Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions platforms/nixos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 3 additions & 5 deletions platforms/nixos/configure-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
6 changes: 3 additions & 3 deletions platforms/nixos/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions platforms/windows-11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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だけでは完了しない。
Expand Down