zot/examples/extensions
patriceckhart 83b64e2562 examples: scratchpad notes persist to .zot/scratchpad-notes.jsonl
Notes are now project-local and survive zot restarts. The
extension reads its cwd from the hello_ack handshake, then:

  - on /note    appends one line of {"at":..,"text":..} JSONL
                under <cwd>/.zot/scratchpad-notes.jsonl
  - on /notes   reads the in-memory cache (loaded on hello_ack)
  - on /clear-notes truncates the file and clears the cache
  - on read_notes (tool) returns the cached set

Single-writer assumption (one zot session per cwd at a time);
two concurrent zot processes writing to the same file would
interleave but JSONL line boundaries stay intact under POSIX
PIPE_BUF semantics. Good enough for an example.

Verified end-to-end: round 1 writes two notes via the slash
command, round 2 (fresh extension process, same cwd) loads
them and surfaces them via both /notes and the read_notes
tool.
2026-04-19 15:16:06 +02:00
..
clock fix(extensions): route through manager from runSlash default branch 2026-04-19 14:20:22 +02:00
guard feat(extensions): phase 3 — event subscriptions + tool-call interception 2026-04-19 14:57:03 +02:00
hello chore: exclude built extension example binaries from git 2026-04-19 14:10:00 +02:00
scratchpad examples: scratchpad notes persist to .zot/scratchpad-notes.jsonl 2026-04-19 15:16:06 +02:00
weather feat(extensions): phase 2 — extension-defined tools 2026-04-19 14:46:32 +02:00