From 276d6ef3ca53e021911529844dfcc2d3d7c4a372 Mon Sep 17 00:00:00 2001 From: Florian Schmidt Date: Mon, 16 Nov 2026 11:42:50 +0100 Subject: [PATCH] docs(mind): record chained notebook decisions (#11) --- .agents/mind/architecture.md | 2 ++ .agents/mind/gotchas.md | 2 ++ .agents/mind/index.md | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.agents/mind/architecture.md b/.agents/mind/architecture.md index d375ca0..125a4cd 100644 --- a/.agents/mind/architecture.md +++ b/.agents/mind/architecture.md @@ -12,5 +12,7 @@ - [2026-11-16] **Notebook management (#9):** a shared mutation queue serializes saves/create/move/duplicate/delete. Exclusive hard-link publication prevents target replacement; saves use temp+rename. The recursive watcher updates lists; deleted open drafts are retained. Frontmatter helpers use YAML document nodes. - [2026-11-16] **Host credentials (#7):** write-only AES-256-GCM files under dataDir, host-name AAD; shared SSH connect selects per-host password/key. ssh2 1.17.0 has no client user-certificate pairing API. Hosts plugin owns management routes and preserves inventory comments/version checks. - [2026-11-16] **Deploy/update:** host one-liner `bootstrap.sh` (temp dir, nothing left on host); `install.sh` is install-or-update; root-owned `shellbook-update` fetches the installer over HTTPS because root must never run code from the service-user-writable `/opt/shellbook`. +- [2026-11-16] **Chained notebooks (#11):** `::use` is flattened in core (`composeNotebook`): alias-prefixed params/ids/captures with `scope`, so render/run keep one notebook model and one substitution path. Server loads files and injects builtins (`shellbook.*`, server-only); `:::when` gates display and execution; `::host` adds to Hosts via the host-management API. Required params/secrets gate only their own scope, identically in core render and server `prepareRun`. +- [2026-11-16] **Template delivery:** `install.sh` offers each shipped notebook template once (`/etc/shellbook/templates-offered`), copied as the service user, never overwriting or restoring deleted files. ## Archive diff --git a/.agents/mind/gotchas.md b/.agents/mind/gotchas.md index 10681ed..d3c100a 100644 --- a/.agents/mind/gotchas.md +++ b/.agents/mind/gotchas.md @@ -15,5 +15,7 @@ - [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. - [2026-11-16] **CJS named imports in the bundle:** `import { utils } from "ssh2"` passes Vitest but crashes `node dist/main.js`; import CommonJS packages via default export. `test/bundle.test.ts` starts the real bundle. +- [2026-11-16] **Capture defaults deadlock if required in the same scope:** a required param whose default waits for a capture of its own notebook blocks the step producing it. Make such params optional (e.g. `ctid: default "{{nextid}}"`). +- [2026-11-16] **Bash tool heredocs with apostrophes fail** in this harness ("unexpected EOF"); write scripts to the scratchpad and run them instead. ## Archive diff --git a/.agents/mind/index.md b/.agents/mind/index.md index 9d067ac..6d1bb41 100644 --- a/.agents/mind/index.md +++ b/.agents/mind/index.md @@ -2,7 +2,7 @@ > Always-loaded. Everything else is on-demand. Update TOC when files change. ## Current Focus -- [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] M0–M3 (#1–#4), UI-first follow-ups (#7–#10) and chained notebooks (#11: when/use/host, LXC + web-server templates) closed. - [2026-11-16] Open: #5/#6 need a real CT 501 deploy (bootstrap.sh one-liner, setup token, real SSH run, tmux terminal). Not yet verified in a real browser or against real OpenSSH. ## Invariants @@ -15,7 +15,7 @@ - Everything doable from the web UI; files are storage, not the only way in. ## Table of Contents -- `architecture.md` — 11 entries — why custom app, stack, AI integration, workspace split, deploy/update +- `architecture.md` — 13 entries — why custom app, stack, AI integration, workspace split, deploy/update, chained notebooks, template delivery - `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` — 13 entries — integration foot-guns (CRLF, host-key events, tmux/systemd, env names, pct exec PATH, TUN, chat paths, watcher timing) +- `gotchas.md` — 15 entries — integration foot-guns (CRLF, host-key events, tmux/systemd, env names, pct exec PATH, TUN, chat paths, watcher timing, capture-default deadlock, heredocs)