From 87e4a06a0fdaf29d2c4ddcf91af0b08985aef778 Mon Sep 17 00:00:00 2001 From: samuido <176191237+rebuildup@users.noreply.github.com> Date: Fri, 16 Oct 2026 09:17:12 +0900 Subject: [PATCH 1/6] fix: do not override native claude in NixOS shell setup --- platforms/nixos/configure-shell.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/platforms/nixos/configure-shell.sh b/platforms/nixos/configure-shell.sh index 83f0ba3d..b8cedd77 100755 --- a/platforms/nixos/configure-shell.sh +++ b/platforms/nixos/configure-shell.sh @@ -26,11 +26,8 @@ if [[ -d "$pc_setup_agent_entry" ]]; then *) export PATH="$pc_setup_agent_entry:$PATH" ;; esac fi -if [[ -x "$pc_setup_agent_entry/mimo" ]]; then - claude() { - "$HOME/.dotfiles/script/agent/mimo" claude "$@" - } -fi +# Native 'claude' stays untouched. Opt-in API accounts use global mise tasks +# installed by dotfiles under ~/.config/mise/conf.d/agent-routes.toml. if command -v wt >/dev/null 2>&1; then eval "$(wt config shell init bash)" From 67238a87fc9059766b929582ad59ef247acd975d Mon Sep 17 00:00:00 2001 From: samuido <176191237+rebuildup@users.noreply.github.com> Date: Fri, 16 Oct 2026 09:17:14 +0900 Subject: [PATCH 2/6] test: verify NixOS shell preserves native Claude Code --- platforms/nixos/verify.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platforms/nixos/verify.sh b/platforms/nixos/verify.sh index c1686a00..c93aae14 100755 --- a/platforms/nixos/verify.sh +++ b/platforms/nixos/verify.sh @@ -112,12 +112,10 @@ else fi shell_init_file="$HOME/.config/pc-setup/shell-init.bash" -if [[ -r "$shell_init_file" ]] && - grep -Fq '.dotfiles/script/agent' "$shell_init_file" && - grep -Fq 'agent/mimo' "$shell_init_file"; then - ok "dotfiles provider entrypoint routing is present in shell init" +if [[ -r "$shell_init_file" ]] && ! grep -Eq 'claude\(\)|agent/mimo.*claude' "$shell_init_file"; then + ok "native claude is not overridden by pc-setup shell init" else - fail "dotfiles provider entrypoint routing is missing from $shell_init_file; rerun platforms/nixos/configure-shell.sh" + fail "pc-setup shell init is missing or overrides native claude; rerun platforms/nixos/configure-shell.sh" fi if [[ -d "$HOME/.local/state/pc-setup/nix-user-baseline/bin" ]]; then From 20eca74c04a1595b6561a458762d8b1ad576eaff Mon Sep 17 00:00:00 2001 From: samuido <176191237+rebuildup@users.noreply.github.com> Date: Fri, 16 Oct 2026 09:22:37 +0900 Subject: [PATCH 3/6] test: verify NixOS shell init no longer forces MiMo into claude --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc75ab57..27415c7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -191,7 +191,8 @@ jobs: grep -Fq 'nix-user-baseline/bin' "$HOME/.config/pc-setup/shell-init.bash" grep -Fq 'wt config shell init bash' "$HOME/.config/pc-setup/shell-init.bash" grep -Fq '.dotfiles/script/agent' "$HOME/.config/pc-setup/shell-init.bash" - grep -Fq 'agent/mimo' "$HOME/.config/pc-setup/shell-init.bash" + ! grep -Fq 'agent/mimo' "$HOME/.config/pc-setup/shell-init.bash" + ! grep -Fq 'claude()' "$HOME/.config/pc-setup/shell-init.bash" # Once Home Manager owns the rc files they are declarative symlinks. # Re-running bootstrap must preserve those links instead of replacing From df946797a8c90d21e45c61fe9fdae8cde6f7a02c Mon Sep 17 00:00:00 2001 From: rebuildup Date: Fri, 16 Oct 2026 13:04:38 +0900 Subject: [PATCH 4/6] docs: point shell init and NixOS docs at the dotfiles agent launcher The dotfiles PR #46 converged the draft global mise tasks into a single declarative config (dotfiles config/agents.toml) plus the unified `agent` launcher. Native `claude` stays untouched (no function, no PATH shim); this branch keeps its CI/verify assertions and only updates the stale commentary that still described delegation and mise tasks. --- platforms/nixos/README.md | 12 ++++++++---- platforms/nixos/configure-shell.sh | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/platforms/nixos/README.md b/platforms/nixos/README.md index 417126e4..d10d74fd 100644 --- a/platforms/nixos/README.md +++ b/platforms/nixos/README.md @@ -288,14 +288,18 @@ gh auth status Claude Code 本体は `mise.global.toml` の portable CLI baseline から導入します。 -provider 接続は machine provisioning ではなく `rebuildup/dotfiles` の Infisical runtime integration が所有します。MiMo 利用時は dotfiles の provider entrypoint 経由で起動します。 +provider 接続は machine provisioning ではなく `rebuildup/dotfiles` の Infisical runtime integration が所有します。 ```bash -claude -# equivalent: ~/.dotfiles/script/agent/mimo claude +claude # official native Claude Code login +agent list # configured harness/provider routes +agent claude openrouter # explicit opt-in API route (dotfiles launcher) +agent opencode zen # free OpenCode Zen models +# MiMo は dotfiles の tuned entrypoint が維持: +~/.dotfiles/script/agent/mimo claude ``` -`~/.config/pc-setup/shell-init.bash` は `~/.dotfiles/script/agent` を PATH 先頭に置き、`mimo` entrypoint が存在する場合に `claude` を process-scoped injection へ委譲します。委譲は shell function と、agent 配下の `claude` PATH shim の両方で行うため、function 未定義のシェルでも素の Claude Code に落ちません。provider URL / model / credential は shell には export されません。 +`~/.config/pc-setup/shell-init.bash` は `~/.dotfiles/script/agent`(provider-tuned entrypoint)を PATH に追加するだけで、`claude` を shell function や PATH shim で委譲しません(native CLI のまま)。provider URL / model / credential を shell に export もしません。代替API route は `agent` launcher(`~/.local/bin/agent`、設定は `~/.dotfiles/config/agents.toml`)が process-scoped に注入します。`agent` 本体は dotfiles の `./script/link` が配置します。 ### OpenCode diff --git a/platforms/nixos/configure-shell.sh b/platforms/nixos/configure-shell.sh index b8cedd77..2637284f 100755 --- a/platforms/nixos/configure-shell.sh +++ b/platforms/nixos/configure-shell.sh @@ -26,8 +26,9 @@ if [[ -d "$pc_setup_agent_entry" ]]; then *) export PATH="$pc_setup_agent_entry:$PATH" ;; esac fi -# Native 'claude' stays untouched. Opt-in API accounts use global mise tasks -# installed by dotfiles under ~/.config/mise/conf.d/agent-routes.toml. +# Native 'claude' stays untouched. Opt-in API routes go through the dotfiles +# `agent` launcher: ~/.local/bin/agent, config ~/.dotfiles/config/agents.toml +# (process-scoped Infisical injection, explicit provider per launch). if command -v wt >/dev/null 2>&1; then eval "$(wt config shell init bash)" From 8f556d32c99b3e81d133fc7ba3e500beac47c2e4 Mon Sep 17 00:00:00 2001 From: rebuildup Date: Sat, 17 Oct 2026 07:07:44 +0900 Subject: [PATCH 5/6] docs(windows-11): document the Bun-based agent launcher for Windows native rebuildup/dotfiles PR #46 moves the unified agent launcher to a single Bun+TypeScript implementation (script/agent.ts) that supports Windows native without Bash/WSL/Python: script/agent.ps1 entry, .cmd shortcuts from config/agents.toml, script/with-secrets.ps1 starting infisical.exe. bun and pwsh are already in the mise bootstrap (mise.global.toml + mandatory package phase) and bun is in the windows-11 verify list. --- platforms/windows-11/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platforms/windows-11/README.md b/platforms/windows-11/README.md index da7d57cd..e7fbcb69 100644 --- a/platforms/windows-11/README.md +++ b/platforms/windows-11/README.md @@ -192,6 +192,17 @@ Windows nativeのsymlink adapterはまだcanonical化していないため、roo 現時点のuser-level agent/dotfiles設定はWSL側をcanonicalとし、Windows native adapter完成後に同じsource of truthを接続する。 +例外として、統一 `agent` ランチャー(rebuildup/dotfiles PR #46)はBun + TypeScriptの単一実装(`script/agent.ts`)でWindows nativeを直接サポートする。symlink不要で、以下で起動できる: + +```powershell +& ~\.dotfiles\script\agent.ps1 check +& ~\.dotfiles\script\agent.ps1 opencode zen -- run "explain this repo" +& ~\.dotfiles\script\agent.ps1 opencode-zen -- run "..." # shortcut form(TOML由来) +& ~\.dotfiles\script\agent.ps1 shortcuts create # ~/.local/bin に最小 .cmd を生成 +``` + +Secret注入は `script/with-secrets.ps1`(`infisical.exe` をWindows nativeで起動)。`config/agents.toml` は全OS共通のsource of truth。引数の忠実な渡し方にはPowerShell 7.3+を推奨(entry scriptが `$PSNativeCommandArgumentPassing = 'Standard'` を設定)。`bun` と `pwsh` はmise bootstrap(`mise.global.toml` / mandatory package)で揃う。 + ## Manual/vendor boundaries 次はpackage presenceだけでは完了しない。 From f89b449a831b24b1faebc596831e9e0ca91f8dc3 Mon Sep 17 00:00:00 2001 From: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 20:47:17 +0900 Subject: [PATCH 6/6] test(nixos): keep asserting the dotfiles agent PATH provision in verify (#104) The override check must not silently drop the provision half of the contract: shell-init.bash still has to expose ~/.dotfiles/script/agent so dotfiles provider entrypoints stay reachable. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- platforms/nixos/verify.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platforms/nixos/verify.sh b/platforms/nixos/verify.sh index c93aae14..23dcd567 100755 --- a/platforms/nixos/verify.sh +++ b/platforms/nixos/verify.sh @@ -112,10 +112,12 @@ else fi shell_init_file="$HOME/.config/pc-setup/shell-init.bash" -if [[ -r "$shell_init_file" ]] && ! grep -Eq 'claude\(\)|agent/mimo.*claude' "$shell_init_file"; then - ok "native claude is not overridden by pc-setup shell init" +if [[ -r "$shell_init_file" ]] && + grep -Fq '.dotfiles/script/agent' "$shell_init_file" && + ! grep -Eq 'claude\(\)|agent/mimo.*claude' "$shell_init_file"; then + ok "dotfiles agent entrypoints are provisioned and native claude is not overridden" else - fail "pc-setup shell init is missing or overrides native claude; rerun platforms/nixos/configure-shell.sh" + fail "pc-setup shell init is missing, lost the dotfiles agent PATH entry, or overrides native claude; rerun platforms/nixos/configure-shell.sh" fi if [[ -d "$HOME/.local/state/pc-setup/nix-user-baseline/bin" ]]; then