@openvtc/trust-tasks 0.26.9 → 0.26.11

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 (40) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/dist/_shared/components.d.ts +43 -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/rooms/keys/act/0.2/payload.d.ts +546 -0
  9. package/dist/rooms/keys/act/0.2/payload.d.ts.map +1 -0
  10. package/dist/rooms/keys/act/0.2/payload.js +305 -0
  11. package/dist/rooms/keys/act/0.2/payload.js.map +1 -0
  12. package/dist/rooms/keys/file-key/0.2/payload.d.ts +306 -0
  13. package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -0
  14. package/dist/rooms/keys/file-key/0.2/payload.js +167 -0
  15. package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -0
  16. package/dist/rooms/keys/open/0.2/payload.d.ts +323 -0
  17. package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -0
  18. package/dist/rooms/keys/open/0.2/payload.js +171 -0
  19. package/dist/rooms/keys/open/0.2/payload.js.map +1 -0
  20. package/dist/vtc/_shared/0.1/admission.d.ts +16 -0
  21. package/dist/vtc/_shared/0.1/admission.d.ts.map +1 -0
  22. package/dist/vtc/_shared/0.1/admission.js +6 -0
  23. package/dist/vtc/_shared/0.1/admission.js.map +1 -0
  24. package/dist/vtc/members/admit/0.1/payload.d.ts +481 -0
  25. package/dist/vtc/members/admit/0.1/payload.d.ts.map +1 -0
  26. package/dist/vtc/members/admit/0.1/payload.js +281 -0
  27. package/dist/vtc/members/admit/0.1/payload.js.map +1 -0
  28. package/dist/vtc/members/make-membership/0.1/payload.d.ts +447 -0
  29. package/dist/vtc/members/make-membership/0.1/payload.d.ts.map +1 -0
  30. package/dist/vtc/members/make-membership/0.1/payload.js +267 -0
  31. package/dist/vtc/members/make-membership/0.1/payload.js.map +1 -0
  32. package/package.json +1 -1
  33. package/src/_shared/components.ts +43 -0
  34. package/src/index.ts +6 -0
  35. package/src/rooms/keys/act/0.2/payload.ts +380 -0
  36. package/src/rooms/keys/file-key/0.2/payload.ts +224 -0
  37. package/src/rooms/keys/open/0.2/payload.ts +237 -0
  38. package/src/vtc/_shared/0.1/admission.ts +17 -0
  39. package/src/vtc/members/admit/0.1/payload.ts +326 -0
  40. package/src/vtc/members/make-membership/0.1/payload.ts +304 -0
@@ -0,0 +1,237 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/open/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.
11
+ */
12
+ export interface RoomsKeysOpenPayload {
13
+ /**
14
+ * The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext.
15
+ */
16
+ roomId: string;
17
+ /**
18
+ * The record's key within the room.
19
+ */
20
+ key: string;
21
+ /**
22
+ * The record's version. Bound into the associated data, so a record served at a different version does not open.
23
+ */
24
+ version: number;
25
+ /**
26
+ * The sealed record exactly as the host returned it.
27
+ */
28
+ sealed: {
29
+ /**
30
+ * base64url.
31
+ */
32
+ ciphertext: string;
33
+ /**
34
+ * base64url.
35
+ */
36
+ nonce: string;
37
+ /**
38
+ * The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing.
39
+ */
40
+ epoch: number;
41
+ };
42
+ /**
43
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
44
+ */
45
+ ext?: Ext;
46
+ }
47
+ /**
48
+ * Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.
49
+ */
50
+ export interface RoomsKeysOpenResponsePayload {
51
+ /**
52
+ * The opened record, base64url. The only thing that crosses back — never the key.
53
+ */
54
+ plaintext: string;
55
+ ext?: Ext;
56
+ }
57
+
58
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
59
+ export type { Ext };
60
+
61
+ /** Trust Task type URI. */
62
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.2" as const;
63
+
64
+ /** Stable alias for this specification's request payload shape. */
65
+ export type Payload = RoomsKeysOpenPayload;
66
+
67
+ /** Trust Task response type URI (request type URI + "#response"). */
68
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/open/0.2#response" as const;
69
+
70
+ /** Stable alias for this specification's success-response payload shape. */
71
+ export type Response = RoomsKeysOpenResponsePayload;
72
+
73
+ /**
74
+ * This specification's payload schema, as a value.
75
+ *
76
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
77
+ * rather than only as a `.json` file because TypeScript types are erased
78
+ * at runtime: without a schema a consumer has nothing to validate, and
79
+ * every REQUIRED payload member is optional in practice. Cross-file
80
+ * `$ref`s are already inlined, so it needs no resolver.
81
+ */
82
+ export const PAYLOAD_SCHEMA = {
83
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
84
+ "$id": "https://trusttasks.org/spec/rooms/keys/open/0.2",
85
+ "title": "Rooms Keys Open — payload",
86
+ "description": "An agent asks the party holding its principal's room keys to open one sealed record. The key never crosses to the agent: this is a decryption oracle, not a key-release call.",
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": [
90
+ "roomId",
91
+ "key",
92
+ "version",
93
+ "sealed"
94
+ ],
95
+ "properties": {
96
+ "roomId": {
97
+ "type": "string",
98
+ "description": "The room the record belongs to. Part of the record's associated data, so a caller naming the wrong room gets an authentication failure rather than someone else's plaintext."
99
+ },
100
+ "key": {
101
+ "type": "string",
102
+ "maxLength": 512,
103
+ "description": "The record's key within the room."
104
+ },
105
+ "version": {
106
+ "type": "integer",
107
+ "minimum": 1,
108
+ "description": "The record's version. Bound into the associated data, so a record served at a different version does not open."
109
+ },
110
+ "sealed": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "ciphertext",
115
+ "nonce",
116
+ "epoch"
117
+ ],
118
+ "description": "The sealed record exactly as the host returned it.",
119
+ "properties": {
120
+ "ciphertext": {
121
+ "type": "string",
122
+ "description": "base64url."
123
+ },
124
+ "nonce": {
125
+ "type": "string",
126
+ "description": "base64url."
127
+ },
128
+ "epoch": {
129
+ "type": "integer",
130
+ "minimum": 1,
131
+ "description": "The epoch it was sealed under. The oracle refuses an epoch it holds no key for rather than guessing."
132
+ }
133
+ }
134
+ },
135
+ "ext": {
136
+ "$ref": "#/$defs/Ext",
137
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
138
+ }
139
+ },
140
+ "$defs": {
141
+ "Response": {
142
+ "$anchor": "response",
143
+ "title": "Rooms Keys Open — response payload",
144
+ "description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "plaintext"
149
+ ],
150
+ "properties": {
151
+ "plaintext": {
152
+ "type": "string",
153
+ "description": "The opened record, base64url. The only thing that crosses back — never the key."
154
+ },
155
+ "ext": {
156
+ "$ref": "#/$defs/Ext"
157
+ }
158
+ }
159
+ },
160
+ "Ext": {
161
+ "title": "Ext",
162
+ "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.",
163
+ "type": "object",
164
+ "minProperties": 1,
165
+ "additionalProperties": true,
166
+ "propertyNames": {
167
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
168
+ }
169
+ }
170
+ }
171
+ } as const;
172
+
173
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
174
+ export const RESPONSE_PAYLOAD_SCHEMA = {
175
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
176
+ "$ref": "#/$defs/Response",
177
+ "$defs": {
178
+ "Response": {
179
+ "$anchor": "response",
180
+ "title": "Rooms Keys Open — response payload",
181
+ "description": "Success response to rooms/keys/open. Type https://trusttasks.org/spec/rooms/keys/open/0.2#response.",
182
+ "type": "object",
183
+ "additionalProperties": false,
184
+ "required": [
185
+ "plaintext"
186
+ ],
187
+ "properties": {
188
+ "plaintext": {
189
+ "type": "string",
190
+ "description": "The opened record, base64url. The only thing that crosses back — never the key."
191
+ },
192
+ "ext": {
193
+ "$ref": "#/$defs/Ext"
194
+ }
195
+ }
196
+ },
197
+ "Ext": {
198
+ "title": "Ext",
199
+ "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.",
200
+ "type": "object",
201
+ "minProperties": 1,
202
+ "additionalProperties": true,
203
+ "propertyNames": {
204
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
205
+ }
206
+ }
207
+ }
208
+ } as const;
209
+
210
+ /**
211
+ * SPEC.md §7.2 policy for the request variant, from this specification's
212
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
213
+ * per-specification and cannot be derived from the document alone, and
214
+ * item 2 needs the schema this carries.
215
+ */
216
+ export const SPEC = {
217
+ typeUri: TYPE_URI,
218
+ isBearer: false,
219
+ isProofRequired: true,
220
+ isRecipientRequired: true,
221
+ isIssuedAtRequired: true,
222
+ payloadSchema: PAYLOAD_SCHEMA,
223
+ } as const;
224
+
225
+ /**
226
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
227
+ * tracks the *issuer* party's requirement because a response swaps the
228
+ * parties (§7.3 item 5).
229
+ */
230
+ export const RESPONSE_SPEC = {
231
+ typeUri: RESPONSE_TYPE_URI,
232
+ isBearer: false,
233
+ isProofRequired: true,
234
+ isRecipientRequired: true,
235
+ isIssuedAtRequired: true,
236
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
237
+ } as const;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/_shared/0.1/admission.schema.json
4
+ */
5
+
6
+ /**
7
+ * Shared types for direct admission: vtc/members/admit (an administrator admits a DID without a join request) and vtc/members/make-membership (an administrator gives an existing access-control entry with no member record the membership a completed join would have given it). Both answer with the same record of the membership admitted, so it lives here. Not itself a Trust Task specification (the `_shared` folder is skipped by the registry build and the codegen).
8
+ */
9
+ export interface VTCSharedDirectAdmissionDefinitions {
10
+ [k: string]: unknown | undefined;
11
+ }
12
+
13
+ /**
14
+ * The definitions this shared schema publishes, hoisted to one declaration each.
15
+ * See "../../../_shared/components.js".
16
+ */
17
+ export type { AdmittedMembership, Approval } from "../../../_shared/components.js";
@@ -0,0 +1,326 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/members/admit/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { AdmittedMembership, Approval, Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.
11
+ */
12
+ export type VTCMembersAdmitResponsePayload = AdmittedMembership;
13
+
14
+ /**
15
+ * An administrator admits a DID as a member of the community without a join request, at a community role it names.
16
+ */
17
+ export interface VTCMembersAdmitPayload {
18
+ /**
19
+ * The DID to admit. It holds no access-control entry at the community, or only one of the `application` community role (a non-member holding resource grants), and no live membership.
20
+ */
21
+ subject: string;
22
+ /**
23
+ * The community role the membership will hold, in the community's wire form (`member`, `moderator`, `issuer`, `custom:<name>`). Required, so that what an approver is shown is what was asked for. Never `admin`, never `application`, and never a role whose authority would confer authority-conferring capabilities; a role other than `member` is subject to the role-assignment rules of Conformance item 3.
24
+ */
25
+ role: string;
26
+ /**
27
+ * A human-readable label for the new access-control entry, as `acl/grant` carries one. Confers nothing. Not blank.
28
+ */
29
+ label?: string;
30
+ /**
31
+ * Why, for the community's audit trail and for the administrators asked to approve it if the admission is referred. Never published to the subject or beyond the community.
32
+ */
33
+ reason?: string;
34
+ ext?: Ext;
35
+ }
36
+
37
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
38
+ export type { AdmittedMembership, Approval, Ext };
39
+
40
+ /** Trust Task type URI. */
41
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/members/admit/0.1" as const;
42
+
43
+ /** Stable alias for this specification's request payload shape. */
44
+ export type Payload = VTCMembersAdmitPayload;
45
+
46
+ /** Trust Task response type URI (request type URI + "#response"). */
47
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/members/admit/0.1#response" as const;
48
+
49
+ /** Stable alias for this specification's success-response payload shape. */
50
+ export type Response = VTCMembersAdmitResponsePayload;
51
+
52
+ /**
53
+ * This specification's payload schema, as a value.
54
+ *
55
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
56
+ * rather than only as a `.json` file because TypeScript types are erased
57
+ * at runtime: without a schema a consumer has nothing to validate, and
58
+ * every REQUIRED payload member is optional in practice. Cross-file
59
+ * `$ref`s are already inlined, so it needs no resolver.
60
+ */
61
+ export const PAYLOAD_SCHEMA = {
62
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
63
+ "$id": "https://trusttasks.org/spec/vtc/members/admit/0.1",
64
+ "title": "VTC Members Admit — payload",
65
+ "description": "An administrator admits a DID as a member of the community without a join request, at a community role it names.",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "subject",
70
+ "role"
71
+ ],
72
+ "properties": {
73
+ "subject": {
74
+ "type": "string",
75
+ "pattern": "^did:",
76
+ "maxLength": 2048,
77
+ "description": "The DID to admit. It holds no access-control entry at the community, or only one of the `application` community role (a non-member holding resource grants), and no live membership."
78
+ },
79
+ "role": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "maxLength": 128,
83
+ "description": "The community role the membership will hold, in the community's wire form (`member`, `moderator`, `issuer`, `custom:<name>`). Required, so that what an approver is shown is what was asked for. Never `admin`, never `application`, and never a role whose authority would confer authority-conferring capabilities; a role other than `member` is subject to the role-assignment rules of Conformance item 3."
84
+ },
85
+ "label": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "maxLength": 256,
89
+ "pattern": "\\S",
90
+ "description": "A human-readable label for the new access-control entry, as `acl/grant` carries one. Confers nothing. Not blank."
91
+ },
92
+ "reason": {
93
+ "type": "string",
94
+ "maxLength": 1024,
95
+ "description": "Why, for the community's audit trail and for the administrators asked to approve it if the admission is referred. Never published to the subject or beyond the community."
96
+ },
97
+ "ext": {
98
+ "$ref": "#/$defs/Ext"
99
+ }
100
+ },
101
+ "$defs": {
102
+ "Response": {
103
+ "$anchor": "response",
104
+ "title": "VTC Members Admit — response payload",
105
+ "description": "Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.",
106
+ "$ref": "#/$defs/AdmittedMembership",
107
+ "unevaluatedProperties": false
108
+ },
109
+ "AdmittedMembership": {
110
+ "title": "AdmittedMembership",
111
+ "description": "A membership admitted directly, with the credentials issued for it — the success payload of vtc/members/admit and vtc/members/make-membership.",
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "subject",
116
+ "role",
117
+ "status",
118
+ "returning",
119
+ "approval",
120
+ "statusListIndex",
121
+ "vmc",
122
+ "roleVac"
123
+ ],
124
+ "properties": {
125
+ "subject": {
126
+ "type": "string",
127
+ "pattern": "^did:",
128
+ "maxLength": 2048,
129
+ "description": "The DID admitted."
130
+ },
131
+ "role": {
132
+ "type": "string",
133
+ "minLength": 1,
134
+ "maxLength": 128,
135
+ "description": "The community role the membership holds: for vtc/members/admit the one requested, for vtc/members/make-membership the role the entry already held."
136
+ },
137
+ "label": {
138
+ "type": "string",
139
+ "minLength": 1,
140
+ "maxLength": 256,
141
+ "description": "The new entry's label, when vtc/members/admit was given one. Absent for vtc/members/make-membership, which writes no entry."
142
+ },
143
+ "status": {
144
+ "type": "string",
145
+ "enum": [
146
+ "admitted"
147
+ ],
148
+ "description": "Always `admitted`: a refusal is a trust-task-error, and a referred admission is answered with trust-task-next-step until it executes."
149
+ },
150
+ "returning": {
151
+ "type": "boolean",
152
+ "description": "True when vtc/members/admit re-admitted a former member (a removed member record, no entry), as a rejoin would re-admit them. Always false for vtc/members/make-membership, which refuses a removed record."
153
+ },
154
+ "approval": {
155
+ "$ref": "#/$defs/Approval"
156
+ },
157
+ "statusListIndex": {
158
+ "type": "integer",
159
+ "minimum": 0,
160
+ "description": "The membership's slot on the community's revocation status list, which the VMC's credentialStatus names."
161
+ },
162
+ "vmc": {
163
+ "type": "object",
164
+ "description": "The Verifiable Membership Credential issued for the admission, delivered inline as vtc/join-requests/decide delivers it."
165
+ },
166
+ "roleVac": {
167
+ "type": "object",
168
+ "description": "The role credential issued for the admission: a Verifiable Authority Credential issued by the community whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }`, the shape vtc/join-requests/decide returns."
169
+ },
170
+ "ext": {
171
+ "$ref": "#/$defs/Ext"
172
+ }
173
+ }
174
+ },
175
+ "Approval": {
176
+ "title": "Approval",
177
+ "type": "string",
178
+ "enum": [
179
+ "policyAllowed",
180
+ "approved",
181
+ "waived"
182
+ ],
183
+ "description": "How the admission came to execute. `policyAllowed`: the community's policy admitted it at once. `approved`: the policy referred it, the community parked it, and another administrator approved it. `waived`: the policy referred it, and the community's single-administrator mode waived the approval on the requester's own re-authentication bound to the operation."
184
+ },
185
+ "Ext": {
186
+ "title": "Ext",
187
+ "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.",
188
+ "type": "object",
189
+ "minProperties": 1,
190
+ "additionalProperties": true,
191
+ "propertyNames": {
192
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
193
+ }
194
+ }
195
+ }
196
+ } as const;
197
+
198
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
199
+ export const RESPONSE_PAYLOAD_SCHEMA = {
200
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
201
+ "$ref": "#/$defs/Response",
202
+ "$defs": {
203
+ "Response": {
204
+ "$anchor": "response",
205
+ "title": "VTC Members Admit — response payload",
206
+ "description": "Success response to vtc/members/admit/0.1: the membership as admitted, with the credentials issued for it. Type https://trusttasks.org/spec/vtc/members/admit/0.1#response — carried directly, or on the request's threadId when a referred operation executes after its approval.",
207
+ "$ref": "#/$defs/AdmittedMembership",
208
+ "unevaluatedProperties": false
209
+ },
210
+ "AdmittedMembership": {
211
+ "title": "AdmittedMembership",
212
+ "description": "A membership admitted directly, with the credentials issued for it — the success payload of vtc/members/admit and vtc/members/make-membership.",
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "required": [
216
+ "subject",
217
+ "role",
218
+ "status",
219
+ "returning",
220
+ "approval",
221
+ "statusListIndex",
222
+ "vmc",
223
+ "roleVac"
224
+ ],
225
+ "properties": {
226
+ "subject": {
227
+ "type": "string",
228
+ "pattern": "^did:",
229
+ "maxLength": 2048,
230
+ "description": "The DID admitted."
231
+ },
232
+ "role": {
233
+ "type": "string",
234
+ "minLength": 1,
235
+ "maxLength": 128,
236
+ "description": "The community role the membership holds: for vtc/members/admit the one requested, for vtc/members/make-membership the role the entry already held."
237
+ },
238
+ "label": {
239
+ "type": "string",
240
+ "minLength": 1,
241
+ "maxLength": 256,
242
+ "description": "The new entry's label, when vtc/members/admit was given one. Absent for vtc/members/make-membership, which writes no entry."
243
+ },
244
+ "status": {
245
+ "type": "string",
246
+ "enum": [
247
+ "admitted"
248
+ ],
249
+ "description": "Always `admitted`: a refusal is a trust-task-error, and a referred admission is answered with trust-task-next-step until it executes."
250
+ },
251
+ "returning": {
252
+ "type": "boolean",
253
+ "description": "True when vtc/members/admit re-admitted a former member (a removed member record, no entry), as a rejoin would re-admit them. Always false for vtc/members/make-membership, which refuses a removed record."
254
+ },
255
+ "approval": {
256
+ "$ref": "#/$defs/Approval"
257
+ },
258
+ "statusListIndex": {
259
+ "type": "integer",
260
+ "minimum": 0,
261
+ "description": "The membership's slot on the community's revocation status list, which the VMC's credentialStatus names."
262
+ },
263
+ "vmc": {
264
+ "type": "object",
265
+ "description": "The Verifiable Membership Credential issued for the admission, delivered inline as vtc/join-requests/decide delivers it."
266
+ },
267
+ "roleVac": {
268
+ "type": "object",
269
+ "description": "The role credential issued for the admission: a Verifiable Authority Credential issued by the community whose `credentialSubject.authority` is `{ scope: <community DID>, actions: [\"role:<name>\"] }`, the shape vtc/join-requests/decide returns."
270
+ },
271
+ "ext": {
272
+ "$ref": "#/$defs/Ext"
273
+ }
274
+ }
275
+ },
276
+ "Approval": {
277
+ "title": "Approval",
278
+ "type": "string",
279
+ "enum": [
280
+ "policyAllowed",
281
+ "approved",
282
+ "waived"
283
+ ],
284
+ "description": "How the admission came to execute. `policyAllowed`: the community's policy admitted it at once. `approved`: the policy referred it, the community parked it, and another administrator approved it. `waived`: the policy referred it, and the community's single-administrator mode waived the approval on the requester's own re-authentication bound to the operation."
285
+ },
286
+ "Ext": {
287
+ "title": "Ext",
288
+ "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.",
289
+ "type": "object",
290
+ "minProperties": 1,
291
+ "additionalProperties": true,
292
+ "propertyNames": {
293
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
294
+ }
295
+ }
296
+ }
297
+ } as const;
298
+
299
+ /**
300
+ * SPEC.md §7.2 policy for the request variant, from this specification's
301
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
302
+ * per-specification and cannot be derived from the document alone, and
303
+ * item 2 needs the schema this carries.
304
+ */
305
+ export const SPEC = {
306
+ typeUri: TYPE_URI,
307
+ isBearer: false,
308
+ isProofRequired: true,
309
+ isRecipientRequired: true,
310
+ isIssuedAtRequired: true,
311
+ payloadSchema: PAYLOAD_SCHEMA,
312
+ } as const;
313
+
314
+ /**
315
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
316
+ * tracks the *issuer* party's requirement because a response swaps the
317
+ * parties (§7.3 item 5).
318
+ */
319
+ export const RESPONSE_SPEC = {
320
+ typeUri: RESPONSE_TYPE_URI,
321
+ isBearer: false,
322
+ isProofRequired: true,
323
+ isRecipientRequired: true,
324
+ isIssuedAtRequired: true,
325
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
326
+ } as const;