Store
Path:
codemode-gateway/src/snippets/store.tsRelative: src/snippets/store.tsSubproject: codemode-gatewayCategory: codemode-gatewayLines: 137Bytes: 4,804Imports: 2Exports: 6
Content Preview
- import { normalizeCode } from "@cloudflare/codemode";
- import type { Env, Snippet, SnippetSummary } from "../types";
- /**
- * The gateway-native snippet store over the `SNIPPETS` KV namespace
- * (per ADR-2026-07-10-codemode-snippets-kv-not-runtime). Snippets are the
- * gateway's "procedural memory": named, described, discoverable sandbox
- * scripts that already ran and worked. The store owns name validation and the
- * canonicalization step; `codemode.run` (in `src/registry.ts`) owns execution.
- *