@altopelago/sansa 0.9.1 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -1
- package/README.md +13 -5
- package/conformance/cts-claims.json +4 -4
- package/docs/api-contract.md +41 -22
- package/docs/capabilities.json +40 -2
- package/docs/instruction-tool.md +4 -0
- package/docs/query-tool.md +28 -8
- package/fixtures/address-v1.json +9 -9
- package/fixtures/query-inventory.aeon +2 -2
- package/fixtures/query-inventory.json +4 -4
- package/fixtures/query-inventory.telex.aes +571 -0
- package/package.json +1 -1
- package/scripts/instruction.mjs +3 -3
- package/scripts/query-web.mjs +2 -1
- package/scripts/query.mjs +14 -9
- package/scripts/validate-cts-claims.mjs +22 -11
- package/src/index.d.ts +171 -2
- package/src/index.js +517 -22
- package/stress-tests/address/valid.sansa-cases +3 -3
- package/tools/mutate-web/app.js +26 -6
- package/tools/mutate-web/index.html +6 -1
- package/tools/mutate-web/runtime.mjs +314 -16
- package/tools/query-web/app.js +24 -5
- package/tools/query-web/index.html +4 -0
- package/tools/query-web/runtime.mjs +407 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,65 @@ versions may still include breaking changes when the SANSA specifications move.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## 0.10.1 - 2026-09-11
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added direct complete `telex.aes` input to the Query CLI and browser
|
|
15
|
+
workbench. The adapter preserves portable paths, record order, structural
|
|
16
|
+
identities, datatype components, flat attributes, and expanded node heads
|
|
17
|
+
without reconstructing the AEON parser AST.
|
|
18
|
+
- Added a conservative Telex target surface and Mutate Workbench source mode.
|
|
19
|
+
Exact scalar replacement now re-emits complete Telex while retaining event
|
|
20
|
+
order, paths, identities, datatype components, and flat attributes. Changed
|
|
21
|
+
events discard stale origin/span coordinates; structural rewrites fail closed
|
|
22
|
+
pending a portable path-rewrite contract. The Instruction CLI can select the
|
|
23
|
+
same representability surface with `--target telex` or `--target telex.aes`.
|
|
24
|
+
- Preserved structural identity as opaque binding metadata throughout SANSA
|
|
25
|
+
resolution without using identity to construct or compare addresses.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Accepted exact normative representation names such as `NodeLiteral` and
|
|
30
|
+
`NodeHead` in `%kind` filters while retaining existing lower-first matching
|
|
31
|
+
for compatible host namespaces.
|
|
32
|
+
- Kept representation-kind filters on the ordinary identifier grammar and
|
|
33
|
+
rejected the obsolete hyphenated `%node-head` spelling.
|
|
34
|
+
- Aligned portable AES node-navigation fixtures with the explicit
|
|
35
|
+
`NodeLiteral` → `NodeHead` → content hierarchy.
|
|
36
|
+
|
|
37
|
+
## 0.10.0 - 2026-09-01
|
|
38
|
+
|
|
39
|
+
### Breaking
|
|
40
|
+
|
|
41
|
+
- Renamed the AEON temporal literal family from `zrut` to `wtc` across query,
|
|
42
|
+
instruction, mutation, workbench, fixture, declaration, and documentation
|
|
43
|
+
surfaces.
|
|
44
|
+
- Changed qualifier datatype clarifiers to one bracketed list. String
|
|
45
|
+
clarifiers must now be quoted, multiple values use comma separation inside
|
|
46
|
+
the same brackets, and numeric clarifiers such as `radix[16]` are represented
|
|
47
|
+
as numbers. Repeated clarifier lists and unquoted string clarifiers are
|
|
48
|
+
rejected.
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- Added experimental `traverseGraph(...)` and `traverseGraphSequence(...)`
|
|
53
|
+
APIs for declared, directed relationship traversal with ordered path
|
|
54
|
+
provenance.
|
|
55
|
+
- Added experimental graph capability metadata covering schema-version
|
|
56
|
+
applicability, semantic-type constraints, edge cardinality, cycle policy,
|
|
57
|
+
authorization hooks, and explicit traversal budgets.
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- Updated address, instruction, mutation, query, fixture, stress, and API
|
|
62
|
+
contract surfaces to use the unified AEON datatype clarifier grammar.
|
|
63
|
+
|
|
64
|
+
### Security
|
|
65
|
+
|
|
66
|
+
- Graph traversal requires explicit budgets and applies an independent
|
|
67
|
+
authorization decision to every traversal step without granting authority to
|
|
68
|
+
composed Query reads.
|
|
11
69
|
|
|
12
70
|
## 0.9.1 - 2026-08-02
|
|
13
71
|
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ CTS snapshot claims are recorded in [conformance/cts-claims.json](conformance/ct
|
|
|
28
28
|
- SANSA.Query evaluation for `from`, Boolean `where`, `order by`, `offset`, `limit`, and `select` over literals, resolution expressions, comparisons, Boolean operators, membership, cardinality predicates, built-in string functions, function-like operators, and projection expressions
|
|
29
29
|
- experimental SANSA.Mutate structured planning for exact `create`, `replace`, `remove`, ordered `insert`, and same-container `move`
|
|
30
30
|
- experimental SANSA.Mutate value-intent preservation and operation, precondition, and value budgets
|
|
31
|
-
- experimental SANSA.Mutate target-surface validation for AEON, JSON-compatible, and custom target representability checks
|
|
31
|
+
- experimental SANSA.Mutate target-surface validation for AEON, JSON-compatible, Telex scalar replacement, and custom target representability checks
|
|
32
32
|
- experimental workbench-only SANSA.Mutate policy plan filter for trusted consumer authorization tests
|
|
33
33
|
- experimental mutation apply through explicit host mutation hooks with stale-target checks
|
|
34
34
|
- experimental SANSA.Instruction parsing, candidate-relative lowering, and mutation-planner bridging for conservative mutation verbs
|
|
@@ -61,7 +61,7 @@ The Instruction and Mutate CTS lanes are experimental and are not included in `n
|
|
|
61
61
|
## Query Tool
|
|
62
62
|
|
|
63
63
|
The package includes a standalone query tool for exercising SANSA.Query against
|
|
64
|
-
AEON source or a host-neutral JSON namespace fixture:
|
|
64
|
+
AEON source, portable Telex AES, or a host-neutral JSON namespace fixture:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
npm run query -- --query 'from $.inventory.items.* where contains(.sku, "B") select .sku'
|
|
@@ -70,7 +70,9 @@ npm run query -- --query 'from $.inventory.items.* where contains(.sku, "B") sel
|
|
|
70
70
|
The default CLI fixture is [fixtures/query-inventory.json](fixtures/query-inventory.json),
|
|
71
71
|
which keeps `sansa-query` self-contained after package install. `.aeon` fixture
|
|
72
72
|
support is optional and uses an AEON TypeScript Core runtime when one is
|
|
73
|
-
available.
|
|
73
|
+
available. `.telex.aes` fixture support uses the optional
|
|
74
|
+
`@altopelago/aeon-aes` runtime and projects complete portable records directly
|
|
75
|
+
into a SANSA namespace without rebuilding an AEON parser AST.
|
|
74
76
|
|
|
75
77
|
For browser-based technical testing, run the Query Workbench:
|
|
76
78
|
|
|
@@ -88,15 +90,21 @@ npm run mutate:web
|
|
|
88
90
|
|
|
89
91
|
Then open `http://127.0.0.1:4173/tools/mutate-web/`.
|
|
90
92
|
|
|
91
|
-
The Mutate Workbench accepts either structured mutation-request JSON or
|
|
93
|
+
The Mutate Workbench accepts AEON source or complete portable Telex AES plus either structured mutation-request JSON or
|
|
92
94
|
proposal-stage SANSA Instruction source, then uses the same plan/apply preview
|
|
93
95
|
surface. It also includes an experimental target selector so planned mutations
|
|
94
|
-
can be checked against AEON
|
|
96
|
+
can be checked against AEON, JSON-compatible, or Telex representation surfaces before
|
|
95
97
|
apply/render. JSON responses include `targetProfile` metadata that names the
|
|
96
98
|
selected representability boundary. Its phase model is intentionally explicit: parse Instruction
|
|
97
99
|
source when present, lower to exact structured mutation operations, plan through
|
|
98
100
|
SANSA.Mutate, run optional consumer policy, run optional target-surface
|
|
99
101
|
validation, then preview or apply through host mutation hooks.
|
|
102
|
+
Telex apply currently supports replacement of existing scalar events only. It
|
|
103
|
+
re-emits a complete Telex stream without reconstructing AEON source, preserves
|
|
104
|
+
event order, path, structural identity, datatype components, and separate
|
|
105
|
+
attribute events, and clears stale `origin`/`span` coordinates on the changed
|
|
106
|
+
event. Structural operations remain explicit target-surface failures until a
|
|
107
|
+
portable path-rewrite contract is defined.
|
|
100
108
|
The optional policy panel is a workbench-only prototype of the experimental
|
|
101
109
|
`sansa.mutate.policy.planFilter` slice for trusted consumer authorization tests;
|
|
102
110
|
its current boundary is documented in
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"claim_format": "aeonite.cts-claims.v1",
|
|
3
3
|
"repository": "AltoPelago/sansa",
|
|
4
4
|
"implementation": "@altopelago/sansa",
|
|
5
|
-
"implementation_version": "0.
|
|
5
|
+
"implementation_version": "0.10.1",
|
|
6
6
|
"cts_repository": "aeonite-org/aeonite-cts",
|
|
7
7
|
"cts_protocol": "cts.protocol.v1",
|
|
8
8
|
"claims": [
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"surface": "sansa-query-parser",
|
|
29
|
-
"snapshot_id": "sansa-query-parser-cts-v1-snapshot-0.
|
|
29
|
+
"snapshot_id": "sansa-query-parser-cts-v1-snapshot-0.2",
|
|
30
30
|
"status": "claimed",
|
|
31
31
|
"command": "npm run cts:query",
|
|
32
32
|
"notes": "The default command excludes experimental extension cases."
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"surface": "sansa-query-experimental",
|
|
36
|
-
"snapshot_id": "sansa-query-parser-cts-v1-snapshot-0.
|
|
36
|
+
"snapshot_id": "sansa-query-parser-cts-v1-snapshot-0.2",
|
|
37
37
|
"status": "experimental",
|
|
38
38
|
"command": "npm run cts:query:experimental"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"surface": "sansa-instruction",
|
|
42
|
-
"snapshot_id": "sansa-instruction-cts-v1-snapshot-0.
|
|
42
|
+
"snapshot_id": "sansa-instruction-cts-v1-snapshot-0.2",
|
|
43
43
|
"status": "experimental",
|
|
44
44
|
"command": "npm run cts:instruction"
|
|
45
45
|
},
|
package/docs/api-contract.md
CHANGED
|
@@ -332,6 +332,7 @@ Resolve invariants:
|
|
|
332
332
|
- Current bindings are processed in Binding Set order.
|
|
333
333
|
- Per-binding results are appended in deterministic local structural order.
|
|
334
334
|
- Resolve does not implicitly deduplicate bindings; repeated traversal routes may produce repeated binding occurrences.
|
|
335
|
+
- Resolve returns the original host bindings rather than reconstructed copies. Opaque occurrence metadata such as an AES `identity` is therefore preserved, but selectors, ordering, multiplicity, and canonical addresses never derive from that identity.
|
|
335
336
|
- A supported selector that is structurally inapplicable to one input binding produces no bindings for that branch.
|
|
336
337
|
- Unsupported or forbidden operations fail explicitly.
|
|
337
338
|
- Every output binding is expected to retain a canonical address when the host adapter exposes one.
|
|
@@ -408,7 +409,7 @@ If mutation targets parse successfully but produce SANSA portability warnings, s
|
|
|
408
409
|
|
|
409
410
|
Mutation plans are current-process execution artifacts, not portable serialized plan documents. A plan retains live binding objects supplied by the resolver, along with local adapter artifacts such as `bindingHandle` and `observedState`. These fields are for same-process continuity checks and diagnostics. Do not `JSON.stringify` a plan and replay it later or in another implementation; cloned or serialized plans cannot prove live binding continuity and should fail apply-time stale-target checks. A portable mutation-plan serialization format may be defined by a later profile.
|
|
410
411
|
|
|
411
|
-
For scalar values, the workbench adapter treats `kind` as the AEON literal family when one is provided. Known scalar families include `string`, `number`, `boolean`, `toggle`, `hex`, `radix`, `encoding`, `separator`/`sep`, `sansa`, `date`, `time`, `datetime`, `
|
|
412
|
+
For scalar values, the workbench adapter treats `kind` as the AEON literal family when one is provided. Known scalar families include `string`, `number`, `boolean`, `toggle`, `hex`, `radix`, `encoding`, `separator`/`sep`, `sansa`, `date`, `time`, `datetime`, `wtc`, `null`, `nan`, `infinity`, `cloneReference`, and `pointerReference`. JSON payloads omit AEON sigils: `kind: "hex"` with `"ff00aa"` renders `#ff00aa`; `kind: "sep"` with `"0.11.0"` renders `^0.11.0`; `kind: "null"` with `"notApplicable"` renders `!notApplicable`; and `kind: "cloneReference"` with `"target"` renders `~target`. The adapter rejects payloads that cannot be rendered as the requested known AEON literal family. Unknown custom `kind` values remain adapter-visible metadata and are not interpreted by the core planner.
|
|
412
413
|
|
|
413
414
|
Experimental Mutate budgets are optional and fail closed:
|
|
414
415
|
|
|
@@ -504,7 +505,7 @@ Successful apply returns one result record per applied operation. Result records
|
|
|
504
505
|
|
|
505
506
|
If a mutation hook rejects or throws during consumer-selected non-atomic apply, the result is `ok: false` with `SANSA_MUTATE_APPLY_FAILED`. `operationResults` may contain records for hooks that already completed before the failure. This must not be interpreted as full plan success; rollback, transactionality, retries, and compensation remain adapter or consumer responsibilities.
|
|
506
507
|
|
|
507
|
-
The Mutate Workbench JSON response includes a compact `affectedBinding` summary for each applied operation.
|
|
508
|
+
The Mutate Workbench JSON response includes a compact `affectedBinding` summary for each applied operation. It preserves `identity`, `semanticType`, split `datatype` / `generics` / `clarifiers`, `representationKind`, `scalarKind`, `nullReason`, `nodeTag`, `origin`, `span`, and a JSON-safe `value` where available, so tools can inspect applied literal-family and portable AES metadata without parsing the rendered Source Result text. Fields unavailable on a host binding remain absent.
|
|
508
509
|
|
|
509
510
|
This API does not authorize operations, validate proposed values against
|
|
510
511
|
schemas, follow references implicitly, or provide storage transactions.
|
|
@@ -567,8 +568,8 @@ Options:
|
|
|
567
568
|
|
|
568
569
|
- `--query`, `-q`: query source
|
|
569
570
|
- `--query-file`: read query source from a file
|
|
570
|
-
- `--fixture`, `-f`: AEON or JSON namespace fixture, defaulting to `fixtures/query-inventory.json`
|
|
571
|
-
- `--fixture-kind`: force fixture kind as `aeon` or `json`; otherwise inferred from the file extension
|
|
571
|
+
- `--fixture`, `-f`: AEON, Telex AES, or JSON namespace fixture, defaulting to `fixtures/query-inventory.json`
|
|
572
|
+
- `--fixture-kind`: force fixture kind as `aeon`, `telex`, or `json`; otherwise inferred from the file extension
|
|
572
573
|
- `--params`: JSON params mounted at `$.<"params">`
|
|
573
574
|
- `--params-file`: read JSON params from a file and mount them at `$.<"params">`
|
|
574
575
|
- `--mode`: `evaluate` or `parse`
|
|
@@ -580,9 +581,9 @@ Options:
|
|
|
580
581
|
- `--max-order-candidates`: fail if order by would sort more than this many candidates
|
|
581
582
|
- `--max-result-records`: fail if select would produce more than this many result records
|
|
582
583
|
|
|
583
|
-
The default CLI fixture is JSON so `sansa-query` can run without optional host integrations after package install. AEON fixtures are compiled with an optional AEON TypeScript Core runtime and adapted into a SANSA resolver namespace. JSON fixture bindings remain host-neutral objects. The built-in JSON adapter reads `root`, `children`, `attributeSpace` or `attributes`, `localSpaces`, and scalar values through `value` or `scalar`.
|
|
584
|
+
The default CLI fixture is JSON so `sansa-query` can run without optional host integrations after package install. AEON fixtures are compiled with an optional AEON TypeScript Core runtime and adapted into a SANSA resolver namespace. Telex fixtures use an optional AEON AES runtime and adapt complete portable records directly, preserving flat attributes, structural identities, datatype components, record order, and expanded node heads. Partial streams require external state and are rejected by this adapter. JSON fixture bindings remain host-neutral objects. The built-in JSON adapter reads `root`, `children`, `attributeSpace` or `attributes`, `localSpaces`, and scalar values through `value` or `scalar`.
|
|
584
585
|
|
|
585
|
-
AEON fixture support is optional. The tool resolves AEON Core from `SANSA_AEON_CORE_MODULE`, from an installed `@altopelago/aeon-core` visible to the calling project, or from the sibling aeon-family development workspace path. JSON fixtures and Query parsing
|
|
586
|
+
AEON fixture support is optional. The tool resolves AEON Core from `SANSA_AEON_CORE_MODULE`, from an installed `@altopelago/aeon-core` visible to the calling project, or from the sibling aeon-family development workspace path. Telex support resolves the AES codec from `SANSA_AEON_AES_MODULE`, an installed `@altopelago/aeon-aes`, or the corresponding sibling development build. JSON fixtures and Query parsing require neither runtime.
|
|
586
587
|
|
|
587
588
|
Params may be supplied either as a full local-space fixture binding with `children`, or as a simple object map. Structured SANSA Address Literal values use `{ "type": "SansaAddressLiteral", "address": "..." }`; these are preserved as `sansa` bindings so query expressions can activate them with `path(...)`.
|
|
588
589
|
|
|
@@ -592,10 +593,11 @@ The package also includes a browser workbench:
|
|
|
592
593
|
npm run query:web
|
|
593
594
|
```
|
|
594
595
|
|
|
595
|
-
The workbench server serves [tools/query-web](../tools/query-web) and [tools/mutate-web](../tools/mutate-web). The Query Workbench defaults to `.aeon` source input and exposes a local `/api/query` endpoint. For `.aeon` source, the endpoint uses the optional AEON TypeScript core compiler to derive a host-neutral SANSA resolver namespace before running SANSA.Query. A params editor mounts a small AEON source snippet as `$.<"params">`; top-level params bindings become children of that local address space.
|
|
596
|
+
The workbench server serves [tools/query-web](../tools/query-web) and [tools/mutate-web](../tools/mutate-web). The Query Workbench defaults to `.aeon` source input and exposes a local `/api/query` endpoint. For `.aeon` source, the endpoint uses the optional AEON TypeScript core compiler to derive a host-neutral SANSA resolver namespace before running SANSA.Query. Its Telex mode consumes a complete portable AES stream directly, while JSON fixture mode remains available for resolver-shape debugging. A params editor mounts a small AEON source snippet as `$.<"params">`; top-level params bindings become children of that local address space. The browser UI includes a Normal/Validation policy toggle, a Transform extension toggle, and evaluation budget inputs. `/api/query` accepts `sourceKind: "aeon" | "telex" | "json"`, `policy: "validation"`, `transformExtensions: false`, and `budget` for evaluate requests.
|
|
596
597
|
|
|
597
598
|
The experimental Mutate Workbench exposes `/api/mutate`. It accepts `.aeon`
|
|
598
|
-
source
|
|
599
|
+
source or complete portable Telex AES selected with `sourceKind: "aeon" |
|
|
600
|
+
"telex"`, plan/apply mode, operation/precondition/value mutation budgets, parse
|
|
599
601
|
position-limit input, apply options such as `requireAtomic` and
|
|
600
602
|
`recheckPreconditions`, an optional experimental mutation policy plan filter, and one
|
|
601
603
|
of two request input forms:
|
|
@@ -606,11 +608,12 @@ of two request input forms:
|
|
|
606
608
|
which runs `planInstruction(...)` and then uses the returned plan for the
|
|
607
609
|
same preview/apply path.
|
|
608
610
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
returns
|
|
612
|
-
|
|
613
|
-
|
|
611
|
+
For AEON input, the endpoint compiles the source into a fresh host-neutral
|
|
612
|
+
namespace, layers an in-memory mutation adapter over that namespace, and
|
|
613
|
+
returns an AEON-ish rendered source tree. It is not a canonical AEON source
|
|
614
|
+
rewriter. For Telex input, it validates a complete stream, plans against the
|
|
615
|
+
portable namespace directly, and re-emits Telex after apply without creating an
|
|
616
|
+
AEON AST or source document.
|
|
614
617
|
|
|
615
618
|
When the experimental mutation policy plan filter is enabled, policy JSON is trusted
|
|
616
619
|
consumer input and is validated before authorization. Unsupported top-level or
|
|
@@ -628,8 +631,9 @@ validateMutationPlanTarget(...)
|
|
|
628
631
|
applyMutationPlan(...)
|
|
629
632
|
```
|
|
630
633
|
|
|
631
|
-
Built-in target surfaces currently include `"aeon"` and `"
|
|
632
|
-
`"json-compatible"` is accepted as an alias for `"json"
|
|
634
|
+
Built-in target surfaces currently include `"aeon"`, `"json"`, and `"telex"`.
|
|
635
|
+
`"json-compatible"` is accepted as an alias for `"json"`; `"telex.aes"` is an
|
|
636
|
+
alias for `"telex"`. Callers may also pass
|
|
633
637
|
a custom target surface object with an `id` and `validateOperation(operation,
|
|
634
638
|
context)` hook. Target-surface failures are not SANSA parse or
|
|
635
639
|
mutation-planning failures: they mean the target format cannot represent the
|
|
@@ -643,8 +647,8 @@ failures include `datatype`; value representability failures may include
|
|
|
643
647
|
`valuePath` to identify the rejected planned value position.
|
|
644
648
|
|
|
645
649
|
The Mutate Workbench uses this same API. Its `options.targetFormat` defaults to
|
|
646
|
-
|
|
647
|
-
`/api/mutate` request payload.
|
|
650
|
+
the selected source format and can be set explicitly through the browser target
|
|
651
|
+
selector or the `/api/mutate` request payload.
|
|
648
652
|
|
|
649
653
|
The `/api/mutate` response includes a `targetProfile` object in JSON mode:
|
|
650
654
|
|
|
@@ -687,6 +691,18 @@ boolean/null values, but rejects AEON-only representational features such as
|
|
|
687
691
|
attribute-space mutations, `sansa` datatype hints, parameterized datatypes,
|
|
688
692
|
tuples, nodes, references, NaN, and Infinity.
|
|
689
693
|
|
|
694
|
+
Telex target mode is deliberately narrower in this release. It accepts only an
|
|
695
|
+
exact `replace` of an existing portable scalar event with a representable
|
|
696
|
+
scalar value. The writer preserves record order, address, identity, datatype
|
|
697
|
+
components when unchanged, and all separate attribute events. An explicit new
|
|
698
|
+
datatype is parsed into `datatype`, `generics`, and `clarifiers` before the wire
|
|
699
|
+
encoder recombines it. Because `origin` and `span` identify bytes in the input
|
|
700
|
+
artifact, the changed event loses both fields; untouched events retain them.
|
|
701
|
+
Create, remove, insert, move, container replacement, node-head replacement, and
|
|
702
|
+
reference replacement fail at the target-surface boundary. Those operations
|
|
703
|
+
need an explicit portable path-reindexing/reference-translation contract before
|
|
704
|
+
the adapter can claim deterministic Telex output.
|
|
705
|
+
|
|
690
706
|
When the workbench policy toggle is enabled, the endpoint accepts
|
|
691
707
|
`options.policySource` containing a JSON policy document. The endpoint plans
|
|
692
708
|
first, checks the planned operations against the policy, and only applies the
|
|
@@ -806,6 +822,8 @@ Exact member and position selectors select direct children. This implementation
|
|
|
806
822
|
|
|
807
823
|
`#name` filters the current binding set by semantic type. The default matcher accepts exact semantic type names and base names before `<...>` or `[...]`. `%name` filters the current binding set by representation kind.
|
|
808
824
|
|
|
825
|
+
Representation-kind names use the ordinary identifier grammar. An AES-backed namespace exposes normative AEON representation names directly, so `%NodeHead` selects node heads without a separate SANSA vocabulary. A portable `NodeLiteral` exposes its indexed `NodeHead` values as direct children, and each head exposes its indexed content as direct children: `NodeLiteral[head-index][content-index]`. It must not collapse content directly beneath the outer node. Parent traversal exposes the inverse hierarchy. SANSA traverses the structure supplied by the host adapter; AES topology validation remains the host's responsibility.
|
|
826
|
+
|
|
809
827
|
`?` uses a binding supplied through `options.contextualRoot` or `namespace.contextualRoot`. Unlike `root`, `contextualRoot` is a binding value, not a callback. Hosts that need a dynamic contextual root should resolve it before calling `resolveAddress`. Attribute and local address-space traversal are explicit transitions through `.@` and `.<"name">`. They fail explicitly unless exposed by the namespace adapter or binding model. When local-space traversal is supported but a binding does not expose the named local space, normal resolution returns an empty binding set.
|
|
810
828
|
|
|
811
829
|
Qualifiers are preserved by the parser but ignored by generic structural resolution.
|
|
@@ -1020,7 +1038,7 @@ Current comparison policy:
|
|
|
1020
1038
|
| radix and radix | allowed | error | preserved payload and radix-family metadata identity only |
|
|
1021
1039
|
| hex and radix | error | error | no implicit numeric or base-16 coercion |
|
|
1022
1040
|
| encoding and encoding | allowed | allowed | naïve payload order over preserved encoded payload characters |
|
|
1023
|
-
| separator and separator | allowed | allowed | naïve whole-payload order; no splitting on
|
|
1041
|
+
| separator and separator | allowed | allowed | naïve whole-payload order; no splitting on datatype clarifiers |
|
|
1024
1042
|
| SANSA address and SANSA address | allowed | allowed | canonical address-expression identity and naïve address-expression order |
|
|
1025
1043
|
| temporal and temporal | allowed within same family | allowed within same family | default profile uses canonical temporal payload order; cross-family comparison fails without explicit compatibility |
|
|
1026
1044
|
| reference form and reference form | allowed | error | reference-kind and canonical target-path identity; no implicit follow |
|
|
@@ -1198,22 +1216,23 @@ The evaluator does not execute host-supplied functions. Function support is limi
|
|
|
1198
1216
|
}
|
|
1199
1217
|
```
|
|
1200
1218
|
|
|
1201
|
-
Arguments are
|
|
1219
|
+
Arguments are one of:
|
|
1202
1220
|
|
|
1203
1221
|
```js
|
|
1204
1222
|
{ kind: "token", value }
|
|
1205
1223
|
{ kind: "quoted", value }
|
|
1224
|
+
{ kind: "number", value }
|
|
1206
1225
|
```
|
|
1207
1226
|
|
|
1208
1227
|
Top-level qualifier unions are represented by multiple `terms`. Nested qualifier unions inside generic parameters are rejected.
|
|
1209
1228
|
|
|
1210
|
-
Qualifier terms may contain zero or more parameter groups and zero or
|
|
1229
|
+
Qualifier terms may contain zero or more parameter groups and zero or one clarifier value list:
|
|
1211
1230
|
|
|
1212
1231
|
```text
|
|
1213
|
-
name<parameter,parameter><parameter>[argument
|
|
1232
|
+
name<parameter,parameter><parameter>[argument,argument]
|
|
1214
1233
|
```
|
|
1215
1234
|
|
|
1216
|
-
`parameters` is a flattened convenience view. `parameterGroups` preserves how the term should render.
|
|
1235
|
+
`parameters` is a flattened convenience view. `parameterGroups` preserves how the term should render. Clarifier values preserve AEON's single-list datatype clarifier grammar.
|
|
1217
1236
|
|
|
1218
1237
|
## Canonical Rendering
|
|
1219
1238
|
|
package/docs/capabilities.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"implementation": "@altopelago/sansa",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"profiles": [
|
|
5
5
|
"value-semantics-minimum-consumer",
|
|
6
6
|
"aeon.value.default.v1",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"SANSA.Query",
|
|
20
20
|
"SANSA.Instruction",
|
|
21
21
|
"SANSA.Mutate",
|
|
22
|
-
"SANSA.Transform"
|
|
22
|
+
"SANSA.Transform",
|
|
23
|
+
"SANSA.Graph"
|
|
23
24
|
],
|
|
24
25
|
"core": {
|
|
25
26
|
"valueSemanticsMinimumConsumer": true,
|
|
@@ -30,6 +31,42 @@
|
|
|
30
31
|
"mutate": false
|
|
31
32
|
},
|
|
32
33
|
"experimentalCapabilities": [
|
|
34
|
+
{
|
|
35
|
+
"id": "sansa.graph.structured.one-hop.v1",
|
|
36
|
+
"capability": "SANSA.Graph",
|
|
37
|
+
"category": "declared-relationship-traversal",
|
|
38
|
+
"maturity": "experimental",
|
|
39
|
+
"entryPoints": ["traverseGraph", "traverseGraphSequence"],
|
|
40
|
+
"semantics": [
|
|
41
|
+
"structured declarations only",
|
|
42
|
+
"one-hop directed traversal",
|
|
43
|
+
"explicit bounded multi-hop declaration sequences",
|
|
44
|
+
"complete ordered multi-hop path provenance",
|
|
45
|
+
"index-neutral traversal through optional namespace lookup acceleration",
|
|
46
|
+
"explicit omit-or-error cycle policy",
|
|
47
|
+
"explicit schema-version applicability",
|
|
48
|
+
"source and target semantic-type constraints",
|
|
49
|
+
"per-source edge cardinality constraints",
|
|
50
|
+
"same-namespace traversal only",
|
|
51
|
+
"absolute address reference targets",
|
|
52
|
+
"address-valued relationship edges",
|
|
53
|
+
"deterministic Binding Set and Path Set",
|
|
54
|
+
"explicit Query-before and contextual Query/Transform-after composition",
|
|
55
|
+
"mandatory explicit budgets",
|
|
56
|
+
"aggregate depth, node, edge, and result budgets across hops",
|
|
57
|
+
"independent authorization callback per traversal step",
|
|
58
|
+
"read-only"
|
|
59
|
+
],
|
|
60
|
+
"boundaries": [
|
|
61
|
+
"relationship declaration authority remains external to SANSA",
|
|
62
|
+
"AEOS or an AEOS-adjacent profile owns relationship meaning",
|
|
63
|
+
"target adapters own index health, rebuild, and scan fallback",
|
|
64
|
+
"traversal conveys location, never authorization",
|
|
65
|
+
"Graph authorization does not authorize composed Query reads",
|
|
66
|
+
"relationship mutation remains SANSA.Mutate responsibility",
|
|
67
|
+
"no graph storage, indexing, query language, or implicit recursive traversal claim"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
33
70
|
{
|
|
34
71
|
"id": "sansa.instruction.prototype.v1",
|
|
35
72
|
"capability": "SANSA.Instruction",
|
|
@@ -84,6 +121,7 @@
|
|
|
84
121
|
"targetSurfaceValidation": [
|
|
85
122
|
"aeon",
|
|
86
123
|
"json",
|
|
124
|
+
"telex",
|
|
87
125
|
"custom"
|
|
88
126
|
],
|
|
89
127
|
"entryPoints": [
|
package/docs/instruction-tool.md
CHANGED
|
@@ -67,6 +67,7 @@ JSON output includes a sanitized plan summary instead of live binding objects.
|
|
|
67
67
|
npm run instruction -- --mode plan --target aeon --instruction $'from $.inventory.items.*\nwhere .sku == "B-200"\nreplace .qty with :int32, 10'
|
|
68
68
|
npm run instruction -- --mode plan --target json --instruction 'create $.types.selectorCliProbe with :sansa, $.inventory.items.*'
|
|
69
69
|
npm run instruction -- --mode plan --target json-compatible --instruction 'create $.types.label with "ok"'
|
|
70
|
+
npm run instruction -- --mode plan --target telex --instruction 'replace $.inventory.sku with "B-200"'
|
|
70
71
|
```
|
|
71
72
|
|
|
72
73
|
The target check runs after planning by calling
|
|
@@ -74,6 +75,9 @@ The target check runs after planning by calling
|
|
|
74
75
|
parsing, lowering, or mutation planning.
|
|
75
76
|
`json-compatible` is accepted as an alias for the JSON target surface; target
|
|
76
77
|
diagnostics still report normalized `targetFormat: "json"`.
|
|
78
|
+
`telex.aes` is accepted as an alias for the Telex target surface. This checks
|
|
79
|
+
the conservative scalar-replacement representability profile; it does not turn
|
|
80
|
+
the current-process mutation plan into a portable serialized plan.
|
|
77
81
|
|
|
78
82
|
## Phase Model
|
|
79
83
|
|
package/docs/query-tool.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# SANSA Query Tool
|
|
2
2
|
|
|
3
3
|
The package includes a standalone query tool for exercising SANSA.Query against
|
|
4
|
-
AEON source or a host-neutral JSON namespace fixture:
|
|
4
|
+
AEON source, portable Telex AES, or a host-neutral JSON namespace fixture:
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
npm run query -- --query 'from $.inventory.items.* where contains(.sku, "B") select .sku'
|
|
8
8
|
npm run query -- --format json --query 'from $.inventory.items.* where any(.roles.* == "admin") select { sku = .sku name = .name }'
|
|
9
9
|
npm run query -- --query-file query.sansaq --fixture fixtures/query-inventory.aeon
|
|
10
|
+
npm run query -- --query-file query.sansaq --fixture fixtures/query-inventory.telex.aes
|
|
10
11
|
npm run query -- --query-file query.sansaq --fixture fixtures/query-inventory.json
|
|
11
12
|
npm run query -- --policy validation --query 'from $.inventory.items.* where .qty >= 4 select .sku'
|
|
12
13
|
npm run query -- --disable-transform --query 'from $.table.content.* select objectFrom($.table.header.*, .*)'
|
|
@@ -26,12 +27,23 @@ into a SANSA resolver namespace; JSON fixtures expose bindings with `address`,
|
|
|
26
27
|
`children`, optional `attributeSpace` or `attributes`, optional `localSpaces`,
|
|
27
28
|
and scalar values through `value` or `scalar`.
|
|
28
29
|
|
|
30
|
+
`.telex.aes` fixtures are parsed and validated with an optional AEON AES
|
|
31
|
+
runtime, then adapted directly from the complete portable event stream. The
|
|
32
|
+
adapter preserves record order, flat attribute spaces, structural occurrence
|
|
33
|
+
identity, datatype components, and the explicit `NodeLiteral` → `NodeHead` →
|
|
34
|
+
content hierarchy. Partial streams are rejected because this tool has no
|
|
35
|
+
external namespace state with which to complete them.
|
|
36
|
+
|
|
29
37
|
AEON fixture support is optional so SANSA can remain a lower-level package. For
|
|
30
38
|
published-package use, install `@altopelago/aeon-core` in the calling project or
|
|
31
39
|
set `SANSA_AEON_CORE_MODULE` to an AEON Core module path or specifier. Inside
|
|
32
40
|
the aeon-family development workspace, the tool also falls back to the sibling
|
|
33
41
|
AEON TypeScript build path.
|
|
34
42
|
|
|
43
|
+
Telex fixture support follows the same optional-integration model. Install
|
|
44
|
+
`@altopelago/aeon-aes`, set `SANSA_AEON_AES_MODULE`, or use the sibling AES
|
|
45
|
+
TypeScript build in the aeon-family development workspace.
|
|
46
|
+
|
|
35
47
|
The CLI can also mount JSON params at `$.<"params">` using `--params` or
|
|
36
48
|
`--params-file`. Params may be supplied as a full fixture binding with
|
|
37
49
|
`children`, or as a simple object map. Structured SANSA Address Literal values
|
|
@@ -58,7 +70,8 @@ through `--max-from-bindings`, `--max-where-candidates`,
|
|
|
58
70
|
|
|
59
71
|
## Browser Workbench
|
|
60
72
|
|
|
61
|
-
For browser-based testing against `.aeon
|
|
73
|
+
For browser-based testing against `.aeon`, `.telex.aes`, or JSON fixture input,
|
|
74
|
+
run the technical workbench:
|
|
62
75
|
|
|
63
76
|
```bash
|
|
64
77
|
npm run query:web
|
|
@@ -67,13 +80,19 @@ npm run query:web
|
|
|
67
80
|
Then open `http://127.0.0.1:4173/tools/query-web/`.
|
|
68
81
|
|
|
69
82
|
The same server also exposes the experimental SANSA Mutate Workbench at
|
|
70
|
-
`http://127.0.0.1:4173/tools/mutate-web/`. The Mutate Workbench uses `.aeon`
|
|
71
|
-
source input plus an editor that can accept structured JSON mutation requests
|
|
83
|
+
`http://127.0.0.1:4173/tools/mutate-web/`. The Mutate Workbench uses `.aeon` or
|
|
84
|
+
complete `.telex.aes` source input plus an editor that can accept structured JSON mutation requests
|
|
72
85
|
or proposal-stage SANSA Instruction source. Structured JSON runs
|
|
73
86
|
`planMutation(...)` directly. Instruction source runs `planInstruction(...)`,
|
|
74
87
|
then uses the returned plan for the same apply preview path. Each request runs
|
|
75
88
|
against a fresh in-memory namespace.
|
|
76
89
|
|
|
90
|
+
Telex apply is intentionally limited to exact scalar replacement. Successful
|
|
91
|
+
apply re-emits a complete portable stream while preserving event ordering,
|
|
92
|
+
paths, identities, datatype components, and separate attributes. It removes
|
|
93
|
+
stale origin/span coordinates from the changed event. Structural rewrites are
|
|
94
|
+
rejected until their portable path and reference rewriting rules are defined.
|
|
95
|
+
|
|
77
96
|
For command-line testing of proposal-stage SANSA.Instruction, use the
|
|
78
97
|
standalone Instruction tool:
|
|
79
98
|
|
|
@@ -86,11 +105,12 @@ fixtures. See [instruction-tool.md](instruction-tool.md) for details.
|
|
|
86
105
|
|
|
87
106
|
The workbench defaults to [../fixtures/query-inventory.aeon](../fixtures/query-inventory.aeon),
|
|
88
107
|
derives a SANSA resolver namespace from the optional AEON TypeScript Core
|
|
89
|
-
runtime, and runs SANSA.Query over that derived graph.
|
|
108
|
+
runtime, and runs SANSA.Query over that derived graph. Telex mode uses the
|
|
109
|
+
portable AES adapter described above. It also includes a params
|
|
90
110
|
local-space editor mounted at `$.<"params">`, a Normal/Validation policy toggle,
|
|
91
111
|
a Transform extension toggle, a value-semantics profile selector, optional
|
|
92
|
-
budget limit inputs, plus
|
|
93
|
-
directly.
|
|
112
|
+
budget limit inputs, plus Telex and JSON fixture modes for testing portable and
|
|
113
|
+
host-shaped resolver input directly.
|
|
94
114
|
|
|
95
115
|
In text mode, failed parses and evaluations render compact diagnostic lines
|
|
96
116
|
with phase and candidate context when available. JSON mode exposes the full
|
|
@@ -147,7 +167,7 @@ example `#ff00aa`, `%ff00aa`,
|
|
|
147
167
|
`2026-07-25`, `09:30:00Z`, `2026-07-25T09:30:00Z`, and
|
|
148
168
|
`2026-07-25T09:30:00Z&Australia/Melbourne`. Same-family temporal values compare
|
|
149
169
|
through the active temporal value-semantics profile; the default profile uses
|
|
150
|
-
canonical payload order for `date`, `time`, `datetime`, and `
|
|
170
|
+
canonical payload order for `date`, `time`, `datetime`, and `wtc` families. It rejects mixed-type
|
|
151
171
|
comparisons, toggle-to-Boolean coercion, hex-to-radix coercion, cross-family
|
|
152
172
|
temporal comparison, Boolean ordering, container ordering, explicit null
|
|
153
173
|
comparison, and NaN comparison.
|
package/fixtures/address-v1.json
CHANGED
|
@@ -163,10 +163,10 @@
|
|
|
163
163
|
"qualifierTerms": ["tuple"]
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
|
-
"id": "qualified-
|
|
167
|
-
"source": "$.version:sep[
|
|
166
|
+
"id": "qualified-string-clarifier",
|
|
167
|
+
"source": "$.version:sep[\".\"]",
|
|
168
168
|
"valid": true,
|
|
169
|
-
"canonical": "$.version:sep[
|
|
169
|
+
"canonical": "$.version:sep[\".\"]",
|
|
170
170
|
"exact": true,
|
|
171
171
|
"qualifierTerms": ["sep"]
|
|
172
172
|
},
|
|
@@ -179,18 +179,18 @@
|
|
|
179
179
|
"qualifierTerms": ["csv"]
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
|
-
"id": "qualified-
|
|
183
|
-
"source": "$.key:string[\",\"
|
|
182
|
+
"id": "qualified-multiple-clarifier-values",
|
|
183
|
+
"source": "$.key:string[\",\",\".\"]",
|
|
184
184
|
"valid": true,
|
|
185
|
-
"canonical": "$.key:string[\",\"
|
|
185
|
+
"canonical": "$.key:string[\",\",\".\"]",
|
|
186
186
|
"exact": true,
|
|
187
187
|
"qualifierTerms": ["string"]
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
190
|
"id": "qualified-rich-host-surface",
|
|
191
|
-
"source": "$.claim:type<type>[arg]",
|
|
191
|
+
"source": "$.claim:type<type>[\"arg\"]",
|
|
192
192
|
"valid": true,
|
|
193
|
-
"canonical": "$.claim:type<type>[arg]",
|
|
193
|
+
"canonical": "$.claim:type<type>[\"arg\"]",
|
|
194
194
|
"exact": true,
|
|
195
195
|
"qualifierTerms": ["type"]
|
|
196
196
|
},
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"id": "reject-raw-comma-argument",
|
|
199
199
|
"source": "$.inventory:csv[,]",
|
|
200
200
|
"valid": false,
|
|
201
|
-
"error": "
|
|
201
|
+
"error": "SANSA_EXPECTED_QUALIFIER_ARGUMENT"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
"id": "reject-empty-qualifier-argument",
|
|
@@ -10,11 +10,11 @@ types:object = {
|
|
|
10
10
|
mask:radix[16] = %ff00aa
|
|
11
11
|
octal:radix8 = %70
|
|
12
12
|
payload:encoding = &QmFzZTY0IQ==
|
|
13
|
-
version:sep[.] = ^0.11.0
|
|
13
|
+
version:sep["."] = ^0.11.0
|
|
14
14
|
released:date = 2026-07-25
|
|
15
15
|
window:time = 09:30:00Z
|
|
16
16
|
stamp:datetime = 2026-07-25T09:30:00Z
|
|
17
|
-
zone:
|
|
17
|
+
zone:wtc = 2026-07-25T09:30:00Z&Australia/Melbourne
|
|
18
18
|
count:int32 = 2
|
|
19
19
|
capacity:uint64 = 8
|
|
20
20
|
ratio:float64 = 2.5
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
{
|
|
181
181
|
"name": "version",
|
|
182
182
|
"address": "$.types.version",
|
|
183
|
-
"semanticType": "sep[
|
|
183
|
+
"semanticType": "sep[\".\"]",
|
|
184
184
|
"representationKind": "separator",
|
|
185
185
|
"scalarKind": "separator",
|
|
186
186
|
"value": "0.11.0"
|
|
@@ -212,9 +212,9 @@
|
|
|
212
212
|
{
|
|
213
213
|
"name": "zone",
|
|
214
214
|
"address": "$.types.zone",
|
|
215
|
-
"semanticType": "
|
|
216
|
-
"representationKind": "
|
|
217
|
-
"scalarKind": "
|
|
215
|
+
"semanticType": "wtc",
|
|
216
|
+
"representationKind": "wtc",
|
|
217
|
+
"scalarKind": "wtc",
|
|
218
218
|
"value": "2026-07-25T09:30:00Z&Australia/Melbourne"
|
|
219
219
|
},
|
|
220
220
|
{
|