@altopelago/sansa 0.11.1 → 0.12.0

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 CHANGED
@@ -7,6 +7,77 @@ versions may still include breaking changes when the SANSA specifications move.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 0.12.0 - 2026-10-01
11
+
12
+ ### Changed
13
+
14
+ - Added AEON symbolic literals to Query, Instruction, mutation target
15
+ validation, and the AEON/Telex workbench adapters. Pipe-delimited source
16
+ such as `|approved|` and `|in review\|blocked|` preserves a distinct
17
+ `symbol` value family, compares by exact decoded payload, does not coerce to
18
+ strings, and has no intrinsic ordering.
19
+ - Added year- and month-granularity AEON date literals (`YYYY-` and `YYYY-MM`)
20
+ to Query parsing and temporal completion-set comparison. Calendar years and
21
+ months now contain compatible finer-grained dates through
22
+ `temporalRelation(...)` and `compareTemporalClaims(...)`.
23
+ - Added conservative temporal completion-set relations through the exported
24
+ `compareTemporalClaims(...)` helper, the public `temporalRelation`
25
+ value-semantics operation, and the SANSA.Query `temporalRelation(...)`
26
+ function. Relations distinguish equality, ordering, containment, overlap,
27
+ and claims that cannot be compared without inventing missing context.
28
+ - Cross-type query comparison diagnostics now identify both evaluator
29
+ categories, such as `string vs finiteNumber`, while retaining the candidate
30
+ address as structured diagnostic context.
31
+ - Clarified that namespace addresses are current structural locators rather
32
+ than durable identities and that SANSA is a bounded in-process evaluator
33
+ rather than a persistent database.
34
+ - Finite-number equality and ordering now compare canonical numeric lexemes
35
+ exactly, including large integers, long fractions, and exponent forms.
36
+ Namespace adapters can expose `numericLexeme` independently of their host
37
+ materialization value, and projected query-number literals retain their
38
+ canonical text. Radix-family `decimal` values remain
39
+ representation-preserving and profile-defined for numeric interpretation.
40
+ - Added the explicit `aeon.value.radix.numeric.same-base.v1` (`radix-numeric`)
41
+ profile and `compareExactRadixValues(...)` for exact base-2-through-base-64
42
+ equality and ordering without host-number conversion. Default radix
43
+ comparison remains representation-preserving, and cross-base comparison
44
+ fails closed. The value-semantics runner now targets the 0.2 development CTS
45
+ manifest, and the query workbench includes a `decimal` equality example that
46
+ demonstrates the opt-in behavior.
47
+ - Added `aeon.value.radix.numeric.cross-base.v1`
48
+ (`radix-numeric-cross-base`),
49
+ `createCrossBaseRadixNumericValueSemanticsProfile(...)`, and
50
+ `compareExactCrossBaseRadixValues(...)` for exact rational equality and
51
+ ordering across independently resolved bases. The same-base profile remains
52
+ fail-closed for mixed bases. Both radix profiles are now selectable in the
53
+ query workbench instead of being available only through example metadata or
54
+ programmatic options.
55
+ - Added profile-independent radix fractional scale through `radixScaleOf(...)`,
56
+ the `radixScale` value-semantics operation and query function, and optional
57
+ namespace `radixScale` metadata. Trailing zeroes remain significant to scale
58
+ without changing either representation equality or numeric-profile equality.
59
+
60
+ ### Fixed
61
+
62
+ - Allowed namespace `parent` callbacks to return `null` as well as `undefined`
63
+ for root bindings, matching the nullable parent field on resolver bindings
64
+ and common tree-adapter conventions.
65
+ - Added a targeted projection diagnostic explaining that fields use AEON
66
+ `name = expression` syntax and that `:` remains reserved for datatype
67
+ annotations.
68
+ - Limited native structural-equality dispatch to bindings with an explicit
69
+ container representation, so adapters that expose empty child lists on
70
+ scalars do not route scalar comparisons through the container hook.
71
+ - Preserved scalar value-family descriptors while materializing containers for
72
+ generic structural equality, preventing symbol-valued children from
73
+ comparing equal to string-valued children with the same payload.
74
+ - Rejected symbols and other lexical scalar families from string-only query
75
+ functions, member keys, transform keys, field names, and null reasons.
76
+ - Required temporal descriptors for the public `temporalRelation` operation
77
+ instead of accepting arbitrary descriptor payloads.
78
+ - Rendered exact AEON number bindings as numeric lexemes in the query CLI
79
+ rather than quoting their adapter-provided string representation.
80
+
10
81
  ## 0.11.1 - 2026-09-14
11
82
 
12
83
  ### Fixed
package/README.md CHANGED
@@ -56,6 +56,7 @@ npm run cts:mutate
56
56
  ```
57
57
 
58
58
  The default Query CTS lane runs core conformance and skips experimental extension cases. `cts:query:experimental` includes experimental extension coverage.
59
+ The value-semantics runner targets the mutable `value-semantics-cts-v1-snapshot-0.2` development manifest, including the explicit same-base and cross-base radix numeric profiles. Pass `--cts <manifest>` to run an older compatibility target explicitly.
59
60
  The Instruction and Mutate CTS lanes are experimental and are not included in `npm run cts` while SANSA.Instruction and SANSA.Mutate remain proposal-stage. The Mutate lane includes structured planning, apply, target-surface, and experimental policy plan-filter cases.
60
61
 
61
62
  ## Query Tool
@@ -78,6 +79,16 @@ into a SANSA namespace without rebuilding an AEON parser AST.
78
79
  and AES validation. Film support is query-only; SANSA does not expose a Film
79
80
  mutation target or writer.
80
81
 
82
+ Namespace adapters may optionally expose
83
+ `structurallyEqual(leftBinding, rightBinding)`. SANSA uses this hook only for
84
+ `==` and `!=` between one binding on each side when both bindings are
85
+ containers of the same representation kind. A Boolean result is authoritative;
86
+ returning `undefined`, or omitting the hook, retains SANSA's generic structural
87
+ materialization and comparison. The hook receives the active value-semantics
88
+ profile and must decline profiles it cannot implement. This lets retained
89
+ binary document models compare native container handles without making their
90
+ storage topology part of SANSA.Query.
91
+
81
92
  For browser-based technical testing, run the Query Workbench:
82
93
 
83
94
  ```bash
@@ -116,8 +127,18 @@ its current boundary is documented in
116
127
 
117
128
  Both the CLI and browser workbench can select an explicit query value-semantics
118
129
  profile, such as the default codepoint profile, the Natural ASCII numeric-region
119
- profile, or the French locale profile, to test comparison, ordering, and
120
- case-mapping behavior under different consumer contexts.
130
+ profile, the French locale profile, the explicit same-base `radix-numeric`
131
+ profile, or the exact `radix-numeric-cross-base` profile, to test comparison,
132
+ ordering, and case-mapping behavior under different consumer contexts.
133
+ Radix representation scale is independently available through
134
+ `radixScale(value)` in queries and `radixScaleOf(payload, base?)` in the API;
135
+ for example, `%19.9900` has scale 4 even when a numeric profile treats it as
136
+ equal to `%19.99`.
137
+ Conservative temporal completion-set relations are available through
138
+ `temporalRelation(left, right)` in queries and `compareTemporalClaims(left,
139
+ right)` in the API. Date literals may use year (`2026-`), month (`2026-07`),
140
+ or day (`2026-07-25`) granularity; coarser forms contain compatible finer
141
+ forms under those completion-set semantics.
121
142
 
122
143
  Full CLI, workbench, Query semantics, and recipe details live in
123
144
  [docs/query-tool.md](docs/query-tool.md).
@@ -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.1",
5
+ "implementation_version": "0.12.0",
6
6
  "cts_repository": "aeonite-org/aeonite-cts",
7
7
  "cts_protocol": "cts.protocol.v1",
8
8
  "claims": [
@@ -10,7 +10,14 @@
10
10
  "surface": "value-semantics",
11
11
  "snapshot_id": "value-semantics-cts-v1-snapshot-0.1",
12
12
  "status": "claimed",
13
- "command": "npm run cts:value-semantics"
13
+ "command": "npm run cts:value-semantics -- --cts ../../aeonite-org/aeonite-cts/cts/value-semantics/v1/value-semantics-cts.v1.json"
14
+ },
15
+ {
16
+ "surface": "value-semantics-radix-numeric",
17
+ "snapshot_id": "value-semantics-cts-v1-snapshot-0.2",
18
+ "status": "experimental",
19
+ "command": "npm run cts:value-semantics",
20
+ "notes": "The default command targets the mutable proposal-stage development manifest."
14
21
  },
15
22
  {
16
23
  "surface": "sansa-address-parser",
@@ -17,6 +17,7 @@ npm run cts:mutate
17
17
  ```
18
18
 
19
19
  The default Query CTS lane is core conformance and skips experimental extension cases. The experimental lane includes those cases for implementations that advertise matching extensions.
20
+ The value-semantics runner defaults to the mutable `value-semantics-cts-v1-snapshot-0.2` development target. It includes the minimum consumer suite plus conformance vectors for `aeon.value.radix.numeric.same-base.v1` and `aeon.value.radix.numeric.cross-base.v1`; older manifests remain selectable with `--cts <manifest>`.
20
21
  The Instruction and Mutate CTS lanes are experimental and are not included in
21
22
  `npm run cts` while SANSA.Instruction and SANSA.Mutate remain proposal-stage.
22
23
  The Mutate lane covers structured planning, apply, target-surface checks, and
@@ -137,6 +138,7 @@ reference forms, and a conservative container-literal slice:
137
138
  :list<string>, ["adapter", "driver"]
138
139
  :tuple, ("sku", 7)
139
140
  :node, <badge("new", 3)>
141
+ :symbol, |in review\|blocked|
140
142
  ```
141
143
 
142
144
  Container literal members must recursively be instruction values. This keeps
@@ -294,11 +296,57 @@ evaluateValueSemanticsOperation("compare", {
294
296
  })
295
297
  ```
296
298
 
297
- The supported operations are `equal`, `notEqual`, `compare`, and `isValue`. The supported minimum-profile categories are `finiteNumber`, `positiveInfinity`, `negativeInfinity`, `nan`, `string`, `boolean`, `toggle`, `hex`, `radix`, `encoding`, `separator`, `sansaAddress`, `referenceForm`, `temporal`, `lexicalStructuredScalar`, `explicitNull`, `explicitAbsence`, `missing`, `container`, and `bindingSet`.
298
-
299
- The default exported profile, `aeonValueSemanticsDefaultProfile`, uses Unicode scalar-value string order and deterministic default Unicode case mapping. It does not perform natural numeric-region ordering: `part-10` sorts before `part-2` under the default profile. `createIntlValueSemanticsProfile(...)` creates an explicit Intl-backed string profile, `createFrenchValueSemanticsProfile(...)` is a convenience profile for French collation and case mapping, and `createNaturalAsciiValueSemanticsProfile(...)` is an exploratory deterministic numeric-region profile where `part-2` sorts before `part-10`. Query evaluation accepts the same profile surface through `evaluateQuery(..., { valueSemantics })`.
300
-
301
- Custom profile objects must provide a complete string contract: `compareStrings`, `lowerString`, and `upperString` together. They may also provide `compareTemporal` for temporal comparison. Partial hook objects are rejected rather than merged with defaults, because mixed collation, normalization, and case-mapping rules would create an implicit profile that is not portable. The minimum profile does not apply custom string collation to `hex`, `radix`, `encoding`, `separator`, or `sansaAddress` as domain semantics; those families keep their deterministic payload or address-expression behavior unless a future explicit profile defines a richer domain.
299
+ The supported operations are `equal`, `notEqual`, `compare`, `isValue`,
300
+ `radixScale`, and `temporalRelation`. `temporalRelation` returns `equal`,
301
+ `before`, `after`, `contains`, `containedBy`, `overlaps`, or `incomparable` for
302
+ two temporal claims. It treats reduced precision as a completion set and fails
303
+ closed where chronology requires an external timezone, timescale, local-clock,
304
+ or leap-second authority. The supported minimum-profile categories are `finiteNumber`, `positiveInfinity`, `negativeInfinity`, `nan`, `string`, `boolean`, `toggle`, `hex`, `radix`, `encoding`, `separator`, `symbol`, `sansaAddress`, `referenceForm`, `temporal`, `lexicalStructuredScalar`, `explicitNull`, `explicitAbsence`, `missing`, `container`, and `bindingSet`.
305
+
306
+ `finiteNumber` descriptor values may be canonical AEON numeric strings or host
307
+ numbers. Canonical strings are compared exactly, including integer, fractional,
308
+ and exponent forms, without conversion through a host floating-point type.
309
+ Namespace adapters should expose canonical source text through
310
+ `numericLexeme(binding)` or `binding.numericLexeme`; this lexeme takes
311
+ precedence over a convenience host value during comparison.
312
+
313
+ The radix family remains representation-preserving in the minimum profile.
314
+ In particular, `decimal` is the AEON `radix[10]` alias, so numeric conversion
315
+ or ordering for `%19.9900` requires an explicit trusted profile rather than an
316
+ implicit finite-number coercion.
317
+
318
+ `createRadixNumericValueSemanticsProfile()` (profile id
319
+ `aeon.value.radix.numeric.same-base.v1`, compact alias `radix-numeric`) enables
320
+ exact numeric equality and ordering for radix-family values whose resolved
321
+ bases match. A typed operand supplies the base for an untyped `%...` query
322
+ literal, so a `decimal` binding can be compared with `%19.99`. If both operands
323
+ declare different bases, comparison fails closed; cross-base rational
324
+ comparison is not part of this profile. `compareExactRadixValues(left, right,
325
+ base)` exposes the same base-2-through-base-64 comparator directly. Neither API
326
+ converts through JavaScript `number`.
327
+
328
+ `createCrossBaseRadixNumericValueSemanticsProfile()` (profile id
329
+ `aeon.value.radix.numeric.cross-base.v1`, compact alias
330
+ `radix-numeric-cross-base`) additionally compares operands with independently
331
+ resolved bases. It represents each finite radix value as an exact integer over
332
+ an exact power-of-base denominator and cross-multiplies those values without
333
+ rounding. `compareExactCrossBaseRadixValues(left, leftBase, right, rightBase)`
334
+ exposes that comparator directly. The same-base profile continues to reject
335
+ mixed bases.
336
+
337
+ `radixScaleOf(payload, base?)` returns the represented count of fractional
338
+ radix digits, excluding visual `_` separators. The profile-independent
339
+ `radixScale` value-semantics operation and `radixScale(value)` query function
340
+ expose the same representation metadata. Thus `%19.9900` has scale 4 and
341
+ `%19.99` has scale 2 even though an applicable numeric radix profile compares
342
+ their mathematical values as equal. Namespace adapters may expose a cached
343
+ `radixScale` property or callback; SANSA otherwise derives it from a radix
344
+ binding's preserved payload. Scale counts digits in each value's own base and
345
+ does not itself define cross-base quantum, rounding, or schema policy.
346
+
347
+ The default exported profile, `aeonValueSemanticsDefaultProfile`, uses Unicode scalar-value string order and deterministic default Unicode case mapping. It does not perform natural numeric-region ordering: `part-10` sorts before `part-2` under the default profile. `createIntlValueSemanticsProfile(...)` creates an explicit Intl-backed string profile, `createFrenchValueSemanticsProfile(...)` is a convenience profile for French collation and case mapping, `createNaturalAsciiValueSemanticsProfile(...)` is an exploratory deterministic numeric-region profile where `part-2` sorts before `part-10`, `createRadixNumericValueSemanticsProfile(...)` adds exact same-base radix comparison, and `createCrossBaseRadixNumericValueSemanticsProfile(...)` adds exact rational comparison across bases. Query evaluation accepts the same profile surface through `evaluateQuery(..., { valueSemantics })`.
348
+
349
+ Custom profile objects must provide a complete string contract: `compareStrings`, `lowerString`, and `upperString` together. They may also provide `compareTemporal` for temporal comparison and `compareRadix` for explicitly enabled radix comparison. Partial string hook objects are rejected rather than merged with defaults, because mixed collation, normalization, and case-mapping rules would create an implicit profile that is not portable. The minimum profile does not apply custom string collation to `hex`, `radix`, `encoding`, `separator`, `symbol`, or `sansaAddress` as domain semantics; those families keep their deterministic payload or address-expression behavior unless an explicit profile defines a richer domain.
302
350
 
303
351
  `resolveAddress` accepts either an address string or a parsed `SansaAddress` and returns:
304
352
 
@@ -381,7 +429,7 @@ may also carry `provenance`, which is preserved on the planned operation.
381
429
  Provenance is inert metadata; it is not interpreted as SANSA source,
382
430
  authorization policy, validation policy, or mutation rewrite behavior.
383
431
 
384
- `create`, `replace`, and `insert` requests may include optional `datatype` and `kind` strings. `datatype` preserves semantic type intent, such as `sansa`, `list<string>`, or a custom type like `brandColor`. `kind` preserves representation or literal-family intent, such as `hex`, `separator`, `object`, `list`, `tuple`, or `node`. The planner validates only that provided hints are non-empty strings and preserves them on the planned operation. It does not decide whether the value is legal for that datatype or kind; schema, host adapters, or higher-level profiles own semantic compatibility checks.
432
+ `create`, `replace`, and `insert` requests may include optional `datatype` and `kind` strings. `datatype` preserves semantic type intent, such as `sansa`, `list<string>`, or a custom type like `brandColor`. `kind` preserves representation or literal-family intent, such as `hex`, `separator`, `symbol`, `object`, `list`, `tuple`, or `node`. The planner validates only that provided hints are non-empty strings and preserves them on the planned operation. It does not decide whether the value is legal for that datatype or kind; schema, host adapters, or higher-level profiles own semantic compatibility checks.
385
433
 
386
434
  Structured Mutate requests intentionally preserve `datatype` and `kind`
387
435
  separately until target-surface validation. This differs from SANSA
@@ -409,7 +457,12 @@ If mutation targets parse successfully but produce SANSA portability warnings, s
409
457
 
410
458
  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.
411
459
 
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.
460
+ 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`, `symbol`, `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: "symbol"` with `"in review|blocked"` renders `|in review\|blocked|`; `kind: "null"` with `"notApplicable"` renders `!notApplicable`; and `kind: "cloneReference"` with `"target"` renders `~target`. Symbol payloads must be non-empty. 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.
461
+
462
+ The AEON target accepts custom semantic datatypes over symbol representation,
463
+ such as `datatype: "workflowStage", kind: "symbol"`. The reserved `symbol`
464
+ datatype follows the GP profile's no-clarifier rule, so bracket metadata such as
465
+ `symbol["workflow"]` is rejected rather than treated like separator metadata.
413
466
 
414
467
  Experimental Mutate budgets are optional and fail closed:
415
468
 
@@ -689,7 +742,10 @@ planning failure.
689
742
  JSON target mode accepts ordinary JSON-compatible object/list/string/number/
690
743
  boolean/null values, but rejects AEON-only representational features such as
691
744
  attribute-space mutations, `sansa` datatype hints, parameterized datatypes,
692
- tuples, nodes, references, NaN, and Infinity.
745
+ tuples, nodes, references, symbols, NaN, and Infinity. In particular, the
746
+ strict SANSA target surface does not silently materialize a symbol as a JSON
747
+ string; a consumer that deliberately chooses AEON's separate lossy JSON mode
748
+ owns that conversion and its warning metadata.
693
749
 
694
750
  Telex target mode is deliberately narrower in this release. It accepts only an
695
751
  exact `replace` of an existing portable scalar event with a representable
@@ -927,6 +983,9 @@ Recognized expression syntax:
927
983
  - function-call shape: `contains(.name, "x")`
928
984
  - projection shape: `{ name = .name status = .status }`
929
985
 
986
+ Projection fields use AEON assignment syntax. `:` is reserved for AEON
987
+ datatype annotations and is not accepted as a JSON-style field separator.
988
+
930
989
  Operator precedence:
931
990
 
932
991
  ```text
@@ -957,6 +1016,7 @@ Currently evaluated:
957
1016
  - existence predicates over resolution expressions: `exists`, `absent`
958
1017
  - cardinality predicates over resolved binding sets: `any`, `all`, `none`
959
1018
  - built-in string functions: `contains`, `startsWith`, `endsWith`, `lower`, `upper`, `concat`
1019
+ - temporal completion-set relation function: `temporalRelation`
960
1020
  - dynamic address activation in expression positions with `path`
961
1021
  - missing-aware fallback with `fallback`
962
1022
  - dynamic direct-child resolution over addressable containers with `resolveChild`
@@ -1008,17 +1068,19 @@ isNaN(.metric) == true when the scalar is explicit NaN
1008
1068
  isInfinity(.limit) == true when the scalar is positive or negative infinity
1009
1069
  ```
1010
1070
 
1011
- `isValue(...)` is a missing-aware concrete-value guard. It returns true when its operand evaluates to one concrete value, including finite numbers, infinities, strings, Booleans, toggles, lexical structured scalars, SANSA address literals, legal reference forms, and containers. It may inspect scalar expressions directly or consume a Binding Set produced by resolution or `path(...)`. It returns false for zero bindings, explicit null, explicit absence values, and NaN. More than one binding remains a cardinality error.
1071
+ `isValue(...)` is a missing-aware concrete-value guard. It returns true when its operand evaluates to one concrete value, including finite numbers, infinities, strings, Booleans, toggles, symbols, lexical structured scalars, SANSA address literals, legal reference forms, and containers. It may inspect scalar expressions directly or consume a Binding Set produced by resolution or `path(...)`. It returns false for zero bindings, explicit null, explicit absence values, and NaN. More than one binding remains a cardinality error.
1012
1072
 
1013
1073
  `isNull(...)`, `isNullReason(...)`, `isNaN(...)`, and `isInfinity(...)` consume their first operand in single-binding scalar context. A missing operand therefore fails unless the query guards it with `exists(...)` or another missing-aware operator.
1014
1074
 
1015
1075
  `NaN` is not comparable. Scalar comparison and ordering over `NaN` fail with `SANSA_QUERY_EVALUATE_INVALID_COMPARISON`; use `isNaN(...)` for explicit tests. Infinity values remain numeric bounds and may participate in same-type numeric comparisons and ordering.
1016
1076
 
1017
1077
  Query source can express selected AEON scalar literal families directly:
1018
- `#ff00aa`, `%ff00aa`, `&QmFzZTY0IQ==`, `^0.11.0`, `!notSet`, and
1019
- temporal-looking literals such as `2026-07-25`, `09:30:00Z`,
1078
+ `#ff00aa`, `%ff00aa`, `&QmFzZTY0IQ==`, `^0.11.0`, `|approved|`, `!notSet`, and
1079
+ temporal-looking literals such as `2026-`, `2026-07`, `2026-07-25`, `09:30:00Z`,
1020
1080
  `2026-07-25T09:30:00Z`, and `2026-07-25T09:30:00Z&Australia/Melbourne`. These
1021
- literals preserve their family metadata for comparison. Same-family temporal
1081
+ literals preserve their family metadata for comparison. Symbol literals use
1082
+ string-style escapes plus `\|` for an embedded pipe, reject empty payloads and
1083
+ raw newlines, and remain distinct from strings. Same-family temporal
1022
1084
  literals compare through the active temporal profile; the default profile uses
1023
1085
  canonical payload order.
1024
1086
  Explicit null literals are tested through null predicates rather than equality.
@@ -1039,6 +1101,7 @@ Current comparison policy:
1039
1101
  | hex and radix | error | error | no implicit numeric or base-16 coercion |
1040
1102
  | encoding and encoding | allowed | allowed | naïve payload order over preserved encoded payload characters |
1041
1103
  | separator and separator | allowed | allowed | naïve whole-payload order; no splitting on datatype clarifiers |
1104
+ | symbol and symbol | allowed | error | exact decoded payload identity; no implicit string coercion or ordering |
1042
1105
  | SANSA address and SANSA address | allowed | allowed | canonical address-expression identity and naïve address-expression order |
1043
1106
  | 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 |
1044
1107
  | reference form and reference form | allowed | error | reference-kind and canonical target-path identity; no implicit follow |
@@ -1061,7 +1124,7 @@ Ordinary value-producing functions evaluate their arguments before invocation. R
1061
1124
  | multiple bindings | `SANSA_QUERY_EVALUATE_CARDINALITY` |
1062
1125
  | unsupported scalar type | `SANSA_QUERY_EVALUATE_INVALID_FUNCTION_CALL` |
1063
1126
 
1064
- The current built-in string functions are `contains`, `startsWith`, `endsWith`, `lower`, `upper`, and `concat`. Function-name matching is case-sensitive. They require string arguments and reject explicit null, NaN, infinity, Boolean, number, object, and Binding Set arguments unless a future function contract explicitly accepts one of those forms. Value predicates such as `isValue(...)`, `isNull(...)`, `isNullReason(...)`, `isNaN(...)`, and `isInfinity(...)` define their own argument contracts.
1127
+ The current built-in string functions are `contains`, `startsWith`, `endsWith`, `lower`, `upper`, and `concat`. Function-name matching is case-sensitive. They require string arguments and reject explicit null, NaN, infinity, Boolean, number, object, and Binding Set arguments unless a future function contract explicitly accepts one of those forms. `radixScale(value)` accepts one radix-family scalar and returns its represented fractional digit count without normalizing trailing zeroes. `temporalRelation(left, right)` accepts two single temporal scalars and returns `equal`, `before`, `after`, `contains`, `containedBy`, `overlaps`, or `incomparable` using the completion-set semantics of the shared temporal relation operation. Year (`2026-`), month (`2026-07`), and day (`2026-07-25`) dates denote their complete calendar extents, so coarser dates can contain finer dates. Value predicates such as `isValue(...)`, `isNull(...)`, `isNullReason(...)`, `isNaN(...)`, and `isInfinity(...)` define their own argument contracts.
1065
1128
 
1066
1129
  `path(value)` is a function-like structural operator. Its operand is consumed in scalar context and must be a structured SANSA Address Literal value. The initial representation is an object such as `{ type: "SansaAddressLiteral", address: "?.sku" }` or `{ type: "SansaAddressLiteral", address: parsedAddress }`. Plain strings are rejected and are not parsed as address syntax. In expression positions such as `select`, `where`, and `order by`, the activated address resolves in the current candidate context and returns a Binding Set. In `from path(...)`, the activated address supplies the source Binding Set for the query.
1067
1130
 
@@ -1181,6 +1244,13 @@ Query results:
1181
1244
 
1182
1245
  `address` is a backwards-compatible alias for `candidateAddress`. `candidateAddress` is optional and records the canonical source address of the candidate binding when the namespace exposes one. It is the address selected by `from`, after `where`, ordering, and slicing.
1183
1246
 
1247
+ An address is a locator in the namespace's current structure, not a durable
1248
+ identity. Positional addresses can change when ordered containers are edited.
1249
+ When a host supplies `binding.identity`, SANSA treats it as opaque structural
1250
+ occurrence metadata; it does not substitute identity for addressing. Mutation
1251
+ adapters can use identity and observed-state preconditions to reject stale
1252
+ targets.
1253
+
1184
1254
  `valueAddress` is present only when projection preserves one existing selected binding identity. For example, `from $.items.* select .sku` can carry `candidateAddress = $.items[0]` and `valueAddress = $.items[0].sku`. If the selected value is a multi-binding Binding Set, each binding retains its own address inside the value instead of collapsing to one `valueAddress`.
1185
1255
 
1186
1256
  `kind` is `binding` when the selected value is a Binding Set that preserves existing namespace binding identity. `valueAddress` is still present only for the single-binding case. `kind` is `derived` for constructed objects and scalar function results. Derived values do not become addressable namespace bindings.
@@ -1195,8 +1265,25 @@ Query values:
1195
1265
 
1196
1266
  Bindings expose scalar values through `namespace.value(binding)`, `binding.value`, or `binding.scalar`.
1197
1267
 
1268
+ The built-in evaluator compares finite numeric lexemes exactly. A namespace may
1269
+ still expose a JavaScript `number` as its convenience value, but should also
1270
+ expose `numericLexeme` so equality and ordering do not inherit host-number
1271
+ precision loss. Projection materialization remains the namespace adapter's
1272
+ policy: lossless adapters can expose canonical numeric strings, while adapters
1273
+ that deliberately expose native numbers should document that conversion.
1274
+ Numeric literals written directly in a query are projected as their canonical
1275
+ string lexeme so the evaluator does not round them before returning a result.
1276
+ Invalid comparisons identify the two evaluator categories (for example,
1277
+ `string vs finiteNumber`) and include `candidateAddress` when evaluation was
1278
+ attached to a candidate binding.
1279
+
1198
1280
  The evaluator does not execute host-supplied functions. Function support is limited to the built-ins listed above.
1199
1281
 
1282
+ SANSA query evaluation is bounded, deterministic, in-process evaluation over a
1283
+ host-supplied namespace. It is not a persistent database: the package does not
1284
+ provide storage, indexes, transactions, or a cost-based query optimizer. Hosts
1285
+ remain responsible for namespace lifecycle, authorization, and durable writes.
1286
+
1200
1287
  ## Qualifier Model
1201
1288
 
1202
1289
  ```js
@@ -1295,6 +1382,7 @@ Canonical rendering:
1295
1382
  - `SANSA_QUERY_UNEXPECTED_EXPRESSION_TOKEN`
1296
1383
  - `SANSA_QUERY_UNTERMINATED_EXPRESSION`
1297
1384
  - `SANSA_QUERY_INVALID_NUMBER_LITERAL`
1385
+ - `SANSA_QUERY_INVALID_SYMBOL_LITERAL`
1298
1386
  - `SANSA_QUERY_INVALID_RESOLUTION_EXPRESSION`
1299
1387
  - `SANSA_QUERY_INVALID_FUNCTION_CALL`
1300
1388
  - `SANSA_QUERY_INVALID_PROJECTION`
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "implementation": "@altopelago/sansa",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "profiles": [
5
5
  "value-semantics-minimum-consumer",
6
6
  "aeon.value.default.v1",
7
7
  "aeon.value.string.codepoint.v1",
8
8
  "aeon.value.string.natural.ascii.v1",
9
9
  "aeon.value.string.locale.fr.v1",
10
+ "aeon.value.radix.numeric.same-base.v1",
11
+ "aeon.value.radix.numeric.cross-base.v1",
10
12
  "addressing",
11
13
  "resolve",
12
14
  "query",
@@ -180,14 +180,34 @@ same-kind structural container equality, and infinity as a numeric bound.
180
180
  Query source can express the same AEON scalar literal families directly, for
181
181
  example `#ff00aa`, `%ff00aa`,
182
182
  `&QmFzZTY0IQ==`, `^0.11.0`, `!notSet`, and temporal-looking literals such as
183
- `2026-07-25`, `09:30:00Z`, `2026-07-25T09:30:00Z`, and
183
+ `2026-`, `2026-07`, `2026-07-25`, `09:30:00Z`, `2026-07-25T09:30:00Z`, and
184
184
  `2026-07-25T09:30:00Z&Australia/Melbourne`. Same-family temporal values compare
185
185
  through the active temporal value-semantics profile; the default profile uses
186
- canonical payload order for `date`, `time`, `datetime`, and `wtc` families. It rejects mixed-type
186
+ canonical payload order for presentation and does not claim chronological
187
+ ordering. `compareTemporalClaims(left, right)` and the `temporalRelation`
188
+ operation expose conservative completion-set relations: `equal`, `before`,
189
+ `after`, `contains`, `containedBy`, `overlaps`, or `incomparable`. They do not
190
+ resolve named zones, local context, non-UTC timescales, unknown `-00:00`
191
+ offsets, or leap-second chronology. The evaluator rejects mixed-type
187
192
  comparisons, toggle-to-Boolean coercion, hex-to-radix coercion, cross-family
188
193
  temporal comparison, Boolean ordering, container ordering, explicit null
189
194
  comparison, and NaN comparison.
190
195
 
196
+ Queries can request the same completion-set relation with
197
+ `temporalRelation(left, right)`. Both arguments must resolve to one temporal
198
+ scalar or be temporal literals. The function returns one of the relation names
199
+ above as a string, so it can be projected or used in a predicate:
200
+
201
+ ```text
202
+ from $.schedule
203
+ where temporalRelation(.window, 10:30Z) == "contains"
204
+ select { window = .window relation = temporalRelation(.window, 10:30Z) }
205
+ ```
206
+
207
+ Reduced-granularity dates use the same completion-set rules. For example,
208
+ `temporalRelation(2026-, 2026-07)` and
209
+ `temporalRelation(2026-07, 2026-07-25)` are both `contains`.
210
+
191
211
  Numeric datatype labels such as `int32`, `uint64`, and `float64` remain visible
192
212
  to semantic filters. When the host exposes their payload as a finite numeric
193
213
  value, comparison uses the shared numeric value semantics; range, width,
@@ -199,6 +219,17 @@ number, `bool` compares as a Boolean, `trimtick` and `prose` compare as strings,
199
219
  compares as a separator payload when the host exposes those representation
200
220
  families. `hex` remains distinct from radix, including `radix[16]`; no numeric
201
221
  or byte-level interpretation is implied without an explicit profile.
222
+ Use `--value-semantics radix-numeric` (full id
223
+ `aeon.value.radix.numeric.same-base.v1`) to enable exact numeric equality and
224
+ ordering for radix-family operands with the same resolved base. The typed
225
+ operand may supply the base for an untyped `%...` query literal. The profile
226
+ does not enable cross-base comparison, and the default profile continues to
227
+ preserve radix representation identity.
228
+ Use `--value-semantics radix-numeric-cross-base` (full id
229
+ `aeon.value.radix.numeric.cross-base.v1`) when both radix operands declare
230
+ different bases and exact mathematical comparison is intended. The profile
231
+ uses exact rational comparison, so base-2 `%.1` equals base-10 `%.5`, while
232
+ base-3 `%.1` is greater than the finite decimal approximation `%.333`.
202
233
  Semantic filters match the base datatype label of generic claims, so
203
234
  `#null`, `#nan`, and `#infinity` can select values annotated as `null<T>`,
204
235
  `nan<T>`, and `infinity<T>` before predicates such as `isNullReason(...)`,
@@ -244,6 +275,15 @@ built-ins are `contains`, `startsWith`, `endsWith`, `lower`, `upper`, and
244
275
  bindings, multiple bindings, explicit null, numeric specials, and other
245
276
  non-string values unless a specific function contract says otherwise.
246
277
 
278
+ `radixScale(value)` is the non-string built-in for radix representation
279
+ metadata. It returns the number of fractional radix digits excluding `_`
280
+ separators, so `radixScale(%19.9900)` is `4` while
281
+ `radixScale(%19.99)` is `2`. It does not select a numeric comparison profile
282
+ or change equality.
283
+
284
+ `temporalRelation(left, right)` is the non-string built-in for conservative
285
+ completion-set relations between two temporal values.
286
+
247
287
  String comparison and `order by` use deterministic Unicode scalar-value
248
288
  ordering by default. They do not use host locale or process locale collation
249
289
  unless an embedding caller supplies an explicit value-semantics profile.
package/docs/releasing.md CHANGED
@@ -29,16 +29,19 @@ must be released from tag `vX.Y.Z`.
29
29
  ## Release steps
30
30
 
31
31
  1. Run `npm run version:set -- X.Y.Z` to update machine-owned release metadata.
32
- 2. Add the dated `X.Y.Z` release section and human-authored notes to
32
+ 2. Update `conformance/cts-claims.json` so `implementation_version` matches the
33
+ package release, and confirm every claimed immutable CTS snapshot id remains
34
+ authoritative for the release.
35
+ 3. Add the dated `X.Y.Z` release section and human-authored notes to
33
36
  `CHANGELOG.md`.
34
- 3. Run `npm run version:check`, the test suite, CTS, stress tests, and package
37
+ 4. Run `npm run version:check`, the test suite, CTS, stress tests, and package
35
38
  dry-run.
36
- 4. Merge the release-prep PR into `main`.
37
- 5. Confirm CI passes on `main`.
38
- 6. Create tag `vX.Y.Z` from the checked `main` commit.
39
- 7. Publish a GitHub Release for `vX.Y.Z`.
40
- 8. Let `Publish npm` run from GitHub Actions.
41
- 9. Confirm the npm package page shows the expected version and provenance.
39
+ 5. Merge the release-prep PR into `main`.
40
+ 6. Confirm CI passes on `main`.
41
+ 7. Create tag `vX.Y.Z` from the checked `main` commit.
42
+ 8. Publish a GitHub Release for `vX.Y.Z`.
43
+ 9. Let `Publish npm` run from GitHub Actions.
44
+ 10. Confirm the npm package page shows the expected version and provenance.
42
45
 
43
46
  `version:set` updates `package.json` and `docs/capabilities.json` together.
44
47
  `version:check` is enforced by CI and the publish workflow; it also requires a
@@ -4,6 +4,12 @@ target:number = 7
4
4
  targetClone:number = ~target
5
5
  targetPointer:number = ~>target
6
6
 
7
+ prices:object = {
8
+ display:decimal = %19.9900
9
+ binaryTwo:radix[2] = %10
10
+ decimalTwo:decimal = %2
11
+ }
12
+
7
13
  types:object = {
8
14
  color:hex = #ff00aa
9
15
  colorCopy:hex = #ff00aa
@@ -11,6 +17,7 @@ types:object = {
11
17
  octal:radix8 = %70
12
18
  payload:encoding = &QmFzZTY0IQ==
13
19
  version:sep["."] = ^0.11.0
20
+ stage:symbol = |in review\|blocked|
14
21
  released:date = 2026-07-25
15
22
  window:time = 09:30:00Z
16
23
  stamp:datetime = 2026-07-25T09:30:00Z
@@ -59,6 +59,11 @@ kind=SeparatorLiteral
59
59
  datatype=sep["."]
60
60
  value=0.11.0
61
61
 
62
+ path=$.types.stage
63
+ kind=SymbolicLiteral
64
+ datatype=symbol
65
+ value=in review|blocked
66
+
62
67
  path=$.types.released
63
68
  kind=DateLiteral
64
69
  datatype=date
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altopelago/sansa",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "Semantic Address NameSpace Abstraction parser, resolver, and query toolkit.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ const root = resolve(here, '..');
9
9
  const ctsRoot = process.env.AEONITE_CTS_ROOT
10
10
  ? resolve(process.env.AEONITE_CTS_ROOT)
11
11
  : resolve(root, '..', '..', 'aeonite-org', 'aeonite-cts', 'cts');
12
- const manifestPath = readArg('--cts') ?? resolve(ctsRoot, 'value-semantics', 'v1', 'value-semantics-cts.v1.json');
12
+ const manifestPath = readArg('--cts') ?? resolve(ctsRoot, 'value-semantics', 'v1', 'value-semantics-cts.v1.next.json');
13
13
 
14
14
  const manifest = readJson(manifestPath);
15
15
  let pass = 0;
package/scripts/query.mjs CHANGED
@@ -479,8 +479,10 @@ function renderAeonValue(value, metadata, fieldMetadata) {
479
479
  if (value === null) return 'null';
480
480
  if (metadata?.kind === 'hex') return `#${value}`;
481
481
  if (metadata?.kind === 'radix') return `%${value}`;
482
+ if (metadata?.kind === 'number') return metadata.numericLexeme ?? String(value);
482
483
  if (metadata?.kind === 'encoding') return `&${value}`;
483
484
  if (metadata?.kind === 'separator') return `^${value}`;
485
+ if (metadata?.kind === 'symbol') return renderSymbolLiteral(value);
484
486
  if (['date', 'time', 'datetime', 'wtc'].includes(metadata?.kind)) return String(value);
485
487
  if (metadata?.kind === 'sansaAddress' || metadata?.kind === 'sansa') {
486
488
  return value?.canonical ?? value?.address?.canonical ?? value?.address ?? String(value);
@@ -504,6 +506,9 @@ function scalarMetadataFromBinding(binding) {
504
506
  const kind = binding.scalarKind ?? binding.valueKind ?? binding.literalKind ?? binding.representationKind ?? binding.kind ?? binding.type;
505
507
  if (typeof kind === 'string') metadata.kind = lowerFirst(kind);
506
508
  if (binding.nullReason !== undefined) metadata.nullReason = binding.nullReason;
509
+ if (binding.numericLexeme !== undefined) metadata.numericLexeme = binding.numericLexeme;
510
+ if (binding.radixBase !== undefined) metadata.radixBase = binding.radixBase;
511
+ if (binding.radixScale !== undefined) metadata.radixScale = binding.radixScale;
507
512
  return Object.keys(metadata).length > 0 ? metadata : undefined;
508
513
  }
509
514
 
@@ -511,6 +516,18 @@ function lowerFirst(value) {
511
516
  return value ? value[0].toLowerCase() + value.slice(1) : value;
512
517
  }
513
518
 
519
+ function renderSymbolLiteral(value) {
520
+ const text = String(value ?? '')
521
+ .replace(/\\/g, '\\\\')
522
+ .replace(/\|/g, '\\|')
523
+ .replace(/\n/g, '\\n')
524
+ .replace(/\r/g, '\\r')
525
+ .replace(/\t/g, '\\t')
526
+ .replace(/\u0008/g, '\\b')
527
+ .replace(/\f/g, '\\f');
528
+ return `|${text}|`;
529
+ }
530
+
514
531
  function summarizeQueryValue(value) {
515
532
  switch (value.type) {
516
533
  case 'bindingSet':