@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,505 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/records/get/0.1/payload.schema.json
4
+ */
5
+ import type { AuthorityPresentation, Ext, SealedRecord } from "../../../../_shared/components.js";
6
+ export interface RoomsRecordsGetPayload {
7
+ /**
8
+ * The room's identifier.
9
+ */
10
+ roomId: string;
11
+ /**
12
+ * The record to read.
13
+ */
14
+ key: string;
15
+ /**
16
+ * Must confer the `read` action at this room's scope. A read presents exactly as a write does, and on a `private` room requires no host session at all — authorizing reads by session would hand the host a member identifier on every access, and a week of access logs would reconstruct the membership the tier exists to withhold.
17
+ */
18
+ presentation: AuthorityPresentation;
19
+ /**
20
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
21
+ */
22
+ ext?: Ext;
23
+ }
24
+ /**
25
+ * Success response to rooms/records/get. Type https://trusttasks.org/spec/rooms/records/get/0.1#response.
26
+ */
27
+ export interface RoomsRecordsGetResponsePayload {
28
+ key: string;
29
+ version: number;
30
+ /**
31
+ * Present on an `attributed` or `private` room.
32
+ */
33
+ sealed?: SealedRecord;
34
+ /**
35
+ * Present on an `open` room.
36
+ */
37
+ cleartext?: {
38
+ [k: string]: unknown | undefined;
39
+ };
40
+ ext?: Ext;
41
+ }
42
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
43
+ export type { AuthorityPresentation, Ext, SealedRecord };
44
+ /** Trust Task type URI. */
45
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/records/get/0.1";
46
+ /** Stable alias for this specification's request payload shape. */
47
+ export type Payload = RoomsRecordsGetPayload;
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/records/get/0.1#response";
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = RoomsRecordsGetResponsePayload;
52
+ /**
53
+ * This specification's payload schema, as a value.
54
+ *
55
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
56
+ * rather than only as a `.json` file because TypeScript types are erased
57
+ * at runtime: without a schema a consumer has nothing to validate, and
58
+ * every REQUIRED payload member is optional in practice. Cross-file
59
+ * `$ref`s are already inlined, so it needs no resolver.
60
+ */
61
+ export declare const PAYLOAD_SCHEMA: {
62
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
63
+ readonly $id: "https://trusttasks.org/spec/rooms/records/get/0.1";
64
+ readonly title: "Rooms Records Get — payload";
65
+ readonly type: "object";
66
+ readonly additionalProperties: false;
67
+ readonly required: readonly ["roomId", "key", "presentation"];
68
+ readonly properties: {
69
+ readonly roomId: {
70
+ readonly type: "string";
71
+ readonly description: "The room's identifier.";
72
+ };
73
+ readonly key: {
74
+ readonly type: "string";
75
+ readonly maxLength: 512;
76
+ readonly description: "The record to read.";
77
+ };
78
+ readonly presentation: {
79
+ readonly $ref: "#/$defs/AuthorityPresentation";
80
+ readonly description: "Must confer the `read` action at this room's scope. A read presents exactly as a write does, and on a `private` room requires no host session at all — authorizing reads by session would hand the host a member identifier on every access, and a week of access logs would reconstruct the membership the tier exists to withhold.";
81
+ };
82
+ readonly ext: {
83
+ readonly $ref: "#/$defs/Ext";
84
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
85
+ };
86
+ };
87
+ readonly $defs: {
88
+ readonly Response: {
89
+ readonly $anchor: "response";
90
+ readonly title: "Rooms Records Get — response payload";
91
+ readonly description: "Success response to rooms/records/get. Type https://trusttasks.org/spec/rooms/records/get/0.1#response.";
92
+ readonly type: "object";
93
+ readonly additionalProperties: false;
94
+ readonly required: readonly ["key", "version"];
95
+ readonly properties: {
96
+ readonly key: {
97
+ readonly type: "string";
98
+ };
99
+ readonly version: {
100
+ readonly type: "integer";
101
+ readonly minimum: 1;
102
+ };
103
+ readonly sealed: {
104
+ readonly $ref: "#/$defs/SealedRecord";
105
+ readonly description: "Present on an `attributed` or `private` room.";
106
+ };
107
+ readonly cleartext: {
108
+ readonly type: "object";
109
+ readonly description: "Present on an `open` room.";
110
+ readonly additionalProperties: true;
111
+ };
112
+ readonly ext: {
113
+ readonly $ref: "#/$defs/Ext";
114
+ };
115
+ };
116
+ };
117
+ readonly Ext: {
118
+ readonly title: "Ext";
119
+ readonly 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.";
120
+ readonly type: "object";
121
+ readonly minProperties: 1;
122
+ readonly additionalProperties: true;
123
+ readonly propertyNames: {
124
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
125
+ };
126
+ };
127
+ readonly SealedRecord: {
128
+ readonly title: "SealedRecord";
129
+ readonly type: "object";
130
+ readonly additionalProperties: false;
131
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
132
+ readonly 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.";
133
+ readonly properties: {
134
+ readonly ciphertext: {
135
+ readonly type: "string";
136
+ readonly 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.";
137
+ };
138
+ readonly nonce: {
139
+ readonly type: "string";
140
+ readonly description: "AEAD nonce, base64url.";
141
+ };
142
+ readonly epoch: {
143
+ readonly type: "integer";
144
+ readonly minimum: 1;
145
+ readonly 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.";
146
+ };
147
+ };
148
+ };
149
+ readonly AuthorityPresentation: {
150
+ readonly title: "AuthorityPresentation";
151
+ readonly type: "object";
152
+ readonly additionalProperties: false;
153
+ readonly required: readonly ["membership", "authority"];
154
+ readonly 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.";
155
+ readonly properties: {
156
+ readonly membership: {
157
+ readonly type: "string";
158
+ readonly 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.";
159
+ };
160
+ readonly authority: {
161
+ readonly type: "array";
162
+ readonly minItems: 1;
163
+ readonly maxItems: 8;
164
+ readonly items: {
165
+ readonly type: "string";
166
+ };
167
+ readonly 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.";
168
+ };
169
+ readonly subjectBinding: {
170
+ readonly type: "string";
171
+ readonly 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.";
172
+ };
173
+ };
174
+ };
175
+ };
176
+ };
177
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
178
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
179
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
180
+ readonly $ref: "#/$defs/Response";
181
+ readonly $defs: {
182
+ readonly Response: {
183
+ readonly $anchor: "response";
184
+ readonly title: "Rooms Records Get — response payload";
185
+ readonly description: "Success response to rooms/records/get. Type https://trusttasks.org/spec/rooms/records/get/0.1#response.";
186
+ readonly type: "object";
187
+ readonly additionalProperties: false;
188
+ readonly required: readonly ["key", "version"];
189
+ readonly properties: {
190
+ readonly key: {
191
+ readonly type: "string";
192
+ };
193
+ readonly version: {
194
+ readonly type: "integer";
195
+ readonly minimum: 1;
196
+ };
197
+ readonly sealed: {
198
+ readonly $ref: "#/$defs/SealedRecord";
199
+ readonly description: "Present on an `attributed` or `private` room.";
200
+ };
201
+ readonly cleartext: {
202
+ readonly type: "object";
203
+ readonly description: "Present on an `open` room.";
204
+ readonly additionalProperties: true;
205
+ };
206
+ readonly ext: {
207
+ readonly $ref: "#/$defs/Ext";
208
+ };
209
+ };
210
+ };
211
+ readonly Ext: {
212
+ readonly title: "Ext";
213
+ readonly 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.";
214
+ readonly type: "object";
215
+ readonly minProperties: 1;
216
+ readonly additionalProperties: true;
217
+ readonly propertyNames: {
218
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
219
+ };
220
+ };
221
+ readonly SealedRecord: {
222
+ readonly title: "SealedRecord";
223
+ readonly type: "object";
224
+ readonly additionalProperties: false;
225
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
226
+ readonly 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.";
227
+ readonly properties: {
228
+ readonly ciphertext: {
229
+ readonly type: "string";
230
+ readonly 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.";
231
+ };
232
+ readonly nonce: {
233
+ readonly type: "string";
234
+ readonly description: "AEAD nonce, base64url.";
235
+ };
236
+ readonly epoch: {
237
+ readonly type: "integer";
238
+ readonly minimum: 1;
239
+ readonly 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.";
240
+ };
241
+ };
242
+ };
243
+ readonly AuthorityPresentation: {
244
+ readonly title: "AuthorityPresentation";
245
+ readonly type: "object";
246
+ readonly additionalProperties: false;
247
+ readonly required: readonly ["membership", "authority"];
248
+ readonly 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.";
249
+ readonly properties: {
250
+ readonly membership: {
251
+ readonly type: "string";
252
+ readonly 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.";
253
+ };
254
+ readonly authority: {
255
+ readonly type: "array";
256
+ readonly minItems: 1;
257
+ readonly maxItems: 8;
258
+ readonly items: {
259
+ readonly type: "string";
260
+ };
261
+ readonly 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.";
262
+ };
263
+ readonly subjectBinding: {
264
+ readonly type: "string";
265
+ readonly 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.";
266
+ };
267
+ };
268
+ };
269
+ };
270
+ };
271
+ /**
272
+ * SPEC.md §7.2 policy for the request variant, from this specification's
273
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
274
+ * per-specification and cannot be derived from the document alone, and
275
+ * item 2 needs the schema this carries.
276
+ */
277
+ export declare const SPEC: {
278
+ readonly typeUri: "https://trusttasks.org/spec/rooms/records/get/0.1";
279
+ readonly isBearer: false;
280
+ readonly isProofRequired: true;
281
+ readonly isRecipientRequired: true;
282
+ readonly isIssuedAtRequired: true;
283
+ readonly payloadSchema: {
284
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
285
+ readonly $id: "https://trusttasks.org/spec/rooms/records/get/0.1";
286
+ readonly title: "Rooms Records Get — payload";
287
+ readonly type: "object";
288
+ readonly additionalProperties: false;
289
+ readonly required: readonly ["roomId", "key", "presentation"];
290
+ readonly properties: {
291
+ readonly roomId: {
292
+ readonly type: "string";
293
+ readonly description: "The room's identifier.";
294
+ };
295
+ readonly key: {
296
+ readonly type: "string";
297
+ readonly maxLength: 512;
298
+ readonly description: "The record to read.";
299
+ };
300
+ readonly presentation: {
301
+ readonly $ref: "#/$defs/AuthorityPresentation";
302
+ readonly description: "Must confer the `read` action at this room's scope. A read presents exactly as a write does, and on a `private` room requires no host session at all — authorizing reads by session would hand the host a member identifier on every access, and a week of access logs would reconstruct the membership the tier exists to withhold.";
303
+ };
304
+ readonly ext: {
305
+ readonly $ref: "#/$defs/Ext";
306
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
307
+ };
308
+ };
309
+ readonly $defs: {
310
+ readonly Response: {
311
+ readonly $anchor: "response";
312
+ readonly title: "Rooms Records Get — response payload";
313
+ readonly description: "Success response to rooms/records/get. Type https://trusttasks.org/spec/rooms/records/get/0.1#response.";
314
+ readonly type: "object";
315
+ readonly additionalProperties: false;
316
+ readonly required: readonly ["key", "version"];
317
+ readonly properties: {
318
+ readonly key: {
319
+ readonly type: "string";
320
+ };
321
+ readonly version: {
322
+ readonly type: "integer";
323
+ readonly minimum: 1;
324
+ };
325
+ readonly sealed: {
326
+ readonly $ref: "#/$defs/SealedRecord";
327
+ readonly description: "Present on an `attributed` or `private` room.";
328
+ };
329
+ readonly cleartext: {
330
+ readonly type: "object";
331
+ readonly description: "Present on an `open` room.";
332
+ readonly additionalProperties: true;
333
+ };
334
+ readonly ext: {
335
+ readonly $ref: "#/$defs/Ext";
336
+ };
337
+ };
338
+ };
339
+ readonly Ext: {
340
+ readonly title: "Ext";
341
+ readonly 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.";
342
+ readonly type: "object";
343
+ readonly minProperties: 1;
344
+ readonly additionalProperties: true;
345
+ readonly propertyNames: {
346
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
347
+ };
348
+ };
349
+ readonly SealedRecord: {
350
+ readonly title: "SealedRecord";
351
+ readonly type: "object";
352
+ readonly additionalProperties: false;
353
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
354
+ readonly 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.";
355
+ readonly properties: {
356
+ readonly ciphertext: {
357
+ readonly type: "string";
358
+ readonly 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.";
359
+ };
360
+ readonly nonce: {
361
+ readonly type: "string";
362
+ readonly description: "AEAD nonce, base64url.";
363
+ };
364
+ readonly epoch: {
365
+ readonly type: "integer";
366
+ readonly minimum: 1;
367
+ readonly 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.";
368
+ };
369
+ };
370
+ };
371
+ readonly AuthorityPresentation: {
372
+ readonly title: "AuthorityPresentation";
373
+ readonly type: "object";
374
+ readonly additionalProperties: false;
375
+ readonly required: readonly ["membership", "authority"];
376
+ readonly 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.";
377
+ readonly properties: {
378
+ readonly membership: {
379
+ readonly type: "string";
380
+ readonly 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.";
381
+ };
382
+ readonly authority: {
383
+ readonly type: "array";
384
+ readonly minItems: 1;
385
+ readonly maxItems: 8;
386
+ readonly items: {
387
+ readonly type: "string";
388
+ };
389
+ readonly 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.";
390
+ };
391
+ readonly subjectBinding: {
392
+ readonly type: "string";
393
+ readonly 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.";
394
+ };
395
+ };
396
+ };
397
+ };
398
+ };
399
+ };
400
+ /**
401
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
402
+ * tracks the *issuer* party's requirement because a response swaps the
403
+ * parties (§7.3 item 5).
404
+ */
405
+ export declare const RESPONSE_SPEC: {
406
+ readonly typeUri: "https://trusttasks.org/spec/rooms/records/get/0.1#response";
407
+ readonly isBearer: false;
408
+ readonly isProofRequired: true;
409
+ readonly isRecipientRequired: true;
410
+ readonly isIssuedAtRequired: true;
411
+ readonly payloadSchema: {
412
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
413
+ readonly $ref: "#/$defs/Response";
414
+ readonly $defs: {
415
+ readonly Response: {
416
+ readonly $anchor: "response";
417
+ readonly title: "Rooms Records Get — response payload";
418
+ readonly description: "Success response to rooms/records/get. Type https://trusttasks.org/spec/rooms/records/get/0.1#response.";
419
+ readonly type: "object";
420
+ readonly additionalProperties: false;
421
+ readonly required: readonly ["key", "version"];
422
+ readonly properties: {
423
+ readonly key: {
424
+ readonly type: "string";
425
+ };
426
+ readonly version: {
427
+ readonly type: "integer";
428
+ readonly minimum: 1;
429
+ };
430
+ readonly sealed: {
431
+ readonly $ref: "#/$defs/SealedRecord";
432
+ readonly description: "Present on an `attributed` or `private` room.";
433
+ };
434
+ readonly cleartext: {
435
+ readonly type: "object";
436
+ readonly description: "Present on an `open` room.";
437
+ readonly additionalProperties: true;
438
+ };
439
+ readonly ext: {
440
+ readonly $ref: "#/$defs/Ext";
441
+ };
442
+ };
443
+ };
444
+ readonly Ext: {
445
+ readonly title: "Ext";
446
+ readonly 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.";
447
+ readonly type: "object";
448
+ readonly minProperties: 1;
449
+ readonly additionalProperties: true;
450
+ readonly propertyNames: {
451
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
452
+ };
453
+ };
454
+ readonly SealedRecord: {
455
+ readonly title: "SealedRecord";
456
+ readonly type: "object";
457
+ readonly additionalProperties: false;
458
+ readonly required: readonly ["ciphertext", "nonce", "epoch"];
459
+ readonly 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.";
460
+ readonly properties: {
461
+ readonly ciphertext: {
462
+ readonly type: "string";
463
+ readonly 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.";
464
+ };
465
+ readonly nonce: {
466
+ readonly type: "string";
467
+ readonly description: "AEAD nonce, base64url.";
468
+ };
469
+ readonly epoch: {
470
+ readonly type: "integer";
471
+ readonly minimum: 1;
472
+ readonly 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.";
473
+ };
474
+ };
475
+ };
476
+ readonly AuthorityPresentation: {
477
+ readonly title: "AuthorityPresentation";
478
+ readonly type: "object";
479
+ readonly additionalProperties: false;
480
+ readonly required: readonly ["membership", "authority"];
481
+ readonly 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.";
482
+ readonly properties: {
483
+ readonly membership: {
484
+ readonly type: "string";
485
+ readonly 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.";
486
+ };
487
+ readonly authority: {
488
+ readonly type: "array";
489
+ readonly minItems: 1;
490
+ readonly maxItems: 8;
491
+ readonly items: {
492
+ readonly type: "string";
493
+ };
494
+ readonly 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.";
495
+ };
496
+ readonly subjectBinding: {
497
+ readonly type: "string";
498
+ readonly 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.";
499
+ };
500
+ };
501
+ };
502
+ };
503
+ };
504
+ };
505
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/records/get/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGlG,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,YAAY,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE;QACV,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;IACF,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,qBAAqB,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAEzD,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,mDAA4D,CAAC;AAErF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAE7C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,4DAAqE,CAAC;AAEvG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiIjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}