feat(booterm): structured pty_exited WS notifications. Plan-validated, impl-validated, code-reviewed green (contracts build clean, contracts test 29/29, booterm + web typecheck clean). wip: in-progress inference/provider refactor (agents.ts, provider.ts, new llama-providers.ts, removed llama-args-validator), plus arena, dispatcher, compaction, schema changes. openspec: pty-exit-notifications complete; x-agent-flags planned (not yet implemented).
2.2 KiB
2.2 KiB
Tasks — BooControl SSH editor verb-mode + model pull
T1 — schema
apps/control/src/schema.sql:ALTER TABLE control_hosts ADD COLUMN IF NOT EXISTS ssh_mode TEXT NOT NULL DEFAULT 'shell'. Verify:pnpm -C apps/control build.
T2 — RemoteOps seam (shell + wrapper)
- In
ssh-config.tsadd theRemoteOpsinterface +shellOps(target, configPath, exec)(current command strings) +wrapperOps(target, exec)(verbsread/backup/write/restart). Verify: existingssh-config.test.tsstill green.
T3 — thread mode through the pipeline
readRemoteConfigandapplyRemoteConfigacceptmode: 'shell'|'wrapper'(default'shell') and select ops.applyRemoteConfigbackup uses the ops' returned path. Verify:pnpm -C apps/control test(ssh-config shell-mode unchanged).
T4 — wrapper-mode tests
- Add tests: wrapper ops emit
read/backup/write(stdin)/restartverbs;applyRemoteConfig({mode:'wrapper'})reads the backup path from thebackupverb's stdout; failure at each step reported. Verify:pnpm -C apps/control test.
T5 — model pull job
services/model-pull.ts:runModelPullwith server-side repo-id validation, wrapperpull <repo>verb (shell fallback using amodels_dir),control_job(jobTypeaction,detail.kind='pull') progress. Verify:model-pull.test.ts(validation accept/reject + verb emission).
T6 — routes
routes/ssh-config.ts: acceptsshModeinPATCH /api/hosts/:id; pass each host'sssh_modeinto read/diff/apply; addPOST /api/hosts/:id/pull {repo}(202, non-blocking). Verify:pnpm -C apps/control build.
T7 — UI
HostConfigEditor.tsx: SSH-mode selector (shell/wrapper) in the settings form; a "Pull model" repo input + button that POSTs and surfaces job status. Verify:npx tsc -p apps/web/tsconfig.app.json --noEmit.
T8 — gates
- Full gates: control build + test, web tsc. Verify each command above passes.
Deferred (YAGNI)
- Dedicated
control_jobjobTypepull(reuseaction). Reopen trigger: pull needs distinct UI filtering from other actions. huggingface-cliprogress-percent parsing. Reopen trigger: operators want a progress bar rather than streamed lines.