Commit Graph
4 Commits
Author SHA1 Message Date
Florian Schmidt 382da1736f fix(core): keep unset values visible in prose (#12)
renderText now leaves {{name}} in place when the value is empty, so prose
shows which parameter is still missing instead of a blank.
2026-11-16 12:31:54 +01:00
Florian Schmidt 845d6c828e feat: chained notebooks with when sections and host blocks (#11)
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.
2026-11-16 11:42:12 +01:00
Florian Schmidt c993089f37 fix(core): normalize CRLF line endings in step scripts (#1)
Bash treats a trailing carriage return as part of the command, so notebooks saved with CRLF endings produced broken scripts.
2026-11-16 00:06:28 +01:00
Florian Schmidt f0d5de691a feat(core): implement notebook parsing and safe parameter rendering (#1)
Parse YAML frontmatter, shell steps and conditional sections with source ranges and diagnostics. Resolve typed defaults and runtime values through one script substitution path, keeping secrets env-only and validating artifact metadata.

Add yaml for standards-compliant frontmatter parsing and bounded alias handling rather than implementing YAML locally. Cover the spec example and edge cases with 59 core tests, including 256 POSIX shell quoting round trips.
2026-11-16 00:05:27 +01:00