@openvtc/trust-tasks 0.21.5 → 0.21.7

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,294 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/restore/status/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/restore/status/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/restore/status/0.1#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/vta/restore/status/0.1",
21
+ "title": "VTA Restore — Status — payload",
22
+ "description": "An administrator asks a Verifiable Trust Agent whether its current state derives from a backup restore, and which software version it runs. The payload carries nothing. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "ext": {
27
+ "$ref": "#/$defs/Ext",
28
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
29
+ }
30
+ },
31
+ "$defs": {
32
+ "DeploymentEnvironment": {
33
+ "title": "DeploymentEnvironment",
34
+ "description": "The kind of deployment an agent's state lives in, as a backup restore classifies it: plain (an unencrypted store), hardened (the store encrypted under a key derived from the agent's seed), or tee (seed and signing keys sealed to an attested trusted execution environment).",
35
+ "type": "string",
36
+ "enum": [
37
+ "plain",
38
+ "hardened",
39
+ "tee"
40
+ ]
41
+ },
42
+ "RestoreRecord": {
43
+ "title": "RestoreRecord",
44
+ "description": "The backup restore the agent's current state derives from (VTI-VTA-051). `sourceEnvironment` is the kind of deployment the backup was taken from, present when the backup records it; `targetEnvironment` is the kind the restore was applied to — this agent's.",
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": [
48
+ "appliedAt",
49
+ "stagedAt",
50
+ "stagedBy",
51
+ "targetEnvironment"
52
+ ],
53
+ "properties": {
54
+ "appliedAt": {
55
+ "type": "string",
56
+ "format": "date-time",
57
+ "description": "When the restored state was applied — the boot at which it replaced the agent's previous state."
58
+ },
59
+ "stagedAt": {
60
+ "type": "string",
61
+ "format": "date-time",
62
+ "description": "When the restore was committed and staged for the next boot."
63
+ },
64
+ "stagedBy": {
65
+ "type": "string",
66
+ "pattern": "^did:",
67
+ "maxLength": 2048,
68
+ "description": "The DID of the administrator who committed the restore."
69
+ },
70
+ "sourceDid": {
71
+ "type": "string",
72
+ "pattern": "^did:",
73
+ "maxLength": 2048,
74
+ "description": "The DID of the agent the backup was taken from, when the backup records one. Differs from the responding agent's own DID when a restore replaced its identity."
75
+ },
76
+ "sourceEnvironment": {
77
+ "$ref": "#/$defs/DeploymentEnvironment"
78
+ },
79
+ "targetEnvironment": {
80
+ "$ref": "#/$defs/DeploymentEnvironment"
81
+ },
82
+ "internalKeysLost": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "maxLength": 256
88
+ },
89
+ "maxItems": 10000,
90
+ "description": "Identifiers of keys whose records came back without their material: keys the agent generated internally and never exports, so no backup carries them. Absent when none were lost."
91
+ },
92
+ "hostedDidsDetached": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string",
96
+ "pattern": "^did:",
97
+ "maxLength": 2048
98
+ },
99
+ "maxItems": 10000,
100
+ "description": "DIDs whose hosting registrations the restore detached because it replaced a different identity; each must be registered with its host again. Absent when none were."
101
+ }
102
+ }
103
+ },
104
+ "Response": {
105
+ "$anchor": "response",
106
+ "title": "VTA Restore Status — response payload",
107
+ "description": "Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/restore/status/0.1#response. Failures use trust-task-error, not this shape.",
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "version",
112
+ "restored"
113
+ ],
114
+ "properties": {
115
+ "version": {
116
+ "type": "string",
117
+ "minLength": 1,
118
+ "maxLength": 64,
119
+ "description": "The agent's software version, as its build reports it."
120
+ },
121
+ "restored": {
122
+ "type": "boolean",
123
+ "description": "Whether the agent's current state derives from a backup restore. Always present, so 'not restored' is stated rather than inferred from an absent member. True exactly when `restore` is present."
124
+ },
125
+ "restore": {
126
+ "$ref": "#/$defs/RestoreRecord",
127
+ "description": "The restore the agent's current state derives from. Present exactly when `restored` is true."
128
+ },
129
+ "ext": {
130
+ "$ref": "#/$defs/Ext",
131
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
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
+ };
147
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
148
+ export const RESPONSE_PAYLOAD_SCHEMA = {
149
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
150
+ "$ref": "#/$defs/Response",
151
+ "$defs": {
152
+ "DeploymentEnvironment": {
153
+ "title": "DeploymentEnvironment",
154
+ "description": "The kind of deployment an agent's state lives in, as a backup restore classifies it: plain (an unencrypted store), hardened (the store encrypted under a key derived from the agent's seed), or tee (seed and signing keys sealed to an attested trusted execution environment).",
155
+ "type": "string",
156
+ "enum": [
157
+ "plain",
158
+ "hardened",
159
+ "tee"
160
+ ]
161
+ },
162
+ "RestoreRecord": {
163
+ "title": "RestoreRecord",
164
+ "description": "The backup restore the agent's current state derives from (VTI-VTA-051). `sourceEnvironment` is the kind of deployment the backup was taken from, present when the backup records it; `targetEnvironment` is the kind the restore was applied to — this agent's.",
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": [
168
+ "appliedAt",
169
+ "stagedAt",
170
+ "stagedBy",
171
+ "targetEnvironment"
172
+ ],
173
+ "properties": {
174
+ "appliedAt": {
175
+ "type": "string",
176
+ "format": "date-time",
177
+ "description": "When the restored state was applied — the boot at which it replaced the agent's previous state."
178
+ },
179
+ "stagedAt": {
180
+ "type": "string",
181
+ "format": "date-time",
182
+ "description": "When the restore was committed and staged for the next boot."
183
+ },
184
+ "stagedBy": {
185
+ "type": "string",
186
+ "pattern": "^did:",
187
+ "maxLength": 2048,
188
+ "description": "The DID of the administrator who committed the restore."
189
+ },
190
+ "sourceDid": {
191
+ "type": "string",
192
+ "pattern": "^did:",
193
+ "maxLength": 2048,
194
+ "description": "The DID of the agent the backup was taken from, when the backup records one. Differs from the responding agent's own DID when a restore replaced its identity."
195
+ },
196
+ "sourceEnvironment": {
197
+ "$ref": "#/$defs/DeploymentEnvironment"
198
+ },
199
+ "targetEnvironment": {
200
+ "$ref": "#/$defs/DeploymentEnvironment"
201
+ },
202
+ "internalKeysLost": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "maxLength": 256
208
+ },
209
+ "maxItems": 10000,
210
+ "description": "Identifiers of keys whose records came back without their material: keys the agent generated internally and never exports, so no backup carries them. Absent when none were lost."
211
+ },
212
+ "hostedDidsDetached": {
213
+ "type": "array",
214
+ "items": {
215
+ "type": "string",
216
+ "pattern": "^did:",
217
+ "maxLength": 2048
218
+ },
219
+ "maxItems": 10000,
220
+ "description": "DIDs whose hosting registrations the restore detached because it replaced a different identity; each must be registered with its host again. Absent when none were."
221
+ }
222
+ }
223
+ },
224
+ "Response": {
225
+ "$anchor": "response",
226
+ "title": "VTA Restore Status — response payload",
227
+ "description": "Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/restore/status/0.1#response. Failures use trust-task-error, not this shape.",
228
+ "type": "object",
229
+ "additionalProperties": false,
230
+ "required": [
231
+ "version",
232
+ "restored"
233
+ ],
234
+ "properties": {
235
+ "version": {
236
+ "type": "string",
237
+ "minLength": 1,
238
+ "maxLength": 64,
239
+ "description": "The agent's software version, as its build reports it."
240
+ },
241
+ "restored": {
242
+ "type": "boolean",
243
+ "description": "Whether the agent's current state derives from a backup restore. Always present, so 'not restored' is stated rather than inferred from an absent member. True exactly when `restore` is present."
244
+ },
245
+ "restore": {
246
+ "$ref": "#/$defs/RestoreRecord",
247
+ "description": "The restore the agent's current state derives from. Present exactly when `restored` is true."
248
+ },
249
+ "ext": {
250
+ "$ref": "#/$defs/Ext",
251
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
252
+ }
253
+ }
254
+ },
255
+ "Ext": {
256
+ "title": "Ext",
257
+ "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.",
258
+ "type": "object",
259
+ "minProperties": 1,
260
+ "additionalProperties": true,
261
+ "propertyNames": {
262
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
263
+ }
264
+ }
265
+ }
266
+ };
267
+ /**
268
+ * SPEC.md §7.2 policy for the request variant, from this specification's
269
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
270
+ * per-specification and cannot be derived from the document alone, and
271
+ * item 2 needs the schema this carries.
272
+ */
273
+ export const SPEC = {
274
+ typeUri: TYPE_URI,
275
+ isBearer: false,
276
+ isProofRequired: true,
277
+ isRecipientRequired: true,
278
+ isIssuedAtRequired: true,
279
+ payloadSchema: PAYLOAD_SCHEMA,
280
+ };
281
+ /**
282
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
283
+ * tracks the *issuer* party's requirement because a response swaps the
284
+ * parties (§7.3 item 5).
285
+ */
286
+ export const RESPONSE_SPEC = {
287
+ typeUri: RESPONSE_TYPE_URI,
288
+ isBearer: false,
289
+ isProofRequired: true,
290
+ isRecipientRequired: true,
291
+ isIssuedAtRequired: true,
292
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
293
+ };
294
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/restore/status/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4EH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,oDAA6D,CAAC;AAKtF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,6DAAsE,CAAC;AAKxG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,oDAAoD;IAC3D,OAAO,EAAE,gCAAgC;IACzC,aAAa,EAAE,uSAAuS;IACtT,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;YACrB,aAAa,EAAE,yDAAyD;SACzE;KACF;IACD,OAAO,EAAE;QACP,uBAAuB,EAAE;YACvB,OAAO,EAAE,uBAAuB;YAChC,aAAa,EAAE,kRAAkR;YACjS,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,OAAO;gBACP,UAAU;gBACV,KAAK;aACN;SACF;QACD,eAAe,EAAE;YACf,OAAO,EAAE,eAAe;YACxB,aAAa,EAAE,kQAAkQ;YACjR,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,WAAW;gBACX,UAAU;gBACV,UAAU;gBACV,mBAAmB;aACpB;YACD,YAAY,EAAE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kMAAkM;iBAClN;gBACD,SAAS,EAAE;oBACT,MAAM,EAAE,uBAAuB;oBAC/B,aAAa,EAAE,8FAA8F;iBAC9G;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,aAAa;oBACrB,aAAa,EAAE,yDAAyD;iBACzE;aACF;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,uKAAuK;YACtL,MAAM,EAAE,QAAQ;YAChB,eAAe,EAAE,CAAC;YAClB,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE;gBACf,SAAS,EAAE,mCAAmC;aAC/C;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,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,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.21.5",
3
+ "version": "0.21.7",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,268 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/revoke-session/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Invalidate one named session, every session of the producer, or every session of a named subject the producer may manage. The auth service drops the targeted session(s); any future use of their access or refresh tokens MUST fail. Exactly one of `sessionId`, `all` and `subject` is present.
11
+ */
12
+ export type AuthRevokeSession = {
13
+ /**
14
+ * The session to revoke. Mutually exclusive with `all` and `subject`.
15
+ */
16
+ sessionId?: string;
17
+ /**
18
+ * When true, revoke every active session the consumer holds for the producer's own subject — equivalent to `subject` naming the producer. `false` targets nothing and is refused as malformedRequest; it stays schema-valid only because 0.1 admitted it. Mutually exclusive with `sessionId` and `subject`.
19
+ */
20
+ all?: boolean;
21
+ /**
22
+ * Revoke every active session the consumer holds for this subject. The producer's own identifier, or a subject whose access the producer could withdraw under the consumer's access-control policy — see Authorization. Mutually exclusive with `sessionId` and `all`.
23
+ */
24
+ subject?: string;
25
+ /**
26
+ * Optional human-readable rationale (e.g. "logout", "device-lost", "access-withdrawn"). Surfaced in audit logs; the framework imposes no vocabulary.
27
+ */
28
+ reason?: string;
29
+ /**
30
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
31
+ */
32
+ ext?: Ext;
33
+ } & {
34
+ [k: string]: unknown | undefined;
35
+ };
36
+
37
+ /**
38
+ * Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.
39
+ */
40
+ export interface AuthRevokeSessionResponsePayload {
41
+ /**
42
+ * Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions.
43
+ */
44
+ revokedCount: number;
45
+ /**
46
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
47
+ */
48
+ ext?: Ext;
49
+ }
50
+
51
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
52
+ export type { Ext };
53
+
54
+ /** Trust Task type URI. */
55
+ export const TYPE_URI = "https://trusttasks.org/spec/auth/revoke-session/0.2" as const;
56
+
57
+ /** Stable alias for this specification's request payload shape. */
58
+ export type Payload = AuthRevokeSession;
59
+
60
+ /** Trust Task response type URI (request type URI + "#response"). */
61
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/auth/revoke-session/0.2#response" as const;
62
+
63
+ /** Stable alias for this specification's success-response payload shape. */
64
+ export type Response = AuthRevokeSessionResponsePayload;
65
+
66
+ /**
67
+ * This specification's payload schema, as a value.
68
+ *
69
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
70
+ * rather than only as a `.json` file because TypeScript types are erased
71
+ * at runtime: without a schema a consumer has nothing to validate, and
72
+ * every REQUIRED payload member is optional in practice. Cross-file
73
+ * `$ref`s are already inlined, so it needs no resolver.
74
+ */
75
+ export const PAYLOAD_SCHEMA = {
76
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
77
+ "$id": "https://trusttasks.org/spec/auth/revoke-session/0.2",
78
+ "title": "Auth — Revoke Session",
79
+ "description": "Invalidate one named session, every session of the producer, or every session of a named subject the producer may manage. The auth service drops the targeted session(s); any future use of their access or refresh tokens MUST fail. Exactly one of `sessionId`, `all` and `subject` is present.",
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "properties": {
83
+ "sessionId": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "description": "The session to revoke. Mutually exclusive with `all` and `subject`."
87
+ },
88
+ "all": {
89
+ "type": "boolean",
90
+ "description": "When true, revoke every active session the consumer holds for the producer's own subject — equivalent to `subject` naming the producer. `false` targets nothing and is refused as malformedRequest; it stays schema-valid only because 0.1 admitted it. Mutually exclusive with `sessionId` and `subject`."
91
+ },
92
+ "subject": {
93
+ "type": "string",
94
+ "pattern": "^did:",
95
+ "maxLength": 2048,
96
+ "description": "Revoke every active session the consumer holds for this subject. The producer's own identifier, or a subject whose access the producer could withdraw under the consumer's access-control policy — see Authorization. Mutually exclusive with `sessionId` and `all`."
97
+ },
98
+ "reason": {
99
+ "type": "string",
100
+ "maxLength": 1024,
101
+ "description": "Optional human-readable rationale (e.g. \"logout\", \"device-lost\", \"access-withdrawn\"). Surfaced in audit logs; the framework imposes no vocabulary."
102
+ },
103
+ "ext": {
104
+ "$ref": "#/$defs/Ext",
105
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
106
+ }
107
+ },
108
+ "oneOf": [
109
+ {
110
+ "required": [
111
+ "sessionId"
112
+ ],
113
+ "not": {
114
+ "anyOf": [
115
+ {
116
+ "required": [
117
+ "all"
118
+ ]
119
+ },
120
+ {
121
+ "required": [
122
+ "subject"
123
+ ]
124
+ }
125
+ ]
126
+ }
127
+ },
128
+ {
129
+ "required": [
130
+ "all"
131
+ ],
132
+ "not": {
133
+ "anyOf": [
134
+ {
135
+ "required": [
136
+ "sessionId"
137
+ ]
138
+ },
139
+ {
140
+ "required": [
141
+ "subject"
142
+ ]
143
+ }
144
+ ]
145
+ }
146
+ },
147
+ {
148
+ "required": [
149
+ "subject"
150
+ ],
151
+ "not": {
152
+ "anyOf": [
153
+ {
154
+ "required": [
155
+ "sessionId"
156
+ ]
157
+ },
158
+ {
159
+ "required": [
160
+ "all"
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ }
166
+ ],
167
+ "$defs": {
168
+ "Response": {
169
+ "$anchor": "response",
170
+ "title": "Auth Revoke Session — response payload",
171
+ "description": "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.",
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "revokedCount"
176
+ ],
177
+ "properties": {
178
+ "revokedCount": {
179
+ "type": "integer",
180
+ "minimum": 0,
181
+ "description": "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions."
182
+ },
183
+ "ext": {
184
+ "$ref": "#/$defs/Ext",
185
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
186
+ }
187
+ }
188
+ },
189
+ "Ext": {
190
+ "title": "Ext",
191
+ "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.",
192
+ "type": "object",
193
+ "minProperties": 1,
194
+ "additionalProperties": true,
195
+ "propertyNames": {
196
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
197
+ }
198
+ }
199
+ }
200
+ } as const;
201
+
202
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
203
+ export const RESPONSE_PAYLOAD_SCHEMA = {
204
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
205
+ "$ref": "#/$defs/Response",
206
+ "$defs": {
207
+ "Response": {
208
+ "$anchor": "response",
209
+ "title": "Auth Revoke Session — response payload",
210
+ "description": "Acknowledgement carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/revoke-session/0.2#response.",
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "revokedCount"
215
+ ],
216
+ "properties": {
217
+ "revokedCount": {
218
+ "type": "integer",
219
+ "minimum": 0,
220
+ "description": "Number of sessions this request invalidated. Zero is a valid outcome: the named session was already gone, or the subject held no active sessions."
221
+ },
222
+ "ext": {
223
+ "$ref": "#/$defs/Ext",
224
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
225
+ }
226
+ }
227
+ },
228
+ "Ext": {
229
+ "title": "Ext",
230
+ "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.",
231
+ "type": "object",
232
+ "minProperties": 1,
233
+ "additionalProperties": true,
234
+ "propertyNames": {
235
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
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;
package/src/index.ts CHANGED
@@ -54,6 +54,7 @@ export * as AuthPasskeyRevokeStart_v0_1 from "./auth/passkey/revoke/start/0.1/pa
54
54
  export * as AuthPasskeyRevokeStart_v0_2 from "./auth/passkey/revoke/start/0.2/payload.js";
55
55
  export * as AuthRefresh_v0_1 from "./auth/refresh/0.1/payload.js";
56
56
  export * as AuthRevokeSession_v0_1 from "./auth/revoke-session/0.1/payload.js";
57
+ export * as AuthRevokeSession_v0_2 from "./auth/revoke-session/0.2/payload.js";
57
58
  export * as AuthSessionsList_v0_1 from "./auth/sessions/list/0.1/payload.js";
58
59
  export * as AuthStepUpApproveRequest_v0_1 from "./auth/step-up/approve-request/0.1/payload.js";
59
60
  export * as AuthStepUpApproveRequest_v0_2 from "./auth/step-up/approve-request/0.2/payload.js";
@@ -233,6 +234,7 @@ export * as KeysCreate_v0_1 from "./keys/create/0.1/payload.js";
233
234
  export * as KeysDeriveAndSignDocument_v0_1 from "./keys/derive-and-sign-document/0.1/payload.js";
234
235
  export * as KeysDeriveAndSign_v0_1 from "./keys/derive-and-sign/0.1/payload.js";
235
236
  export * as KeysExportSecret_v0_1 from "./keys/export-secret/0.1/payload.js";
237
+ export * as KeysImportWrappingKey_v0_1 from "./keys/import-wrapping-key/0.1/payload.js";
236
238
  export * as KeysImport_v0_1 from "./keys/import/0.1/payload.js";
237
239
  export * as KeysList_v0_1 from "./keys/list/0.1/payload.js";
238
240
  export * as KeysRename_v0_1 from "./keys/rename/0.1/payload.js";
@@ -514,6 +516,7 @@ export * as VtaDidTemplatesRender_v2_0 from "./vta/did-templates/render/2.0/payl
514
516
  export * as VtaDidTemplatesUpdate_v1_0 from "./vta/did-templates/update/1.0/payload.js";
515
517
  export * as VtaDidTemplatesUpdate_v2_0 from "./vta/did-templates/update/2.0/payload.js";
516
518
  export * as VtaDidTemplatesUpdate_v3_0 from "./vta/did-templates/update/3.0/payload.js";
519
+ export * as VtaHealthDetails_v0_1 from "./vta/health/details/0.1/payload.js";
517
520
  export * as VtaManagementReloadServices_v1_0 from "./vta/management/reload-services/1.0/payload.js";
518
521
  export * as VtaMemoryDelete_v0_1 from "./vta/memory/delete/0.1/payload.js";
519
522
  export * as VtaMemoryList_v0_1 from "./vta/memory/list/0.1/payload.js";
@@ -522,6 +525,7 @@ export * as VtaPasskeyVmsEnrollChallenge_v0_1 from "./vta/passkey-vms/enroll-cha
522
525
  export * as VtaPasskeyVmsEnrollSubmit_v0_1 from "./vta/passkey-vms/enroll-submit/0.1/payload.js";
523
526
  export * as VtaPasskeyVmsList_v0_1 from "./vta/passkey-vms/list/0.1/payload.js";
524
527
  export * as VtaPasskeyVmsRevoke_v0_1 from "./vta/passkey-vms/revoke/0.1/payload.js";
528
+ export * as VtaRestoreStatus_v0_1 from "./vta/restore/status/0.1/payload.js";
525
529
  export * as VtaServicesDisable_v1_0 from "./vta/services/disable/1.0/payload.js";
526
530
  export * as VtaServicesDrainCancel_v1_0 from "./vta/services/drain/cancel/1.0/payload.js";
527
531
  export * as VtaServicesDrainList_v1_0 from "./vta/services/drain/list/1.0/payload.js";