diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc75ab5..27415c7 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 diff --git a/platforms/nixos/README.md b/platforms/nixos/README.md index 417126e..d10d74f 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 83f0ba3..2637284 100755 --- a/platforms/nixos/configure-shell.sh +++ b/platforms/nixos/configure-shell.sh @@ -26,11 +26,9 @@ 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 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)" diff --git a/platforms/nixos/verify.sh b/platforms/nixos/verify.sh index c1686a0..23dcd56 100755 --- a/platforms/nixos/verify.sh +++ b/platforms/nixos/verify.sh @@ -114,10 +114,10 @@ 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" + ! grep -Eq 'claude\(\)|agent/mimo.*claude' "$shell_init_file"; then + ok "dotfiles agent entrypoints are provisioned and native claude is not overridden" 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, 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 diff --git a/platforms/windows-11/README.md b/platforms/windows-11/README.md index da7d57c..e7fbcb6 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だけでは完了しない。