@synoi/sraid 0.3.0 → 0.4.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/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # @synoi/sraid
2
2
 
3
- Reference TypeScript implementation of **SRAID (Self-Routing Addressable
4
- Identity Data)**, L0 of the SynOI SRAID Stack. MIT-licensed.
3
+ Reference TypeScript implementation of **SRAID**, the SynOI content-addressed
4
+ object format. MIT-licensed.
5
+
6
+ SRAID is a name, not an acronym. It has been expanded two different ways in two
7
+ different places; neither expansion added anything, so this package no longer
8
+ expands it. What it does is below.
5
9
 
6
10
  SRAID defines:
7
11
 
@@ -9,24 +13,28 @@ SRAID defines:
9
13
  - a deterministic canonical object serializer used as input to hashing and signing,
10
14
  - a content-derived **OID** (`sha256:` followed by 64 hex chars) over the canonical bytes,
11
15
  - a hybrid **Ed25519 + ML-DSA-65** signature envelope,
12
- - an **L3 Merkle-DAG lineage** layer (`prev` edge + typed `links[]`), hashed into the OID so a head id commits its whole reachable history, and
13
- - a supersession record, the **SRO** (Supersession Record Object), that links a successor CDRO to its predecessor.
14
-
15
- The three legacy supersession mechanisms, the self-asserted `supersedes`
16
- string, the standalone SRO, and the `prev` edge, are unified by the lineage
17
- helpers (`lineageLinks`, `supersededOids`, `latestWins`). `latestWins` resolves
18
- a set of versions to its single head by following the identity-bound `prev`/
19
- `links` edges, giving a verifier a **latest-wins / monotone** rule instead of an
20
- unwitnessed pointer. Given the complete version set, `latestWins` will not name
21
- a superseded object as head; full rollback-replay resistance additionally
22
- requires that the superseding object cannot be withheld, which is a Resolver /
23
- transparency-log property (DESIGN, not yet deployed). The `set_complete` field
24
- on `LatestWinsResult` is the local signal that lets a caller detect an
25
- incomplete (potentially withheld) set.
26
-
27
- Higher layers are built on SRAID objects: Vault/Resolver at L1, Inference
28
- Broker/Resonance at L2, GAP at L3. This package is intentionally tiny and has no
29
- storage, no HTTP surface, and no governance logic.
16
+ - a **Merkle-DAG lineage** layer (`prev` edge + typed `links[]`), hashed into the OID so a head id commits its whole reachable history.
17
+
18
+ Supersession is expressed by two things, both identity-bound because
19
+ `cdroContentCore` hashes them: the `prev`/`links[]` Merkle edges, and the legacy
20
+ self-asserted `supersedes` string. `latestWins` resolves a version set to its
21
+ single head by following the identity-bound edges, giving a verifier a
22
+ **latest-wins / monotone** rule instead of an unwitnessed pointer. Given the
23
+ complete version set it will not name a superseded object as head; full
24
+ rollback-replay resistance additionally requires that the superseding object
25
+ cannot be withheld, which is a Resolver / transparency-log property (DESIGN, not
26
+ yet deployed). `set_complete` on `LatestWinsResult` is the local signal letting a
27
+ caller detect an incomplete (potentially withheld) set.
28
+
29
+ The standalone **SRO** was removed in 0.4.0 — see the CHANGELOG.
30
+
31
+ This package is object identity: canonical bytes, OIDs, hybrid signature
32
+ verification, lineage. It has no storage, no HTTP surface, and no policy.
33
+
34
+ It verifies **signatures, not identities**: `signer_kid` is an opaque string this
35
+ package never resolves, and nothing here checks revocation. Deciding whether a
36
+ key was trusted at signing time needs a key directory, which is a caller
37
+ concern.
30
38
 
31
39
  ## Install
32
40
 
@@ -39,63 +47,101 @@ npm install @synoi/sraid
39
47
  ```ts
40
48
  import {
41
49
  canonicalize,
42
- oidOf,
43
- verifySignature,
50
+ cdroOid,
51
+ cdroContentCore,
52
+ pae,
53
+ verifyAttestation,
44
54
  validateCdro,
55
+ type AttestationEnvelope,
45
56
  type CDRO,
46
- type SignatureEnvelope,
47
57
  } from '@synoi/sraid'
48
58
  import { ed25519 } from '@noble/curves/ed25519'
49
59
  import { ml_dsa65 } from '@noble/post-quantum/ml-dsa.js'
50
60
  import { randomBytes } from 'node:crypto'
51
61
 
52
- // 1. Build a CDRO body and derive its OID.
53
- const body = { capability: 'door.unlock', risk_class: 'B' }
54
- const oid = oidOf(body) // sha256:<64 hex chars>
55
-
56
- const cdro: CDRO<typeof body> = {
57
- oid,
62
+ // 1. Build the CDRO content core: every field EXCEPT the detached
63
+ // envelope fields (oid, signature, attestation, ...).
64
+ const core = {
58
65
  type: 'gap:capability_declaration',
59
- sraid_version: '2.0',
66
+ sraid_version: '2.0' as const,
60
67
  tenant_id: 't-home',
61
68
  created_at_ms: Date.now(),
62
69
  created_by: 'actor:skill:demo',
63
- body,
70
+ body: { capability: 'door.unlock', risk_class: 'B' },
64
71
  }
65
72
 
66
- console.log(validateCdro(cdro)) // { ok: true, errors: [] }
73
+ // 2. Identity is the hash of the WHOLE content core, not just the body.
74
+ // Use cdroOid(core) — NOT oidOf(core.body).
75
+ const cdro: CDRO<typeof core.body> = { oid: cdroOid(core), ...core }
76
+
77
+ console.log(validateCdro(cdro)) // { ok: true, errors: [] }
78
+ console.log(cdro.oid === cdroOid(cdro)) // true
67
79
 
68
- // 2. Sign the canonical bytes with both Ed25519 and ML-DSA-65.
69
- const canonical = canonicalize(cdro.body)
70
- const message = new TextEncoder().encode(canonical)
80
+ // 3. Sign the canonical content core through the DSSE PAE, which binds
81
+ // payloadType into the signed bytes (prevents cross-type replay).
82
+ const payloadType = 'application/vnd.synoi.sraid+json'
83
+ const payload = canonicalize(cdroContentCore(cdro))
84
+ const signedBytes = pae(payloadType, payload)
71
85
 
72
86
  const edPriv = new Uint8Array(randomBytes(32))
73
87
  const edPub = ed25519.getPublicKey(edPriv)
74
88
  const mlKeys = ml_dsa65.keygen(new Uint8Array(randomBytes(32)))
75
89
 
76
- const envelope: SignatureEnvelope = {
77
- ed25519: Buffer.from(ed25519.sign(message, edPriv)).toString('base64'),
78
- ml_dsa_65: Buffer.from(ml_dsa65.sign(message, mlKeys.secretKey)).toString('base64'),
79
- signer_kid: 'synoi-demo-2026-05',
90
+ const attestation: AttestationEnvelope = {
91
+ payloadType,
92
+ payload,
93
+ signatures: [
94
+ {
95
+ alg: 'ed25519',
96
+ sig: Buffer.from(ed25519.sign(signedBytes, edPriv)).toString('base64'),
97
+ keyid: 'synoi-demo-2026-05',
98
+ },
99
+ {
100
+ alg: 'ml-dsa-65',
101
+ sig: Buffer.from(ml_dsa65.sign(signedBytes, mlKeys.secretKey)).toString('base64'),
102
+ keyid: 'synoi-demo-2026-05',
103
+ },
104
+ ],
80
105
  }
81
106
 
82
- // 3. Verify.
83
- const v = verifySignature({
84
- canonical,
85
- envelope,
107
+ // 4. Attaching the attestation does NOT change identity — the six detached
108
+ // envelope fields are stripped before hashing.
109
+ const attested = { ...cdro, attestation }
110
+ console.log(cdroOid(attested) === cdro.oid) // true
111
+
112
+ // 5. Verify. `valid` is true only when BOTH signatures verify over the PAE.
113
+ const v = verifyAttestation({
114
+ envelope: attestation,
86
115
  ed25519_pub: edPub,
87
116
  ml_dsa_pub: mlKeys.publicKey,
117
+ expectedPayloadType: payloadType,
88
118
  })
89
- console.log(v) // { valid: true, reasons: [] }
119
+ console.log(v) // { valid: true, reasons: [] }
90
120
  ```
91
121
 
122
+ > **Identity is over the content core, not the body.** `oidOf(cdro.body)` is
123
+ > *not* a CDRO's OID; use `cdroOid`. `verifySignature` / `SignatureEnvelope`
124
+ > (bare-bytes, no payload-type binding) remain exported for compatibility but
125
+ > are superseded by the attestation path above.
126
+
92
127
  ## Surface
93
128
 
94
129
  ```ts
95
130
  canonicalize(value: unknown): string
131
+
132
+ // CDRO identity — hash the content core. THIS is an object's OID.
133
+ cdroOid(cdro: unknown): string
134
+ cdroContentCore(cdro: unknown): Record<string, unknown>
135
+ CDRO_ENVELOPE_FIELDS: readonly string[] // the six stripped fields
136
+
137
+ // Value-level hashing. oidOf(cdro.body) is NOT the CDRO's OID.
96
138
  oidOf(canonical: unknown): string
97
139
  oidOfCanonical(canonical: string | Uint8Array): string
98
140
 
141
+ // DSSE attestation — payload-type bound, both signatures required.
142
+ verifyAttestation(input): { valid: boolean; reasons: string[] }
143
+ pae(payloadType: string, payload: string | Uint8Array): Uint8Array
144
+
99
145
  verifySignature(args: {
100
146
  canonical: string | Uint8Array
101
147
  envelope: SignatureEnvelope
@@ -109,7 +155,6 @@ validateSignatureEnvelope(x: unknown): { ok: boolean; errors: string[] }
109
155
 
110
156
  // Types
111
157
  interface CDRO<TBody> { /* envelope */ }
112
- interface SRO { /* supersession record */ }
113
158
  interface SignatureEnvelope { ed25519: string; ml_dsa_65: string; signer_kid: string }
114
159
  ```
115
160
 
@@ -158,9 +203,21 @@ The node default entry is unchanged and keeps its synchronous `node:crypto` fast
158
203
  paths. This subpath is purely additive. Added in 0.3.0; earlier versions export
159
204
  only `.` and `./canonicalize`.
160
205
 
206
+ ## Authority verification
207
+
208
+ Capability-grant and delegation-chain verification is NOT in this package. It is
209
+ authorization policy, not object identity, and it moved to
210
+ [`@synoi/authority-verify`](https://github.com/synoi/synoi-authority-verify) in
211
+ 0.4.0.
212
+
213
+ `capabilityCovers`, `AuthorityResolver` and `GrantStatus` did NOT move - they are
214
+ a pure string predicate and a live-status contract, and remain in the surface
215
+ above.
216
+
161
217
  ## Canonical form
162
218
 
163
- The canonical form is recursive JCS-lite JSON:
219
+ The canonical form is a strict RFC 8785 (JCS) profile, tested against the
220
+ RFC 8785 vectors (`test/rfc8785-conformance.test.ts`):
164
221
 
165
222
  - primitives via `JSON.stringify`,
166
223
  - objects emit keys in lexicographic order,
@@ -170,7 +227,7 @@ The canonical form is recursive JCS-lite JSON:
170
227
 
171
228
  This canonical form is a wire contract. **Any byte-level change to the
172
229
  serializer changes every OID and invalidates every previously-created
173
- signature.** Treat it as frozen for SRAID v1.0; evolve it only via a new,
230
+ signature.** Treat it as frozen for SRAID v2.0; evolve it only via a new,
174
231
  explicitly versioned canonical profile.
175
232
 
176
233
  ## OID format
@@ -179,8 +236,12 @@ explicitly versioned canonical profile.
179
236
  OID = "sha256:" + lowercase_hex( sha256( canonicalize(content) ) )
180
237
  ```
181
238
 
182
- The hash input is the OBJECT MINUS its own `oid` and `signature` fields, so
183
- signature rotation does not change the OID.
239
+ The hash input is the object MINUS the six detached envelope fields
240
+ (`oid`, `signature`, `ml_dsa_signature`, `signature_key_id`,
241
+ `signature_algorithm`, `attestation`) — see `CDRO_ENVELOPE_FIELDS`. Everything
242
+ else is hashed, including `authority`, `sensitivity`, `prev`, `links` and
243
+ `supersedes`, so those are identity-bound and cannot be silently stripped.
244
+ Signing or rotating a signature never changes the OID.
184
245
 
185
246
  ## Why hybrid signatures
186
247
 
package/SPEC.md CHANGED
@@ -1,4 +1,4 @@
1
- # SRAID - Self-Routing Addressable Identity Data, Core Object Specification
1
+ # SRAID - Core Object Specification
2
2
 
3
3
  **Core Specification, Version 1.0**
4
4
 
@@ -38,7 +38,7 @@ A SRAID object (the Canonical Data Record Object, or **CDRO**) is a map with the
38
38
 
39
39
  The `oid`, `attestation`, and `signature` members are excluded from the OID input (Section 4) so that the same content produces the same OID and re-signing never changes identity. All other members are part of the canonical content and therefore contribute to the OID.
40
40
 
41
- **Lineage fields are independent.** An object MAY carry `supersedes`, `prev`, and one or more `links[]` simultaneously. `supersedes` asserts a version-replacement relationship (this object is the authoritative successor of the referenced OID); `prev` is the hash-chain backpointer for ordered append; `links[]` are typed semantic edges (L3). Each is validated for canonical-OID format in isolation. The validator does NOT enforce agreement among them (for example it does not require `supersedes === prev`), nor does it resolve or fetch the referenced objects. Higher layers (Vault/Resolver, GAP) are responsible for any cross-field lineage semantics. The signed supersession receipt (SRO, type `sraid:sro`) is distinct from the self-asserted `supersedes` field on a CDRO: the SRO is an independently signed object authored by a governing actor; `supersedes` is a producer-asserted claim inside the envelope. Both fields are format-validated but neither implies the other.
41
+ **Lineage fields are independent.** An object MAY carry `supersedes`, `prev`, and one or more `links[]` simultaneously. `supersedes` asserts a version-replacement relationship (this object is the authoritative successor of the referenced OID); `prev` is the hash-chain backpointer for ordered append; `links[]` are typed semantic edges (L3). Each is validated for canonical-OID format in isolation. The validator does NOT enforce agreement among them (for example it does not require `supersedes === prev`), nor does it resolve or fetch the referenced objects. Higher layers (Vault/Resolver, GAP) are responsible for any cross-field lineage semantics. The standalone supersession receipt (SRO, type `sraid:sro`) was REMOVED in 0.4.0: nothing in any language consumed it, `lineage.ts` never handled it, and the canon had already retired the term (ADR_022 section 0). A caller recording WHY something was superseded should put that in the successor's own `body`, where it is hashed and signed.
42
42
 
43
43
  ## 3. Canonical form
44
44
 
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @synoi/sraid — capability.ts
3
+ *
4
+ * Capability-pattern matching and the live-status contract.
5
+ *
6
+ * These stay in the core entry, while the grant/delegation VERIFIERS moved to
7
+ * `@synoi/sraid/authority` in 0.4.0, because they are different things:
8
+ *
9
+ * - `capabilityCovers` is a pure, total string predicate with no crypto, no
10
+ * I/O and no policy. It decides whether one dotted-taxonomy pattern covers
11
+ * another, and it is the leaf primitive that grant stores build on
12
+ * (synoi-app's `in-memory-engine.ts` and `app-store/store.ts` both call it
13
+ * directly rather than going through a verifier).
14
+ * - `GrantStatus` / `AuthorityResolver` are the CONTRACT for live grant
15
+ * state. The contract is a type; satisfying it is somebody else's job.
16
+ * Keeping it here lets a store, a resolver and a verifier agree on shape
17
+ * without any of them depending on the verifier.
18
+ *
19
+ * Nothing in this module makes, or can make, a live claim.
20
+ */
21
+ /**
22
+ * Match a capability `target` against a grant `pattern`. Pure string logic,
23
+ * re-stated here so the core stays dependency-free (the same rule lives in
24
+ * `@synoi/gap-types` `capabilityMatches`; the object layer must not depend on
25
+ * the protocol layer).
26
+ *
27
+ * - exact match → true
28
+ * - '*' → match-all
29
+ * - 'skill.*' matches 'skill.create' and deeper (segment-boundary only).
30
+ * A non-boundary 'admin.us*' must NOT match 'admin.users.delete'
31
+ * (privilege-escalation footgun) — only a '.'-anchored '*' is a wildcard.
32
+ */
33
+ export declare function capabilityCovers(pattern: string, target: string): boolean;
34
+ /**
35
+ * The live-state interface that the OID Resolver implements. It is the ONLY
36
+ * source of truth for the two properties that cannot be checked offline:
37
+ * whether a grant currently exists (resolves) and whether it has been revoked.
38
+ *
39
+ * RESOLVER-DEPENDENT: undeployed today (SRAID_FOUNDATION_PUNCHLIST C). Defined
40
+ * here so callers, a future resolver, and the out-of-core verifier all agree
41
+ * on one contract.
42
+ */
43
+ export interface AuthorityResolver {
44
+ /**
45
+ * Resolve a grant OID to its current status. Implementations should return
46
+ * `{ exists: false }` for an unknown OID and `{ exists: true, revoked: true,
47
+ * revoked_at_ms }` for a revoked one.
48
+ */
49
+ resolveGrantStatus(grantOid: string): Promise<GrantStatus> | GrantStatus;
50
+ }
51
+ export interface GrantStatus {
52
+ /** Whether the grant OID resolves to a known, published grant. */
53
+ exists: boolean;
54
+ /** Whether the grant has been revoked. Only meaningful when `exists`. */
55
+ revoked?: boolean;
56
+ /** When the revocation took effect, if revoked. */
57
+ revoked_at_ms?: number;
58
+ }
59
+ //# sourceMappingURL=capability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAQzE;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAA;CACzE;AAED,MAAM,WAAW,WAAW;IAC1B,kEAAkE;IAClE,MAAM,EAAE,OAAO,CAAA;IACf,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @synoi/sraid — capability.ts
3
+ *
4
+ * Capability-pattern matching and the live-status contract.
5
+ *
6
+ * These stay in the core entry, while the grant/delegation VERIFIERS moved to
7
+ * `@synoi/sraid/authority` in 0.4.0, because they are different things:
8
+ *
9
+ * - `capabilityCovers` is a pure, total string predicate with no crypto, no
10
+ * I/O and no policy. It decides whether one dotted-taxonomy pattern covers
11
+ * another, and it is the leaf primitive that grant stores build on
12
+ * (synoi-app's `in-memory-engine.ts` and `app-store/store.ts` both call it
13
+ * directly rather than going through a verifier).
14
+ * - `GrantStatus` / `AuthorityResolver` are the CONTRACT for live grant
15
+ * state. The contract is a type; satisfying it is somebody else's job.
16
+ * Keeping it here lets a store, a resolver and a verifier agree on shape
17
+ * without any of them depending on the verifier.
18
+ *
19
+ * Nothing in this module makes, or can make, a live claim.
20
+ */
21
+ /**
22
+ * Match a capability `target` against a grant `pattern`. Pure string logic,
23
+ * re-stated here so the core stays dependency-free (the same rule lives in
24
+ * `@synoi/gap-types` `capabilityMatches`; the object layer must not depend on
25
+ * the protocol layer).
26
+ *
27
+ * - exact match → true
28
+ * - '*' → match-all
29
+ * - 'skill.*' matches 'skill.create' and deeper (segment-boundary only).
30
+ * A non-boundary 'admin.us*' must NOT match 'admin.users.delete'
31
+ * (privilege-escalation footgun) — only a '.'-anchored '*' is a wildcard.
32
+ */
33
+ export function capabilityCovers(pattern, target) {
34
+ if (pattern === target)
35
+ return true;
36
+ if (pattern === '*')
37
+ return true;
38
+ if (pattern.endsWith('.*')) {
39
+ const prefix = pattern.slice(0, -1); // keep trailing '.', e.g. 'skill.'
40
+ return target.startsWith(prefix);
41
+ }
42
+ return false;
43
+ }
44
+ //# sourceMappingURL=capability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability.js","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,MAAc;IAC9D,IAAI,OAAO,KAAK,MAAM;QAAE,OAAO,IAAI,CAAA;IACnC,IAAI,OAAO,KAAK,GAAG;QAAE,OAAO,IAAI,CAAA;IAChC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA,CAAC,mCAAmC;QACvE,OAAO,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  /**
2
2
  * @synoi/sraid — public surface.
3
3
  *
4
- * SRAID (Self-Routing Addressable Identity Data) is L0 of the SynOI SRAID Stack:
4
+ * SRAID is the object-identity layer: it defines what a signed object IS and
5
+ * how anyone re-derives and verifies its identity offline.
5
6
  *
6
- * L0 SRAID ← this package
7
- * L1 Vault / Resolver
8
- * L2 Inference Broker / Resonance
9
- * L3 GAP (Governed Action Protocol)
10
- * L4 Apps
7
+ * Scope, precisely:
8
+ * IN canonical serializer, OID computation, hybrid Ed25519 + ML-DSA-65
9
+ * attestation verification, lineage resolution, shape validators.
10
+ * OUT storage, transport, key resolution, revocation, policy, enforcement.
11
11
  *
12
- * This package is intentionally small: types, canonical serializer,
13
- * OID computation, hybrid signature verification, and shape validators.
14
- * No storage, no HTTP, no governance those are higher layers.
12
+ * It verifies SIGNATURES, not IDENTITIES: `signer_kid` is an opaque string
13
+ * this package never resolves, and nothing here checks revocation. Deciding
14
+ * whether a key was trusted at signing time is a caller/directory concern.
15
15
  */
16
- export type { AttestationEnvelope, AttestationSignature, AuthorityBlock, AuthorityDecision, CDRO, LineageLink, LinkRel, SRO, SROBody, SensitivityTier, SignatureEnvelope, } from './types.js';
16
+ export type { AttestationEnvelope, AttestationSignature, AuthorityBlock, AuthorityDecision, CDRO, LineageLink, LinkRel, SensitivityTier, SignatureEnvelope, } from './types.js';
17
17
  export { canonicalize } from './canonicalize.js';
18
18
  export { oidOf, oidOfCanonical, cdroOid, cdroContentCore, CDRO_ENVELOPE_FIELDS } from './oid.js';
19
19
  export { verifySignature, type VerifySignatureInput, type VerifySignatureResult, } from './signature.js';
@@ -22,7 +22,7 @@ export { evictKeyFromCaches } from './internal/key-cache.js';
22
22
  export { verifyAttestation, pae, ALG_ED25519, ALG_ML_DSA_65, type VerifyAttestationInput, type VerifyAttestationResult, } from './attestation.js';
23
23
  export { lineageLinks, supersededOids, latestWins, type LatestWinsResult, } from './lineage.js';
24
24
  export { SENSITIVITY_TIERS, SENSITIVITY_DEFAULT, isSensitivityTier, sensitivityRank, sensitivityMax, sensitivityCarryForward, sensitivityMonotoneCheck, } from './sensitivity.js';
25
- export { verifyAuthority, capabilityCovers, type VerifyAuthorityInput, type VerifyAuthorityResult, type AuthorityResolver, type GrantStatus, type GrantBodyShape, } from './authority.js';
26
- export { verifyDelegationChain, MAX_DELEGATION_DEPTH, type VerifyDelegationChainInput, type VerifyDelegationChainResult, type HopResult, type LinkPubkeys, } from './authority.js';
27
- export { validateCdro, validateSro, validateSignatureEnvelope, validateAttestationEnvelope, validateAuthorityBlock, validateLineageLink, type ValidationResult, } from './validate.js';
25
+ export { capabilityCovers } from './capability.js';
26
+ export type { AuthorityResolver, GrantStatus } from './capability.js';
27
+ export { validateCdro, validateSignatureEnvelope, validateAttestationEnvelope, validateAuthorityBlock, validateLineageLink, type ValidationResult, } from './validate.js';
28
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,IAAI,EACJ,WAAW,EACX,OAAO,EACP,GAAG,EACH,OAAO,EACP,eAAe,EACf,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAGnB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAGhG,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,g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AO,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAGhG,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAA;AAKvB,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAMlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAK5D,OAAO,EACL,iBAAiB,EACjB,GAAG,EACH,WAAW,EACX,aAAa,EACb,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,UAAU,EACV,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAA;AAGrB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGrE,OAAO,EACL,YAAY,EACZ,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAA"}
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  /**
2
2
  * @synoi/sraid — public surface.
3
3
  *
4
- * SRAID (Self-Routing Addressable Identity Data) is L0 of the SynOI SRAID Stack:
4
+ * SRAID is the object-identity layer: it defines what a signed object IS and
5
+ * how anyone re-derives and verifies its identity offline.
5
6
  *
6
- * L0 SRAID ← this package
7
- * L1 Vault / Resolver
8
- * L2 Inference Broker / Resonance
9
- * L3 GAP (Governed Action Protocol)
10
- * L4 Apps
7
+ * Scope, precisely:
8
+ * IN canonical serializer, OID computation, hybrid Ed25519 + ML-DSA-65
9
+ * attestation verification, lineage resolution, shape validators.
10
+ * OUT storage, transport, key resolution, revocation, policy, enforcement.
11
11
  *
12
- * This package is intentionally small: types, canonical serializer,
13
- * OID computation, hybrid signature verification, and shape validators.
14
- * No storage, no HTTP, no governance those are higher layers.
12
+ * It verifies SIGNATURES, not IDENTITIES: `signer_kid` is an opaque string
13
+ * this package never resolves, and nothing here checks revocation. Deciding
14
+ * whether a key was trusted at signing time is a caller/directory concern.
15
15
  */
16
16
  // Canonical serializer — byte-identical to synoi-gateway + @synoi/vault.
17
17
  export { canonicalize } from './canonicalize.js';
@@ -28,19 +28,27 @@ export { verifyMlDsa65, isNativeMlDsaAvailable } from './mldsa.js';
28
28
  // bytes; `evictKeyFromCaches(keyId)` drops that entry from every cache so a
29
29
  // rotated or compromised key cannot be served stale on a later verify.
30
30
  export { evictKeyFromCaches } from './internal/key-cache.js';
31
- // L2 DSSE attestation — PAE type-binding, hybrid Ed25519 + ML-DSA-65 both
31
+ // DSSE attestation — PAE type-binding, hybrid Ed25519 + ML-DSA-65 both
32
32
  // required. The preferred signing path (replaces the legacy bare-bytes
33
33
  // SignatureEnvelope; closes the cross-type confusion gap SRAID F7 / A4).
34
34
  export { verifyAttestation, pae, ALG_ED25519, ALG_ML_DSA_65, } from './attestation.js';
35
- // L3 lineage (Merkle-DAG) — unify supersedes/SRO/prev; latest-wins resolution.
35
+ // Lineage (Merkle-DAG) — unify the `supersedes` string with the identity-bound
36
+ // `prev`/`links` edges; latest-wins resolution over a version set.
36
37
  export { lineageLinks, supersededOids, latestWins, } from './lineage.js';
37
- // L4 propagating sensitivity — coarse, opaque tier + monotone max() carry-forward.
38
+ // Propagating sensitivity — coarse, opaque tier + monotone max() carry-forward.
38
39
  export { SENSITIVITY_TIERS, SENSITIVITY_DEFAULT, isSensitivityTier, sensitivityRank, sensitivityMax, sensitivityCarryForward, sensitivityMonotoneCheck, } from './sensitivity.js';
39
- // L4 authority verification (the authorized axis).
40
- export { verifyAuthority, capabilityCovers, } from './authority.js';
41
- // L4 delegation-chain verification (K2) — VERIFY-ONLY, offline, no enforcement.
42
- // Always reports revocation_checked/existence_checked false (no live claim).
43
- export { verifyDelegationChain, MAX_DELEGATION_DEPTH, } from './authority.js';
40
+ // Capability matching + the live-grant-status contract. The leaf primitive a
41
+ // grant store needs: pure string logic, no crypto, no I/O, no live claim.
42
+ export { capabilityCovers } from './capability.js';
44
43
  // Shape validators.
45
- export { validateCdro, validateSro, validateSignatureEnvelope, validateAttestationEnvelope, validateAuthorityBlock, validateLineageLink, } from './validate.js';
44
+ export { validateCdro, validateSignatureEnvelope, validateAttestationEnvelope, validateAuthorityBlock, validateLineageLink, } from './validate.js';
45
+ // MOVED IN 0.4.0 — the grant and delegation-chain VERIFIERS (`verifyAuthority`,
46
+ // `verifyDelegationChain`, `MAX_DELEGATION_DEPTH`) are authorization policy,
47
+ // not object identity, and are no longer exported from this entry. They live
48
+ // at the `@synoi/sraid/authority` subpath, unchanged and still verify-only.
49
+ //
50
+ // `capabilityCovers`, `AuthorityResolver` and `GrantStatus` did NOT move: they
51
+ // are the leaf primitive and the contract, and are exported above.
52
+ //
53
+ // REMOVED IN 0.4.0 — `validateSro`, `SRO`, `SROBody`. See CHANGELOG 0.4.0.
46
54
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,yEAAyE;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,oEAAoE;AACpE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAEhG,8EAA8E;AAC9E,OAAO,EACL,eAAe,GAGhB,MAAM,gBAAgB,CAAA;AAEvB,6EAA6E;AAC7E,4EAA4E;AAC5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AC5E,0EAA0E;AAC1E,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAElE,wEAAwE;AACxE,yEAAyE;AACzE,4EAA4E;AAC5E,uEAAuE;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,uEAAuE;AACvE,uEAAuE;AACvE,yEAAyE;AACzE,OAAO,EACL,iBAAiB,EACjB,GAAG,EACH,WAAW,EACX,aAAa,GAGd,MAAM,kBAAkB,CAAA;AAEzB,+EAA+E;AAC/E,mEAAmE;AACnE,OAAO,EACL,YAAY,EACZ,cAAc,EACd,UAAU,GAEX,MAAM,cAAc,CAAA;AAErB,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kBAAkB,CAAA;AAEzB,6EAA6E;AAC7E,0EAA0E;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAGlD,oBAAoB;AACpB,OAAO,EACL,YAAY,EACZ,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,GAEpB,MAAM,eAAe,CAAA;AAEtB,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,EAAE;AACF,+EAA+E;AAC/E,mEAAmE;AACnE,EAAE;AACF,2EAA2E"}
package/dist/lineage.js CHANGED
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"lineage.js","sourceRoot":"","sources":["../src/lineage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,YAAY,CAAC,IAAiD;IAC5E,MAAM,GAAG,GAAkB,EAAE,CAAA;IAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9B,MAAM,IAAI,G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,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;YAC1F,CAAC;YACD,iEAAiE;QACnE,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;YACnB,OAAO,CAAC,GAAG,EAAE,CAAA;YACb,KAAK,CAAC,GAAG,EAAE,CAAA;QACb,CAAC;IACH,CAAC;IAED,0EAA0E;IAC1E,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA;IAC9E,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK;YAC1C,OAAO,EAAE,CAAC,yBAAyB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAA;IAClE,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;AAC5D,CAAC"}
package/dist/types.d.ts CHANGED
@@ -196,14 +196,15 @@ export interface AttestationEnvelope {
196
196
  * CDRO — Canonical Data Record Object.
197
197
  *
198
198
  * The base shape every signed CDRO object takes. The `oid` field is
199
- * `sha256:` + hex(sha256(canonicalize(body))) where the body is the CDRO
200
- * minus the `oid` and `signature` fields.
199
+ * `sha256:` + hex(sha256(canonicalize(cdroContentCore(obj)))) the WHOLE
200
+ * object minus the six detached envelope fields (`CDRO_ENVELOPE_FIELDS`).
201
+ * It is NOT a hash of `body` alone: use `cdroOid`, not `oidOf(cdro.body)`.
201
202
  *
202
203
  * Mirrors `GapCdroEnvelope` in synoi-gateway so a GAP object IS a CDRO.
203
204
  * Higher-layer packages narrow `body` with their own type.
204
205
  */
205
206
  export interface CDRO<TBody = unknown> {
206
- /** "sha256:" + hex(sha256(canonicalize(cdro_minus_oid_and_signature))). */
207
+ /** "sha256:" + hex(sha256(canonicalize(cdroContentCore(this)))). */
207
208
  oid: string;
208
209
  /** Object type discriminator (e.g. "gap:capability_grant"). */
209
210
  type: string;
@@ -283,31 +284,4 @@ export interface CDRO<TBody = unknown> {
283
284
  */
284
285
  signature?: SignatureEnvelope;
285
286
  }
286
- /**
287
- * SRO — Mutation / Supersession Record.
288
- *
289
- * Links a successor CDRO to its predecessor and the actor that authorized
290
- * the supersession. SROs are themselves CDRO objects (so they're CDROs with
291
- * an `oid` and `signature`), but they have a specific body shape.
292
- *
293
- * Where CDROs are the "what" of the system, SROs are the "what changed."
294
- * They form an append-only chain: every supersedes pointer in a CDRO is
295
- * accompanied by an SRO that explains and witnesses the change.
296
- */
297
- export interface SROBody {
298
- /** OID of the predecessor object being superseded. */
299
- predecessor_oid: string;
300
- /** OID of the successor object that supersedes it. */
301
- successor_oid: string;
302
- /** Why the predecessor was superseded. Free-form short string. */
303
- reason: string;
304
- /** OID of the actor that authorized this mutation. */
305
- authorized_by: string;
306
- /** Optional list of supporting evidence OIDs (audit trail). */
307
- evidence_oids?: string[];
308
- }
309
- /** SRO is just a CDRO with a fixed body type. */
310
- export type SRO = CDRO<SROBody> & {
311
- type: 'sraid:sro';
312
- };
313
287
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,MAAM,GACN,OAAO,GACP,SAAS,GACT,UAAU,GACV,QAAQ,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WA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EAAE,SAAS,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAC5C,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAA;IACX,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAA;IACf,kEAAkE;IAClE,UAAU,EAAE,oBAAoB,EAAE,CAAA;CACnC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,IAAI,CAAC,KAAK,GAAG,OAAO;IACnC,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAA;IACX,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,aAAa,EAAE,KAAK,CAAA;IACpB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAA;IACrB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAA;IAClB,+DAA+D;IAC/D,IAAI,EAAE,KAAK,CAAA;IACX;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,CAAA;IACrB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAA;IACjC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAA;CAC9B"}
package/dist/types.js CHANGED
@@ -13,4 +13,23 @@
13
13
  * input, so signature rotation does not change the OID.
14
14
  */
15
15
  export {};
16
+ // ── Supersession ──────────────────────────────────────────────────────────────
17
+ //
18
+ // The standalone SRO (Supersession Record Object, `type: 'sraid:sro'`) was
19
+ // REMOVED in 0.4.0. It was the third of three overlapping supersession
20
+ // mechanisms and the only one nothing consumed: `lineage.ts` never handled it,
21
+ // no repo in the SynOI stack referenced it in any language, and the canon had
22
+ // already retired the term (ADR_022 section 0: "an earlier, retired
23
+ // object-format term").
24
+ //
25
+ // Supersession is now expressed by exactly two things, both identity-bound
26
+ // because `cdroContentCore` hashes them:
27
+ //
28
+ // prev / links[] the Merkle edges - a head OID commits its whole reachable
29
+ // history. Resolve a version set with `latestWins`.
30
+ // supersedes the legacy self-asserted string, kept for compatibility.
31
+ //
32
+ // A caller that needs to record WHY something was superseded should put that
33
+ // in the successor's own `body`, where it is hashed and signed, rather than in
34
+ // a separate object whose linkage was never verified.
16
35
  //# sourceMappingURL=types.js.map