@openvtc/trust-tasks 0.18.2 → 0.18.4

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 (53) hide show
  1. package/CHANGELOG.md +216 -0
  2. package/dist/_shared/components.d.ts +102 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +6 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/process-attestation/0.1/payload.d.ts +1190 -0
  9. package/dist/process-attestation/0.1/payload.d.ts.map +1 -0
  10. package/dist/process-attestation/0.1/payload.js +660 -0
  11. package/dist/process-attestation/0.1/payload.js.map +1 -0
  12. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  13. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  14. package/dist/rooms/create/0.1/payload.d.ts +58 -2
  15. package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
  16. package/dist/rooms/create/0.1/payload.js +32 -0
  17. package/dist/rooms/create/0.1/payload.js.map +1 -1
  18. package/dist/rooms/epoch/commits/0.1/payload.d.ts +506 -0
  19. package/dist/rooms/epoch/commits/0.1/payload.d.ts.map +1 -0
  20. package/dist/rooms/epoch/commits/0.1/payload.js +268 -0
  21. package/dist/rooms/epoch/commits/0.1/payload.js.map +1 -0
  22. package/dist/rooms/epoch/mint/0.1/payload.d.ts +20 -0
  23. package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -1
  24. package/dist/rooms/epoch/mint/0.1/payload.js +5 -0
  25. package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
  26. package/dist/rooms/epoch/prune/0.1/payload.d.ts +423 -0
  27. package/dist/rooms/epoch/prune/0.1/payload.d.ts.map +1 -0
  28. package/dist/rooms/epoch/prune/0.1/payload.js +229 -0
  29. package/dist/rooms/epoch/prune/0.1/payload.js.map +1 -0
  30. package/dist/rooms/keys/browse/0.1/payload.d.ts +825 -0
  31. package/dist/rooms/keys/browse/0.1/payload.d.ts.map +1 -0
  32. package/dist/rooms/keys/browse/0.1/payload.js +494 -0
  33. package/dist/rooms/keys/browse/0.1/payload.js.map +1 -0
  34. package/dist/rooms/keys/read/0.1/payload.d.ts +703 -0
  35. package/dist/rooms/keys/read/0.1/payload.d.ts.map +1 -0
  36. package/dist/rooms/keys/read/0.1/payload.js +424 -0
  37. package/dist/rooms/keys/read/0.1/payload.js.map +1 -0
  38. package/dist/rooms/owner/anchor/0.1/payload.d.ts +537 -0
  39. package/dist/rooms/owner/anchor/0.1/payload.d.ts.map +1 -0
  40. package/dist/rooms/owner/anchor/0.1/payload.js +291 -0
  41. package/dist/rooms/owner/anchor/0.1/payload.js.map +1 -0
  42. package/package.json +1 -1
  43. package/src/_shared/components.ts +102 -0
  44. package/src/index.ts +6 -0
  45. package/src/process-attestation/0.1/payload.ts +794 -0
  46. package/src/rooms/_shared/0.1/room.ts +1 -1
  47. package/src/rooms/create/0.1/payload.ts +42 -2
  48. package/src/rooms/epoch/commits/0.1/payload.ts +341 -0
  49. package/src/rooms/epoch/mint/0.1/payload.ts +15 -0
  50. package/src/rooms/epoch/prune/0.1/payload.ts +289 -0
  51. package/src/rooms/keys/browse/0.1/payload.ts +560 -0
  52. package/src/rooms/keys/read/0.1/payload.ts +498 -0
  53. package/src/rooms/owner/anchor/0.1/payload.ts +353 -0
@@ -0,0 +1,506 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/epoch/commits/0.1/payload.schema.json
4
+ */
5
+ import type { AuthorityPresentation, Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * TODO: what the request payload of rooms/epoch/commits carries. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface RoomsEpochCommitsPayload {
10
+ /**
11
+ * The room to catch up on.
12
+ */
13
+ roomId: string;
14
+ /**
15
+ * The epoch this member is at. The host returns the commits **above** it, in order.
16
+ *
17
+ * A member asks for what they are missing rather than for a count, because only they know where they are — a host that guessed would be guessing from the last time it saw them, which on a `private` room is a thing it should not be tracking.
18
+ */
19
+ sinceEpoch: number;
20
+ /**
21
+ * Page size to ask for. Commits are large and a member far behind may have many; a caller reads to the end by asking again from the epoch it reached.
22
+ */
23
+ limit?: number;
24
+ /**
25
+ * Must confer `read` at this room's scope. A commit is opaque to whoever holds it without the group state, so this authorises the *fetch* rather than the contents — and on a `private` room requires no host session, exactly as a record read does.
26
+ */
27
+ presentation: AuthorityPresentation;
28
+ /**
29
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
30
+ */
31
+ ext?: Ext;
32
+ }
33
+ /**
34
+ * Success response to rooms/epoch/commits. Type https://trusttasks.org/spec/rooms/epoch/commits/0.1#response.
35
+ */
36
+ export interface RoomsEpochCommitsResponsePayload {
37
+ roomId: string;
38
+ /**
39
+ * The commits above `sinceEpoch`, **in ascending epoch order and with no gaps**. MLS commits apply in sequence: one applied out of order or over a gap is rejected by the group, so a host that returned an unordered or sparse set would produce a member who cannot catch up and cannot say why. A host that is missing a commit MUST return the run it has *up to* the gap and stop, rather than skipping it.
40
+ *
41
+ * @maxItems 100
42
+ */
43
+ commits: {
44
+ /**
45
+ * The epoch this commit produced.
46
+ */
47
+ epoch: number;
48
+ /**
49
+ * The MLS commit, base64url, exactly as it was published. A host that re-encoded it would produce something the group rejects.
50
+ */
51
+ commit: string;
52
+ }[];
53
+ /**
54
+ * The epoch the room is at now.
55
+ *
56
+ * **Not `sinceEpoch` plus the number returned.** Those differ whenever the host is missing a commit or the page ended early, and that difference is the useful part: a member who applies everything served and is still behind knows a delivery is missing rather than concluding their own state is broken.
57
+ */
58
+ roomEpoch?: number;
59
+ ext?: Ext;
60
+ }
61
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
62
+ export type { AuthorityPresentation, Ext };
63
+ /** Trust Task type URI. */
64
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/commits/0.1";
65
+ /** Stable alias for this specification's request payload shape. */
66
+ export type Payload = RoomsEpochCommitsPayload;
67
+ /** Trust Task response type URI (request type URI + "#response"). */
68
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/commits/0.1#response";
69
+ /** Stable alias for this specification's success-response payload shape. */
70
+ export type Response = RoomsEpochCommitsResponsePayload;
71
+ /**
72
+ * This specification's payload schema, as a value.
73
+ *
74
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
75
+ * rather than only as a `.json` file because TypeScript types are erased
76
+ * at runtime: without a schema a consumer has nothing to validate, and
77
+ * every REQUIRED payload member is optional in practice. Cross-file
78
+ * `$ref`s are already inlined, so it needs no resolver.
79
+ */
80
+ export declare const PAYLOAD_SCHEMA: {
81
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
82
+ readonly $id: "https://trusttasks.org/spec/rooms/epoch/commits/0.1";
83
+ readonly title: "Rooms Epoch Commits — payload";
84
+ readonly description: "TODO: what the request payload of rooms/epoch/commits carries. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
85
+ readonly type: "object";
86
+ readonly additionalProperties: false;
87
+ readonly required: readonly ["roomId", "sinceEpoch", "presentation"];
88
+ readonly properties: {
89
+ readonly roomId: {
90
+ readonly type: "string";
91
+ readonly description: "The room to catch up on.";
92
+ };
93
+ readonly sinceEpoch: {
94
+ readonly type: "integer";
95
+ readonly minimum: 0;
96
+ readonly description: "The epoch this member is at. The host returns the commits **above** it, in order.\n\nA member asks for what they are missing rather than for a count, because only they know where they are — a host that guessed would be guessing from the last time it saw them, which on a `private` room is a thing it should not be tracking.";
97
+ };
98
+ readonly limit: {
99
+ readonly type: "integer";
100
+ readonly minimum: 1;
101
+ readonly maximum: 100;
102
+ readonly description: "Page size to ask for. Commits are large and a member far behind may have many; a caller reads to the end by asking again from the epoch it reached.";
103
+ };
104
+ readonly presentation: {
105
+ readonly $ref: "#/$defs/AuthorityPresentation";
106
+ readonly description: "Must confer `read` at this room's scope. A commit is opaque to whoever holds it without the group state, so this authorises the *fetch* rather than the contents — and on a `private` room requires no host session, exactly as a record read does.";
107
+ };
108
+ readonly ext: {
109
+ readonly $ref: "#/$defs/Ext";
110
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
111
+ };
112
+ };
113
+ readonly $defs: {
114
+ readonly Response: {
115
+ readonly $anchor: "response";
116
+ readonly type: "object";
117
+ readonly additionalProperties: false;
118
+ readonly required: readonly ["roomId", "commits"];
119
+ readonly description: "Success response to rooms/epoch/commits. Type https://trusttasks.org/spec/rooms/epoch/commits/0.1#response.";
120
+ readonly properties: {
121
+ readonly roomId: {
122
+ readonly type: "string";
123
+ };
124
+ readonly commits: {
125
+ readonly type: "array";
126
+ readonly maxItems: 100;
127
+ readonly description: "The commits above `sinceEpoch`, **in ascending epoch order and with no gaps**. MLS commits apply in sequence: one applied out of order or over a gap is rejected by the group, so a host that returned an unordered or sparse set would produce a member who cannot catch up and cannot say why. A host that is missing a commit MUST return the run it has *up to* the gap and stop, rather than skipping it.";
128
+ readonly items: {
129
+ readonly type: "object";
130
+ readonly additionalProperties: false;
131
+ readonly required: readonly ["epoch", "commit"];
132
+ readonly properties: {
133
+ readonly epoch: {
134
+ readonly type: "integer";
135
+ readonly minimum: 1;
136
+ readonly description: "The epoch this commit produced.";
137
+ };
138
+ readonly commit: {
139
+ readonly type: "string";
140
+ readonly maxLength: 262144;
141
+ readonly description: "The MLS commit, base64url, exactly as it was published. A host that re-encoded it would produce something the group rejects.";
142
+ };
143
+ };
144
+ };
145
+ };
146
+ readonly roomEpoch: {
147
+ readonly type: "integer";
148
+ readonly minimum: 1;
149
+ readonly description: "The epoch the room is at now.\n\n**Not `sinceEpoch` plus the number returned.** Those differ whenever the host is missing a commit or the page ended early, and that difference is the useful part: a member who applies everything served and is still behind knows a delivery is missing rather than concluding their own state is broken.";
150
+ };
151
+ readonly ext: {
152
+ readonly $ref: "#/$defs/Ext";
153
+ };
154
+ };
155
+ readonly title: "Rooms Epoch Commits — response payload";
156
+ };
157
+ readonly Ext: {
158
+ readonly title: "Ext";
159
+ 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.";
160
+ readonly type: "object";
161
+ readonly minProperties: 1;
162
+ readonly additionalProperties: true;
163
+ readonly propertyNames: {
164
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
165
+ };
166
+ };
167
+ readonly AuthorityPresentation: {
168
+ readonly title: "AuthorityPresentation";
169
+ readonly type: "object";
170
+ readonly additionalProperties: false;
171
+ readonly required: readonly ["membership", "authority"];
172
+ 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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
173
+ readonly properties: {
174
+ readonly membership: {
175
+ readonly type: "string";
176
+ 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.";
177
+ };
178
+ readonly authority: {
179
+ readonly type: "array";
180
+ readonly minItems: 1;
181
+ readonly maxItems: 8;
182
+ readonly items: {
183
+ readonly type: "string";
184
+ };
185
+ 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.";
186
+ };
187
+ readonly subjectBinding: {
188
+ readonly type: "string";
189
+ 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.";
190
+ };
191
+ };
192
+ };
193
+ };
194
+ };
195
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
196
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
197
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
198
+ readonly $ref: "#/$defs/Response";
199
+ readonly $defs: {
200
+ readonly Response: {
201
+ readonly $anchor: "response";
202
+ readonly type: "object";
203
+ readonly additionalProperties: false;
204
+ readonly required: readonly ["roomId", "commits"];
205
+ readonly description: "Success response to rooms/epoch/commits. Type https://trusttasks.org/spec/rooms/epoch/commits/0.1#response.";
206
+ readonly properties: {
207
+ readonly roomId: {
208
+ readonly type: "string";
209
+ };
210
+ readonly commits: {
211
+ readonly type: "array";
212
+ readonly maxItems: 100;
213
+ readonly description: "The commits above `sinceEpoch`, **in ascending epoch order and with no gaps**. MLS commits apply in sequence: one applied out of order or over a gap is rejected by the group, so a host that returned an unordered or sparse set would produce a member who cannot catch up and cannot say why. A host that is missing a commit MUST return the run it has *up to* the gap and stop, rather than skipping it.";
214
+ readonly items: {
215
+ readonly type: "object";
216
+ readonly additionalProperties: false;
217
+ readonly required: readonly ["epoch", "commit"];
218
+ readonly properties: {
219
+ readonly epoch: {
220
+ readonly type: "integer";
221
+ readonly minimum: 1;
222
+ readonly description: "The epoch this commit produced.";
223
+ };
224
+ readonly commit: {
225
+ readonly type: "string";
226
+ readonly maxLength: 262144;
227
+ readonly description: "The MLS commit, base64url, exactly as it was published. A host that re-encoded it would produce something the group rejects.";
228
+ };
229
+ };
230
+ };
231
+ };
232
+ readonly roomEpoch: {
233
+ readonly type: "integer";
234
+ readonly minimum: 1;
235
+ readonly description: "The epoch the room is at now.\n\n**Not `sinceEpoch` plus the number returned.** Those differ whenever the host is missing a commit or the page ended early, and that difference is the useful part: a member who applies everything served and is still behind knows a delivery is missing rather than concluding their own state is broken.";
236
+ };
237
+ readonly ext: {
238
+ readonly $ref: "#/$defs/Ext";
239
+ };
240
+ };
241
+ readonly title: "Rooms Epoch Commits — response payload";
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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
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/epoch/commits/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/epoch/commits/0.1";
296
+ readonly title: "Rooms Epoch Commits — payload";
297
+ readonly description: "TODO: what the request payload of rooms/epoch/commits carries. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
298
+ readonly type: "object";
299
+ readonly additionalProperties: false;
300
+ readonly required: readonly ["roomId", "sinceEpoch", "presentation"];
301
+ readonly properties: {
302
+ readonly roomId: {
303
+ readonly type: "string";
304
+ readonly description: "The room to catch up on.";
305
+ };
306
+ readonly sinceEpoch: {
307
+ readonly type: "integer";
308
+ readonly minimum: 0;
309
+ readonly description: "The epoch this member is at. The host returns the commits **above** it, in order.\n\nA member asks for what they are missing rather than for a count, because only they know where they are — a host that guessed would be guessing from the last time it saw them, which on a `private` room is a thing it should not be tracking.";
310
+ };
311
+ readonly limit: {
312
+ readonly type: "integer";
313
+ readonly minimum: 1;
314
+ readonly maximum: 100;
315
+ readonly description: "Page size to ask for. Commits are large and a member far behind may have many; a caller reads to the end by asking again from the epoch it reached.";
316
+ };
317
+ readonly presentation: {
318
+ readonly $ref: "#/$defs/AuthorityPresentation";
319
+ readonly description: "Must confer `read` at this room's scope. A commit is opaque to whoever holds it without the group state, so this authorises the *fetch* rather than the contents — and on a `private` room requires no host session, exactly as a record read does.";
320
+ };
321
+ readonly ext: {
322
+ readonly $ref: "#/$defs/Ext";
323
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
324
+ };
325
+ };
326
+ readonly $defs: {
327
+ readonly Response: {
328
+ readonly $anchor: "response";
329
+ readonly type: "object";
330
+ readonly additionalProperties: false;
331
+ readonly required: readonly ["roomId", "commits"];
332
+ readonly description: "Success response to rooms/epoch/commits. Type https://trusttasks.org/spec/rooms/epoch/commits/0.1#response.";
333
+ readonly properties: {
334
+ readonly roomId: {
335
+ readonly type: "string";
336
+ };
337
+ readonly commits: {
338
+ readonly type: "array";
339
+ readonly maxItems: 100;
340
+ readonly description: "The commits above `sinceEpoch`, **in ascending epoch order and with no gaps**. MLS commits apply in sequence: one applied out of order or over a gap is rejected by the group, so a host that returned an unordered or sparse set would produce a member who cannot catch up and cannot say why. A host that is missing a commit MUST return the run it has *up to* the gap and stop, rather than skipping it.";
341
+ readonly items: {
342
+ readonly type: "object";
343
+ readonly additionalProperties: false;
344
+ readonly required: readonly ["epoch", "commit"];
345
+ readonly properties: {
346
+ readonly epoch: {
347
+ readonly type: "integer";
348
+ readonly minimum: 1;
349
+ readonly description: "The epoch this commit produced.";
350
+ };
351
+ readonly commit: {
352
+ readonly type: "string";
353
+ readonly maxLength: 262144;
354
+ readonly description: "The MLS commit, base64url, exactly as it was published. A host that re-encoded it would produce something the group rejects.";
355
+ };
356
+ };
357
+ };
358
+ };
359
+ readonly roomEpoch: {
360
+ readonly type: "integer";
361
+ readonly minimum: 1;
362
+ readonly description: "The epoch the room is at now.\n\n**Not `sinceEpoch` plus the number returned.** Those differ whenever the host is missing a commit or the page ended early, and that difference is the useful part: a member who applies everything served and is still behind knows a delivery is missing rather than concluding their own state is broken.";
363
+ };
364
+ readonly ext: {
365
+ readonly $ref: "#/$defs/Ext";
366
+ };
367
+ };
368
+ readonly title: "Rooms Epoch Commits — response payload";
369
+ };
370
+ readonly Ext: {
371
+ readonly title: "Ext";
372
+ 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.";
373
+ readonly type: "object";
374
+ readonly minProperties: 1;
375
+ readonly additionalProperties: true;
376
+ readonly propertyNames: {
377
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
378
+ };
379
+ };
380
+ readonly AuthorityPresentation: {
381
+ readonly title: "AuthorityPresentation";
382
+ readonly type: "object";
383
+ readonly additionalProperties: false;
384
+ readonly required: readonly ["membership", "authority"];
385
+ 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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
386
+ readonly properties: {
387
+ readonly membership: {
388
+ readonly type: "string";
389
+ 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.";
390
+ };
391
+ readonly authority: {
392
+ readonly type: "array";
393
+ readonly minItems: 1;
394
+ readonly maxItems: 8;
395
+ readonly items: {
396
+ readonly type: "string";
397
+ };
398
+ 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.";
399
+ };
400
+ readonly subjectBinding: {
401
+ readonly type: "string";
402
+ 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.";
403
+ };
404
+ };
405
+ };
406
+ };
407
+ };
408
+ };
409
+ /**
410
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
411
+ * tracks the *issuer* party's requirement because a response swaps the
412
+ * parties (§7.3 item 5).
413
+ */
414
+ export declare const RESPONSE_SPEC: {
415
+ readonly typeUri: "https://trusttasks.org/spec/rooms/epoch/commits/0.1#response";
416
+ readonly isBearer: false;
417
+ readonly isProofRequired: true;
418
+ readonly isRecipientRequired: true;
419
+ readonly isIssuedAtRequired: true;
420
+ readonly payloadSchema: {
421
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
422
+ readonly $ref: "#/$defs/Response";
423
+ readonly $defs: {
424
+ readonly Response: {
425
+ readonly $anchor: "response";
426
+ readonly type: "object";
427
+ readonly additionalProperties: false;
428
+ readonly required: readonly ["roomId", "commits"];
429
+ readonly description: "Success response to rooms/epoch/commits. Type https://trusttasks.org/spec/rooms/epoch/commits/0.1#response.";
430
+ readonly properties: {
431
+ readonly roomId: {
432
+ readonly type: "string";
433
+ };
434
+ readonly commits: {
435
+ readonly type: "array";
436
+ readonly maxItems: 100;
437
+ readonly description: "The commits above `sinceEpoch`, **in ascending epoch order and with no gaps**. MLS commits apply in sequence: one applied out of order or over a gap is rejected by the group, so a host that returned an unordered or sparse set would produce a member who cannot catch up and cannot say why. A host that is missing a commit MUST return the run it has *up to* the gap and stop, rather than skipping it.";
438
+ readonly items: {
439
+ readonly type: "object";
440
+ readonly additionalProperties: false;
441
+ readonly required: readonly ["epoch", "commit"];
442
+ readonly properties: {
443
+ readonly epoch: {
444
+ readonly type: "integer";
445
+ readonly minimum: 1;
446
+ readonly description: "The epoch this commit produced.";
447
+ };
448
+ readonly commit: {
449
+ readonly type: "string";
450
+ readonly maxLength: 262144;
451
+ readonly description: "The MLS commit, base64url, exactly as it was published. A host that re-encoded it would produce something the group rejects.";
452
+ };
453
+ };
454
+ };
455
+ };
456
+ readonly roomEpoch: {
457
+ readonly type: "integer";
458
+ readonly minimum: 1;
459
+ readonly description: "The epoch the room is at now.\n\n**Not `sinceEpoch` plus the number returned.** Those differ whenever the host is missing a commit or the page ended early, and that difference is the useful part: a member who applies everything served and is still behind knows a delivery is missing rather than concluding their own state is broken.";
460
+ };
461
+ readonly ext: {
462
+ readonly $ref: "#/$defs/Ext";
463
+ };
464
+ };
465
+ readonly title: "Rooms Epoch Commits — response payload";
466
+ };
467
+ readonly Ext: {
468
+ readonly title: "Ext";
469
+ 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.";
470
+ readonly type: "object";
471
+ readonly minProperties: 1;
472
+ readonly additionalProperties: true;
473
+ readonly propertyNames: {
474
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
475
+ };
476
+ };
477
+ readonly AuthorityPresentation: {
478
+ readonly title: "AuthorityPresentation";
479
+ readonly type: "object";
480
+ readonly additionalProperties: false;
481
+ readonly required: readonly ["membership", "authority"];
482
+ 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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
483
+ readonly properties: {
484
+ readonly membership: {
485
+ readonly type: "string";
486
+ 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.";
487
+ };
488
+ readonly authority: {
489
+ readonly type: "array";
490
+ readonly minItems: 1;
491
+ readonly maxItems: 8;
492
+ readonly items: {
493
+ readonly type: "string";
494
+ };
495
+ 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.";
496
+ };
497
+ readonly subjectBinding: {
498
+ readonly type: "string";
499
+ 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.";
500
+ };
501
+ };
502
+ };
503
+ };
504
+ };
505
+ };
506
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/epoch/commits/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,EAAE;QACP;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC;AAE3C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,qDAA8D,CAAC;AAEvF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAE/C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,8DAAuE,CAAC;AAEzG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+HjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}