@openvtc/trust-tasks 0.12.11 → 0.12.13

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.
@@ -0,0 +1,311 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/join-requests/submit/0.2/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/submit/0.2";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/submit/0.2#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/vtc/join-requests/submit/0.2",
21
+ "title": "VTC Join-Requests Submit — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "vp"
26
+ ],
27
+ "properties": {
28
+ "vp": {
29
+ "type": "object",
30
+ "description": "The applicant's W3C Verifiable Presentation (opaque here), satisfying the community's join policy. The applicant DID is the document proof's signer — not a payload field."
31
+ },
32
+ "registryConsent": {
33
+ "type": "boolean",
34
+ "description": "Whether the applicant consents to trust-registry publication."
35
+ },
36
+ "extensions": {
37
+ "type": "object",
38
+ "description": "Opaque applicant-supplied extension bag."
39
+ },
40
+ "ext": {
41
+ "$ref": "#/$defs/Ext"
42
+ }
43
+ },
44
+ "$defs": {
45
+ "Response": {
46
+ "$anchor": "response",
47
+ "title": "VTC Join-Requests Submit — response payload",
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": [
51
+ "requestId",
52
+ "verdict"
53
+ ],
54
+ "properties": {
55
+ "requestId": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "description": "Id of the created join request (a UUID)."
59
+ },
60
+ "verdict": {
61
+ "$ref": "#/$defs/Verdict",
62
+ "description": "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all."
63
+ },
64
+ "ext": {
65
+ "$ref": "#/$defs/Ext"
66
+ }
67
+ }
68
+ },
69
+ "Ext": {
70
+ "title": "Ext",
71
+ "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.",
72
+ "type": "object",
73
+ "minProperties": 1,
74
+ "additionalProperties": true,
75
+ "propertyNames": {
76
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
77
+ }
78
+ },
79
+ "Verdict": {
80
+ "$anchor": "verdict",
81
+ "title": "Verdict",
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "effect",
86
+ "with"
87
+ ],
88
+ "description": "A ceremony decision: the effect, plus its effect-dependent detail.",
89
+ "properties": {
90
+ "effect": {
91
+ "$ref": "#/$defs/VerdictEffect"
92
+ },
93
+ "with": {
94
+ "$ref": "#/$defs/VerdictWith"
95
+ }
96
+ }
97
+ },
98
+ "VerdictWith": {
99
+ "$anchor": "verdictWith",
100
+ "title": "VerdictWith",
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "description": "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.",
104
+ "properties": {
105
+ "role": {
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "description": "The granted local role. `allow` only."
109
+ },
110
+ "obligations": {
111
+ "type": "object",
112
+ "description": "Conditions attached to the grant. `allow` only."
113
+ },
114
+ "bundleRef": {
115
+ "type": "object",
116
+ "description": "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only."
117
+ },
118
+ "code": {
119
+ "type": "string",
120
+ "minLength": 1,
121
+ "description": "Stable refusal code, safe to branch on. `deny` only."
122
+ },
123
+ "reason": {
124
+ "type": [
125
+ "string",
126
+ "null"
127
+ ],
128
+ "description": "Elaboration in prose, when the decider gave one. `deny` and `refer`."
129
+ },
130
+ "queue": {
131
+ "type": "string",
132
+ "minLength": 1,
133
+ "description": "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only."
134
+ },
135
+ "needs": {
136
+ "type": "array",
137
+ "items": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "description": "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only."
142
+ },
143
+ "presentationDefinition": {
144
+ "type": "object",
145
+ "description": "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only."
146
+ }
147
+ }
148
+ },
149
+ "VerdictEffect": {
150
+ "$anchor": "verdictEffect",
151
+ "title": "VerdictEffect",
152
+ "type": "string",
153
+ "enum": [
154
+ "allow",
155
+ "deny",
156
+ "refer",
157
+ "requestMore"
158
+ ],
159
+ "description": "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act."
160
+ }
161
+ }
162
+ };
163
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
164
+ export const RESPONSE_PAYLOAD_SCHEMA = {
165
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
166
+ "$ref": "#/$defs/Response",
167
+ "$defs": {
168
+ "Response": {
169
+ "$anchor": "response",
170
+ "title": "VTC Join-Requests Submit — response payload",
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": [
174
+ "requestId",
175
+ "verdict"
176
+ ],
177
+ "properties": {
178
+ "requestId": {
179
+ "type": "string",
180
+ "minLength": 1,
181
+ "description": "Id of the created join request (a UUID)."
182
+ },
183
+ "verdict": {
184
+ "$ref": "#/$defs/Verdict",
185
+ "description": "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all."
186
+ },
187
+ "ext": {
188
+ "$ref": "#/$defs/Ext"
189
+ }
190
+ }
191
+ },
192
+ "Ext": {
193
+ "title": "Ext",
194
+ "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.",
195
+ "type": "object",
196
+ "minProperties": 1,
197
+ "additionalProperties": true,
198
+ "propertyNames": {
199
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
200
+ }
201
+ },
202
+ "Verdict": {
203
+ "$anchor": "verdict",
204
+ "title": "Verdict",
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": [
208
+ "effect",
209
+ "with"
210
+ ],
211
+ "description": "A ceremony decision: the effect, plus its effect-dependent detail.",
212
+ "properties": {
213
+ "effect": {
214
+ "$ref": "#/$defs/VerdictEffect"
215
+ },
216
+ "with": {
217
+ "$ref": "#/$defs/VerdictWith"
218
+ }
219
+ }
220
+ },
221
+ "VerdictWith": {
222
+ "$anchor": "verdictWith",
223
+ "title": "VerdictWith",
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "description": "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.",
227
+ "properties": {
228
+ "role": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "description": "The granted local role. `allow` only."
232
+ },
233
+ "obligations": {
234
+ "type": "object",
235
+ "description": "Conditions attached to the grant. `allow` only."
236
+ },
237
+ "bundleRef": {
238
+ "type": "object",
239
+ "description": "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only."
240
+ },
241
+ "code": {
242
+ "type": "string",
243
+ "minLength": 1,
244
+ "description": "Stable refusal code, safe to branch on. `deny` only."
245
+ },
246
+ "reason": {
247
+ "type": [
248
+ "string",
249
+ "null"
250
+ ],
251
+ "description": "Elaboration in prose, when the decider gave one. `deny` and `refer`."
252
+ },
253
+ "queue": {
254
+ "type": "string",
255
+ "minLength": 1,
256
+ "description": "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only."
257
+ },
258
+ "needs": {
259
+ "type": "array",
260
+ "items": {
261
+ "type": "string",
262
+ "minLength": 1
263
+ },
264
+ "description": "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only."
265
+ },
266
+ "presentationDefinition": {
267
+ "type": "object",
268
+ "description": "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only."
269
+ }
270
+ }
271
+ },
272
+ "VerdictEffect": {
273
+ "$anchor": "verdictEffect",
274
+ "title": "VerdictEffect",
275
+ "type": "string",
276
+ "enum": [
277
+ "allow",
278
+ "deny",
279
+ "refer",
280
+ "requestMore"
281
+ ],
282
+ "description": "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act."
283
+ }
284
+ }
285
+ };
286
+ /**
287
+ * SPEC.md §7.2 policy for the request variant, from this specification's
288
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
289
+ * per-specification and cannot be derived from the document alone, and
290
+ * item 2 needs the schema this carries.
291
+ */
292
+ export const SPEC = {
293
+ typeUri: TYPE_URI,
294
+ isBearer: false,
295
+ isProofRequired: true,
296
+ isRecipientRequired: true,
297
+ payloadSchema: PAYLOAD_SCHEMA,
298
+ };
299
+ /**
300
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
301
+ * tracks the *issuer* party's requirement because a response swaps the
302
+ * parties (§7.3 item 5).
303
+ */
304
+ export const RESPONSE_SPEC = {
305
+ typeUri: RESPONSE_TYPE_URI,
306
+ isBearer: false,
307
+ isProofRequired: true,
308
+ isRecipientRequired: true,
309
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
310
+ };
311
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/join-requests/submit/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyFH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,0DAAmE,CAAC;AAK5F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mEAA4E,CAAC;AAK9G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,0DAA0D;IACjE,OAAO,EAAE,oCAAoC;IAC7C,MAAM,EAAE,QAAQ;IAChB,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Aa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.12.11",
3
+ "version": "0.12.13",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -326,6 +326,7 @@ export * as VtaWebvhServersRegister_v1_0 from "./vta/webvh/servers/register/1.0/
326
326
  export * as VtaWebvhServersRemove_v1_0 from "./vta/webvh/servers/remove/1.0/payload.js";
327
327
  export * as VtaWebvhServersRetireOrphan_v0_1 from "./vta/webvh/servers/retire-orphan/0.1/payload.js";
328
328
  export * as BackupShared_v0_1 from "./vtc/_shared/0.1/backup.js";
329
+ export * as CeremonyShared_v0_1 from "./vtc/_shared/0.1/ceremony.js";
329
330
  export * as CommunityShared_v0_1 from "./vtc/_shared/0.1/community.js";
330
331
  export * as ConfigPortabilityShared_v0_1 from "./vtc/_shared/0.1/config-portability.js";
331
332
  export * as EndorsementTypeShared_v0_1 from "./vtc/_shared/0.1/endorsement-type.js";
@@ -340,6 +341,7 @@ export * as VtcAdminInvitesList_v0_1 from "./vtc/admin/invites/list/0.1/payload.
340
341
  export * as VtcAdminInvitesRevoke_v0_1 from "./vtc/admin/invites/revoke/0.1/payload.js";
341
342
  export * as VtcAuthAdminSession_v0_1 from "./vtc/auth/admin-session/0.1/payload.js";
342
343
  export * as VtcAuthRecognise_v0_1 from "./vtc/auth/recognise/0.1/payload.js";
344
+ export * as VtcAuthRecognise_v0_2 from "./vtc/auth/recognise/0.2/payload.js";
343
345
  export * as VtcAuthRecogniseChallenge_v0_1 from "./vtc/auth/recognise/challenge/0.1/payload.js";
344
346
  export * as VtcBackupExport_v0_1 from "./vtc/backup/export/0.1/payload.js";
345
347
  export * as VtcBackupImport_v0_1 from "./vtc/backup/import/0.1/payload.js";
@@ -373,6 +375,7 @@ export * as VtcJoinRequestsShow_v0_1 from "./vtc/join-requests/show/0.1/payload.
373
375
  export * as VtcJoinRequestsStatus_v0_1 from "./vtc/join-requests/status/0.1/payload.js";
374
376
  export * as VtcJoinRequestsSubmitReceipt_v0_1 from "./vtc/join-requests/submit-receipt/0.1/payload.js";
375
377
  export * as VtcJoinRequestsSubmit_v0_1 from "./vtc/join-requests/submit/0.1/payload.js";
378
+ export * as VtcJoinRequestsSubmit_v0_2 from "./vtc/join-requests/submit/0.2/payload.js";
376
379
  export * as VtcMembersAdminRemove_v0_1 from "./vtc/members/admin-remove/0.1/payload.js";
377
380
  export * as VtcMembersList_v0_1 from "./vtc/members/list/0.1/payload.js";
378
381
  export * as VtcMembersPersonhoodAssert_v0_1 from "./vtc/members/personhood/assert/0.1/payload.js";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/_shared/0.1/ceremony.schema.json
4
+ */
5
+
6
+ /**
7
+ * The decision a community returns from a ceremony step. Shared across ceremony families because the four outcomes are the same wherever a policy decides something about an applicant.
8
+ */
9
+ export interface VTCSharedCeremonyDefinitions {
10
+ [k: string]: unknown | undefined;
11
+ }
@@ -0,0 +1,231 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/auth/recognise/0.2/payload.schema.json
4
+ */
5
+
6
+ export interface VTCAuthRecognisePayload {
7
+ /**
8
+ * A holder-signed W3C Verifiable Presentation embedding the foreign membership and endorsement credentials in `verifiableCredential`.
9
+ *
10
+ * The holder proof MUST use `proofPurpose: authentication`, MUST commit to the single-use `nonce` issued by `vtc/auth/recognise/challenge`, and MUST name the recognising community's DID as `domain`. A consumer MUST verify the holder proof, verify each embedded credential's issuer proof, and refuse unless the presentation's holder is the credentials' subject.
11
+ */
12
+ presentation: {};
13
+ ext?: Ext;
14
+ }
15
+ /**
16
+ * 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.
17
+ */
18
+ export interface Ext {
19
+ [k: string]: unknown | undefined;
20
+ }
21
+ export interface VTCAuthRecogniseResponsePayload {
22
+ /**
23
+ * A cross-community session id (xc-<uuid>), distinguishing it from local-member sessions.
24
+ */
25
+ sessionId: string;
26
+ data: {
27
+ accessToken: string;
28
+ /**
29
+ * Unix-seconds expiry, clamped to min(local default, earliest of the vec/vmc validUntil).
30
+ */
31
+ accessExpiresAt: number;
32
+ foreignIssuerDid: string;
33
+ /**
34
+ * The LOCAL role from cross_community_roles policy — not the foreign role.
35
+ */
36
+ mappedRole: string;
37
+ };
38
+ ext?: Ext;
39
+ }
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/auth/recognise/0.2" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = VTCAuthRecognisePayload;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/auth/recognise/0.2#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = VTCAuthRecogniseResponsePayload;
52
+
53
+ /**
54
+ * This specification's payload schema, as a value.
55
+ *
56
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
57
+ * rather than only as a `.json` file because TypeScript types are erased
58
+ * at runtime: without a schema a consumer has nothing to validate, and
59
+ * every REQUIRED payload member is optional in practice. Cross-file
60
+ * `$ref`s are already inlined, so it needs no resolver.
61
+ */
62
+ export const PAYLOAD_SCHEMA = {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "$id": "https://trusttasks.org/spec/vtc/auth/recognise/0.2",
65
+ "title": "VTC Auth Recognise — payload",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "presentation"
70
+ ],
71
+ "properties": {
72
+ "presentation": {
73
+ "type": "object",
74
+ "description": "A holder-signed W3C Verifiable Presentation embedding the foreign membership and endorsement credentials in `verifiableCredential`.\n\nThe holder proof MUST use `proofPurpose: authentication`, MUST commit to the single-use `nonce` issued by `vtc/auth/recognise/challenge`, and MUST name the recognising community's DID as `domain`. A consumer MUST verify the holder proof, verify each embedded credential's issuer proof, and refuse unless the presentation's holder is the credentials' subject."
75
+ },
76
+ "ext": {
77
+ "$ref": "#/$defs/Ext"
78
+ }
79
+ },
80
+ "$defs": {
81
+ "Response": {
82
+ "$anchor": "response",
83
+ "title": "VTC Auth Recognise — response payload",
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "sessionId",
88
+ "data"
89
+ ],
90
+ "properties": {
91
+ "sessionId": {
92
+ "type": "string",
93
+ "pattern": "^xc-",
94
+ "description": "A cross-community session id (xc-<uuid>), distinguishing it from local-member sessions."
95
+ },
96
+ "data": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": [
100
+ "accessToken",
101
+ "accessExpiresAt",
102
+ "foreignIssuerDid",
103
+ "mappedRole"
104
+ ],
105
+ "properties": {
106
+ "accessToken": {
107
+ "type": "string"
108
+ },
109
+ "accessExpiresAt": {
110
+ "type": "integer",
111
+ "minimum": 0,
112
+ "description": "Unix-seconds expiry, clamped to min(local default, earliest of the vec/vmc validUntil)."
113
+ },
114
+ "foreignIssuerDid": {
115
+ "type": "string"
116
+ },
117
+ "mappedRole": {
118
+ "type": "string",
119
+ "description": "The LOCAL role from cross_community_roles policy — not the foreign role."
120
+ }
121
+ }
122
+ },
123
+ "ext": {
124
+ "$ref": "#/$defs/Ext"
125
+ }
126
+ }
127
+ },
128
+ "Ext": {
129
+ "title": "Ext",
130
+ "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.",
131
+ "type": "object",
132
+ "minProperties": 1,
133
+ "additionalProperties": true,
134
+ "propertyNames": {
135
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
136
+ }
137
+ }
138
+ }
139
+ } as const;
140
+
141
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
142
+ export const RESPONSE_PAYLOAD_SCHEMA = {
143
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
144
+ "$ref": "#/$defs/Response",
145
+ "$defs": {
146
+ "Response": {
147
+ "$anchor": "response",
148
+ "title": "VTC Auth Recognise — response payload",
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "required": [
152
+ "sessionId",
153
+ "data"
154
+ ],
155
+ "properties": {
156
+ "sessionId": {
157
+ "type": "string",
158
+ "pattern": "^xc-",
159
+ "description": "A cross-community session id (xc-<uuid>), distinguishing it from local-member sessions."
160
+ },
161
+ "data": {
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "required": [
165
+ "accessToken",
166
+ "accessExpiresAt",
167
+ "foreignIssuerDid",
168
+ "mappedRole"
169
+ ],
170
+ "properties": {
171
+ "accessToken": {
172
+ "type": "string"
173
+ },
174
+ "accessExpiresAt": {
175
+ "type": "integer",
176
+ "minimum": 0,
177
+ "description": "Unix-seconds expiry, clamped to min(local default, earliest of the vec/vmc validUntil)."
178
+ },
179
+ "foreignIssuerDid": {
180
+ "type": "string"
181
+ },
182
+ "mappedRole": {
183
+ "type": "string",
184
+ "description": "The LOCAL role from cross_community_roles policy — not the foreign role."
185
+ }
186
+ }
187
+ },
188
+ "ext": {
189
+ "$ref": "#/$defs/Ext"
190
+ }
191
+ }
192
+ },
193
+ "Ext": {
194
+ "title": "Ext",
195
+ "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.",
196
+ "type": "object",
197
+ "minProperties": 1,
198
+ "additionalProperties": true,
199
+ "propertyNames": {
200
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
201
+ }
202
+ }
203
+ }
204
+ } as const;
205
+
206
+ /**
207
+ * SPEC.md §7.2 policy for the request variant, from this specification's
208
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
209
+ * per-specification and cannot be derived from the document alone, and
210
+ * item 2 needs the schema this carries.
211
+ */
212
+ export const SPEC = {
213
+ typeUri: TYPE_URI,
214
+ isBearer: false,
215
+ isProofRequired: false,
216
+ isRecipientRequired: true,
217
+ payloadSchema: PAYLOAD_SCHEMA,
218
+ } as const;
219
+
220
+ /**
221
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
222
+ * tracks the *issuer* party's requirement because a response swaps the
223
+ * parties (§7.3 item 5).
224
+ */
225
+ export const RESPONSE_SPEC = {
226
+ typeUri: RESPONSE_TYPE_URI,
227
+ isBearer: false,
228
+ isProofRequired: false,
229
+ isRecipientRequired: true,
230
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
231
+ } as const;