@openvtc/trust-tasks 0.16.9 → 0.16.10

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 (166) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/dist/_shared/components.d.ts +204 -5
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +27 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +27 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/persona/_shared/0.1/persona-record.d.ts +22 -0
  9. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -0
  10. package/dist/persona/_shared/0.1/persona-record.js +6 -0
  11. package/dist/persona/_shared/0.1/persona-record.js.map +1 -0
  12. package/dist/persona/attribute/delete/1.0/payload.d.ts +351 -0
  13. package/dist/persona/attribute/delete/1.0/payload.d.ts.map +1 -0
  14. package/dist/persona/attribute/delete/1.0/payload.js +188 -0
  15. package/dist/persona/attribute/delete/1.0/payload.js.map +1 -0
  16. package/dist/persona/attribute/list/1.0/payload.d.ts +895 -0
  17. package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -0
  18. package/dist/persona/attribute/list/1.0/payload.js +532 -0
  19. package/dist/persona/attribute/list/1.0/payload.js.map +1 -0
  20. package/dist/persona/attribute/put/1.0/payload.d.ts +829 -0
  21. package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -0
  22. package/dist/persona/attribute/put/1.0/payload.js +487 -0
  23. package/dist/persona/attribute/put/1.0/payload.js.map +1 -0
  24. package/dist/persona/binding/get/1.0/payload.d.ts +382 -0
  25. package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -0
  26. package/dist/persona/binding/get/1.0/payload.js +206 -0
  27. package/dist/persona/binding/get/1.0/payload.js.map +1 -0
  28. package/dist/persona/binding/list/1.0/payload.d.ts +387 -0
  29. package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -0
  30. package/dist/persona/binding/list/1.0/payload.js +210 -0
  31. package/dist/persona/binding/list/1.0/payload.js.map +1 -0
  32. package/dist/persona/binding/set/1.0/payload.d.ts +545 -0
  33. package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -0
  34. package/dist/persona/binding/set/1.0/payload.js +302 -0
  35. package/dist/persona/binding/set/1.0/payload.js.map +1 -0
  36. package/dist/persona/contact/delete/1.0/payload.d.ts +313 -0
  37. package/dist/persona/contact/delete/1.0/payload.d.ts.map +1 -0
  38. package/dist/persona/contact/delete/1.0/payload.js +174 -0
  39. package/dist/persona/contact/delete/1.0/payload.js.map +1 -0
  40. package/dist/persona/contact/get/1.0/payload.d.ts +1027 -0
  41. package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -0
  42. package/dist/persona/contact/get/1.0/payload.js +606 -0
  43. package/dist/persona/contact/get/1.0/payload.js.map +1 -0
  44. package/dist/persona/contact/list/1.0/payload.d.ts +490 -0
  45. package/dist/persona/contact/list/1.0/payload.d.ts.map +1 -0
  46. package/dist/persona/contact/list/1.0/payload.js +262 -0
  47. package/dist/persona/contact/list/1.0/payload.js.map +1 -0
  48. package/dist/persona/contact/put/1.0/payload.d.ts +885 -0
  49. package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -0
  50. package/dist/persona/contact/put/1.0/payload.js +518 -0
  51. package/dist/persona/contact/put/1.0/payload.js.map +1 -0
  52. package/dist/persona/correlation/analyze/1.0/payload.d.ts +648 -0
  53. package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -0
  54. package/dist/persona/correlation/analyze/1.0/payload.js +338 -0
  55. package/dist/persona/correlation/analyze/1.0/payload.js.map +1 -0
  56. package/dist/persona/disclosure/history/1.0/payload.d.ts +639 -0
  57. package/dist/persona/disclosure/history/1.0/payload.d.ts.map +1 -0
  58. package/dist/persona/disclosure/history/1.0/payload.js +339 -0
  59. package/dist/persona/disclosure/history/1.0/payload.js.map +1 -0
  60. package/dist/persona/disclosure/present/1.0/payload.d.ts +400 -0
  61. package/dist/persona/disclosure/present/1.0/payload.d.ts.map +1 -0
  62. package/dist/persona/disclosure/present/1.0/payload.js +211 -0
  63. package/dist/persona/disclosure/present/1.0/payload.js.map +1 -0
  64. package/dist/persona/disclosure/preview/1.0/payload.d.ts +858 -0
  65. package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -0
  66. package/dist/persona/disclosure/preview/1.0/payload.js +480 -0
  67. package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -0
  68. package/dist/persona/local/binding/set/1.0/payload.d.ts +394 -0
  69. package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -0
  70. package/dist/persona/local/binding/set/1.0/payload.js +226 -0
  71. package/dist/persona/local/binding/set/1.0/payload.js.map +1 -0
  72. package/dist/persona/local/profile/delete/1.0/payload.d.ts +311 -0
  73. package/dist/persona/local/profile/delete/1.0/payload.d.ts.map +1 -0
  74. package/dist/persona/local/profile/delete/1.0/payload.js +173 -0
  75. package/dist/persona/local/profile/delete/1.0/payload.js.map +1 -0
  76. package/dist/persona/local/profile/get/1.0/payload.d.ts +368 -0
  77. package/dist/persona/local/profile/get/1.0/payload.d.ts.map +1 -0
  78. package/dist/persona/local/profile/get/1.0/payload.js +210 -0
  79. package/dist/persona/local/profile/get/1.0/payload.js.map +1 -0
  80. package/dist/persona/local/profile/list/1.0/payload.d.ts +387 -0
  81. package/dist/persona/local/profile/list/1.0/payload.d.ts.map +1 -0
  82. package/dist/persona/local/profile/list/1.0/payload.js +214 -0
  83. package/dist/persona/local/profile/list/1.0/payload.js.map +1 -0
  84. package/dist/persona/local/profile/put/1.0/payload.d.ts +545 -0
  85. package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -0
  86. package/dist/persona/local/profile/put/1.0/payload.js +315 -0
  87. package/dist/persona/local/profile/put/1.0/payload.js.map +1 -0
  88. package/dist/persona/profile/delete/1.0/payload.d.ts +350 -0
  89. package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -0
  90. package/dist/persona/profile/delete/1.0/payload.js +189 -0
  91. package/dist/persona/profile/delete/1.0/payload.js.map +1 -0
  92. package/dist/persona/profile/get/1.0/payload.d.ts +1307 -0
  93. package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -0
  94. package/dist/persona/profile/get/1.0/payload.js +804 -0
  95. package/dist/persona/profile/get/1.0/payload.js.map +1 -0
  96. package/dist/persona/profile/list/1.0/payload.d.ts +1120 -0
  97. package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -0
  98. package/dist/persona/profile/list/1.0/payload.js +680 -0
  99. package/dist/persona/profile/list/1.0/payload.js.map +1 -0
  100. package/dist/persona/profile/put/1.0/payload.d.ts +1115 -0
  101. package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -0
  102. package/dist/persona/profile/put/1.0/payload.js +675 -0
  103. package/dist/persona/profile/put/1.0/payload.js.map +1 -0
  104. package/dist/persona/renderers/list/1.0/payload.d.ts +362 -0
  105. package/dist/persona/renderers/list/1.0/payload.d.ts.map +1 -0
  106. package/dist/persona/renderers/list/1.0/payload.js +197 -0
  107. package/dist/persona/renderers/list/1.0/payload.js.map +1 -0
  108. package/dist/rooms/owner/claim/0.1/payload.d.ts +391 -0
  109. package/dist/rooms/owner/claim/0.1/payload.d.ts.map +1 -0
  110. package/dist/rooms/owner/claim/0.1/payload.js +214 -0
  111. package/dist/rooms/owner/claim/0.1/payload.js.map +1 -0
  112. package/dist/rooms/owner/transfer/0.1/payload.d.ts +391 -0
  113. package/dist/rooms/owner/transfer/0.1/payload.d.ts.map +1 -0
  114. package/dist/rooms/owner/transfer/0.1/payload.js +214 -0
  115. package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -0
  116. package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
  117. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
  118. package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
  119. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
  120. package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
  121. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
  122. package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
  123. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
  124. package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
  125. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
  126. package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
  127. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
  128. package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
  129. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
  130. package/package.json +1 -1
  131. package/src/_shared/components.ts +211 -5
  132. package/src/index.ts +27 -0
  133. package/src/persona/_shared/0.1/persona-record.ts +23 -0
  134. package/src/persona/attribute/delete/1.0/payload.ts +238 -0
  135. package/src/persona/attribute/list/1.0/payload.ts +590 -0
  136. package/src/persona/attribute/put/1.0/payload.ts +559 -0
  137. package/src/persona/binding/get/1.0/payload.ts +257 -0
  138. package/src/persona/binding/list/1.0/payload.ts +260 -0
  139. package/src/persona/binding/set/1.0/payload.ts +370 -0
  140. package/src/persona/contact/delete/1.0/payload.ts +216 -0
  141. package/src/persona/contact/get/1.0/payload.ts +662 -0
  142. package/src/persona/contact/list/1.0/payload.ts +323 -0
  143. package/src/persona/contact/put/1.0/payload.ts +580 -0
  144. package/src/persona/correlation/analyze/1.0/payload.ts +466 -0
  145. package/src/persona/disclosure/history/1.0/payload.ts +415 -0
  146. package/src/persona/disclosure/present/1.0/payload.ts +274 -0
  147. package/src/persona/disclosure/preview/1.0/payload.ts +597 -0
  148. package/src/persona/local/binding/set/1.0/payload.ts +267 -0
  149. package/src/persona/local/profile/delete/1.0/payload.ts +215 -0
  150. package/src/persona/local/profile/get/1.0/payload.ts +251 -0
  151. package/src/persona/local/profile/list/1.0/payload.ts +260 -0
  152. package/src/persona/local/profile/put/1.0/payload.ts +373 -0
  153. package/src/persona/profile/delete/1.0/payload.ts +236 -0
  154. package/src/persona/profile/get/1.0/payload.ts +846 -0
  155. package/src/persona/profile/list/1.0/payload.ts +723 -0
  156. package/src/persona/profile/put/1.0/payload.ts +741 -0
  157. package/src/persona/renderers/list/1.0/payload.ts +248 -0
  158. package/src/rooms/owner/claim/0.1/payload.ts +268 -0
  159. package/src/rooms/owner/transfer/0.1/payload.ts +268 -0
  160. package/src/vta/_shared/0.1/app-state-record.ts +1 -1
  161. package/src/vta/app-state/delete/1.0/payload.ts +1 -1
  162. package/src/vta/app-state/get/1.0/payload.ts +1 -1
  163. package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
  164. package/src/vta/app-state/list/1.0/payload.ts +1 -1
  165. package/src/vta/app-state/put/1.0/payload.ts +1 -1
  166. package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
@@ -0,0 +1,248 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/renderers/list/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Enumerate the output formats this agent can present in, and what each one discards. A client cannot negotiate a format it cannot discover.
11
+ */
12
+ export interface PersonaRenderersListPayload {
13
+ ext?: Ext;
14
+ }
15
+ /**
16
+ * Success response to persona/renderers/list. Type https://trusttasks.org/spec/persona/renderers/list/1.0#response.
17
+ */
18
+ export interface PersonaRenderersListResponsePayload {
19
+ /**
20
+ * @maxItems 32
21
+ */
22
+ renderers: {
23
+ id: string;
24
+ description?: string;
25
+ /**
26
+ * True for the maintainer's lossless native form, used when a producer names no renderer. Exactly one renderer is canonical.
27
+ */
28
+ canonical?: boolean;
29
+ /**
30
+ * What this format discards — commonly provenance, because most general-purpose contact formats have nowhere to put it. Declared here so that lossiness is negotiated rather than discovered by a holder afterwards.
31
+ *
32
+ * @maxItems 32
33
+ */
34
+ drops: string[];
35
+ /**
36
+ * Whether the format can represent a claim proven rather than shown. Most cannot: there is no field in a general contact format for 'over the threshold'. A disclosure containing a predicate through a renderer that cannot carry one fails at negotiation rather than silently dropping the claim.
37
+ */
38
+ canCarryPredicates: boolean;
39
+ }[];
40
+ ext?: Ext;
41
+ }
42
+
43
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
44
+ export type { Ext };
45
+
46
+ /** Trust Task type URI. */
47
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/renderers/list/1.0" as const;
48
+
49
+ /** Stable alias for this specification's request payload shape. */
50
+ export type Payload = PersonaRenderersListPayload;
51
+
52
+ /** Trust Task response type URI (request type URI + "#response"). */
53
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/renderers/list/1.0#response" as const;
54
+
55
+ /** Stable alias for this specification's success-response payload shape. */
56
+ export type Response = PersonaRenderersListResponsePayload;
57
+
58
+ /**
59
+ * This specification's payload schema, as a value.
60
+ *
61
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
62
+ * rather than only as a `.json` file because TypeScript types are erased
63
+ * at runtime: without a schema a consumer has nothing to validate, and
64
+ * every REQUIRED payload member is optional in practice. Cross-file
65
+ * `$ref`s are already inlined, so it needs no resolver.
66
+ */
67
+ export const PAYLOAD_SCHEMA = {
68
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
69
+ "$id": "https://trusttasks.org/spec/persona/renderers/list/1.0",
70
+ "title": "Persona Renderers List — payload",
71
+ "description": "Enumerate the output formats this agent can present in, and what each one discards. A client cannot negotiate a format it cannot discover.",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "properties": {
75
+ "ext": {
76
+ "$ref": "#/$defs/Ext"
77
+ }
78
+ },
79
+ "$defs": {
80
+ "Response": {
81
+ "$anchor": "response",
82
+ "title": "Persona Renderers List — response payload",
83
+ "description": "Success response to persona/renderers/list. Type https://trusttasks.org/spec/persona/renderers/list/1.0#response.",
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "renderers"
88
+ ],
89
+ "properties": {
90
+ "renderers": {
91
+ "type": "array",
92
+ "maxItems": 32,
93
+ "items": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "id",
98
+ "drops",
99
+ "canCarryPredicates"
100
+ ],
101
+ "properties": {
102
+ "id": {
103
+ "type": "string",
104
+ "maxLength": 64
105
+ },
106
+ "description": {
107
+ "type": "string",
108
+ "maxLength": 512
109
+ },
110
+ "canonical": {
111
+ "type": "boolean",
112
+ "description": "True for the maintainer's lossless native form, used when a producer names no renderer. Exactly one renderer is canonical."
113
+ },
114
+ "drops": {
115
+ "type": "array",
116
+ "maxItems": 32,
117
+ "items": {
118
+ "type": "string",
119
+ "maxLength": 64
120
+ },
121
+ "description": "What this format discards — commonly provenance, because most general-purpose contact formats have nowhere to put it. Declared here so that lossiness is negotiated rather than discovered by a holder afterwards."
122
+ },
123
+ "canCarryPredicates": {
124
+ "type": "boolean",
125
+ "description": "Whether the format can represent a claim proven rather than shown. Most cannot: there is no field in a general contact format for 'over the threshold'. A disclosure containing a predicate through a renderer that cannot carry one fails at negotiation rather than silently dropping the claim."
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "ext": {
131
+ "$ref": "#/$defs/Ext"
132
+ }
133
+ }
134
+ },
135
+ "Ext": {
136
+ "title": "Ext",
137
+ "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.",
138
+ "type": "object",
139
+ "minProperties": 1,
140
+ "additionalProperties": true,
141
+ "propertyNames": {
142
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
143
+ }
144
+ }
145
+ }
146
+ } as const;
147
+
148
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
149
+ export const RESPONSE_PAYLOAD_SCHEMA = {
150
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
151
+ "$ref": "#/$defs/Response",
152
+ "$defs": {
153
+ "Response": {
154
+ "$anchor": "response",
155
+ "title": "Persona Renderers List — response payload",
156
+ "description": "Success response to persona/renderers/list. Type https://trusttasks.org/spec/persona/renderers/list/1.0#response.",
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "renderers"
161
+ ],
162
+ "properties": {
163
+ "renderers": {
164
+ "type": "array",
165
+ "maxItems": 32,
166
+ "items": {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "required": [
170
+ "id",
171
+ "drops",
172
+ "canCarryPredicates"
173
+ ],
174
+ "properties": {
175
+ "id": {
176
+ "type": "string",
177
+ "maxLength": 64
178
+ },
179
+ "description": {
180
+ "type": "string",
181
+ "maxLength": 512
182
+ },
183
+ "canonical": {
184
+ "type": "boolean",
185
+ "description": "True for the maintainer's lossless native form, used when a producer names no renderer. Exactly one renderer is canonical."
186
+ },
187
+ "drops": {
188
+ "type": "array",
189
+ "maxItems": 32,
190
+ "items": {
191
+ "type": "string",
192
+ "maxLength": 64
193
+ },
194
+ "description": "What this format discards — commonly provenance, because most general-purpose contact formats have nowhere to put it. Declared here so that lossiness is negotiated rather than discovered by a holder afterwards."
195
+ },
196
+ "canCarryPredicates": {
197
+ "type": "boolean",
198
+ "description": "Whether the format can represent a claim proven rather than shown. Most cannot: there is no field in a general contact format for 'over the threshold'. A disclosure containing a predicate through a renderer that cannot carry one fails at negotiation rather than silently dropping the claim."
199
+ }
200
+ }
201
+ }
202
+ },
203
+ "ext": {
204
+ "$ref": "#/$defs/Ext"
205
+ }
206
+ }
207
+ },
208
+ "Ext": {
209
+ "title": "Ext",
210
+ "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.",
211
+ "type": "object",
212
+ "minProperties": 1,
213
+ "additionalProperties": true,
214
+ "propertyNames": {
215
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
216
+ }
217
+ }
218
+ }
219
+ } as const;
220
+
221
+ /**
222
+ * SPEC.md §7.2 policy for the request variant, from this specification's
223
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
224
+ * per-specification and cannot be derived from the document alone, and
225
+ * item 2 needs the schema this carries.
226
+ */
227
+ export const SPEC = {
228
+ typeUri: TYPE_URI,
229
+ isBearer: false,
230
+ isProofRequired: true,
231
+ isRecipientRequired: true,
232
+ isIssuedAtRequired: false,
233
+ payloadSchema: PAYLOAD_SCHEMA,
234
+ } as const;
235
+
236
+ /**
237
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
238
+ * tracks the *issuer* party's requirement because a response swaps the
239
+ * parties (§7.3 item 5).
240
+ */
241
+ export const RESPONSE_SPEC = {
242
+ typeUri: RESPONSE_TYPE_URI,
243
+ isBearer: false,
244
+ isProofRequired: true,
245
+ isRecipientRequired: true,
246
+ isIssuedAtRequired: false,
247
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
248
+ } as const;
@@ -0,0 +1,268 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/owner/claim/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { AuthorityPresentation, Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A nominated successor claims ownership of a room whose owner has stopped renewing it. A claim is an act, never an automatic promotion: an ownership change should be something somebody caused, not something that happened.
11
+ */
12
+ export interface RoomsOwnerClaimPayload {
13
+ /**
14
+ * The room being claimed.
15
+ */
16
+ roomId: string;
17
+ /**
18
+ * The succession credential the room issued to this claimant, serialized per the governing profile. Issued in advance by the owner themselves — a host verifies a decision the previous owner already made, and never makes one of its own about who should own a room.
19
+ */
20
+ nomination: string;
21
+ /**
22
+ * The claimant's own membership and authority in the room. A host cannot see the MLS group, so this credential — the room's own statement that this party is a member — is the only membership it can check, and it is the same one every other room task presents.
23
+ */
24
+ presentation: AuthorityPresentation;
25
+ /**
26
+ * Why, for the room's audit trail. A claim is a takeover; it should say what prompted it.
27
+ */
28
+ reason?: string;
29
+ /**
30
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
31
+ */
32
+ ext?: Ext;
33
+ }
34
+ /**
35
+ * Success response to rooms/owner/claim. Type https://trusttasks.org/spec/rooms/owner/claim/0.1#response.
36
+ */
37
+ export interface RoomsOwnerClaimResponsePayload {
38
+ roomId: string;
39
+ /**
40
+ * The owner after the claim — the claimant.
41
+ */
42
+ ownerDid: string;
43
+ ext?: Ext;
44
+ }
45
+
46
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
47
+ export type { AuthorityPresentation, Ext };
48
+
49
+ /** Trust Task type URI. */
50
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/owner/claim/0.1" as const;
51
+
52
+ /** Stable alias for this specification's request payload shape. */
53
+ export type Payload = RoomsOwnerClaimPayload;
54
+
55
+ /** Trust Task response type URI (request type URI + "#response"). */
56
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/owner/claim/0.1#response" as const;
57
+
58
+ /** Stable alias for this specification's success-response payload shape. */
59
+ export type Response = RoomsOwnerClaimResponsePayload;
60
+
61
+ /**
62
+ * This specification's payload schema, as a value.
63
+ *
64
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
65
+ * rather than only as a `.json` file because TypeScript types are erased
66
+ * at runtime: without a schema a consumer has nothing to validate, and
67
+ * every REQUIRED payload member is optional in practice. Cross-file
68
+ * `$ref`s are already inlined, so it needs no resolver.
69
+ */
70
+ export const PAYLOAD_SCHEMA = {
71
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
72
+ "$id": "https://trusttasks.org/spec/rooms/owner/claim/0.1",
73
+ "title": "Rooms Owner Claim — payload",
74
+ "description": "A nominated successor claims ownership of a room whose owner has stopped renewing it. A claim is an act, never an automatic promotion: an ownership change should be something somebody caused, not something that happened.",
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": [
78
+ "roomId",
79
+ "nomination",
80
+ "presentation"
81
+ ],
82
+ "properties": {
83
+ "roomId": {
84
+ "type": "string",
85
+ "description": "The room being claimed."
86
+ },
87
+ "nomination": {
88
+ "type": "string",
89
+ "description": "The succession credential the room issued to this claimant, serialized per the governing profile. Issued in advance by the owner themselves — a host verifies a decision the previous owner already made, and never makes one of its own about who should own a room."
90
+ },
91
+ "presentation": {
92
+ "$ref": "#/$defs/AuthorityPresentation",
93
+ "description": "The claimant's own membership and authority in the room. A host cannot see the MLS group, so this credential — the room's own statement that this party is a member — is the only membership it can check, and it is the same one every other room task presents."
94
+ },
95
+ "reason": {
96
+ "type": "string",
97
+ "maxLength": 512,
98
+ "description": "Why, for the room's audit trail. A claim is a takeover; it should say what prompted it."
99
+ },
100
+ "ext": {
101
+ "$ref": "#/$defs/Ext",
102
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
103
+ }
104
+ },
105
+ "$defs": {
106
+ "Response": {
107
+ "$anchor": "response",
108
+ "title": "Rooms Owner Claim — response payload",
109
+ "description": "Success response to rooms/owner/claim. Type https://trusttasks.org/spec/rooms/owner/claim/0.1#response.",
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "roomId",
114
+ "ownerDid"
115
+ ],
116
+ "properties": {
117
+ "roomId": {
118
+ "type": "string"
119
+ },
120
+ "ownerDid": {
121
+ "type": "string",
122
+ "description": "The owner after the claim — the claimant."
123
+ },
124
+ "ext": {
125
+ "$ref": "#/$defs/Ext"
126
+ }
127
+ }
128
+ },
129
+ "Ext": {
130
+ "title": "Ext",
131
+ "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.",
132
+ "type": "object",
133
+ "minProperties": 1,
134
+ "additionalProperties": true,
135
+ "propertyNames": {
136
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
137
+ }
138
+ },
139
+ "AuthorityPresentation": {
140
+ "title": "AuthorityPresentation",
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": [
144
+ "membership",
145
+ "authority"
146
+ ],
147
+ "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.",
148
+ "properties": {
149
+ "membership": {
150
+ "type": "string",
151
+ "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."
152
+ },
153
+ "authority": {
154
+ "type": "array",
155
+ "minItems": 1,
156
+ "maxItems": 8,
157
+ "items": {
158
+ "type": "string"
159
+ },
160
+ "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."
161
+ },
162
+ "subjectBinding": {
163
+ "type": "string",
164
+ "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."
165
+ }
166
+ }
167
+ }
168
+ }
169
+ } as const;
170
+
171
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
172
+ export const RESPONSE_PAYLOAD_SCHEMA = {
173
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
174
+ "$ref": "#/$defs/Response",
175
+ "$defs": {
176
+ "Response": {
177
+ "$anchor": "response",
178
+ "title": "Rooms Owner Claim — response payload",
179
+ "description": "Success response to rooms/owner/claim. Type https://trusttasks.org/spec/rooms/owner/claim/0.1#response.",
180
+ "type": "object",
181
+ "additionalProperties": false,
182
+ "required": [
183
+ "roomId",
184
+ "ownerDid"
185
+ ],
186
+ "properties": {
187
+ "roomId": {
188
+ "type": "string"
189
+ },
190
+ "ownerDid": {
191
+ "type": "string",
192
+ "description": "The owner after the claim — the claimant."
193
+ },
194
+ "ext": {
195
+ "$ref": "#/$defs/Ext"
196
+ }
197
+ }
198
+ },
199
+ "Ext": {
200
+ "title": "Ext",
201
+ "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.",
202
+ "type": "object",
203
+ "minProperties": 1,
204
+ "additionalProperties": true,
205
+ "propertyNames": {
206
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
207
+ }
208
+ },
209
+ "AuthorityPresentation": {
210
+ "title": "AuthorityPresentation",
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "membership",
215
+ "authority"
216
+ ],
217
+ "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.",
218
+ "properties": {
219
+ "membership": {
220
+ "type": "string",
221
+ "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."
222
+ },
223
+ "authority": {
224
+ "type": "array",
225
+ "minItems": 1,
226
+ "maxItems": 8,
227
+ "items": {
228
+ "type": "string"
229
+ },
230
+ "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."
231
+ },
232
+ "subjectBinding": {
233
+ "type": "string",
234
+ "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."
235
+ }
236
+ }
237
+ }
238
+ }
239
+ } as const;
240
+
241
+ /**
242
+ * SPEC.md §7.2 policy for the request variant, from this specification's
243
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
244
+ * per-specification and cannot be derived from the document alone, and
245
+ * item 2 needs the schema this carries.
246
+ */
247
+ export const SPEC = {
248
+ typeUri: TYPE_URI,
249
+ isBearer: false,
250
+ isProofRequired: true,
251
+ isRecipientRequired: true,
252
+ isIssuedAtRequired: true,
253
+ payloadSchema: PAYLOAD_SCHEMA,
254
+ } as const;
255
+
256
+ /**
257
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
258
+ * tracks the *issuer* party's requirement because a response swaps the
259
+ * parties (§7.3 item 5).
260
+ */
261
+ export const RESPONSE_SPEC = {
262
+ typeUri: RESPONSE_TYPE_URI,
263
+ isBearer: false,
264
+ isProofRequired: true,
265
+ isRecipientRequired: true,
266
+ isIssuedAtRequired: true,
267
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
268
+ } as const;