@openvtc/trust-tasks 0.16.8 → 0.16.9

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 (50) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/dist/_shared/components.d.ts +2 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +4 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
  25. package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
  26. package/dist/rooms/keys/commit/0.1/payload.js +146 -0
  27. package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
  28. package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
  29. package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
  30. package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
  31. package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
  32. package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
  33. package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
  34. package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
  35. package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
  36. package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
  37. package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
  38. package/dist/rooms/records/curate/0.1/payload.js +277 -0
  39. package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
  40. package/package.json +1 -1
  41. package/src/_shared/components.ts +6 -2
  42. package/src/device/list/0.1/payload.ts +6 -2
  43. package/src/device/list/0.2/payload.ts +6 -2
  44. package/src/device/register/0.1/payload.ts +6 -2
  45. package/src/device/register/0.2/payload.ts +6 -2
  46. package/src/index.ts +4 -0
  47. package/src/rooms/keys/commit/0.1/payload.ts +195 -0
  48. package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
  49. package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
  50. package/src/rooms/records/curate/0.1/payload.ts +357 -0
@@ -0,0 +1,500 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/records/curate/0.1/payload.schema.json
4
+ */
5
+ import type { AuthorityPresentation, Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * A member curates a record: demotes it, retracts it, restores it from demotion, or pins it. Distinct from `rooms/records/put`, which replaces content — curation changes a record's standing in the room without a member having to rewrite it, and `curate` is a separate authority action so a community can grant one without the other.
8
+ */
9
+ export type RoomsRecordsCuratePayload = {
10
+ [k: string]: unknown | undefined;
11
+ } & {
12
+ /**
13
+ * The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own.
14
+ */
15
+ roomId: string;
16
+ /**
17
+ * The record to curate.
18
+ */
19
+ key: string;
20
+ /**
21
+ * Must confer the `curate` action at this room's scope. Deliberately not implied by `write`: curation is judgement over what a room's shared knowledge is worth, which is a different grant from the ability to add to it.
22
+ */
23
+ presentation: AuthorityPresentation;
24
+ /**
25
+ * The standing to move the record to. `deprecated` demotes it — the body is retained and a recalling agent MUST treat it as demoted rather than hidden. `retracted` is a tombstone: the body is dropped and the key, version and epoch remain so incremental sync converges. `active` restores a `deprecated` record; it MUST NOT be accepted for a `retracted` one, whose body is already gone and cannot be restored by a status change.
26
+ */
27
+ status?: "active" | "deprecated" | "retracted";
28
+ /**
29
+ * Whether the record is pinned. Orthogonal to `status` — a pinned record is still active, deprecated or retracted — because pinning answers 'what matters here' and status answers 'is this still current'. Omit to leave unchanged.
30
+ */
31
+ pinned?: boolean;
32
+ /**
33
+ * Why, for the room's audit trail. A retraction without a reason is the one a member cannot interpret later.
34
+ */
35
+ reason?: string;
36
+ /**
37
+ * Optional precondition: the record's current version. Curation assigns a new version — a demotion other members must converge on is a change like any other — so a caller that read a record before deciding to curate it can require that nothing has replaced it since.
38
+ */
39
+ expectedVersion?: number;
40
+ /**
41
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
42
+ */
43
+ ext?: Ext;
44
+ };
45
+ /**
46
+ * Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.
47
+ */
48
+ export interface RoomsRecordsCurateResponsePayload {
49
+ /**
50
+ * The record curated.
51
+ */
52
+ key: string;
53
+ /**
54
+ * The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version.
55
+ */
56
+ version: number;
57
+ /**
58
+ * The record's standing after the operation.
59
+ */
60
+ status: "active" | "deprecated" | "retracted";
61
+ /**
62
+ * Whether the record is pinned after the operation.
63
+ */
64
+ pinned?: boolean;
65
+ ext?: Ext;
66
+ }
67
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
68
+ export type { AuthorityPresentation, Ext };
69
+ /** Trust Task type URI. */
70
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/records/curate/0.1";
71
+ /** Stable alias for this specification's request payload shape. */
72
+ export type Payload = RoomsRecordsCuratePayload;
73
+ /** Trust Task response type URI (request type URI + "#response"). */
74
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/records/curate/0.1#response";
75
+ /** Stable alias for this specification's success-response payload shape. */
76
+ export type Response = RoomsRecordsCurateResponsePayload;
77
+ /**
78
+ * This specification's payload schema, as a value.
79
+ *
80
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
81
+ * rather than only as a `.json` file because TypeScript types are erased
82
+ * at runtime: without a schema a consumer has nothing to validate, and
83
+ * every REQUIRED payload member is optional in practice. Cross-file
84
+ * `$ref`s are already inlined, so it needs no resolver.
85
+ */
86
+ export declare const PAYLOAD_SCHEMA: {
87
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
88
+ readonly $id: "https://trusttasks.org/spec/rooms/records/curate/0.1";
89
+ readonly title: "Rooms Records Curate — payload";
90
+ readonly description: "A member curates a record: demotes it, retracts it, restores it from demotion, or pins it. Distinct from `rooms/records/put`, which replaces content — curation changes a record's standing in the room without a member having to rewrite it, and `curate` is a separate authority action so a community can grant one without the other.";
91
+ readonly type: "object";
92
+ readonly additionalProperties: false;
93
+ readonly required: readonly ["roomId", "key", "presentation"];
94
+ readonly properties: {
95
+ readonly roomId: {
96
+ readonly type: "string";
97
+ readonly description: "The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own.";
98
+ };
99
+ readonly key: {
100
+ readonly type: "string";
101
+ readonly maxLength: 512;
102
+ readonly description: "The record to curate.";
103
+ };
104
+ readonly presentation: {
105
+ readonly $ref: "#/$defs/AuthorityPresentation";
106
+ readonly description: "Must confer the `curate` action at this room's scope. Deliberately not implied by `write`: curation is judgement over what a room's shared knowledge is worth, which is a different grant from the ability to add to it.";
107
+ };
108
+ readonly status: {
109
+ readonly type: "string";
110
+ readonly enum: readonly ["active", "deprecated", "retracted"];
111
+ readonly description: "The standing to move the record to. `deprecated` demotes it — the body is retained and a recalling agent MUST treat it as demoted rather than hidden. `retracted` is a tombstone: the body is dropped and the key, version and epoch remain so incremental sync converges. `active` restores a `deprecated` record; it MUST NOT be accepted for a `retracted` one, whose body is already gone and cannot be restored by a status change.";
112
+ };
113
+ readonly pinned: {
114
+ readonly type: "boolean";
115
+ readonly description: "Whether the record is pinned. Orthogonal to `status` — a pinned record is still active, deprecated or retracted — because pinning answers 'what matters here' and status answers 'is this still current'. Omit to leave unchanged.";
116
+ };
117
+ readonly reason: {
118
+ readonly type: "string";
119
+ readonly maxLength: 512;
120
+ readonly description: "Why, for the room's audit trail. A retraction without a reason is the one a member cannot interpret later.";
121
+ };
122
+ readonly expectedVersion: {
123
+ readonly type: "integer";
124
+ readonly minimum: 1;
125
+ readonly description: "Optional precondition: the record's current version. Curation assigns a new version — a demotion other members must converge on is a change like any other — so a caller that read a record before deciding to curate it can require that nothing has replaced it since.";
126
+ };
127
+ readonly ext: {
128
+ readonly $ref: "#/$defs/Ext";
129
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
130
+ };
131
+ };
132
+ readonly anyOf: readonly [{
133
+ readonly required: readonly ["status"];
134
+ }, {
135
+ readonly required: readonly ["pinned"];
136
+ }];
137
+ readonly $defs: {
138
+ readonly Response: {
139
+ readonly $anchor: "response";
140
+ readonly title: "Rooms Records Curate — response payload";
141
+ readonly description: "Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.";
142
+ readonly type: "object";
143
+ readonly additionalProperties: false;
144
+ readonly required: readonly ["key", "version", "status"];
145
+ readonly properties: {
146
+ readonly key: {
147
+ readonly type: "string";
148
+ readonly description: "The record curated.";
149
+ };
150
+ readonly version: {
151
+ readonly type: "integer";
152
+ readonly minimum: 1;
153
+ readonly description: "The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version.";
154
+ };
155
+ readonly status: {
156
+ readonly type: "string";
157
+ readonly enum: readonly ["active", "deprecated", "retracted"];
158
+ readonly description: "The record's standing after the operation.";
159
+ };
160
+ readonly pinned: {
161
+ readonly type: "boolean";
162
+ readonly description: "Whether the record is pinned after the operation.";
163
+ };
164
+ readonly ext: {
165
+ readonly $ref: "#/$defs/Ext";
166
+ };
167
+ };
168
+ };
169
+ readonly Ext: {
170
+ readonly title: "Ext";
171
+ 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.";
172
+ readonly type: "object";
173
+ readonly minProperties: 1;
174
+ readonly additionalProperties: true;
175
+ readonly propertyNames: {
176
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
177
+ };
178
+ };
179
+ readonly AuthorityPresentation: {
180
+ readonly title: "AuthorityPresentation";
181
+ readonly type: "object";
182
+ readonly additionalProperties: false;
183
+ readonly required: readonly ["membership", "authority"];
184
+ 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.";
185
+ readonly properties: {
186
+ readonly membership: {
187
+ readonly type: "string";
188
+ 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.";
189
+ };
190
+ readonly authority: {
191
+ readonly type: "array";
192
+ readonly minItems: 1;
193
+ readonly maxItems: 8;
194
+ readonly items: {
195
+ readonly type: "string";
196
+ };
197
+ 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.";
198
+ };
199
+ readonly subjectBinding: {
200
+ readonly type: "string";
201
+ 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.";
202
+ };
203
+ };
204
+ };
205
+ };
206
+ };
207
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
208
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
209
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
210
+ readonly $ref: "#/$defs/Response";
211
+ readonly $defs: {
212
+ readonly Response: {
213
+ readonly $anchor: "response";
214
+ readonly title: "Rooms Records Curate — response payload";
215
+ readonly description: "Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.";
216
+ readonly type: "object";
217
+ readonly additionalProperties: false;
218
+ readonly required: readonly ["key", "version", "status"];
219
+ readonly properties: {
220
+ readonly key: {
221
+ readonly type: "string";
222
+ readonly description: "The record curated.";
223
+ };
224
+ readonly version: {
225
+ readonly type: "integer";
226
+ readonly minimum: 1;
227
+ readonly description: "The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version.";
228
+ };
229
+ readonly status: {
230
+ readonly type: "string";
231
+ readonly enum: readonly ["active", "deprecated", "retracted"];
232
+ readonly description: "The record's standing after the operation.";
233
+ };
234
+ readonly pinned: {
235
+ readonly type: "boolean";
236
+ readonly description: "Whether the record is pinned after the operation.";
237
+ };
238
+ readonly ext: {
239
+ readonly $ref: "#/$defs/Ext";
240
+ };
241
+ };
242
+ };
243
+ readonly Ext: {
244
+ readonly title: "Ext";
245
+ 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.";
246
+ readonly type: "object";
247
+ readonly minProperties: 1;
248
+ readonly additionalProperties: true;
249
+ readonly propertyNames: {
250
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
251
+ };
252
+ };
253
+ readonly AuthorityPresentation: {
254
+ readonly title: "AuthorityPresentation";
255
+ readonly type: "object";
256
+ readonly additionalProperties: false;
257
+ readonly required: readonly ["membership", "authority"];
258
+ 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.";
259
+ readonly properties: {
260
+ readonly membership: {
261
+ readonly type: "string";
262
+ 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.";
263
+ };
264
+ readonly authority: {
265
+ readonly type: "array";
266
+ readonly minItems: 1;
267
+ readonly maxItems: 8;
268
+ readonly items: {
269
+ readonly type: "string";
270
+ };
271
+ 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.";
272
+ };
273
+ readonly subjectBinding: {
274
+ readonly type: "string";
275
+ 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.";
276
+ };
277
+ };
278
+ };
279
+ };
280
+ };
281
+ /**
282
+ * SPEC.md §7.2 policy for the request variant, from this specification's
283
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
284
+ * per-specification and cannot be derived from the document alone, and
285
+ * item 2 needs the schema this carries.
286
+ */
287
+ export declare const SPEC: {
288
+ readonly typeUri: "https://trusttasks.org/spec/rooms/records/curate/0.1";
289
+ readonly isBearer: false;
290
+ readonly isProofRequired: true;
291
+ readonly isRecipientRequired: true;
292
+ readonly isIssuedAtRequired: true;
293
+ readonly payloadSchema: {
294
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
295
+ readonly $id: "https://trusttasks.org/spec/rooms/records/curate/0.1";
296
+ readonly title: "Rooms Records Curate — payload";
297
+ readonly description: "A member curates a record: demotes it, retracts it, restores it from demotion, or pins it. Distinct from `rooms/records/put`, which replaces content — curation changes a record's standing in the room without a member having to rewrite it, and `curate` is a separate authority action so a community can grant one without the other.";
298
+ readonly type: "object";
299
+ readonly additionalProperties: false;
300
+ readonly required: readonly ["roomId", "key", "presentation"];
301
+ readonly properties: {
302
+ readonly roomId: {
303
+ readonly type: "string";
304
+ readonly description: "The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own.";
305
+ };
306
+ readonly key: {
307
+ readonly type: "string";
308
+ readonly maxLength: 512;
309
+ readonly description: "The record to curate.";
310
+ };
311
+ readonly presentation: {
312
+ readonly $ref: "#/$defs/AuthorityPresentation";
313
+ readonly description: "Must confer the `curate` action at this room's scope. Deliberately not implied by `write`: curation is judgement over what a room's shared knowledge is worth, which is a different grant from the ability to add to it.";
314
+ };
315
+ readonly status: {
316
+ readonly type: "string";
317
+ readonly enum: readonly ["active", "deprecated", "retracted"];
318
+ readonly description: "The standing to move the record to. `deprecated` demotes it — the body is retained and a recalling agent MUST treat it as demoted rather than hidden. `retracted` is a tombstone: the body is dropped and the key, version and epoch remain so incremental sync converges. `active` restores a `deprecated` record; it MUST NOT be accepted for a `retracted` one, whose body is already gone and cannot be restored by a status change.";
319
+ };
320
+ readonly pinned: {
321
+ readonly type: "boolean";
322
+ readonly description: "Whether the record is pinned. Orthogonal to `status` — a pinned record is still active, deprecated or retracted — because pinning answers 'what matters here' and status answers 'is this still current'. Omit to leave unchanged.";
323
+ };
324
+ readonly reason: {
325
+ readonly type: "string";
326
+ readonly maxLength: 512;
327
+ readonly description: "Why, for the room's audit trail. A retraction without a reason is the one a member cannot interpret later.";
328
+ };
329
+ readonly expectedVersion: {
330
+ readonly type: "integer";
331
+ readonly minimum: 1;
332
+ readonly description: "Optional precondition: the record's current version. Curation assigns a new version — a demotion other members must converge on is a change like any other — so a caller that read a record before deciding to curate it can require that nothing has replaced it since.";
333
+ };
334
+ readonly ext: {
335
+ readonly $ref: "#/$defs/Ext";
336
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
337
+ };
338
+ };
339
+ readonly anyOf: readonly [{
340
+ readonly required: readonly ["status"];
341
+ }, {
342
+ readonly required: readonly ["pinned"];
343
+ }];
344
+ readonly $defs: {
345
+ readonly Response: {
346
+ readonly $anchor: "response";
347
+ readonly title: "Rooms Records Curate — response payload";
348
+ readonly description: "Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.";
349
+ readonly type: "object";
350
+ readonly additionalProperties: false;
351
+ readonly required: readonly ["key", "version", "status"];
352
+ readonly properties: {
353
+ readonly key: {
354
+ readonly type: "string";
355
+ readonly description: "The record curated.";
356
+ };
357
+ readonly version: {
358
+ readonly type: "integer";
359
+ readonly minimum: 1;
360
+ readonly description: "The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version.";
361
+ };
362
+ readonly status: {
363
+ readonly type: "string";
364
+ readonly enum: readonly ["active", "deprecated", "retracted"];
365
+ readonly description: "The record's standing after the operation.";
366
+ };
367
+ readonly pinned: {
368
+ readonly type: "boolean";
369
+ readonly description: "Whether the record is pinned after the operation.";
370
+ };
371
+ readonly ext: {
372
+ readonly $ref: "#/$defs/Ext";
373
+ };
374
+ };
375
+ };
376
+ readonly Ext: {
377
+ readonly title: "Ext";
378
+ 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.";
379
+ readonly type: "object";
380
+ readonly minProperties: 1;
381
+ readonly additionalProperties: true;
382
+ readonly propertyNames: {
383
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
384
+ };
385
+ };
386
+ readonly AuthorityPresentation: {
387
+ readonly title: "AuthorityPresentation";
388
+ readonly type: "object";
389
+ readonly additionalProperties: false;
390
+ readonly required: readonly ["membership", "authority"];
391
+ 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.";
392
+ readonly properties: {
393
+ readonly membership: {
394
+ readonly type: "string";
395
+ 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.";
396
+ };
397
+ readonly authority: {
398
+ readonly type: "array";
399
+ readonly minItems: 1;
400
+ readonly maxItems: 8;
401
+ readonly items: {
402
+ readonly type: "string";
403
+ };
404
+ 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.";
405
+ };
406
+ readonly subjectBinding: {
407
+ readonly type: "string";
408
+ 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.";
409
+ };
410
+ };
411
+ };
412
+ };
413
+ };
414
+ };
415
+ /**
416
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
417
+ * tracks the *issuer* party's requirement because a response swaps the
418
+ * parties (§7.3 item 5).
419
+ */
420
+ export declare const RESPONSE_SPEC: {
421
+ readonly typeUri: "https://trusttasks.org/spec/rooms/records/curate/0.1#response";
422
+ readonly isBearer: false;
423
+ readonly isProofRequired: true;
424
+ readonly isRecipientRequired: true;
425
+ readonly isIssuedAtRequired: true;
426
+ readonly payloadSchema: {
427
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
428
+ readonly $ref: "#/$defs/Response";
429
+ readonly $defs: {
430
+ readonly Response: {
431
+ readonly $anchor: "response";
432
+ readonly title: "Rooms Records Curate — response payload";
433
+ readonly description: "Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.";
434
+ readonly type: "object";
435
+ readonly additionalProperties: false;
436
+ readonly required: readonly ["key", "version", "status"];
437
+ readonly properties: {
438
+ readonly key: {
439
+ readonly type: "string";
440
+ readonly description: "The record curated.";
441
+ };
442
+ readonly version: {
443
+ readonly type: "integer";
444
+ readonly minimum: 1;
445
+ readonly description: "The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version.";
446
+ };
447
+ readonly status: {
448
+ readonly type: "string";
449
+ readonly enum: readonly ["active", "deprecated", "retracted"];
450
+ readonly description: "The record's standing after the operation.";
451
+ };
452
+ readonly pinned: {
453
+ readonly type: "boolean";
454
+ readonly description: "Whether the record is pinned after the operation.";
455
+ };
456
+ readonly ext: {
457
+ readonly $ref: "#/$defs/Ext";
458
+ };
459
+ };
460
+ };
461
+ readonly Ext: {
462
+ readonly title: "Ext";
463
+ 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.";
464
+ readonly type: "object";
465
+ readonly minProperties: 1;
466
+ readonly additionalProperties: true;
467
+ readonly propertyNames: {
468
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
469
+ };
470
+ };
471
+ readonly AuthorityPresentation: {
472
+ readonly title: "AuthorityPresentation";
473
+ readonly type: "object";
474
+ readonly additionalProperties: false;
475
+ readonly required: readonly ["membership", "authority"];
476
+ 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.";
477
+ readonly properties: {
478
+ readonly membership: {
479
+ readonly type: "string";
480
+ 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.";
481
+ };
482
+ readonly authority: {
483
+ readonly type: "array";
484
+ readonly minItems: 1;
485
+ readonly maxItems: 8;
486
+ readonly items: {
487
+ readonly type: "string";
488
+ };
489
+ 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.";
490
+ };
491
+ readonly subjectBinding: {
492
+ readonly type: "string";
493
+ 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.";
494
+ };
495
+ };
496
+ };
497
+ };
498
+ };
499
+ };
500
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/records/curate/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC,GAAG;IACF;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,YAAY,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAC;IAC/C;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAC;IAC9C;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC;AAE3C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,sDAA+D,CAAC;AAExF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,yBAAyB,CAAC;AAEhD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,+DAAwE,CAAC;AAE1G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEzD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}