diff --git a/.agents/mind/attempts.md b/.agents/mind/attempts.md index 649b652..7450761 100644 --- a/.agents/mind/attempts.md +++ b/.agents/mind/attempts.md @@ -3,5 +3,7 @@ - [2026-11-15] **Approach:** marimo in LXC 501 + Fabric/asyncssh helpers, Claude via marimo's ACP agent panel. **Outcome:** ACP panel superseded by marimo pair; sidebar chat is API-key only. **Now:** dropped. - [2026-11-15] **Approach:** marimo pair (Claude Code CLI in terminal) writing Python notebooks. **Outcome:** worked technically, but notebooks became Python wrappers; commands not readable/copyable, chat only in bottom terminal. **Now:** custom app (ShellBook) with shell-first format. - [2026-11-16] **Approach:** 5 parallel Codex agents in worktrees (core/server/web/terminal/auth) against fixed contracts, orchestrator merges. **Outcome:** worked; conflicts only in app.ts, server package.json, lockfile (regenerate with pnpm install). Integration bugs surfaced only across branches (event order, env var names, auth vs. other tests). **Now:** keep contracts-first + integration test after merge. +- [2026-11-16] **Approach:** first spec delivered config-file-driven host setup (hosts.yaml) and terminal-only Claude. **Outcome:** user expected everything from the UI (servers, passwords/keys, chat, notebook management, setup). **Now:** UI-first invariant in AGENTS.md; #7–#10 delivered via 4 parallel Codex delegates + orchestrator review fixes. +- [2026-11-16] **Approach:** reuse old marimo CT 501 for ShellBook, keeping the existing `claude` login (scratch `reuse-ct.sh`: snapshot `pre-shellbook`, copy ~/.claude to shellbook user). **Outcome:** two deploy bugs (TUN dev0 conflict, PATH/uid in pct exec) fixed in df489fa/4fe7e4e. **Now:** rerun update on CT 501. ## Archive diff --git a/.agents/mind/gotchas.md b/.agents/mind/gotchas.md index 441eea2..1f4f08b 100644 --- a/.agents/mind/gotchas.md +++ b/.agents/mind/gotchas.md @@ -9,5 +9,10 @@ - [2026-11-16] **Notebook root symlinks (#9):** validating only child components after realpath(root) permits a symlinked notebooks root. Notebook reads and mutations validate the root itself before walking children; regression-covered. Workspace CLI/filesystem writers remain trusted against concurrent path swaps. - [2026-11-16] **Chat CLI permissions (#8):** allowedTools only auto-approves; tools + restricted mode (2.1.248+) enforce the file/tool boundary. Synthetic fixture tests never invoke the real CLI; deployment must verify installed-version/login compatibility. +- [2026-11-16] **`pct exec` PATH** is `/sbin:/bin:/usr/sbin:/usr/bin` (no /usr/local/bin) and root `tar` keeps archive uids; install/update scripts set PATH and use `tar --no-same-owner`. Deploy tests in `deploy/test/`. +- [2026-11-16] **CT TUN passthrough:** a CT with manual `lxc.mount.entry` for /dev/net/tun fails to start if `devN: /dev/net/tun` is added too (autodev hook status 17); `ct-config.sh has_tun_passthrough` detects both forms. +- [2026-11-16] **Path conventions:** web/API notebook paths are relative to `notebooks/`; chat protocol paths are workspace-relative (`notebooks/...`). Convert at the ChatPanel boundary. +- [2026-11-16] **Watcher timing tests:** full parallel test run on Windows delays fs events >100 ms; keep watcher test debounce/quiet windows generous. +- [2026-11-16] **HTTP errors:** server httpError messages (4xx/502/503) are user-facing and shown by the web client; 500 messages are not. Keep 4xx/502 messages free of secrets. ## Archive diff --git a/.agents/mind/index.md b/.agents/mind/index.md index 0a25f9a..579d3b9 100644 --- a/.agents/mind/index.md +++ b/.agents/mind/index.md @@ -2,8 +2,8 @@ > Always-loaded. Everything else is on-demand. Update TOC when files change. ## Current Focus -- [2026-11-16] M0–M3 done and closed (#1–#4); M4 (#5) and M5 (#6) code merged, issues open pending Linux verification. -- [2026-11-16] Next: first deploy to CT 501 (deploy/README.md), then verify tmux + `claude` live-reload loop there and close #5/#6. +- [2026-11-16] M0–M3 (#1–#4) and the UI-first follow-ups (#7 hosts/credentials, #8 chat, #9 notebook management, #10 settings/setup) closed. +- [2026-11-16] Open: #5/#6 need a real CT 501 deploy (update.sh, setup token, real SSH run, tmux terminal). Not yet verified in a real browser or against real OpenSSH. ## Invariants - Displayed script == executed script (one substitution path). @@ -12,9 +12,10 @@ - Strict SSH host key checking with explicit TOFU. - `check` steps are side-effect free. - Notebooks stay plain, readable Markdown. +- Everything doable from the web UI; files are storage, not the only way in. ## Table of Contents - `architecture.md` — 8 entries — why custom app, stack, AI integration, workspace split -- `attempts.md` — 2 entries — marimo + marimo-pair trial and why it was dropped -- `open.md` — 2 entries — open design questions -- `gotchas.md` — 6 entries — integration foot-guns (CRLF scripts, host-key event order, tmux vs systemd, env names) +- `attempts.md` — 4 entries — marimo + marimo-pair trial and why it was dropped +- `open.md` — 2 entries — open design questions (sudo password, chat history) +- `gotchas.md` — 11 entries — integration foot-guns (CRLF, host-key events, tmux/systemd, env names, pct exec PATH, TUN, chat paths, watcher timing) diff --git a/.agents/mind/open.md b/.agents/mind/open.md index ed4d138..174ca34 100644 --- a/.agents/mind/open.md +++ b/.agents/mind/open.md @@ -1,6 +1,6 @@ # Open Questions -- [2026-11-15] Optional chat-style UI (stream-json headless `claude`) in addition to the terminal? Would bill to the Agent SDK credit on subscriptions — decide after M4. +- [2026-11-16] Chat panel stores only conversation titles + CLI session ids; restore message history after reload (from CLI transcripts) or keep it ephemeral? - [2026-11-15] sudo with password (`type: secret` + `sudo -S`) or require NOPASSWD sudo only? Spec v0.1: `sudo -n` only. ## Archive diff --git a/AGENTS.md b/AGENTS.md index 95a19a0..c43da56 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,6 +10,10 @@ hosts over SSH. Spec: `docs/spec.md` — read it before any design change. ## Invariants +- **Everything is doable from the web UI**: servers and their SSH passwords/keys, + notebooks, chatting with Claude, setup and password. Files (hosts.yaml, Markdown, + git) remain the storage format, never the only way in. + - **The displayed script is the executed script.** Rendering and execution use the same substitution result; never build a second, hidden command string. - **All shell quoting goes through `packages/core` `shellQuote`.** No ad-hoc escaping anywhere.