@openvtc/trust-tasks 0.21.1 → 0.21.3

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 (32) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/index.d.ts +5 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +5 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/vta/attestation/config-report/0.1/payload.d.ts +378 -0
  7. package/dist/vta/attestation/config-report/0.1/payload.d.ts.map +1 -0
  8. package/dist/vta/attestation/config-report/0.1/payload.js +212 -0
  9. package/dist/vta/attestation/config-report/0.1/payload.js.map +1 -0
  10. package/dist/vta/attestation/report/0.1/payload.d.ts +350 -0
  11. package/dist/vta/attestation/report/0.1/payload.d.ts.map +1 -0
  12. package/dist/vta/attestation/report/0.1/payload.js +196 -0
  13. package/dist/vta/attestation/report/0.1/payload.js.map +1 -0
  14. package/dist/vta/attestation/status/0.1/payload.d.ts +274 -0
  15. package/dist/vta/attestation/status/0.1/payload.d.ts.map +1 -0
  16. package/dist/vta/attestation/status/0.1/payload.js +158 -0
  17. package/dist/vta/attestation/status/0.1/payload.js.map +1 -0
  18. package/dist/vta/services/report/0.1/payload.d.ts +618 -0
  19. package/dist/vta/services/report/0.1/payload.d.ts.map +1 -0
  20. package/dist/vta/services/report/0.1/payload.js +322 -0
  21. package/dist/vta/services/report/0.1/payload.js.map +1 -0
  22. package/dist/vta/services/update/1.1/payload.d.ts +490 -0
  23. package/dist/vta/services/update/1.1/payload.d.ts.map +1 -0
  24. package/dist/vta/services/update/1.1/payload.js +269 -0
  25. package/dist/vta/services/update/1.1/payload.js.map +1 -0
  26. package/package.json +1 -1
  27. package/src/index.ts +5 -0
  28. package/src/vta/attestation/config-report/0.1/payload.ts +273 -0
  29. package/src/vta/attestation/report/0.1/payload.ts +253 -0
  30. package/src/vta/attestation/status/0.1/payload.ts +203 -0
  31. package/src/vta/services/report/0.1/payload.ts +419 -0
  32. package/src/vta/services/update/1.1/payload.ts +326 -0
@@ -0,0 +1,350 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/attestation/report/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * Asks an agent for fresh attestation evidence bound to a nonce the verifier chose. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface VTAAttestationReportPayload {
10
+ /**
11
+ * Thirty-two bytes the verifier generated for this request, lowercase hex. The agent binds exactly this into the evidence, so no earlier report can answer this request.
12
+ */
13
+ nonce: string;
14
+ /**
15
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
16
+ */
17
+ ext?: Ext;
18
+ }
19
+ export interface VTAAttestationReportResponsePayload {
20
+ /**
21
+ * The platform that produced the evidence, and so how to verify it.
22
+ */
23
+ teeType: "nitro" | "sev-snp" | "simulated";
24
+ /**
25
+ * The platform's quote, base64: a COSE_Sign1 attestation document for nitro, an attestation report for sev-snp. Verified against the vendor's root, never trusted on the agent's word.
26
+ */
27
+ evidence: string;
28
+ /**
29
+ * The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this.
30
+ */
31
+ nonce: string;
32
+ /**
33
+ * The DID the evidence binds as its user data. A verifier checks the evidence binds it and that it is the response document's issuer.
34
+ */
35
+ vtaDid?: string;
36
+ /**
37
+ * When the evidence was produced. Informational: freshness comes from the nonce.
38
+ */
39
+ generatedAt: string;
40
+ /**
41
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
42
+ */
43
+ ext?: Ext;
44
+ }
45
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
46
+ export type { Ext };
47
+ /** Trust Task type URI. */
48
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vta/attestation/report/0.1";
49
+ /** Stable alias for this specification's request payload shape. */
50
+ export type Payload = VTAAttestationReportPayload;
51
+ /** Trust Task response type URI (request type URI + "#response"). */
52
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/attestation/report/0.1#response";
53
+ /** Stable alias for this specification's success-response payload shape. */
54
+ export type Response = VTAAttestationReportResponsePayload;
55
+ /**
56
+ * This specification's payload schema, as a value.
57
+ *
58
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
59
+ * rather than only as a `.json` file because TypeScript types are erased
60
+ * at runtime: without a schema a consumer has nothing to validate, and
61
+ * every REQUIRED payload member is optional in practice. Cross-file
62
+ * `$ref`s are already inlined, so it needs no resolver.
63
+ */
64
+ export declare const PAYLOAD_SCHEMA: {
65
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
66
+ readonly $id: "https://trusttasks.org/spec/vta/attestation/report/0.1";
67
+ readonly title: "VTA Attestation — Report — payload";
68
+ readonly description: "Asks an agent for fresh attestation evidence bound to a nonce the verifier chose. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
69
+ readonly type: "object";
70
+ readonly additionalProperties: false;
71
+ readonly required: readonly ["nonce"];
72
+ readonly properties: {
73
+ readonly nonce: {
74
+ readonly type: "string";
75
+ readonly pattern: "^[0-9a-f]{64}$";
76
+ readonly description: "Thirty-two bytes the verifier generated for this request, lowercase hex. The agent binds exactly this into the evidence, so no earlier report can answer this request.";
77
+ };
78
+ readonly ext: {
79
+ readonly $ref: "#/$defs/Ext";
80
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
81
+ };
82
+ };
83
+ readonly $defs: {
84
+ readonly Response: {
85
+ readonly $anchor: "response";
86
+ readonly title: "VTA Attestation Report — response payload";
87
+ readonly type: "object";
88
+ readonly additionalProperties: false;
89
+ readonly required: readonly ["teeType", "evidence", "nonce", "generatedAt"];
90
+ readonly properties: {
91
+ readonly teeType: {
92
+ readonly type: "string";
93
+ readonly enum: readonly ["nitro", "sev-snp", "simulated"];
94
+ readonly description: "The platform that produced the evidence, and so how to verify it.";
95
+ };
96
+ readonly evidence: {
97
+ readonly type: "string";
98
+ readonly minLength: 1;
99
+ readonly maxLength: 65536;
100
+ readonly pattern: "^[A-Za-z0-9+/_-]+={0,2}$";
101
+ readonly description: "The platform's quote, base64: a COSE_Sign1 attestation document for nitro, an attestation report for sev-snp. Verified against the vendor's root, never trusted on the agent's word.";
102
+ };
103
+ readonly nonce: {
104
+ readonly type: "string";
105
+ readonly pattern: "^[0-9a-f]{64}$";
106
+ readonly description: "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this.";
107
+ };
108
+ readonly vtaDid: {
109
+ readonly type: "string";
110
+ readonly minLength: 1;
111
+ readonly maxLength: 1000;
112
+ readonly description: "The DID the evidence binds as its user data. A verifier checks the evidence binds it and that it is the response document's issuer.";
113
+ };
114
+ readonly generatedAt: {
115
+ readonly type: "string";
116
+ readonly format: "date-time";
117
+ readonly description: "When the evidence was produced. Informational: freshness comes from the nonce.";
118
+ };
119
+ readonly ext: {
120
+ readonly $ref: "#/$defs/Ext";
121
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
122
+ };
123
+ };
124
+ };
125
+ readonly Ext: {
126
+ readonly title: "Ext";
127
+ readonly 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.";
128
+ readonly type: "object";
129
+ readonly minProperties: 1;
130
+ readonly additionalProperties: true;
131
+ readonly propertyNames: {
132
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
133
+ };
134
+ };
135
+ };
136
+ };
137
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
138
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
139
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
140
+ readonly $ref: "#/$defs/Response";
141
+ readonly $defs: {
142
+ readonly Response: {
143
+ readonly $anchor: "response";
144
+ readonly title: "VTA Attestation Report — response payload";
145
+ readonly type: "object";
146
+ readonly additionalProperties: false;
147
+ readonly required: readonly ["teeType", "evidence", "nonce", "generatedAt"];
148
+ readonly properties: {
149
+ readonly teeType: {
150
+ readonly type: "string";
151
+ readonly enum: readonly ["nitro", "sev-snp", "simulated"];
152
+ readonly description: "The platform that produced the evidence, and so how to verify it.";
153
+ };
154
+ readonly evidence: {
155
+ readonly type: "string";
156
+ readonly minLength: 1;
157
+ readonly maxLength: 65536;
158
+ readonly pattern: "^[A-Za-z0-9+/_-]+={0,2}$";
159
+ readonly description: "The platform's quote, base64: a COSE_Sign1 attestation document for nitro, an attestation report for sev-snp. Verified against the vendor's root, never trusted on the agent's word.";
160
+ };
161
+ readonly nonce: {
162
+ readonly type: "string";
163
+ readonly pattern: "^[0-9a-f]{64}$";
164
+ readonly description: "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this.";
165
+ };
166
+ readonly vtaDid: {
167
+ readonly type: "string";
168
+ readonly minLength: 1;
169
+ readonly maxLength: 1000;
170
+ readonly description: "The DID the evidence binds as its user data. A verifier checks the evidence binds it and that it is the response document's issuer.";
171
+ };
172
+ readonly generatedAt: {
173
+ readonly type: "string";
174
+ readonly format: "date-time";
175
+ readonly description: "When the evidence was produced. Informational: freshness comes from the nonce.";
176
+ };
177
+ readonly ext: {
178
+ readonly $ref: "#/$defs/Ext";
179
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
180
+ };
181
+ };
182
+ };
183
+ readonly Ext: {
184
+ readonly title: "Ext";
185
+ readonly 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.";
186
+ readonly type: "object";
187
+ readonly minProperties: 1;
188
+ readonly additionalProperties: true;
189
+ readonly propertyNames: {
190
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
191
+ };
192
+ };
193
+ };
194
+ };
195
+ /**
196
+ * SPEC.md §7.2 policy for the request variant, from this specification's
197
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
198
+ * per-specification and cannot be derived from the document alone, and
199
+ * item 2 needs the schema this carries.
200
+ */
201
+ export declare const SPEC: {
202
+ readonly typeUri: "https://trusttasks.org/spec/vta/attestation/report/0.1";
203
+ readonly isBearer: false;
204
+ readonly isProofRequired: false;
205
+ readonly isRecipientRequired: true;
206
+ readonly isIssuedAtRequired: false;
207
+ readonly payloadSchema: {
208
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
209
+ readonly $id: "https://trusttasks.org/spec/vta/attestation/report/0.1";
210
+ readonly title: "VTA Attestation — Report — payload";
211
+ readonly description: "Asks an agent for fresh attestation evidence bound to a nonce the verifier chose. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
212
+ readonly type: "object";
213
+ readonly additionalProperties: false;
214
+ readonly required: readonly ["nonce"];
215
+ readonly properties: {
216
+ readonly nonce: {
217
+ readonly type: "string";
218
+ readonly pattern: "^[0-9a-f]{64}$";
219
+ readonly description: "Thirty-two bytes the verifier generated for this request, lowercase hex. The agent binds exactly this into the evidence, so no earlier report can answer this request.";
220
+ };
221
+ readonly ext: {
222
+ readonly $ref: "#/$defs/Ext";
223
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
224
+ };
225
+ };
226
+ readonly $defs: {
227
+ readonly Response: {
228
+ readonly $anchor: "response";
229
+ readonly title: "VTA Attestation Report — response payload";
230
+ readonly type: "object";
231
+ readonly additionalProperties: false;
232
+ readonly required: readonly ["teeType", "evidence", "nonce", "generatedAt"];
233
+ readonly properties: {
234
+ readonly teeType: {
235
+ readonly type: "string";
236
+ readonly enum: readonly ["nitro", "sev-snp", "simulated"];
237
+ readonly description: "The platform that produced the evidence, and so how to verify it.";
238
+ };
239
+ readonly evidence: {
240
+ readonly type: "string";
241
+ readonly minLength: 1;
242
+ readonly maxLength: 65536;
243
+ readonly pattern: "^[A-Za-z0-9+/_-]+={0,2}$";
244
+ readonly description: "The platform's quote, base64: a COSE_Sign1 attestation document for nitro, an attestation report for sev-snp. Verified against the vendor's root, never trusted on the agent's word.";
245
+ };
246
+ readonly nonce: {
247
+ readonly type: "string";
248
+ readonly pattern: "^[0-9a-f]{64}$";
249
+ readonly description: "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this.";
250
+ };
251
+ readonly vtaDid: {
252
+ readonly type: "string";
253
+ readonly minLength: 1;
254
+ readonly maxLength: 1000;
255
+ readonly description: "The DID the evidence binds as its user data. A verifier checks the evidence binds it and that it is the response document's issuer.";
256
+ };
257
+ readonly generatedAt: {
258
+ readonly type: "string";
259
+ readonly format: "date-time";
260
+ readonly description: "When the evidence was produced. Informational: freshness comes from the nonce.";
261
+ };
262
+ readonly ext: {
263
+ readonly $ref: "#/$defs/Ext";
264
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
265
+ };
266
+ };
267
+ };
268
+ readonly Ext: {
269
+ readonly title: "Ext";
270
+ readonly 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.";
271
+ readonly type: "object";
272
+ readonly minProperties: 1;
273
+ readonly additionalProperties: true;
274
+ readonly propertyNames: {
275
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
276
+ };
277
+ };
278
+ };
279
+ };
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 declare const RESPONSE_SPEC: {
287
+ readonly typeUri: "https://trusttasks.org/spec/vta/attestation/report/0.1#response";
288
+ readonly isBearer: false;
289
+ readonly isProofRequired: true;
290
+ readonly isRecipientRequired: true;
291
+ readonly isIssuedAtRequired: false;
292
+ readonly payloadSchema: {
293
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
294
+ readonly $ref: "#/$defs/Response";
295
+ readonly $defs: {
296
+ readonly Response: {
297
+ readonly $anchor: "response";
298
+ readonly title: "VTA Attestation Report — response payload";
299
+ readonly type: "object";
300
+ readonly additionalProperties: false;
301
+ readonly required: readonly ["teeType", "evidence", "nonce", "generatedAt"];
302
+ readonly properties: {
303
+ readonly teeType: {
304
+ readonly type: "string";
305
+ readonly enum: readonly ["nitro", "sev-snp", "simulated"];
306
+ readonly description: "The platform that produced the evidence, and so how to verify it.";
307
+ };
308
+ readonly evidence: {
309
+ readonly type: "string";
310
+ readonly minLength: 1;
311
+ readonly maxLength: 65536;
312
+ readonly pattern: "^[A-Za-z0-9+/_-]+={0,2}$";
313
+ readonly description: "The platform's quote, base64: a COSE_Sign1 attestation document for nitro, an attestation report for sev-snp. Verified against the vendor's root, never trusted on the agent's word.";
314
+ };
315
+ readonly nonce: {
316
+ readonly type: "string";
317
+ readonly pattern: "^[0-9a-f]{64}$";
318
+ readonly description: "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this.";
319
+ };
320
+ readonly vtaDid: {
321
+ readonly type: "string";
322
+ readonly minLength: 1;
323
+ readonly maxLength: 1000;
324
+ readonly description: "The DID the evidence binds as its user data. A verifier checks the evidence binds it and that it is the response document's issuer.";
325
+ };
326
+ readonly generatedAt: {
327
+ readonly type: "string";
328
+ readonly format: "date-time";
329
+ readonly description: "When the evidence was produced. Informational: freshness comes from the nonce.";
330
+ };
331
+ readonly ext: {
332
+ readonly $ref: "#/$defs/Ext";
333
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
334
+ };
335
+ };
336
+ };
337
+ readonly Ext: {
338
+ readonly title: "Ext";
339
+ readonly 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.";
340
+ readonly type: "object";
341
+ readonly minProperties: 1;
342
+ readonly additionalProperties: true;
343
+ readonly propertyNames: {
344
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
345
+ };
346
+ };
347
+ };
348
+ };
349
+ };
350
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vta/attestation/report/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,wDAAiE,CAAC;AAE1F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,2BAA2B,CAAC;AAElD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,iEAA0E,CAAC;AAE5G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,mCAAmC,CAAC;AAE3D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiE1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/attestation/report/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/attestation/report/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/attestation/report/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/attestation/report/0.1",
21
+ "title": "VTA Attestation — Report — payload",
22
+ "description": "Asks an agent for fresh attestation evidence bound to a nonce the verifier chose. 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
+ "required": [
26
+ "nonce"
27
+ ],
28
+ "properties": {
29
+ "nonce": {
30
+ "type": "string",
31
+ "pattern": "^[0-9a-f]{64}$",
32
+ "description": "Thirty-two bytes the verifier generated for this request, lowercase hex. The agent binds exactly this into the evidence, so no earlier report can answer this request."
33
+ },
34
+ "ext": {
35
+ "$ref": "#/$defs/Ext",
36
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
37
+ }
38
+ },
39
+ "$defs": {
40
+ "Response": {
41
+ "$anchor": "response",
42
+ "title": "VTA Attestation Report — response payload",
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": [
46
+ "teeType",
47
+ "evidence",
48
+ "nonce",
49
+ "generatedAt"
50
+ ],
51
+ "properties": {
52
+ "teeType": {
53
+ "type": "string",
54
+ "enum": [
55
+ "nitro",
56
+ "sev-snp",
57
+ "simulated"
58
+ ],
59
+ "description": "The platform that produced the evidence, and so how to verify it."
60
+ },
61
+ "evidence": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 65536,
65
+ "pattern": "^[A-Za-z0-9+/_-]+={0,2}$",
66
+ "description": "The platform's quote, base64: a COSE_Sign1 attestation document for nitro, an attestation report for sev-snp. Verified against the vendor's root, never trusted on the agent's word."
67
+ },
68
+ "nonce": {
69
+ "type": "string",
70
+ "pattern": "^[0-9a-f]{64}$",
71
+ "description": "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this."
72
+ },
73
+ "vtaDid": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 1000,
77
+ "description": "The DID the evidence binds as its user data. A verifier checks the evidence binds it and that it is the response document's issuer."
78
+ },
79
+ "generatedAt": {
80
+ "type": "string",
81
+ "format": "date-time",
82
+ "description": "When the evidence was produced. Informational: freshness comes from the nonce."
83
+ },
84
+ "ext": {
85
+ "$ref": "#/$defs/Ext",
86
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
87
+ }
88
+ }
89
+ },
90
+ "Ext": {
91
+ "title": "Ext",
92
+ "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.",
93
+ "type": "object",
94
+ "minProperties": 1,
95
+ "additionalProperties": true,
96
+ "propertyNames": {
97
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
98
+ }
99
+ }
100
+ }
101
+ };
102
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
103
+ export const RESPONSE_PAYLOAD_SCHEMA = {
104
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
105
+ "$ref": "#/$defs/Response",
106
+ "$defs": {
107
+ "Response": {
108
+ "$anchor": "response",
109
+ "title": "VTA Attestation Report — response payload",
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "teeType",
114
+ "evidence",
115
+ "nonce",
116
+ "generatedAt"
117
+ ],
118
+ "properties": {
119
+ "teeType": {
120
+ "type": "string",
121
+ "enum": [
122
+ "nitro",
123
+ "sev-snp",
124
+ "simulated"
125
+ ],
126
+ "description": "The platform that produced the evidence, and so how to verify it."
127
+ },
128
+ "evidence": {
129
+ "type": "string",
130
+ "minLength": 1,
131
+ "maxLength": 65536,
132
+ "pattern": "^[A-Za-z0-9+/_-]+={0,2}$",
133
+ "description": "The platform's quote, base64: a COSE_Sign1 attestation document for nitro, an attestation report for sev-snp. Verified against the vendor's root, never trusted on the agent's word."
134
+ },
135
+ "nonce": {
136
+ "type": "string",
137
+ "pattern": "^[0-9a-f]{64}$",
138
+ "description": "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this."
139
+ },
140
+ "vtaDid": {
141
+ "type": "string",
142
+ "minLength": 1,
143
+ "maxLength": 1000,
144
+ "description": "The DID the evidence binds as its user data. A verifier checks the evidence binds it and that it is the response document's issuer."
145
+ },
146
+ "generatedAt": {
147
+ "type": "string",
148
+ "format": "date-time",
149
+ "description": "When the evidence was produced. Informational: freshness comes from the nonce."
150
+ },
151
+ "ext": {
152
+ "$ref": "#/$defs/Ext",
153
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
154
+ }
155
+ }
156
+ },
157
+ "Ext": {
158
+ "title": "Ext",
159
+ "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.",
160
+ "type": "object",
161
+ "minProperties": 1,
162
+ "additionalProperties": true,
163
+ "propertyNames": {
164
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
165
+ }
166
+ }
167
+ }
168
+ };
169
+ /**
170
+ * SPEC.md §7.2 policy for the request variant, from this specification's
171
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
172
+ * per-specification and cannot be derived from the document alone, and
173
+ * item 2 needs the schema this carries.
174
+ */
175
+ export const SPEC = {
176
+ typeUri: TYPE_URI,
177
+ isBearer: false,
178
+ isProofRequired: false,
179
+ isRecipientRequired: true,
180
+ isIssuedAtRequired: false,
181
+ payloadSchema: PAYLOAD_SCHEMA,
182
+ };
183
+ /**
184
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
185
+ * tracks the *issuer* party's requirement because a response swaps the
186
+ * parties (§7.3 item 5).
187
+ */
188
+ export const RESPONSE_SPEC = {
189
+ typeUri: RESPONSE_TYPE_URI,
190
+ isBearer: false,
191
+ isProofRequired: true,
192
+ isRecipientRequired: true,
193
+ isIssuedAtRequired: false,
194
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
195
+ };
196
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/attestation/report/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,wDAAiE,CAAC;AAK1F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,iEAA0E,CAAC;AAK5G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,wDAAwD;IAC/D,OAAO,EAAE,oCAAoC;IAC7C,aAAa,EAAE,gNAAgN;IAC/N,MAAM,EAAE,QAAQ;IAChB,sBAAs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