@openvtc/trust-tasks 0.16.5 → 0.16.7

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/_shared/components.d.ts +79 -4
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +8 -8
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +12 -4
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +8 -8
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +12 -4
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +8 -8
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +12 -4
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +8 -8
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +12 -4
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +6 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +6 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/rooms/_shared/0.1/room.d.ts +16 -0
  25. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -0
  26. package/dist/rooms/_shared/0.1/room.js +6 -0
  27. package/dist/rooms/_shared/0.1/room.js.map +1 -0
  28. package/dist/rooms/create/0.1/payload.d.ts +305 -0
  29. package/dist/rooms/create/0.1/payload.d.ts.map +1 -0
  30. package/dist/rooms/create/0.1/payload.js +176 -0
  31. package/dist/rooms/create/0.1/payload.js.map +1 -0
  32. package/dist/rooms/epoch/mint/0.1/payload.d.ts +385 -0
  33. package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -0
  34. package/dist/rooms/epoch/mint/0.1/payload.js +214 -0
  35. package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -0
  36. package/dist/rooms/records/get/0.1/payload.d.ts +505 -0
  37. package/dist/rooms/records/get/0.1/payload.d.ts.map +1 -0
  38. package/dist/rooms/records/get/0.1/payload.js +279 -0
  39. package/dist/rooms/records/get/0.1/payload.js.map +1 -0
  40. package/dist/rooms/records/list/0.1/payload.d.ts +618 -0
  41. package/dist/rooms/records/list/0.1/payload.d.ts.map +1 -0
  42. package/dist/rooms/records/list/0.1/payload.js +338 -0
  43. package/dist/rooms/records/list/0.1/payload.js.map +1 -0
  44. package/dist/rooms/records/put/0.1/payload.d.ts +591 -0
  45. package/dist/rooms/records/put/0.1/payload.d.ts.map +1 -0
  46. package/dist/rooms/records/put/0.1/payload.js +314 -0
  47. package/dist/rooms/records/put/0.1/payload.js.map +1 -0
  48. package/package.json +1 -1
  49. package/src/_shared/components.ts +95 -4
  50. package/src/device/list/0.1/payload.ts +12 -4
  51. package/src/device/list/0.2/payload.ts +12 -4
  52. package/src/device/register/0.1/payload.ts +12 -4
  53. package/src/device/register/0.2/payload.ts +12 -4
  54. package/src/index.ts +6 -0
  55. package/src/rooms/_shared/0.1/room.ts +17 -0
  56. package/src/rooms/create/0.1/payload.ts +224 -0
  57. package/src/rooms/epoch/mint/0.1/payload.ts +262 -0
  58. package/src/rooms/records/get/0.1/payload.ts +333 -0
  59. package/src/rooms/records/list/0.1/payload.ts +397 -0
  60. package/src/rooms/records/put/0.1/payload.ts +388 -0
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/records/put/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/records/put/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/records/put/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/rooms/records/put/0.1",
21
+ "title": "Rooms Records Put — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "roomId",
26
+ "key",
27
+ "presentation"
28
+ ],
29
+ "properties": {
30
+ "roomId": {
31
+ "type": "string",
32
+ "description": "The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own — which is what lets a room move hosts without reissuing a credential."
33
+ },
34
+ "key": {
35
+ "type": "string",
36
+ "maxLength": 512,
37
+ "description": "The record's key within the room. MUST be opaque on an `attributed` or `private` room; see RecordMetadata.key."
38
+ },
39
+ "presentation": {
40
+ "$ref": "#/$defs/AuthorityPresentation",
41
+ "description": "Must confer the `write` action at this room's scope."
42
+ },
43
+ "expectedVersion": {
44
+ "type": "integer",
45
+ "minimum": 0,
46
+ "description": "Optional precondition. Omit to overwrite unconditionally; `0` means create-only and fails if the key exists. On mismatch the host returns `rooms/records/put:versionConflict` CARRYING THE CURRENT VERSION AND RECORD — a bare rejection would force a re-read, and between rejection and re-read the record can change again, so the pattern has no fixed point under contention."
47
+ },
48
+ "sealed": {
49
+ "$ref": "#/$defs/SealedRecord",
50
+ "description": "REQUIRED on an `attributed` or `private` room. Mutually exclusive with `cleartext`."
51
+ },
52
+ "cleartext": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "body"
57
+ ],
58
+ "description": "REQUIRED on an `open` room, where the host reads records and can therefore search them. Mutually exclusive with `sealed`.",
59
+ "properties": {
60
+ "title": {
61
+ "type": "string",
62
+ "maxLength": 512
63
+ },
64
+ "description": {
65
+ "type": "string",
66
+ "maxLength": 2048
67
+ },
68
+ "body": {
69
+ "type": "string",
70
+ "maxLength": 1048576
71
+ },
72
+ "tags": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string",
76
+ "maxLength": 64
77
+ },
78
+ "maxItems": 32
79
+ }
80
+ }
81
+ },
82
+ "ext": {
83
+ "$ref": "#/$defs/Ext",
84
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
85
+ }
86
+ },
87
+ "$defs": {
88
+ "Response": {
89
+ "$anchor": "response",
90
+ "title": "Rooms Records Put — response payload",
91
+ "description": "Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.1#response.",
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": [
95
+ "key",
96
+ "version"
97
+ ],
98
+ "properties": {
99
+ "key": {
100
+ "type": "string",
101
+ "description": "The stored record's key."
102
+ },
103
+ "version": {
104
+ "type": "integer",
105
+ "minimum": 1,
106
+ "description": "The version assigned, monotonic per room."
107
+ },
108
+ "epoch": {
109
+ "type": "integer",
110
+ "minimum": 1,
111
+ "description": "The epoch the record was stored under."
112
+ },
113
+ "ext": {
114
+ "$ref": "#/$defs/Ext"
115
+ }
116
+ }
117
+ },
118
+ "Ext": {
119
+ "title": "Ext",
120
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
121
+ "type": "object",
122
+ "minProperties": 1,
123
+ "additionalProperties": true,
124
+ "propertyNames": {
125
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
126
+ }
127
+ },
128
+ "SealedRecord": {
129
+ "title": "SealedRecord",
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": [
133
+ "ciphertext",
134
+ "nonce",
135
+ "epoch"
136
+ ],
137
+ "description": "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.",
138
+ "properties": {
139
+ "ciphertext": {
140
+ "type": "string",
141
+ "description": "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it."
142
+ },
143
+ "nonce": {
144
+ "type": "string",
145
+ "description": "AEAD nonce, base64url."
146
+ },
147
+ "epoch": {
148
+ "type": "integer",
149
+ "minimum": 1,
150
+ "description": "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key."
151
+ }
152
+ }
153
+ },
154
+ "AuthorityPresentation": {
155
+ "title": "AuthorityPresentation",
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "membership",
160
+ "authority"
161
+ ],
162
+ "description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
163
+ "properties": {
164
+ "membership": {
165
+ "type": "string",
166
+ "description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
167
+ },
168
+ "authority": {
169
+ "type": "array",
170
+ "minItems": 1,
171
+ "maxItems": 8,
172
+ "items": {
173
+ "type": "string"
174
+ },
175
+ "description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
176
+ },
177
+ "subjectBinding": {
178
+ "type": "string",
179
+ "description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
180
+ }
181
+ }
182
+ }
183
+ }
184
+ };
185
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
186
+ export const RESPONSE_PAYLOAD_SCHEMA = {
187
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
188
+ "$ref": "#/$defs/Response",
189
+ "$defs": {
190
+ "Response": {
191
+ "$anchor": "response",
192
+ "title": "Rooms Records Put — response payload",
193
+ "description": "Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.1#response.",
194
+ "type": "object",
195
+ "additionalProperties": false,
196
+ "required": [
197
+ "key",
198
+ "version"
199
+ ],
200
+ "properties": {
201
+ "key": {
202
+ "type": "string",
203
+ "description": "The stored record's key."
204
+ },
205
+ "version": {
206
+ "type": "integer",
207
+ "minimum": 1,
208
+ "description": "The version assigned, monotonic per room."
209
+ },
210
+ "epoch": {
211
+ "type": "integer",
212
+ "minimum": 1,
213
+ "description": "The epoch the record was stored under."
214
+ },
215
+ "ext": {
216
+ "$ref": "#/$defs/Ext"
217
+ }
218
+ }
219
+ },
220
+ "Ext": {
221
+ "title": "Ext",
222
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
223
+ "type": "object",
224
+ "minProperties": 1,
225
+ "additionalProperties": true,
226
+ "propertyNames": {
227
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
228
+ }
229
+ },
230
+ "SealedRecord": {
231
+ "title": "SealedRecord",
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": [
235
+ "ciphertext",
236
+ "nonce",
237
+ "epoch"
238
+ ],
239
+ "description": "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.",
240
+ "properties": {
241
+ "ciphertext": {
242
+ "type": "string",
243
+ "description": "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it."
244
+ },
245
+ "nonce": {
246
+ "type": "string",
247
+ "description": "AEAD nonce, base64url."
248
+ },
249
+ "epoch": {
250
+ "type": "integer",
251
+ "minimum": 1,
252
+ "description": "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key."
253
+ }
254
+ }
255
+ },
256
+ "AuthorityPresentation": {
257
+ "title": "AuthorityPresentation",
258
+ "type": "object",
259
+ "additionalProperties": false,
260
+ "required": [
261
+ "membership",
262
+ "authority"
263
+ ],
264
+ "description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
265
+ "properties": {
266
+ "membership": {
267
+ "type": "string",
268
+ "description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
269
+ },
270
+ "authority": {
271
+ "type": "array",
272
+ "minItems": 1,
273
+ "maxItems": 8,
274
+ "items": {
275
+ "type": "string"
276
+ },
277
+ "description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
278
+ },
279
+ "subjectBinding": {
280
+ "type": "string",
281
+ "description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
282
+ }
283
+ }
284
+ }
285
+ }
286
+ };
287
+ /**
288
+ * SPEC.md §7.2 policy for the request variant, from this specification's
289
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
290
+ * per-specification and cannot be derived from the document alone, and
291
+ * item 2 needs the schema this carries.
292
+ */
293
+ export const SPEC = {
294
+ typeUri: TYPE_URI,
295
+ isBearer: false,
296
+ isProofRequired: true,
297
+ isRecipientRequired: true,
298
+ isIssuedAtRequired: true,
299
+ payloadSchema: PAYLOAD_SCHEMA,
300
+ };
301
+ /**
302
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
303
+ * tracks the *issuer* party's requirement because a response swaps the
304
+ * parties (§7.3 item 5).
305
+ */
306
+ export const RESPONSE_SPEC = {
307
+ typeUri: RESPONSE_TYPE_URI,
308
+ isBearer: false,
309
+ isProofRequired: true,
310
+ isRecipientRequired: true,
311
+ isIssuedAtRequired: true,
312
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
313
+ };
314
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/records/put/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,mDAA4D,CAAC;AAKrF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,4DAAqE,CAAC;AAKvG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,KAAK;QACL,cAAc;KACf;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,sN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Aa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.16.5",
3
+ "version": "0.16.7",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,7 +31,7 @@ export type AuditAction =
31
31
  | "adminAdd"
32
32
  | "adminStrip";
33
33
  /**
34
- * Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each.
34
+ * Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything.
35
35
  */
36
36
  export type Capability_DeviceV0_1 =
37
37
  | "vault-read"
@@ -41,9 +41,13 @@ export type Capability_DeviceV0_1 =
41
41
  | "policy-admin"
42
42
  | "device-admin"
43
43
  | "sign"
44
- | "key-mint";
44
+ | "key-mint"
45
+ | "sign-trust-task"
46
+ | "credential-write"
47
+ | "memory-read"
48
+ | "memory-write";
45
49
  /**
46
- * Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each.
50
+ * Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything.
47
51
  */
48
52
  export type Capability_DeviceV0_2 =
49
53
  | "vaultRead"
@@ -53,7 +57,11 @@ export type Capability_DeviceV0_2 =
53
57
  | "policyAdmin"
54
58
  | "deviceAdmin"
55
59
  | "sign"
56
- | "keyMint";
60
+ | "keyMint"
61
+ | "signTrustTask"
62
+ | "credentialWrite"
63
+ | "memoryRead"
64
+ | "memoryWrite";
57
65
  /**
58
66
  * Discriminator: is this consumer a user-driven Companion or a headless Service?
59
67
  */
@@ -252,6 +260,10 @@ export type Version = number;
252
260
  * A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses.
253
261
  */
254
262
  export type Vid = string;
263
+ /**
264
+ * How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything.
265
+ */
266
+ export type Visibility = "open" | "attributed" | "private";
255
267
 
256
268
  /**
257
269
  * The mediator's view of one served account.
@@ -621,6 +633,34 @@ export interface AuthenticatorAttestationResponseRegistration {
621
633
  authenticatorAttachment?: "platform" | "cross-platform";
622
634
  clientExtensionResults?: {};
623
635
  }
636
+ /**
637
+ * What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.
638
+ */
639
+ export interface AuthorityPresentation {
640
+ /**
641
+ * The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.
642
+ */
643
+ membership: string;
644
+ /**
645
+ * The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.
646
+ *
647
+ * @minItems 1
648
+ * @maxItems 8
649
+ */
650
+ authority:
651
+ | [string]
652
+ | [string, string]
653
+ | [string, string, string]
654
+ | [string, string, string, string]
655
+ | [string, string, string, string, string]
656
+ | [string, string, string, string, string, string]
657
+ | [string, string, string, string, string, string, string]
658
+ | [string, string, string, string, string, string, string, string];
659
+ /**
660
+ * REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.
661
+ */
662
+ subjectBinding?: string;
663
+ }
624
664
  /**
625
665
  * Unencrypted metadata plus the encrypted payload. The KDF and cipher parameters travel in the clear so a reader can decrypt without knowing this specification's defaults.
626
666
  */
@@ -2319,6 +2359,40 @@ export interface QueueLimits {
2319
2359
  */
2320
2360
  receiveQueueLimit?: number;
2321
2361
  }
2362
+ /**
2363
+ * What `rooms/records/list` returns. Never the body: ranking happens on the client, and a host that returned every body would make the caller pay for the whole room on every listing.
2364
+ */
2365
+ export interface RecordMetadata {
2366
+ /**
2367
+ * The record's key within the room. On `attributed` and `private` rooms this MUST be opaque — a random identifier, never a descriptive slug. A key reading `decision/acquire-northwind` defeats the encryption sitting beside it; structured naming belongs inside the sealed body.
2368
+ */
2369
+ key: string;
2370
+ /**
2371
+ * Server-assigned, monotonic per room.
2372
+ */
2373
+ version: number;
2374
+ /**
2375
+ * The epoch the record was sealed under. Absent on an `open` room.
2376
+ */
2377
+ epoch?: number;
2378
+ /**
2379
+ * Curation state. `retracted` is a tombstone: the body is gone, the key and version remain so incremental sync converges and the audit chain stays intact.
2380
+ */
2381
+ status?: "active" | "deprecated" | "retracted";
2382
+ updatedAt: string;
2383
+ /**
2384
+ * Present only on an `open` room; sealed with the body otherwise.
2385
+ */
2386
+ title?: string;
2387
+ /**
2388
+ * Present only on an `open` room; sealed with the body otherwise.
2389
+ */
2390
+ description?: string;
2391
+ /**
2392
+ * The member who wrote it. Present on `open` and `attributed`; on `private` the author is inside the sealed body, where only members can read it.
2393
+ */
2394
+ author?: string;
2395
+ }
2322
2396
  /**
2323
2397
  * A passkey already bound to a subject, as listed by `auth/passkey/list` and targeted by `auth/passkey/revoke/*`. This is the auth service's own management view of a credential — not a WebAuthn dictionary — so its members are camelCase per SPEC.md §4.10. The exception is `transports`, whose values are the externally-owned WebAuthn transport tokens and are carried verbatim.
2324
2398
  */
@@ -2427,6 +2501,23 @@ export interface Context_VtaV0_1 {
2427
2501
  type: "context";
2428
2502
  contextId: string;
2429
2503
  }
2504
+ /**
2505
+ * A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.
2506
+ */
2507
+ export interface SealedRecord {
2508
+ /**
2509
+ * The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it.
2510
+ */
2511
+ ciphertext: string;
2512
+ /**
2513
+ * AEAD nonce, base64url.
2514
+ */
2515
+ nonce: string;
2516
+ /**
2517
+ * The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.
2518
+ */
2519
+ epoch: number;
2520
+ }
2430
2521
  export interface ServiceInstance {
2431
2522
  /**
2432
2523
  * Stable identifier the control plane uses for this instance. SHOULD be derived from the instance's DID (e.g. `did:web:host.example` → `did_web_host_example`) so it survives restarts.
@@ -241,9 +241,13 @@ export const PAYLOAD_SCHEMA = {
241
241
  "policy-admin",
242
242
  "device-admin",
243
243
  "sign",
244
- "key-mint"
244
+ "key-mint",
245
+ "sign-trust-task",
246
+ "credential-write",
247
+ "memory-read",
248
+ "memory-write"
245
249
  ],
246
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
250
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
247
251
  },
248
252
  "KeyCustody": {
249
253
  "title": "KeyCustody",
@@ -573,9 +577,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
573
577
  "policy-admin",
574
578
  "device-admin",
575
579
  "sign",
576
- "key-mint"
580
+ "key-mint",
581
+ "sign-trust-task",
582
+ "credential-write",
583
+ "memory-read",
584
+ "memory-write"
577
585
  ],
578
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
586
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
579
587
  },
580
588
  "KeyCustody": {
581
589
  "title": "KeyCustody",
@@ -241,9 +241,13 @@ export const PAYLOAD_SCHEMA = {
241
241
  "policyAdmin",
242
242
  "deviceAdmin",
243
243
  "sign",
244
- "keyMint"
244
+ "keyMint",
245
+ "signTrustTask",
246
+ "credentialWrite",
247
+ "memoryRead",
248
+ "memoryWrite"
245
249
  ],
246
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
250
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
247
251
  },
248
252
  "KeyCustody": {
249
253
  "title": "KeyCustody",
@@ -573,9 +577,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
573
577
  "policyAdmin",
574
578
  "deviceAdmin",
575
579
  "sign",
576
- "keyMint"
580
+ "keyMint",
581
+ "signTrustTask",
582
+ "credentialWrite",
583
+ "memoryRead",
584
+ "memoryWrite"
577
585
  ],
578
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
586
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
579
587
  },
580
588
  "KeyCustody": {
581
589
  "title": "KeyCustody",
@@ -209,9 +209,13 @@ export const PAYLOAD_SCHEMA = {
209
209
  "policy-admin",
210
210
  "device-admin",
211
211
  "sign",
212
- "key-mint"
212
+ "key-mint",
213
+ "sign-trust-task",
214
+ "credential-write",
215
+ "memory-read",
216
+ "memory-write"
213
217
  ],
214
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
218
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
215
219
  },
216
220
  "KeyCustody": {
217
221
  "title": "KeyCustody",
@@ -531,9 +535,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
531
535
  "policy-admin",
532
536
  "device-admin",
533
537
  "sign",
534
- "key-mint"
538
+ "key-mint",
539
+ "sign-trust-task",
540
+ "credential-write",
541
+ "memory-read",
542
+ "memory-write"
535
543
  ],
536
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
544
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
537
545
  },
538
546
  "KeyCustody": {
539
547
  "title": "KeyCustody",
@@ -209,9 +209,13 @@ export const PAYLOAD_SCHEMA = {
209
209
  "policyAdmin",
210
210
  "deviceAdmin",
211
211
  "sign",
212
- "keyMint"
212
+ "keyMint",
213
+ "signTrustTask",
214
+ "credentialWrite",
215
+ "memoryRead",
216
+ "memoryWrite"
213
217
  ],
214
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
218
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
215
219
  },
216
220
  "KeyCustody": {
217
221
  "title": "KeyCustody",
@@ -531,9 +535,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
531
535
  "policyAdmin",
532
536
  "deviceAdmin",
533
537
  "sign",
534
- "keyMint"
538
+ "keyMint",
539
+ "signTrustTask",
540
+ "credentialWrite",
541
+ "memoryRead",
542
+ "memoryWrite"
535
543
  ],
536
- "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each."
544
+ "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
537
545
  },
538
546
  "KeyCustody": {
539
547
  "title": "KeyCustody",
package/src/index.ts CHANGED
@@ -202,6 +202,12 @@ export * as RegistryRecordPut_v0_1 from "./registry/record/put/0.1/payload.js";
202
202
  export * as RegistryRecordQuery_v0_1 from "./registry/record/query/0.1/payload.js";
203
203
  export * as RegistryRecordRead_v0_1 from "./registry/record/read/0.1/payload.js";
204
204
  export * as RegistryRecordUpdate_v0_1 from "./registry/record/update/0.1/payload.js";
205
+ export * as RoomShared_v0_1 from "./rooms/_shared/0.1/room.js";
206
+ export * as RoomsCreate_v0_1 from "./rooms/create/0.1/payload.js";
207
+ export * as RoomsEpochMint_v0_1 from "./rooms/epoch/mint/0.1/payload.js";
208
+ export * as RoomsRecordsGet_v0_1 from "./rooms/records/get/0.1/payload.js";
209
+ export * as RoomsRecordsList_v0_1 from "./rooms/records/list/0.1/payload.js";
210
+ export * as RoomsRecordsPut_v0_1 from "./rooms/records/put/0.1/payload.js";
205
211
  export * as SyncEventShared_v0_1 from "./sync/_shared/0.1/sync-event.js";
206
212
  export * as SyncEventShared_v0_2 from "./sync/_shared/0.2/sync-event.js";
207
213
  export * as SyncEvent_v0_1 from "./sync/event/0.1/payload.js";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/_shared/0.1/room.schema.json
4
+ */
5
+
6
+ /**
7
+ * Types shared by the rooms/* family. A room is a DTG node with its own identifier that issues the credentials governing it; a host stores its records and verifies presentations against those credentials, and never maintains a member list of its own.
8
+ */
9
+ export interface RoomsSharedTypes {
10
+ [k: string]: unknown | undefined;
11
+ }
12
+
13
+ /**
14
+ * The definitions this shared schema publishes, hoisted to one declaration each.
15
+ * See "../../../_shared/components.js".
16
+ */
17
+ export type { AuthorityPresentation, RecordMetadata, SealedRecord, Visibility } from "../../../_shared/components.js";