Snippet

codemode-gatewaysourcetypescript
Path: codemode-gateway/src/types/snippet.tsRelative: src/types/snippet.tsSubproject: codemode-gatewayCategory: codemode-gateway
Lines: 37Bytes: 1,245Imports: 0Exports: 3

Content Preview

  1. /**
  2. * Snippet store types. A snippet is a saved, named sandbox script — the
  3. * gateway's "procedural memory". Stored as JSON in the `SNIPPETS` Workers KV
  4. * namespace (binding created via `wrangler kv namespace create SNIPPETS`),
  5. * keyed by name. Per ADR-2026-07-10-codemode-snippets-kv-not-runtime the
  6. * gateway owns snippets natively (NOT `createCodemodeRuntime`): ~100 lines
  7. * over KV with the exact small-model contract (`codemode.run("name")`).
  8. */
  9. /** Full stored record (the KV value, JSO