The service stays unprivileged: POST /api/settings/update only writes the
update-request file in the data directory, which a root-owned path unit
watches. Status comes from systemctl show and the root-owned update log;
the check fetches the tracked branch into FETCH_HEAD and lists new commits.
A notebook can include another one and continue with what it produced:
- core: parse :::when{param=a,b}, ::use{notebook= as= with=} and
::host{name= address= user= port= capture=}; composeNotebook namespaces
an included notebook's params, steps, captures and templates by alias
(cycles, missing files, depth > 4 and child errors are reported on the
use line). Defaults may reference captures and builtins
({{shellbook.public_key}}); required params and secrets gate only steps
of their own scope; secretEnv passes a scope's secrets under local names.
- protocol: NotebookResponse gains includes and builtins.
- server: compose includes on load, inject builtins (client values are
ignored), refuse steps in inactive when sections.
- web: render when/use/host blocks, group included params in the form,
add a created machine to Hosts and capture its name, reload when an
included notebook changes, run all checks only for active steps,
authoring snippets for when, use and host.
The bundled server crashed at startup with "Named export 'utils' not
found": ssh2 is CommonJS and Node's ESM loader does not expose `utils`
as a named export. Vitest resolves the module differently, so the unit
tests passed. Import ssh2 through its default export instead.
New test builds the bundle with the package's own esbuild command and
starts it with Node until /api/health answers.
Test connection, key installation and runs now tell authentication
failures apart from unreachable hosts (refused, timeout, DNS, ...)
instead of a generic "SSH connection failed".
The web client keeps the server's deliberate error messages (4xx,
502, 503) and shows them in the hosts page; unexpected 500 errors
still show only the status. The reload hint appears only on 409
conflicts.
Reading, saving, renaming and deleting applied the create-time name rules
to existing files, so notebooks named outside those rules (umlauts,
brackets; written by git or Claude) were listed but returned 400. Name rules
now apply to new paths only; existing paths keep the traversal/symlink checks.
Empty-folder pruning compared a realpath against an unresolved root. With a
symlinked workspace path it walked past notebooks/ and removed the
notebooks folder itself. It now uses the resolved root and stops at it.
Add atomic, versioned notebook mutations, a searchable folder tree, and editor insertion forms. Validate notebook paths and symlink roots and retain drafts after external changes.
Add yaml as a direct web dependency, reusing the existing workspace library for comment-preserving frontmatter edits.
A non-zero exit is a normal result (a failed check shows as a cross), not an execution error; publishing run.error showed an error banner for every failed check.
Integrate auth, config, watcher and terminal wiring in buildApp: auth guards every API route by default, notebook watcher events feed the /api/events hub, the terminal runs in the configured workspace, and SHELLBOOK_DATA_DIR is the single data directory variable. The systemd unit uses KillMode=process so tmux sessions survive service restarts.
Protect HTTP and WebSocket API routes with scrypt password login and signed persistent sessions. Restrict forwarded identity and HTTPS detection to configured proxies, and serve optional web assets with SPA fallback.
Add @fastify/static for Fastify-compatible static file handling and esbuild to bundle TypeScript core source while retaining native dependencies externally.
Use node-pty for native terminal support and chokidar for recursive cross-platform watching with atomic-save normalization. Validate terminal messages, detach clients safely, and expose debounced typed notebook events.
Shared notebook model (types.ts), HTTP/WebSocket protocol (protocol.ts) and
core function signatures (stubs) so core, server and web can be built in
parallel. Minimal Fastify server with a health route and test.