@openvtc/trust-tasks 0.16.7 → 0.16.8
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.
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/open/0.1/payload.d.ts +323 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.js +171 -0
- package/dist/rooms/keys/open/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts +306 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.js +165 -0
- package/dist/rooms/keys/present/0.1/payload.js.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.js +146 -0
- package/dist/vta/backup/abort/1.0/payload.js.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.js +146 -0
- package/dist/vta/backup/complete-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts +477 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js +249 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts +514 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js +267 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts +510 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js +266 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts +230 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.js +130 -0
- package/dist/vta/management/reload-services/1.0/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/rooms/keys/open/0.1/payload.ts +237 -0
- package/src/rooms/keys/present/0.1/payload.ts +224 -0
- package/src/vta/backup/abort/1.0/payload.ts +191 -0
- package/src/vta/backup/complete-export/1.0/payload.ts +191 -0
- package/src/vta/backup/finalize-import/1.0/payload.ts +333 -0
- package/src/vta/backup/initiate-export/1.0/payload.ts +350 -0
- package/src/vta/backup/initiate-import/1.0/payload.ts +349 -0
- package/src/vta/management/reload-services/1.0/payload.ts +167 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/backup/initiate-import/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Asks the recipient to open a slot for an encrypted bundle the producer is about to upload, pre-committing the digest and size so the transfer is verifiable. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTABackupInitiateImportPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Lowercase hex SHA-256 of the bytes about to be uploaded, committed before the upload begins. The recipient refuses a stream that hashes differently, which is what bounds the damage from a leaked write token. A wire-integrity check only: it says the bytes that arrived are the bytes that were sent, and nothing about whether they are worth applying.
|
|
15
|
+
*/
|
|
16
|
+
expectedSha256: string;
|
|
17
|
+
/**
|
|
18
|
+
* Byte count of the upload. Lets the recipient size the slot and refuse a truncated or oversized transfer without hashing it first. A zero-length bundle is not a degenerate case — there is nothing to import — so the floor is 1.
|
|
19
|
+
*/
|
|
20
|
+
expectedSizeBytes: number;
|
|
21
|
+
/**
|
|
22
|
+
* Requested transport mechanism — how the bytes move, not how they are encrypted. `stream` is the only value this version defines and is what an absent member means. Deliberately not an enum, so a recipient offering more can be asked for it without a specification revision; one that does not implement the request refuses with unsupportedAlgorithm.
|
|
23
|
+
*/
|
|
24
|
+
algorithm?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
27
|
+
*/
|
|
28
|
+
ext?: Ext;
|
|
29
|
+
}
|
|
30
|
+
export interface VTABackupInitiateImportResponsePayload {
|
|
31
|
+
descriptor: BundleDescriptor;
|
|
32
|
+
/**
|
|
33
|
+
* Operator-facing text describing how to complete the upload. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put a secret in it.
|
|
34
|
+
*/
|
|
35
|
+
completionHint?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
38
|
+
*/
|
|
39
|
+
ext?: Ext;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Where to write the bytes, on what terms, and until when.
|
|
43
|
+
*/
|
|
44
|
+
export interface BundleDescriptor {
|
|
45
|
+
/**
|
|
46
|
+
* Handle for this bundle across its whole lifecycle. Quoted back by finalize-import and abort. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence.
|
|
47
|
+
*/
|
|
48
|
+
bundleId: string;
|
|
49
|
+
/**
|
|
50
|
+
* The mechanism actually used, which is authoritative over what was requested.
|
|
51
|
+
*/
|
|
52
|
+
algorithm: string;
|
|
53
|
+
/**
|
|
54
|
+
* Where to write the bytes. Write-only: a recipient must not serve staged bytes back from this address, or a leaked token becomes a read of the operator's bundle. A recipient with no address at which it is reachable cannot produce this and refuses with transportUnavailable.
|
|
55
|
+
*/
|
|
56
|
+
transportUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* Bearer credential for transportUrl, presented in the X-Backup-Token header. Minted per bundle and never reused. A recipient should store only a hash of it. Leaking it lets a third party fill the slot; expectedSha256 is what bounds that to a failed transfer rather than a staged substitution.
|
|
59
|
+
*/
|
|
60
|
+
transportToken: string;
|
|
61
|
+
/**
|
|
62
|
+
* Echoed from the request, so the descriptor stands alone as the terms of the transfer.
|
|
63
|
+
*/
|
|
64
|
+
expectedSha256: string;
|
|
65
|
+
/**
|
|
66
|
+
* Echoed from the request, so the descriptor stands alone as the terms of the transfer.
|
|
67
|
+
*/
|
|
68
|
+
expectedSizeBytes: number;
|
|
69
|
+
/**
|
|
70
|
+
* After which the slot closes, the token is refused, and any staged bytes are discarded unread. Short by design: the window is how long a writable endpoint into the agent exists.
|
|
71
|
+
*/
|
|
72
|
+
expiresAt: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
76
|
+
export type { Ext };
|
|
77
|
+
|
|
78
|
+
/** Trust Task type URI. */
|
|
79
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/backup/initiate-import/1.0" as const;
|
|
80
|
+
|
|
81
|
+
/** Stable alias for this specification's request payload shape. */
|
|
82
|
+
export type Payload = VTABackupInitiateImportPayload;
|
|
83
|
+
|
|
84
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
85
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/backup/initiate-import/1.0#response" as const;
|
|
86
|
+
|
|
87
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
88
|
+
export type Response = VTABackupInitiateImportResponsePayload;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* This specification's payload schema, as a value.
|
|
92
|
+
*
|
|
93
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
94
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
95
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
96
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
97
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
98
|
+
*/
|
|
99
|
+
export const PAYLOAD_SCHEMA = {
|
|
100
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
101
|
+
"$id": "https://trusttasks.org/spec/vta/backup/initiate-import/1.0",
|
|
102
|
+
"title": "VTA Backup — Initiate Import — payload",
|
|
103
|
+
"description": "Asks the recipient to open a slot for an encrypted bundle the producer is about to upload, pre-committing the digest and size so the transfer is verifiable. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": [
|
|
107
|
+
"expectedSha256",
|
|
108
|
+
"expectedSizeBytes"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"expectedSha256": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
114
|
+
"description": "Lowercase hex SHA-256 of the bytes about to be uploaded, committed before the upload begins. The recipient refuses a stream that hashes differently, which is what bounds the damage from a leaked write token. A wire-integrity check only: it says the bytes that arrived are the bytes that were sent, and nothing about whether they are worth applying."
|
|
115
|
+
},
|
|
116
|
+
"expectedSizeBytes": {
|
|
117
|
+
"type": "integer",
|
|
118
|
+
"minimum": 1,
|
|
119
|
+
"description": "Byte count of the upload. Lets the recipient size the slot and refuse a truncated or oversized transfer without hashing it first. A zero-length bundle is not a degenerate case — there is nothing to import — so the floor is 1."
|
|
120
|
+
},
|
|
121
|
+
"algorithm": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"minLength": 1,
|
|
124
|
+
"maxLength": 64,
|
|
125
|
+
"description": "Requested transport mechanism — how the bytes move, not how they are encrypted. `stream` is the only value this version defines and is what an absent member means. Deliberately not an enum, so a recipient offering more can be asked for it without a specification revision; one that does not implement the request refuses with unsupportedAlgorithm."
|
|
126
|
+
},
|
|
127
|
+
"ext": {
|
|
128
|
+
"$ref": "#/$defs/Ext",
|
|
129
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"$defs": {
|
|
133
|
+
"Response": {
|
|
134
|
+
"$anchor": "response",
|
|
135
|
+
"title": "VTA Backup Initiate Import — response payload",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": [
|
|
139
|
+
"descriptor"
|
|
140
|
+
],
|
|
141
|
+
"properties": {
|
|
142
|
+
"descriptor": {
|
|
143
|
+
"$ref": "#/$defs/BundleDescriptor",
|
|
144
|
+
"description": "Where to write the bytes, on what terms, and until when."
|
|
145
|
+
},
|
|
146
|
+
"completionHint": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"maxLength": 1024,
|
|
149
|
+
"description": "Operator-facing text describing how to complete the upload. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put a secret in it."
|
|
150
|
+
},
|
|
151
|
+
"ext": {
|
|
152
|
+
"$ref": "#/$defs/Ext",
|
|
153
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"BundleDescriptor": {
|
|
158
|
+
"title": "Bundle descriptor",
|
|
159
|
+
"type": "object",
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"description": "The control-plane account of an out-of-band byte transfer. Shared in shape with initiate-export, where it describes a download rather than an upload.",
|
|
162
|
+
"required": [
|
|
163
|
+
"bundleId",
|
|
164
|
+
"algorithm",
|
|
165
|
+
"transportUrl",
|
|
166
|
+
"transportToken",
|
|
167
|
+
"expectedSha256",
|
|
168
|
+
"expectedSizeBytes",
|
|
169
|
+
"expiresAt"
|
|
170
|
+
],
|
|
171
|
+
"properties": {
|
|
172
|
+
"bundleId": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
175
|
+
"description": "Handle for this bundle across its whole lifecycle. Quoted back by finalize-import and abort. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence."
|
|
176
|
+
},
|
|
177
|
+
"algorithm": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1,
|
|
180
|
+
"maxLength": 64,
|
|
181
|
+
"description": "The mechanism actually used, which is authoritative over what was requested."
|
|
182
|
+
},
|
|
183
|
+
"transportUrl": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"format": "uri",
|
|
186
|
+
"maxLength": 2048,
|
|
187
|
+
"description": "Where to write the bytes. Write-only: a recipient must not serve staged bytes back from this address, or a leaked token becomes a read of the operator's bundle. A recipient with no address at which it is reachable cannot produce this and refuses with transportUnavailable."
|
|
188
|
+
},
|
|
189
|
+
"transportToken": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 1,
|
|
192
|
+
"maxLength": 1024,
|
|
193
|
+
"description": "Bearer credential for transportUrl, presented in the X-Backup-Token header. Minted per bundle and never reused. A recipient should store only a hash of it. Leaking it lets a third party fill the slot; expectedSha256 is what bounds that to a failed transfer rather than a staged substitution."
|
|
194
|
+
},
|
|
195
|
+
"expectedSha256": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
198
|
+
"description": "Echoed from the request, so the descriptor stands alone as the terms of the transfer."
|
|
199
|
+
},
|
|
200
|
+
"expectedSizeBytes": {
|
|
201
|
+
"type": "integer",
|
|
202
|
+
"minimum": 1,
|
|
203
|
+
"description": "Echoed from the request, so the descriptor stands alone as the terms of the transfer."
|
|
204
|
+
},
|
|
205
|
+
"expiresAt": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"format": "date-time",
|
|
208
|
+
"description": "After which the slot closes, the token is refused, and any staged bytes are discarded unread. Short by design: the window is how long a writable endpoint into the agent exists."
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"Ext": {
|
|
213
|
+
"title": "Ext",
|
|
214
|
+
"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.",
|
|
215
|
+
"type": "object",
|
|
216
|
+
"minProperties": 1,
|
|
217
|
+
"additionalProperties": true,
|
|
218
|
+
"propertyNames": {
|
|
219
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
} as const;
|
|
224
|
+
|
|
225
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
226
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
227
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
228
|
+
"$ref": "#/$defs/Response",
|
|
229
|
+
"$defs": {
|
|
230
|
+
"Response": {
|
|
231
|
+
"$anchor": "response",
|
|
232
|
+
"title": "VTA Backup Initiate Import — response payload",
|
|
233
|
+
"type": "object",
|
|
234
|
+
"additionalProperties": false,
|
|
235
|
+
"required": [
|
|
236
|
+
"descriptor"
|
|
237
|
+
],
|
|
238
|
+
"properties": {
|
|
239
|
+
"descriptor": {
|
|
240
|
+
"$ref": "#/$defs/BundleDescriptor",
|
|
241
|
+
"description": "Where to write the bytes, on what terms, and until when."
|
|
242
|
+
},
|
|
243
|
+
"completionHint": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"maxLength": 1024,
|
|
246
|
+
"description": "Operator-facing text describing how to complete the upload. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put a secret in it."
|
|
247
|
+
},
|
|
248
|
+
"ext": {
|
|
249
|
+
"$ref": "#/$defs/Ext",
|
|
250
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"BundleDescriptor": {
|
|
255
|
+
"title": "Bundle descriptor",
|
|
256
|
+
"type": "object",
|
|
257
|
+
"additionalProperties": false,
|
|
258
|
+
"description": "The control-plane account of an out-of-band byte transfer. Shared in shape with initiate-export, where it describes a download rather than an upload.",
|
|
259
|
+
"required": [
|
|
260
|
+
"bundleId",
|
|
261
|
+
"algorithm",
|
|
262
|
+
"transportUrl",
|
|
263
|
+
"transportToken",
|
|
264
|
+
"expectedSha256",
|
|
265
|
+
"expectedSizeBytes",
|
|
266
|
+
"expiresAt"
|
|
267
|
+
],
|
|
268
|
+
"properties": {
|
|
269
|
+
"bundleId": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
272
|
+
"description": "Handle for this bundle across its whole lifecycle. Quoted back by finalize-import and abort. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence."
|
|
273
|
+
},
|
|
274
|
+
"algorithm": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"minLength": 1,
|
|
277
|
+
"maxLength": 64,
|
|
278
|
+
"description": "The mechanism actually used, which is authoritative over what was requested."
|
|
279
|
+
},
|
|
280
|
+
"transportUrl": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"format": "uri",
|
|
283
|
+
"maxLength": 2048,
|
|
284
|
+
"description": "Where to write the bytes. Write-only: a recipient must not serve staged bytes back from this address, or a leaked token becomes a read of the operator's bundle. A recipient with no address at which it is reachable cannot produce this and refuses with transportUnavailable."
|
|
285
|
+
},
|
|
286
|
+
"transportToken": {
|
|
287
|
+
"type": "string",
|
|
288
|
+
"minLength": 1,
|
|
289
|
+
"maxLength": 1024,
|
|
290
|
+
"description": "Bearer credential for transportUrl, presented in the X-Backup-Token header. Minted per bundle and never reused. A recipient should store only a hash of it. Leaking it lets a third party fill the slot; expectedSha256 is what bounds that to a failed transfer rather than a staged substitution."
|
|
291
|
+
},
|
|
292
|
+
"expectedSha256": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
295
|
+
"description": "Echoed from the request, so the descriptor stands alone as the terms of the transfer."
|
|
296
|
+
},
|
|
297
|
+
"expectedSizeBytes": {
|
|
298
|
+
"type": "integer",
|
|
299
|
+
"minimum": 1,
|
|
300
|
+
"description": "Echoed from the request, so the descriptor stands alone as the terms of the transfer."
|
|
301
|
+
},
|
|
302
|
+
"expiresAt": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"format": "date-time",
|
|
305
|
+
"description": "After which the slot closes, the token is refused, and any staged bytes are discarded unread. Short by design: the window is how long a writable endpoint into the agent exists."
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"Ext": {
|
|
310
|
+
"title": "Ext",
|
|
311
|
+
"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.",
|
|
312
|
+
"type": "object",
|
|
313
|
+
"minProperties": 1,
|
|
314
|
+
"additionalProperties": true,
|
|
315
|
+
"propertyNames": {
|
|
316
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
} as const;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
324
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
325
|
+
* per-specification and cannot be derived from the document alone, and
|
|
326
|
+
* item 2 needs the schema this carries.
|
|
327
|
+
*/
|
|
328
|
+
export const SPEC = {
|
|
329
|
+
typeUri: TYPE_URI,
|
|
330
|
+
isBearer: false,
|
|
331
|
+
isProofRequired: true,
|
|
332
|
+
isRecipientRequired: true,
|
|
333
|
+
isIssuedAtRequired: true,
|
|
334
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
335
|
+
} as const;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
339
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
340
|
+
* parties (§7.3 item 5).
|
|
341
|
+
*/
|
|
342
|
+
export const RESPONSE_SPEC = {
|
|
343
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
344
|
+
isBearer: false,
|
|
345
|
+
isProofRequired: true,
|
|
346
|
+
isRecipientRequired: true,
|
|
347
|
+
isIssuedAtRequired: true,
|
|
348
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
349
|
+
} as const;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/management/reload-services/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Asks the recipient to re-read its service configuration and restart its transports. Defines no members: every parameter this task might carry would be a way of asking the agent to run on something other than its configuration — see Why the payload is empty. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTAManagementReloadServicesPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1. Note the limit stated in the specification: an ecosystem must not use this slot to add selective reload, inline configuration, or a skip-validation flag, which are the members the empty payload exists to exclude.
|
|
15
|
+
*/
|
|
16
|
+
ext?: Ext;
|
|
17
|
+
}
|
|
18
|
+
export interface VTAManagementReloadServicesResponsePayload {
|
|
19
|
+
/**
|
|
20
|
+
* The recipient's account of what it is doing. Advisory free text, deliberately not an enum: a producer must not parse it or branch on its value, because the reliable signal is whether the agent answers afterwards, not what it said before restarting. Bounded per §7.3 item 19 — the value lands in transcripts and audit entries.
|
|
21
|
+
*/
|
|
22
|
+
status: string;
|
|
23
|
+
/**
|
|
24
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
25
|
+
*/
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
30
|
+
export type { Ext };
|
|
31
|
+
|
|
32
|
+
/** Trust Task type URI. */
|
|
33
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/management/reload-services/1.0" as const;
|
|
34
|
+
|
|
35
|
+
/** Stable alias for this specification's request payload shape. */
|
|
36
|
+
export type Payload = VTAManagementReloadServicesPayload;
|
|
37
|
+
|
|
38
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
39
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/management/reload-services/1.0#response" as const;
|
|
40
|
+
|
|
41
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
42
|
+
export type Response = VTAManagementReloadServicesResponsePayload;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* This specification's payload schema, as a value.
|
|
46
|
+
*
|
|
47
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
48
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
49
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
50
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
51
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
52
|
+
*/
|
|
53
|
+
export const PAYLOAD_SCHEMA = {
|
|
54
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
55
|
+
"$id": "https://trusttasks.org/spec/vta/management/reload-services/1.0",
|
|
56
|
+
"title": "VTA Management — Reload Services — payload",
|
|
57
|
+
"description": "Asks the recipient to re-read its service configuration and restart its transports. Defines no members: every parameter this task might carry would be a way of asking the agent to run on something other than its configuration — see Why the payload is empty. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"properties": {
|
|
61
|
+
"ext": {
|
|
62
|
+
"$ref": "#/$defs/Ext",
|
|
63
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1. Note the limit stated in the specification: an ecosystem must not use this slot to add selective reload, inline configuration, or a skip-validation flag, which are the members the empty payload exists to exclude."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"$defs": {
|
|
67
|
+
"Response": {
|
|
68
|
+
"$anchor": "response",
|
|
69
|
+
"title": "VTA Management Reload Services — response payload",
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": [
|
|
73
|
+
"status"
|
|
74
|
+
],
|
|
75
|
+
"properties": {
|
|
76
|
+
"status": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"minLength": 1,
|
|
79
|
+
"maxLength": 256,
|
|
80
|
+
"description": "The recipient's account of what it is doing. Advisory free text, deliberately not an enum: a producer must not parse it or branch on its value, because the reliable signal is whether the agent answers afterwards, not what it said before restarting. Bounded per §7.3 item 19 — the value lands in transcripts and audit entries."
|
|
81
|
+
},
|
|
82
|
+
"ext": {
|
|
83
|
+
"$ref": "#/$defs/Ext",
|
|
84
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"Ext": {
|
|
89
|
+
"title": "Ext",
|
|
90
|
+
"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.",
|
|
91
|
+
"type": "object",
|
|
92
|
+
"minProperties": 1,
|
|
93
|
+
"additionalProperties": true,
|
|
94
|
+
"propertyNames": {
|
|
95
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
} as const;
|
|
100
|
+
|
|
101
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
102
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
103
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
104
|
+
"$ref": "#/$defs/Response",
|
|
105
|
+
"$defs": {
|
|
106
|
+
"Response": {
|
|
107
|
+
"$anchor": "response",
|
|
108
|
+
"title": "VTA Management Reload Services — response payload",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"required": [
|
|
112
|
+
"status"
|
|
113
|
+
],
|
|
114
|
+
"properties": {
|
|
115
|
+
"status": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"minLength": 1,
|
|
118
|
+
"maxLength": 256,
|
|
119
|
+
"description": "The recipient's account of what it is doing. Advisory free text, deliberately not an enum: a producer must not parse it or branch on its value, because the reliable signal is whether the agent answers afterwards, not what it said before restarting. Bounded per §7.3 item 19 — the value lands in transcripts and audit entries."
|
|
120
|
+
},
|
|
121
|
+
"ext": {
|
|
122
|
+
"$ref": "#/$defs/Ext",
|
|
123
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"Ext": {
|
|
128
|
+
"title": "Ext",
|
|
129
|
+
"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.",
|
|
130
|
+
"type": "object",
|
|
131
|
+
"minProperties": 1,
|
|
132
|
+
"additionalProperties": true,
|
|
133
|
+
"propertyNames": {
|
|
134
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
} as const;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
142
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
143
|
+
* per-specification and cannot be derived from the document alone, and
|
|
144
|
+
* item 2 needs the schema this carries.
|
|
145
|
+
*/
|
|
146
|
+
export const SPEC = {
|
|
147
|
+
typeUri: TYPE_URI,
|
|
148
|
+
isBearer: false,
|
|
149
|
+
isProofRequired: true,
|
|
150
|
+
isRecipientRequired: true,
|
|
151
|
+
isIssuedAtRequired: true,
|
|
152
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
153
|
+
} as const;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
157
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
158
|
+
* parties (§7.3 item 5).
|
|
159
|
+
*/
|
|
160
|
+
export const RESPONSE_SPEC = {
|
|
161
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
162
|
+
isBearer: false,
|
|
163
|
+
isProofRequired: true,
|
|
164
|
+
isRecipientRequired: true,
|
|
165
|
+
isIssuedAtRequired: true,
|
|
166
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
167
|
+
} as const;
|