@altopelago/sansa 0.10.0 → 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 +26 -1
- package/README.md +13 -5
- package/conformance/cts-claims.json +1 -1
- package/docs/api-contract.md +34 -16
- package/docs/capabilities.json +2 -1
- package/docs/instruction-tool.md +4 -0
- package/docs/query-tool.md +27 -7
- 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 +13 -8
- package/src/index.d.ts +27 -0
- package/src/index.js +158 -2
- package/tools/mutate-web/app.js +26 -6
- package/tools/mutate-web/index.html +6 -1
- package/tools/mutate-web/runtime.mjs +310 -12
- package/tools/query-web/app.js +24 -5
- package/tools/query-web/index.html +4 -0
- package/tools/query-web/runtime.mjs +405 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,32 @@ 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.
|
|
11
36
|
|
|
12
37
|
## 0.10.0 - 2026-09-01
|
|
13
38
|
|
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.10.
|
|
5
|
+
"implementation_version": "0.10.1",
|
|
6
6
|
"cts_repository": "aeonite-org/aeonite-cts",
|
|
7
7
|
"cts_protocol": "cts.protocol.v1",
|
|
8
8
|
"claims": [
|
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.
|
|
@@ -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.
|
package/docs/capabilities.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"implementation": "@altopelago/sansa",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"profiles": [
|
|
5
5
|
"value-semantics-minimum-consumer",
|
|
6
6
|
"aeon.value.default.v1",
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"targetSurfaceValidation": [
|
|
122
122
|
"aeon",
|
|
123
123
|
"json",
|
|
124
|
+
"telex",
|
|
124
125
|
"custom"
|
|
125
126
|
],
|
|
126
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
|