// Bun Snapshot v1, https://bun.sh/docs/test/snapshots exports[`Phase 1: CAS Core 1.6 get returns node JSON (snapshot) 1`] = ` { "type": "ASE7K6A0HG8W9", "value": { "payload": { "age": 30, "name": "Alice", }, "type": "7XX5H51CVD9H0", }, } `; exports[`Phase 1: CAS Core 1.9 verify returns ok for valid node 1`] = ` { "type": "8E2M8H30BHXS8", "value": "ok", } `; exports[`Phase 1: CAS Core 1.10 refs lists direct references (snapshot) 1`] = ` "{ "type": "4N5REDA48XYJP", "value": [] }" `; exports[`Phase 1: CAS Core 1.11 walk shows traversal tree (snapshot) 1`] = ` "{ "type": "7124NEATTWYYY", "value": [ "ERARPP19YJT05" ] }" `; exports[`Phase 2: Schema Validation 2.3 put against non-existent schema hash fails 1`] = `"Schema not found: AAAAAAAAAAAAA"`; exports[`Phase 3: Variable System 3.1 var set creates variable 1`] = ` { "type": "AYHQD2YA9G667", "value": { "labels": [], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": {}, "value": "ERARPP19YJT05", }, } `; exports[`Phase 3: Variable System 3.2 var get returns variable 1`] = ` { "type": "BVW2SAJ8606EZ", "value": { "labels": [], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": {}, "value": "ERARPP19YJT05", }, } `; exports[`Phase 3: Variable System 3.3 var list shows all variables 1`] = ` { "type": "3BY1S4RKNMR0P", "value": [ { "labels": [], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": {}, "value": "ERARPP19YJT05", }, ], } `; exports[`Phase 3: Variable System 3.4 var list prefix filters by prefix 1`] = ` { "type": "3BY1S4RKNMR0P", "value": [ { "labels": [], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": {}, "value": "ERARPP19YJT05", }, ], } `; exports[`Phase 3: Variable System 3.5 var set upsert updates existing variable 1`] = ` { "type": "AYHQD2YA9G667", "value": { "labels": [], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": {}, "value": "F68P1BZ46YDXM", }, } `; exports[`Phase 3: Variable System 3.6 var tag adds kv tag and label 1`] = ` { "type": "BKMJ3DJHTS6VB", "value": { "labels": [ "important", ], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": { "env": "prod", }, "value": "ERARPP19YJT05", }, } `; exports[`Phase 3: Variable System 3.7 var list --tag env:prod filters by kv tag 1`] = ` { "type": "3BY1S4RKNMR0P", "value": [ { "labels": [ "important", ], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": { "env": "prod", }, "value": "ERARPP19YJT05", }, ], } `; exports[`Phase 3: Variable System 3.8 var list --tag important filters by label 1`] = ` { "type": "3BY1S4RKNMR0P", "value": [ { "labels": [ "important", ], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": { "env": "prod", }, "value": "ERARPP19YJT05", }, ], } `; exports[`Phase 3: Variable System 3.9 var tag remove deletes label 1`] = ` { "type": "BKMJ3DJHTS6VB", "value": { "labels": [], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": { "env": "prod", }, "value": "ERARPP19YJT05", }, } `; exports[`Phase 3: Variable System 3.10 var delete removes variable 1`] = ` { "type": "ASWN8JEGAG7AP", "value": [ { "labels": [], "name": "myapp/config", "schema": "7XX5H51CVD9H0", "tags": { "env": "prod", }, "value": "ERARPP19YJT05", }, ], } `; exports[`Phase 3: Variable System 3.11 var get deleted variable returns not found 1`] = `"Error: Variable not found: name=myapp/config, schema=7XX5H51CVD9H0"`; exports[`Phase 4: Template System 4.1 template set registers template 1`] = ` { "type": "9YJZ09DDAYAWR", "value": { "contentHash": "FC8WACA792B6F", "schemaHash": "7XX5H51CVD9H0", }, } `; exports[`Phase 4: Template System 4.2 template get returns template text 1`] = ` { "type": "FJG23DR9456WA", "value": "Name: {{ payload.name }}, Age: {{ payload.age }}", } `; exports[`Phase 4: Template System 4.3 template list shows registered templates 1`] = ` { "type": "3JB2JHXHZG2Z1", "value": [ { "contentHash": "FC8WACA792B6F", "schemaHash": "7XX5H51CVD9H0", }, ], } `; exports[`Phase 4: Template System 4.4 template delete removes template 1`] = ` { "type": "0PYGQE16XPM70", "value": { "deleted": true, }, } `; exports[`Phase 4: Template System 4.5 template get deleted template returns not found 1`] = `"Error: Template not found for schema: 7XX5H51CVD9H0"`; exports[`Phase 5: Render 5.1 render fills payload variables 1`] = `"Hello Alice!"`; exports[`Phase 5: Render 5.2 render --resolution with different value 1`] = `"Hello Alice!"`; exports[`Phase 7: Edge Cases 7.1 get non-existent hash errors gracefully 1`] = `"Node not found: AAAAAAAAAAAAA"`; exports[`Phase 7: Edge Cases 7.3 var set empty name errors 1`] = `"Usage: json-cas var set [--tag ...]"`; exports[`Phase 7: Edge Cases 7.4 var set name with invalid chars errors 1`] = `"Error: Invalid variable name "invalid name!": Segment "invalid name!" contains invalid characters (only @, a-z, A-Z, 0-9, ., _, - allowed)"`; exports[`Phase 7: Edge Cases 7.5 no subcommand shows help text 1`] = ` "Usage: json-cas [--store ] [--json] [args] All JSON commands emit a { type, value } envelope. The type is the hash of the command's @output/* schema (shown in parentheses); pipe any envelope into \`render -p\` to render its value (cas_ref hashes are expanded). Commands: put Store node, print envelope (value=hash) (@output/put) get Print node as envelope (@output/get) has Print envelope (value=boolean) (@output/has) verify Verify integrity + schema (value=ok/corrupted/invalid) (@output/verify) refs List direct cas_ref edges (@output/refs) walk [--format tree] Recursive traversal (@output/walk) hash Compute hash without storing (@output/hash) render [options] Render node as text with resolution decay (raw output) render --pipe/-p [options] Render { type, value } from stdin (raw output) list --type List hashes for a type (value=string[]) (@output/list) var set [--tag ...] Create/update a variable (@output/var-set) var get --schema Get a variable by name + schema (@output/var-get) var delete [--schema ] Delete variable(s) (@output/var-delete) var list [prefix] [--schema ] [--tag ...] List variables (@output/var-list) var tag --schema Modify tags/labels (@output/var-tag) template set | --inline Set template for schema (@output/template-set) template get Get template content (value=string) (@output/template-get) template list List all templates (@output/template-list) template delete Delete template for schema (@output/template-delete) gc Run garbage collection (@output/gc) Flags: --store Store directory (default: ~/.uncaged/json-cas) --var-db Variable database path (default: /variables.db) --json Compact JSON output --schema Schema hash filter for var get/delete/tag/list --tag Tag/label (can be repeated): key:value (tag), name (label), :name (delete) --inline Inline text content for template set --resolution Initial resolution for render (default: 1.0) --decay Decay factor for render (default: 0.5) --epsilon Cutoff threshold for render (default: 0.01) --pipe, -p Read { type, value } JSON from stdin for render" `;