@altopelago/sansa 0.14.2 → 0.15.0-rc.2
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 +118 -1
- package/README.md +96 -1
- package/conformance/README.md +8 -0
- package/conformance/aeonic-anchor-claims.json +133 -0
- package/conformance/aeonic-arithmetic-claims.json +60 -0
- package/conformance/aeonic-clock-claims.json +123 -0
- package/conformance/aeonic-comparison-claims.json +37 -0
- package/conformance/aeonic-datetime-claims.json +110 -0
- package/conformance/aeonic-rational-arithmetic-claims.json +72 -0
- package/conformance/aeonic-temporal-claims.json +105 -0
- package/conformance/cts-claims.json +17 -3
- package/conformance/results/aeonic-anchor-capacity.json +452 -0
- package/conformance/results/aeonic-anchor-snapshot-0.1.json +39 -0
- package/conformance/results/aeonic-arithmetic-snapshot-0.1.json +28 -0
- package/conformance/results/aeonic-clock-all-snapshot-0.1.json +49 -0
- package/conformance/results/aeonic-clock-arithmetic-snapshot-0.1.json +48 -0
- package/conformance/results/aeonic-clock-capacity.json +326 -0
- package/conformance/results/aeonic-clock-relations-snapshot-0.1.json +48 -0
- package/conformance/results/aeonic-comparison-snapshot-0.1.json +19 -0
- package/conformance/results/aeonic-datetime-all-snapshot-0.1.json +47 -0
- package/conformance/results/aeonic-datetime-arithmetic-snapshot-0.1.json +46 -0
- package/conformance/results/aeonic-datetime-capacity.json +302 -0
- package/conformance/results/aeonic-datetime-relations-snapshot-0.1.json +46 -0
- package/conformance/results/aeonic-rational-arithmetic-capacity.json +100 -0
- package/conformance/results/aeonic-rational-arithmetic-snapshot-0.2.json +30 -0
- package/conformance/results/aeonic-temporal-all-property-addressing-2026-11-16.json +39 -0
- package/conformance/results/aeonic-temporal-all-snapshot-0.1.json +39 -0
- package/conformance/results/aeonic-temporal-calendar-property-addressing-2026-11-16.json +38 -0
- package/conformance/results/aeonic-temporal-calendar-snapshot-0.1.json +38 -0
- package/conformance/results/aeonic-temporal-capacity-property-addressing-2026-11-16.json +136 -0
- package/conformance/results/aeonic-temporal-capacity.json +136 -0
- package/conformance/results/aeonic-temporal-relations-property-addressing-2026-11-16.json +38 -0
- package/conformance/results/aeonic-temporal-relations-snapshot-0.1.json +38 -0
- package/docs/aeonic-arithmetic.md +126 -0
- package/docs/aeonic-comparison.md +123 -0
- package/docs/aeonic-rational-arithmetic.md +167 -0
- package/docs/aeonic-temporal-civil-anchor.md +89 -0
- package/docs/aeonic-temporal-civil-clock.md +100 -0
- package/docs/aeonic-temporal-civil-date.md +124 -0
- package/docs/aeonic-temporal-civil-datetime.md +122 -0
- package/docs/api-contract.md +130 -3
- package/docs/capabilities.json +106 -2
- package/docs/child-identity-activation.md +93 -0
- package/docs/child-identity-candidate.md +60 -0
- package/docs/child-identity-tooling.md +31 -0
- package/docs/child-identity-workflows.md +102 -0
- package/docs/empty-keys-candidate.md +29 -0
- package/docs/migration-0.15.0.md +75 -0
- package/docs/property-addressing-implementation.md +118 -0
- package/docs/property-resolve-implementation.md +105 -0
- package/docs/property-selector-support.md +65 -0
- package/docs/property-selectors-api.d.ts +43 -0
- package/docs/property-selectors-api.pyi +27 -0
- package/docs/property-selectors-api.rs +48 -0
- package/docs/property-selectors-contract.md +168 -0
- package/docs/query-tool.md +32 -1
- package/docs/selector-cursor.md +45 -0
- package/docs/unicode-hardening.md +41 -0
- package/fixtures/address-v1.json +4 -3
- package/fixtures/child-identity-workflows/README.md +9 -0
- package/fixtures/child-identity-workflows/moved.aeon +10 -0
- package/fixtures/child-identity-workflows/original.aeon +10 -0
- package/fixtures/child-identity-workflows/reordered.aeon +10 -0
- package/fixtures/child-identity-workflows/replacement.aeon +10 -0
- package/fixtures/child-identity-workflows/workflows.json +89 -0
- package/fixtures/property-namespace-candidate-v1.json +336 -0
- package/fixtures/property-parser-candidate-v1.json +705 -0
- package/fixtures/property-query-candidate-v1.json +398 -0
- package/fixtures/property-resolve-candidate-v1.json +2702 -0
- package/fixtures/unicode-hardening-v1.json +401 -0
- package/package.json +30 -3
- package/scripts/calibrate-aeonic-anchor-capacity.py +294 -0
- package/scripts/calibrate-aeonic-clock-capacity.py +62 -0
- package/scripts/calibrate-aeonic-datetime-capacity.py +76 -0
- package/scripts/calibrate-aeonic-rational-capacity.py +85 -0
- package/scripts/calibrate-aeonic-temporal-capacity.py +95 -0
- package/scripts/cts-address.mjs +6 -2
- package/scripts/cts-aeonic-anchor.mjs +21 -0
- package/scripts/cts-aeonic-arithmetic-adapter.mjs +25 -0
- package/scripts/cts-aeonic-arithmetic.mjs +24 -0
- package/scripts/cts-aeonic-clock.mjs +24 -0
- package/scripts/cts-aeonic-comparison-adapter.mjs +30 -0
- package/scripts/cts-aeonic-comparison.mjs +25 -0
- package/scripts/cts-aeonic-datetime.mjs +24 -0
- package/scripts/cts-aeonic-rational-arithmetic-adapter.mjs +25 -0
- package/scripts/cts-aeonic-rational-arithmetic.mjs +24 -0
- package/scripts/cts-aeonic-temporal-civil-anchor-adapter.mjs +26 -0
- package/scripts/cts-aeonic-temporal-civil-clock-adapter.mjs +28 -0
- package/scripts/cts-aeonic-temporal-civil-date-adapter.mjs +28 -0
- package/scripts/cts-aeonic-temporal-civil-datetime-adapter.mjs +28 -0
- package/scripts/cts-aeonic-temporal.mjs +24 -0
- package/scripts/cts-instruction.mjs +4 -2
- package/scripts/cts-mutate.mjs +3 -2
- package/scripts/cts-resolve.mjs +17 -2
- package/scripts/playground.mjs +110 -0
- package/src/aeonic-arithmetic-binding.js +61 -0
- package/src/aeonic-arithmetic.d.ts +84 -0
- package/src/aeonic-arithmetic.js +276 -0
- package/src/aeonic-comparison.d.ts +86 -0
- package/src/aeonic-comparison.js +274 -0
- package/src/aeonic-convenience.d.ts +30 -0
- package/src/aeonic-convenience.js +45 -0
- package/src/aeonic-exact-number.js +34 -0
- package/src/aeonic-json.js +45 -0
- package/src/aeonic-rational-arithmetic.d.ts +86 -0
- package/src/aeonic-rational-arithmetic.js +417 -0
- package/src/aeonic-rational-json.js +51 -0
- package/src/aeonic-temporal-civil-anchor.d.ts +54 -0
- package/src/aeonic-temporal-civil-anchor.js +316 -0
- package/src/aeonic-temporal-civil-clock.d.ts +124 -0
- package/src/aeonic-temporal-civil-clock.js +388 -0
- package/src/aeonic-temporal-civil-date.d.ts +123 -0
- package/src/aeonic-temporal-civil-date.js +310 -0
- package/src/aeonic-temporal-civil-datetime.d.ts +138 -0
- package/src/aeonic-temporal-civil-datetime.js +501 -0
- package/src/index.d.ts +84 -1
- package/src/index.js +828 -183
- package/src/property-address.js +196 -0
- package/src/property-resolve.js +132 -0
- package/src/query-metadata.d.ts +16 -0
- package/src/query-metadata.js +25 -0
- package/src/selector-cursor.d.ts +19 -0
- package/src/selector-cursor.js +79 -0
- package/stress-tests/address/invalid.sansa-cases +0 -2
- package/stress-tests/address/valid.sansa-cases +3 -0
- package/tools/mutate-web/examples.mjs +1 -1
- package/tools/mutate-web/runtime.mjs +0 -2
- package/tools/playground/README.md +165 -0
- package/tools/playground/accessibility.js +91 -0
- package/tools/playground/aeon-highlight.js +77 -0
- package/tools/playground/aeon-source-composer.js +1077 -0
- package/tools/playground/anchor-examples.mjs +16 -0
- package/tools/playground/arithmetic-evaluator.mjs +28 -0
- package/tools/playground/arithmetic-model.mjs +187 -0
- package/tools/playground/arithmetic-worker.mjs +14 -0
- package/tools/playground/arithmetic.css +1 -0
- package/tools/playground/arithmetic.html +29 -0
- package/tools/playground/arithmetic.mjs +110 -0
- package/tools/playground/clock-examples.mjs +16 -0
- package/tools/playground/datetime-examples.mjs +22 -0
- package/tools/playground/examples.mjs +46 -0
- package/tools/playground/index.html +174 -0
- package/tools/playground/local.css +25 -0
- package/tools/playground/namespace.mjs +39 -0
- package/tools/playground/sansa-playground.js +1565 -0
- package/tools/playground/site.css +3914 -0
- package/tools/playground/temporal-examples.mjs +20 -0
- package/tools/playground/walkthrough.js +90 -0
- package/tools/playground/website-origin.json +16 -0
- package/tools/query-web/IDENTITY_SELECTORS.md +44 -0
- package/tools/query-web/app.js +4 -0
- package/tools/query-web/index.html +4 -0
- package/tools/query-web/runtime.mjs +70 -19
- package/tools/workflows/property-playground-assertions.mjs +33 -0
- package/tools/workflows/verify-child-identities.mjs +137 -0
- package/tools/workflows/verify-property-playground.mjs +48 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Migrating to SANSA0.15
|
|
2
|
+
|
|
3
|
+
Status:0.15.0-rc.2 preparation,23November2026. Independent QA, registry publication,
|
|
4
|
+
exact installed consumers and final platform acceptance remain pending.
|
|
5
|
+
|
|
6
|
+
## Included addressing and evaluation behavior
|
|
7
|
+
|
|
8
|
+
Read-only child identity selectors select direct children within the selected
|
|
9
|
+
scope. For example, `$.items.\item1\` selects a child of `items` by identity. Chained
|
|
10
|
+
identity steps traverse successive child relationships. Results retain canonical
|
|
11
|
+
structural paths, original handles, order and multiplicity. A second matching
|
|
12
|
+
child is ambiguous; a reused identity does not establish mutation freshness.
|
|
13
|
+
Use the existing explicit adapter capability and inspection allowance.
|
|
14
|
+
|
|
15
|
+
Property Resolve/direct Query requires an authoritative optional namespace facet.
|
|
16
|
+
`&key("name")` tests an exposed ordinary member key; `&tag("book")` selects a node
|
|
17
|
+
container; `&headTag("book")` selects a direct node head. Migrate earlier unpublished
|
|
18
|
+
head-target uses of `&tag` explicitly. Ordinary objects with a display `tag` field
|
|
19
|
+
cannot supply authoritative metadata. Incoming keys outside the scoped root stay
|
|
20
|
+
hidden. An authorized Query row retains its scope facts; it does not gain ancestry.
|
|
21
|
+
|
|
22
|
+
`$.[""]` addresses an ordinary empty member. Empty ordinary object/attribute keys
|
|
23
|
+
retain duplicate checks; empty identities/local-space names are not introduced.
|
|
24
|
+
Identity strings remain exact; Unicode wildcard/casing changes do not normalize
|
|
25
|
+
stored identities or broaden reference eligibility.
|
|
26
|
+
|
|
27
|
+
## Provider and host boundaries
|
|
28
|
+
|
|
29
|
+
See the owning [property support matrix](property-selector-support.md),
|
|
30
|
+
[implementation/API notes](property-resolve-implementation.md),
|
|
31
|
+
[child identity semantics](child-identity-candidate.md) and
|
|
32
|
+
[child identity workflows](child-identity-workflows.md).
|
|
33
|
+
|
|
34
|
+
The coordinated AEON SDK namespaces support read-only property Resolve and direct
|
|
35
|
+
Query; pure Python is standalone Resolve-only and existing native Pytonic Query
|
|
36
|
+
uses its separate Rust path. Selected portable AEOS entrypoints are admitted by
|
|
37
|
+
the owning AEON integration; native-event AEOS/LSP and structural rule paths stay
|
|
38
|
+
closed. Inert Core/native/WASM literals do not become executable selectors.
|
|
39
|
+
|
|
40
|
+
The SDK-backed source playground uses the actual engines and a matching built
|
|
41
|
+
AEON checkout. Legacy `sansa-query` and Query Workbench adapters expose no property
|
|
42
|
+
facet and fail with the documented unsupported-scope diagnostic; parsing success
|
|
43
|
+
is not evaluation support. Editor highlighting does not grant runtime capability.
|
|
44
|
+
|
|
45
|
+
AEON clone/pointer references remain constrained structural paths. Identity and
|
|
46
|
+
property selector parsing does not admit them into references, Instruction/Mutate/SO,
|
|
47
|
+
storage/event paths or other consumers without their existing explicit policies.
|
|
48
|
+
Existing constrained child-identity activation remains separately gated; trusted
|
|
49
|
+
activation does not enable it implicitly.
|
|
50
|
+
|
|
51
|
+
## API and resource migration
|
|
52
|
+
|
|
53
|
+
Rust enum/option/diagnostic changes may require downstream source updates; follow
|
|
54
|
+
the implementation notes rather than copying metadata fields from an opaque
|
|
55
|
+
adapter. Namespace facets are optional; callers must retain original binding
|
|
56
|
+
ownership and capability checks. Queries share private per-invocation inspection
|
|
57
|
+
budgets across their admitted identity/property uses; callers should pass the
|
|
58
|
+
existing supported options, not manufacture public budget/session objects.
|
|
59
|
+
|
|
60
|
+
Logical inspection limits do not bound all adapter construction, ancestry,
|
|
61
|
+
projection, rendering or allocation costs. Existing default/maximum and independent
|
|
62
|
+
parser/result/resource limits are unchanged. Compatibility/target tests and1.15x
|
|
63
|
+
latency/1.20x memory budgets remain required. The recorded identity V8 heap
|
|
64
|
+
qualification is still deferred/unqualified, without a new property-cost waiver.
|
|
65
|
+
This document makes no new whole-workflow or all-platform performance claim.
|
|
66
|
+
|
|
67
|
+
## Deferred and separately scoped features
|
|
68
|
+
|
|
69
|
+
Local `&first`, `&last`, `&fromFirst(n)` and `&fromLast(n)` plus newline convention/
|
|
70
|
+
canonical warnings are deferred to tentative AEON0.17.1. The existing `[n]` index
|
|
71
|
+
syntax and newline behavior retain their current contracts. No new recursive/root
|
|
72
|
+
selector, identity mutation/SO or identity-based reference is introduced here.
|
|
73
|
+
Standalone Aeonic and other experimental APIs retain their documented independent
|
|
74
|
+
contracts; advancing this package does not promote experimental snapshots or
|
|
75
|
+
synchronize their version numbers with AEON0.17.0.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Property Addressing implementation checkpoint
|
|
2
|
+
|
|
3
|
+
Date: 16 November 2026. Scope: first implementation slice of
|
|
4
|
+
[roadmap #51](https://github.com/AltoPelago/roadmap/issues/51), following merged
|
|
5
|
+
specs #58, SANSA #48 and CTS #72. Releases and deployment remain held.
|
|
6
|
+
|
|
7
|
+
This is the historical Addressing-only checkpoint. The later
|
|
8
|
+
[Resolve/Query guide](property-resolve-implementation.md) and
|
|
9
|
+
[provider/host matrix](property-selector-support.md) supersede the execution-closed
|
|
10
|
+
statements below for the explicitly admitted SDK, native Pytonic and portable
|
|
11
|
+
AEOS entry points. The original snapshot, counts and pending checklist below
|
|
12
|
+
retain their historical Addressing-only scope; they are not current support guidance.
|
|
13
|
+
|
|
14
|
+
JavaScript and Rust Addressing now recognize exact `&key("...")` and
|
|
15
|
+
`&tag("...")` suffixes, retain a `propertyFilter` AST variant and render canonical
|
|
16
|
+
payloads with existing quote/escape rules. They remain non-exact. No namespace
|
|
17
|
+
property inspection API or execution capability is advertised by this slice.
|
|
18
|
+
|
|
19
|
+
The property candidate bounds are 256 total selectors, 4096 decoded scalar values
|
|
20
|
+
per property argument and 65536 canonical scalars. Recognition distinguishes
|
|
21
|
+
quoted ampersands and qualifier payloads from selector syntax. Existing index
|
|
22
|
+
options and property-free limits remain in force. Property qualifier control flow
|
|
23
|
+
and canonical rendering are iterative; Rust releases nested qualifier data
|
|
24
|
+
iteratively so a successfully parsed bounded address does not overflow on drop.
|
|
25
|
+
JavaScript caller rendering reads plain data descriptors, ignores forged
|
|
26
|
+
canonical/exactness fields and rejects accessors, cycles and unknown variants.
|
|
27
|
+
Native property Resolve input validates bounds before namespace access and retains
|
|
28
|
+
explicit native positional limits while recomputing metadata.
|
|
29
|
+
|
|
30
|
+
## Parsing is separate from execution
|
|
31
|
+
|
|
32
|
+
Resolve denies property selectors before ordinary traversal, including an empty
|
|
33
|
+
prefix, even if a namespace supplies lookalike property callbacks. Query preflight
|
|
34
|
+
denies property-containing address expressions in from/where/order/select and
|
|
35
|
+
projections, including an otherwise empty/false branch. JavaScript Instructions,
|
|
36
|
+
Graph declarations and all address-activation modes retain explicit denials;
|
|
37
|
+
mutation exactness and reference structural-path guards remain in place.
|
|
38
|
+
|
|
39
|
+
Query cursor/current-row integration is **not delivered** here. JavaScript's
|
|
40
|
+
existing address expressions can carry the parsed suffix but evaluation denies
|
|
41
|
+
it. Rust Query text still rejects that suffix at its existing expression cursor;
|
|
42
|
+
caller Query ASTs are explicitly denied in policy preflight. No text/AST Query
|
|
43
|
+
execution parity or portable property-profile conformance is claimed.
|
|
44
|
+
|
|
45
|
+
The runtime-owned regression fixture mirrors the 34 parser expectations from
|
|
46
|
+
CTS `3edc3e27c657f1420c1bda3447c960df549b3427`, suite
|
|
47
|
+
`18-property-parser.json`, SHA-256
|
|
48
|
+
`84aac40fa4360a7fccfa16f820195edef5f0fe8938ad6d689a7c43c7477d25e0`.
|
|
49
|
+
Both implementations run all 34 expectations, including generated boundaries;
|
|
50
|
+
this does not execute or claim the complete 149-case preparation target.
|
|
51
|
+
Historical manifests, expectations, claim selections and performance ceilings are
|
|
52
|
+
unchanged. Existing temporal evidence is revalidated before refreshing exact
|
|
53
|
+
implementation fingerprints; original frozen reports remain retained.
|
|
54
|
+
|
|
55
|
+
## Rust API porting consideration
|
|
56
|
+
|
|
57
|
+
The new selector enum variant requires downstream exhaustive matches to be
|
|
58
|
+
updated before a dependency bump. `QualifierTerm` also now implements `Drop` for
|
|
59
|
+
stack-safe release of deeply nested qualifiers. Callers moving its owned fields
|
|
60
|
+
by value may need `std::mem::take` instead. That source-compatibility consideration
|
|
61
|
+
requires owning review; no AEON Rust dependency is repinned by this patch.
|
|
62
|
+
|
|
63
|
+
## Next slices
|
|
64
|
+
|
|
65
|
+
- [ ] Implement optional authoritative property facets, internal scope frames,
|
|
66
|
+
checked failures and finite inspection accounting in Resolve/adapters.
|
|
67
|
+
- [ ] Complete Query cursor/current-row syntax, cross-provider scope and private
|
|
68
|
+
Query-wide accounting, then explicitly admit read-only Query execution.
|
|
69
|
+
- [ ] Port the new selector variant into AEON lexical/AST consumers. In Rust,
|
|
70
|
+
downstream exhaustive selector matches need source changes before a dependency
|
|
71
|
+
update; this slice does not repin AEON. Pure Python and native/WASM bridges
|
|
72
|
+
remain separate advertised-provider integration work.
|
|
73
|
+
- [ ] Deliver the executable CTS protocol and actual source/installed/native/WASM/
|
|
74
|
+
browser/tooling checks. AEOS selector/Type Transpiler admission remains separate.
|
|
75
|
+
- [ ] Measure affected resource/performance behavior against unchanged 1.15x
|
|
76
|
+
latency /1.20x memory ceilings; no new performance qualification or heap waiver.
|
|
77
|
+
- [ ] Close the separate positional resource gate or record reviewed release-scope
|
|
78
|
+
deferral before final release qualification.
|
|
79
|
+
|
|
80
|
+
## QA follow-up — 16 November 2026
|
|
81
|
+
|
|
82
|
+
QA-2026-0082 and QA-2026-0083 are addressed by preflighting all Instruction
|
|
83
|
+
requirements and structured mutation preconditions before target traversal,
|
|
84
|
+
including later clauses, short circuits, empty sources and replay with
|
|
85
|
+
`recheckPreconditions: false`. Original and canonical precondition spellings
|
|
86
|
+
cannot hide one another. A candidate whose syntax cannot be validated fails
|
|
87
|
+
closed; inert quoted/encoded data retains its existing meaning.
|
|
88
|
+
|
|
89
|
+
Expression admission now uses iterative depth-first frames, lazy child-array
|
|
90
|
+
iteration, completed-node memoization for shared ASTs and active-path cycle
|
|
91
|
+
detection. This is a syntax/capability scan, so memoization does not remove
|
|
92
|
+
execution occurrences or chargeable property inspections. It does not make the
|
|
93
|
+
general expression evaluator or source-expression parser iterative.
|
|
94
|
+
|
|
95
|
+
Regression controls cover depths32/6000/9000, widths64/128, shared DAGs, cycles,
|
|
96
|
+
quoted ampersands, option-limited syntax and zero namespace/mutation-hook reads
|
|
97
|
+
for denied programs. Rust's standalone parsed-expression primitive receives the
|
|
98
|
+
same preflight denial for a short-circuited property. Compatibility, target and
|
|
99
|
+
resource settings are unchanged; execution and release remain closed.
|
|
100
|
+
|
|
101
|
+
## Copilot follow-up — 16 November 2026
|
|
102
|
+
|
|
103
|
+
- [x] Reject properties before acquiring absolute or contextual namespace roots
|
|
104
|
+
in both JavaScript and Rust Resolve. Text and native ASTs return the same
|
|
105
|
+
unsupported-selector diagnostic with missing roots and without invoking root
|
|
106
|
+
hooks. Property-free root diagnostics and traversal retain their behavior.
|
|
107
|
+
- [x] Read expression nodes, clause wrappers, child arrays, projection fields
|
|
108
|
+
and Instruction requirements through own data descriptors during admission.
|
|
109
|
+
Accessors are rejected through existing Query/Instruction diagnostic envelopes
|
|
110
|
+
without invoking them, including returning and throwing getters. Create
|
|
111
|
+
destinations expressed as member names retain their existing lowering behavior.
|
|
112
|
+
- [x] Preserve iterative depth/width, shared-DAG and cycle controls. DAG visit
|
|
113
|
+
instrumentation now counts data-descriptor reads rather than admitting getters.
|
|
114
|
+
This does not advertise arbitrary Proxy AST support or harden every later
|
|
115
|
+
evaluator/host interaction; it protects the admission fields this slice reads.
|
|
116
|
+
|
|
117
|
+
No property execution, capability, public declaration, dependency, target contract
|
|
118
|
+
or numeric budget changes. Release and deployment remain on hold.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Read-only property Resolve and Query implementation
|
|
2
|
+
|
|
3
|
+
Initial implementation: 16 November 2026. Support boundaries updated 22 November
|
|
4
|
+
2026. Unreleased candidate; no profile promotion or release. See the
|
|
5
|
+
[provider/host matrix](property-selector-support.md) for delivered owning APIs and
|
|
6
|
+
intentional host denials.
|
|
7
|
+
|
|
8
|
+
JavaScript/TypeScript and Rust execute `&key("...")`, `&tag("...")` and `&headTag("...")` only in
|
|
9
|
+
standalone read-only Resolve and direct read-only Query with an explicitly capable namespace. Public types
|
|
10
|
+
are `PropertyAccess`, `PropertyAccessContext` and checked `PropertyAccessFault`
|
|
11
|
+
(TypeScript), or `property::PropertyAccess` and its context/scope/kind/error types
|
|
12
|
+
(Rust). `Namespace.properties()` defaults to `None`. An adapter must explicitly
|
|
13
|
+
implement the facet; bare or legacy adapters do not acquire support from metadata.
|
|
14
|
+
The owning AEON SDK and pure-Python namespaces implement the documented facet.
|
|
15
|
+
|
|
16
|
+
The adapter must prove authorized topology and direct-head ownership, without
|
|
17
|
+
inferring authority from paths, display names, ordinary `tag` fields or cached
|
|
18
|
+
outer tags. The optional `namespace.properties` facet supplies `scope` and `key`,
|
|
19
|
+
or `scope` and all three node callbacks. See the [contract](property-selectors-contract.md).
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
// namespace implements the authoritative property facet.
|
|
23
|
+
const result = resolveAddress('$.items.*&key("")', namespace, {
|
|
24
|
+
maxPropertyInspections: 1000,
|
|
25
|
+
});
|
|
26
|
+
// Results retain original opaque binding handles and structural paths.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Each occurrence carries a private authorized scope/evaluation frame. Absolute
|
|
30
|
+
and contextual roots begin boundaries; explicit attribute/local-space transitions
|
|
31
|
+
begin boundaries at their returned roots. Ordinary navigation retains the frame,
|
|
32
|
+
including repeated handles arriving through distinct spaces. Existing parent
|
|
33
|
+
traversal is unchanged; inspecting an escaped occurrence fails before key/tag
|
|
34
|
+
access. Root keys are hidden while intrinsic root tags remain eligible. Contexts
|
|
35
|
+
are frozen in JavaScript and borrowed read-only in Rust. Public options, ASTs and
|
|
36
|
+
results do not carry authority roots or mutable counters/sessions.
|
|
37
|
+
|
|
38
|
+
Validation order is input/AST, options, root, complete requested capabilities,
|
|
39
|
+
then traversal. Missing support fails before child/metadata/head callbacks even
|
|
40
|
+
on empty prefixes or later predicates. Existing parse options and property
|
|
41
|
+
preparation bounds remain in force; caller exact/canonical flags are recomputed.
|
|
42
|
+
Earlier execution-closed standalone placeholders now test this approved opt-in
|
|
43
|
+
contract. Prohibited consumers retain pre-traversal denials.
|
|
44
|
+
|
|
45
|
+
`maxPropertyInspections` defaults to10000 and accepts finite integer numbers
|
|
46
|
+
0..1000000. Rust enforces the same ceiling through `u32`; existing native Pytonic
|
|
47
|
+
and portable AEOS bridges validate their documented numeric inputs before that
|
|
48
|
+
field. Pure Python has its own checked allowance conversion. Invalid limits fail before roots even without a
|
|
49
|
+
predicate. Charge each predicate candidate before scope/metadata, including
|
|
50
|
+
misses and hidden roots. NodeLiteral tag predicates additionally charge each
|
|
51
|
+
yielded direct head before scope/ownership/kind/tag checks. Return the original
|
|
52
|
+
container at most once per occurrence and retain repeated results/charges.
|
|
53
|
+
Stop at the first match; permit a terminal next probe at the exact allowance.
|
|
54
|
+
Checked failures return no partial bindings or host exception/hidden values.
|
|
55
|
+
|
|
56
|
+
Enumeration is incremental. JavaScript closes iterators after early matches,
|
|
57
|
+
budget failures and iterator/metadata faults, including a thrown `next`;
|
|
58
|
+
cleanup faults fail too. Rust drops iterators on every exit; panic/abort and
|
|
59
|
+
throwing destructors are outside its checked-fault guarantee. The Rust regression
|
|
60
|
+
adapter streams existing identifiers without cloning the head vector during
|
|
61
|
+
acquisition. Logical inspections do not bound all adapter work, old navigation,
|
|
62
|
+
input preparation, elapsed time or allocation.
|
|
63
|
+
|
|
64
|
+
The initial 16 November Resolve mirrors preserved prepared CTS fixture bytes:83 JavaScript
|
|
65
|
+
Resolve vectors and67 selected Rust text vectors, asserting every present
|
|
66
|
+
expected field/counter. Rust native types cannot encode JS getter/cycle ASTs or
|
|
67
|
+
boolean/negative/fractional `u32` allowances; those16 vectors are not claimed by
|
|
68
|
+
the Rust text selection. Separate native tests cover flags, multiplicity, bounds,
|
|
69
|
+
allowances and distinct frames. The one scripted invalid UTF-16 host value maps
|
|
70
|
+
to a checked metadata fault in the Rust test adapter, not a production JSON bridge.
|
|
71
|
+
Additional tests cover typed/cleanup faults, reentry and closed consumers. These
|
|
72
|
+
mirrors are runtime regressions, not a new CTS protocol/profile advertisement or
|
|
73
|
+
execution of the full149-case property target.
|
|
74
|
+
|
|
75
|
+
Direct read-only Query admits property addresses in `from`, `where`, `order by`
|
|
76
|
+
and `select`, including projections and nested expressions. `.&key("x")` and
|
|
77
|
+
`.&tag("x")` retain the row's originating scope while moving its evaluation root;
|
|
78
|
+
explicit `?&key("x")` establishes a boundary at the row, hiding its incoming key.
|
|
79
|
+
Attribute/local-space boundaries, repeated occurrence frames and stable ordering
|
|
80
|
+
survive filtering and slicing. One private property allowance spans the entire
|
|
81
|
+
Query; separate and reentrant public calls get fresh state. Complete capability
|
|
82
|
+
preflight runs before empty/short-circuited traversal. Caller property Query ASTs
|
|
83
|
+
are snapshotted while preserving completed-node sharing and rejecting active
|
|
84
|
+
cycles. The existing 20,000-entry/128-level/1 MiB preparation bounds stay in force;
|
|
85
|
+
a separate walk checks semantic rendering against the same entry/text ceilings
|
|
86
|
+
before rendering shared expression occurrences. The snapshot is then reparsed; output bindings/records carry no frames or
|
|
87
|
+
mutable counters. The 15 byte-identical prepared Query vectors check every present
|
|
88
|
+
field and callback count in text and native AST forms, alongside local regressions.
|
|
89
|
+
They are regression mirrors, not full CTS protocol/profile claims.
|
|
90
|
+
|
|
91
|
+
Activation (including trusted), Graph, Instruction/Mutate/SO and structural/
|
|
92
|
+
reference/event/storage consumers stay closed. Direct Query does not admit
|
|
93
|
+
Query-shaped mutation/precondition callers. The separately implemented portable
|
|
94
|
+
AEOS rule-selector profile is admitted only through its explicit AES/Telex APIs;
|
|
95
|
+
legacy native-event validation and the LSP path remain closed. The Type Transpiler
|
|
96
|
+
is deferred. Pure Python has no Query evaluator, while the existing native
|
|
97
|
+
Pytonic `Document.query()` is admitted through the Rust SDK. Core/native/WASM
|
|
98
|
+
literal APIs remain inert; WASM gains no Query API.
|
|
99
|
+
|
|
100
|
+
Rust source porting includes new `ResolveOptions`/`Diagnostic` fields for clients
|
|
101
|
+
using exhaustive struct literals, alongside the prior selector enum/QualifierTerm
|
|
102
|
+
Drop considerations. No version or capability manifest changes. Original
|
|
103
|
+
compatibility/target checks and1.15x latency/1.20x memory ceilings stay unchanged.
|
|
104
|
+
New cost qualification, provider matrices and the positional gate remain open.
|
|
105
|
+
Official releases and deployment stay held.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Property selector support by provider and host
|
|
2
|
+
|
|
3
|
+
Unreleased development support, checked against the delivered APIs on 22 November
|
|
4
|
+
2026. Parsing a selector, exposing ordinary metadata, or coloring its text does
|
|
5
|
+
not authorize evaluation. Capability manifests and stable CTS claims are unchanged.
|
|
6
|
+
|
|
7
|
+
`&key("name")` tests an authorized incoming member/attribute key. Empty and Unicode
|
|
8
|
+
keys remain literal; positions are not keys. `&tag("book")` returns a NodeLiteral
|
|
9
|
+
container with a matching direct head. `&headTag("book")` returns a NodeHead;
|
|
10
|
+
`...&headTag("book").*` explicitly visits that head's children. Results keep their
|
|
11
|
+
original binding handles and structural paths. See the [API contract](property-selectors-contract.md)
|
|
12
|
+
and [execution/accounting guide](property-resolve-implementation.md).
|
|
13
|
+
|
|
14
|
+
## Delivered providers
|
|
15
|
+
|
|
16
|
+
| Provider | Property support | Boundary |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| SANSA JavaScript/TypeScript and Rust | Addressing/rendering; standalone read-only Resolve and direct read-only Query when the namespace supplies the authoritative property facet | A bare namespace or ordinary name/tag field does not opt in. Missing capability fails before traversal, including empty sources |
|
|
19
|
+
| AEON TypeScript/Rust SDK namespaces | Authoritative document facets for Resolve and direct Query | Document topology and scope authorize metadata; display paths/fields do not. The selected package graph must contain the coordinated implementation |
|
|
20
|
+
| Pure Python AEON | Standalone Addressing/Resolve and explicit portable AEOS validation | It has no Query evaluator; it is separate from native Python |
|
|
21
|
+
| Existing native Pytonic | `Document.query()` through the Rust SDK, including bounded property allowance and structured diagnostics | No generic Python callback facet or new standalone native Resolve API is introduced |
|
|
22
|
+
| Core/native/WASM literal APIs | Inert property literal parsing, representation and transport through their existing APIs | A literal is not activated; reduced Core namespaces cannot evaluate properties and WASM gains no Query API |
|
|
23
|
+
|
|
24
|
+
The [AEON SDK guide](https://github.com/AltoPelago/aeon/blob/main/implementations/typescript/packages/sdk/README.md)
|
|
25
|
+
and [portable AEOS guide](https://github.com/AltoPelago/aeon/blob/main/docs/aeos-property-selectors.md)
|
|
26
|
+
name the owning APIs. Declaration sketches beside the candidate contract are
|
|
27
|
+
historical design artifacts; current exported types describe the actual ABI.
|
|
28
|
+
|
|
29
|
+
## Hosts are separate entry points
|
|
30
|
+
|
|
31
|
+
| Host | Current property behavior |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `tools/playground/` source playground | Uses the real AEON SDK facet and SANSA Resolve/Query engines when supplied a matching built AEON checkout; no substitute property parser or resolver |
|
|
34
|
+
| `sansa-query` / `scripts/query.mjs` | Its built-in JSON, native AEON and portable Telex/Film adapters expose no property facet. Parsing can succeed, but evaluation fails with `SANSA_RESOLVE_UNSUPPORTED_PROPERTY_SCOPE` |
|
|
35
|
+
| `tools/query-web/` legacy Query Workbench | Same capability limitation as its own adapters; it is distinct from the SDK-backed source playground. Ordinary/previously admitted identity behavior is unchanged |
|
|
36
|
+
| AEON language service | Compiler-backed inert literal acceptance; its existing native-event schema validation still rejects property rules. It is not the portable AEOS entry point |
|
|
37
|
+
| Editor grammars and installed/vendor hosts | Coloring and a source checkout do not establish semantic or installed support. Property-literal grammar coverage and final selected host graphs remain separate integration work |
|
|
38
|
+
|
|
39
|
+
Use a capable SDK namespace with `resolveAddress` / `evaluateQuery`, or the
|
|
40
|
+
SDK-backed source playground, to exercise property evaluation. Setting a larger
|
|
41
|
+
budget or enabling trusted activation does not give an incapable host authority.
|
|
42
|
+
|
|
43
|
+
## Consumer admission and limits
|
|
44
|
+
|
|
45
|
+
The separately implemented `aeos-properties-0.1` development profile admits
|
|
46
|
+
property predicates only in explicit portable AES/Telex rule-selector APIs.
|
|
47
|
+
Legacy native-event AEOS validation, structural `path` rules and the existing LSP
|
|
48
|
+
validation path remain closed. Activation (including trusted), Graph,
|
|
49
|
+
Instruction/Mutate/SO, clone/pointer references and event/storage paths also
|
|
50
|
+
remain closed to property predicates. Direct Query does not admit Query-shaped
|
|
51
|
+
mutation or precondition callers. The AES Type Transpiler is deferred and is not
|
|
52
|
+
a 0.17.0 prerequisite.
|
|
53
|
+
|
|
54
|
+
Resolve's `maxPropertyInspections` defaults to 10,000, maximum 1,000,000; Query
|
|
55
|
+
shares one private allowance across its clauses. Native Pytonic uses
|
|
56
|
+
`max_property_inspections`; portable AEOS uses its documented resource policy.
|
|
57
|
+
These names belong to different entry points. Logical inspections do not bound
|
|
58
|
+
namespace construction, ancestry, old navigation, all adapter work, time or heap.
|
|
59
|
+
|
|
60
|
+
Complete experimental-profile/cost/platform/registry and final artifact acceptance
|
|
61
|
+
remain separate from implemented support. No new native/WASM rebuild, exhaustive
|
|
62
|
+
conformance, performance acceptance or exact WASM reproducibility follows from
|
|
63
|
+
this guide. Compatibility/target checks, defaults and the existing 1.15x latency /
|
|
64
|
+
1.20x memory budgets are unchanged. Releases, deployment and stable promotion
|
|
65
|
+
remain on hold. Positional selectors retain their separate resource/scope gate.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Candidate 0.1 declarations for review only. Not runtime/package exports. */
|
|
2
|
+
import type {SansaAddress, SansaSelector, SansaResolveNamespace, SansaResolveOptions, SansaQueryEvaluateOptions} from '../src/index.js';
|
|
3
|
+
|
|
4
|
+
export type PropertyName = 'key' | 'tag' | 'headTag';
|
|
5
|
+
export type PropertyScopeRole = 'root' | 'inside' | 'outside';
|
|
6
|
+
export type PropertyNodeKind = 'NodeLiteral' | 'NodeHead' | 'Other';
|
|
7
|
+
export interface PropertyAccessContext<B extends object> {
|
|
8
|
+
readonly scopeRoot: B;
|
|
9
|
+
readonly evaluationRoot: B;
|
|
10
|
+
/** Present only while validating a yielded direct head of this owner. */
|
|
11
|
+
readonly directHeadOf?: B;
|
|
12
|
+
}
|
|
13
|
+
export interface PropertyAccessFault {
|
|
14
|
+
readonly type: 'SansaPropertyAccessFault';
|
|
15
|
+
readonly kind: 'invalidMetadata' | 'scopeViolation' | 'adapterFailure';
|
|
16
|
+
}
|
|
17
|
+
/** Callback faults are thrown, not returned as successful metadata. */
|
|
18
|
+
export interface PropertyAccess<B extends object> {
|
|
19
|
+
readonly scope: (binding: B, context: PropertyAccessContext<B>) => PropertyScopeRole;
|
|
20
|
+
readonly key?: (binding: B, context: PropertyAccessContext<B>) => string | undefined;
|
|
21
|
+
readonly nodeKind?: (binding: B, context: PropertyAccessContext<B>) => PropertyNodeKind;
|
|
22
|
+
readonly nodeTag?: (binding: B, context: PropertyAccessContext<B>) => string | undefined;
|
|
23
|
+
readonly nodeHeads?: (binding: B, context: PropertyAccessContext<B>) => Iterable<B>;
|
|
24
|
+
}
|
|
25
|
+
export interface PropertyNamespace<B extends object> extends SansaResolveNamespace<B> {
|
|
26
|
+
readonly properties?: PropertyAccess<B>;
|
|
27
|
+
}
|
|
28
|
+
export interface PropertyResolveOptions<B extends object> extends SansaResolveOptions<B> {
|
|
29
|
+
/** Candidate: integer 0..1000000; default 10000. No public counter/session. */
|
|
30
|
+
readonly maxPropertyInspections?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface PropertyQueryOptions<B extends object> extends Omit<SansaQueryEvaluateOptions<B>, 'resolve'> {
|
|
33
|
+
readonly resolve?: PropertyResolveOptions<B>;
|
|
34
|
+
}
|
|
35
|
+
export interface PropertyFilterSelector {
|
|
36
|
+
readonly type: 'propertyFilter';
|
|
37
|
+
readonly property: PropertyName;
|
|
38
|
+
readonly value: string;
|
|
39
|
+
}
|
|
40
|
+
/** Contains untrusted caller flags until bounded normalization recomputes them. */
|
|
41
|
+
export interface PropertyAddress extends Omit<SansaAddress, 'selectors'> {
|
|
42
|
+
readonly selectors: readonly (SansaSelector | PropertyFilterSelector)[];
|
|
43
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Candidate declarations only; not an installed Python runtime module.
|
|
2
|
+
|
|
3
|
+
Namespace['properties'] is optional. Existing pure Python mapping spellings are
|
|
4
|
+
retained; the context passed by the engine is an immutable mapping.
|
|
5
|
+
"""
|
|
6
|
+
from collections.abc import Callable, Iterable, Mapping
|
|
7
|
+
from typing import Generic, Literal, NotRequired, TypeVar, TypedDict
|
|
8
|
+
|
|
9
|
+
B = TypeVar('B')
|
|
10
|
+
PropertyScopeRole = Literal['root', 'inside', 'outside']
|
|
11
|
+
PropertyNodeKind = Literal['NodeLiteral', 'NodeHead', 'Other']
|
|
12
|
+
PropertyAccessContext = Mapping[Literal['scopeRoot', 'evaluationRoot', 'directHeadOf'], B]
|
|
13
|
+
|
|
14
|
+
class SansaPropertyAccessError(Exception):
|
|
15
|
+
kind: Literal['invalidMetadata', 'scopeViolation', 'adapterFailure']
|
|
16
|
+
|
|
17
|
+
class PropertyAccess(TypedDict, Generic[B]):
|
|
18
|
+
scope: Callable[[B, PropertyAccessContext[B]], PropertyScopeRole]
|
|
19
|
+
key: NotRequired[Callable[[B, PropertyAccessContext[B]], str | None]]
|
|
20
|
+
nodeKind: NotRequired[Callable[[B, PropertyAccessContext[B]], PropertyNodeKind]]
|
|
21
|
+
nodeTag: NotRequired[Callable[[B, PropertyAccessContext[B]], str | None]]
|
|
22
|
+
nodeHeads: NotRequired[Callable[[B, PropertyAccessContext[B]], Iterable[B]]]
|
|
23
|
+
|
|
24
|
+
class PropertyResolveOptions(TypedDict):
|
|
25
|
+
# Merge with the existing Resolve option map at implementation time.
|
|
26
|
+
# Default 10000; runtime rejects bool and integers outside 0..1000000.
|
|
27
|
+
maxPropertyInspections: NotRequired[int | float]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//! Proposed standalone ABI shapes, not part of sansa-runtime exports.
|
|
2
|
+
//! The properties signature/default below is to be added to the existing
|
|
3
|
+
//! Namespace trait during implementation; this sketch adds no runtime feature.
|
|
4
|
+
|
|
5
|
+
pub const DEFAULT_PROPERTY_INSPECTIONS: u32 = 10_000;
|
|
6
|
+
pub const MAX_PROPERTY_INSPECTIONS: u32 = 1_000_000;
|
|
7
|
+
|
|
8
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
9
|
+
pub enum PropertyScopeRole { Root, Inside, Outside }
|
|
10
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
11
|
+
pub enum PropertyNodeKind { NodeLiteral, NodeHead, Other }
|
|
12
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
13
|
+
pub enum PropertyAccessError { InvalidMetadata, ScopeViolation, AdapterFailure }
|
|
14
|
+
|
|
15
|
+
pub struct PropertyAccessContext<'a, B> {
|
|
16
|
+
pub scope_root: &'a B,
|
|
17
|
+
pub evaluation_root: &'a B,
|
|
18
|
+
pub direct_head_of: Option<&'a B>,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
pub type PropertyHeads<'a, B> =
|
|
22
|
+
Box<dyn Iterator<Item = Result<B, PropertyAccessError>> + 'a>;
|
|
23
|
+
|
|
24
|
+
pub trait PropertyAccess {
|
|
25
|
+
type Binding: Clone + Eq;
|
|
26
|
+
fn supports_key(&self) -> bool { false }
|
|
27
|
+
fn supports_nodes(&self) -> bool { false }
|
|
28
|
+
fn scope(&self, binding: &Self::Binding, context: &PropertyAccessContext<'_, Self::Binding>)
|
|
29
|
+
-> Result<PropertyScopeRole, PropertyAccessError>;
|
|
30
|
+
fn key(&self, _binding: &Self::Binding, _context: &PropertyAccessContext<'_, Self::Binding>)
|
|
31
|
+
-> Result<Option<String>, PropertyAccessError> { Ok(None) }
|
|
32
|
+
fn node_kind(&self, _binding: &Self::Binding, _context: &PropertyAccessContext<'_, Self::Binding>)
|
|
33
|
+
-> Result<PropertyNodeKind, PropertyAccessError> { Ok(PropertyNodeKind::Other) }
|
|
34
|
+
fn node_tag(&self, _binding: &Self::Binding, _context: &PropertyAccessContext<'_, Self::Binding>)
|
|
35
|
+
-> Result<Option<String>, PropertyAccessError> { Ok(None) }
|
|
36
|
+
fn node_heads<'a>(&'a self, _binding: &'a Self::Binding,
|
|
37
|
+
_context: &'a PropertyAccessContext<'a, Self::Binding>)
|
|
38
|
+
-> Result<PropertyHeads<'a, Self::Binding>, PropertyAccessError> {
|
|
39
|
+
Ok(Box::new(std::iter::empty()))
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// Shape of the additive contribution to the existing Namespace, not a new
|
|
44
|
+
/// required trait bound on existing Resolve callers. Default remains unsupported.
|
|
45
|
+
pub trait NamespacePropertyContract {
|
|
46
|
+
type Binding: Clone + Eq;
|
|
47
|
+
fn properties(&self) -> Option<&dyn PropertyAccess<Binding = Self::Binding>> { None }
|
|
48
|
+
}
|