@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,269 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/services/update/1.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.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/services/update/1.1",
21
+ "title": "VTA Services — Update — payload",
22
+ "description": "Request payload for vta/services/update. Replaces the settings on a transport that is already advertised. Refused when the transport is not currently enabled — that case is `enable`, and conflating the two would let a typo silently advertise a service the operator meant to change.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "service",
27
+ "config"
28
+ ],
29
+ "properties": {
30
+ "service": {
31
+ "$ref": "#/$defs/ServiceKind"
32
+ },
33
+ "config": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "description": "Kind-specific settings. Which member applies is decided by `service`, and the two must agree — a `rest` request carrying `mediatorDid` is malformed, not a request with an ignored field. `didcomm` and `tsp` take `mediatorDid`; `rest` and `webauthn` take `url`.",
37
+ "properties": {
38
+ "mediatorDid": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "description": "Mediator to route through. Applies to `didcomm` and `tsp`."
42
+ },
43
+ "url": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "description": "Endpoint to advertise. Applies to `rest` and `webauthn`. MUST be `https://`, with no fragment and no userinfo — the agent refuses anything else, because this value ends up in a signed DID document that clients will fetch."
47
+ },
48
+ "force": {
49
+ "type": "boolean",
50
+ "description": "`didcomm` only: skip the mediator handshake except for DID resolution. Absent means the handshake runs, which is the safe reading — this carries no schema-level default on purpose, because a default would materialise the field into a `rest` or `webauthn` config where it has no meaning. The handshake is what proves the mediator is reachable and willing, so forcing past it can advertise a mediator that cannot actually deliver."
51
+ },
52
+ "handshakeTimeoutSecs": {
53
+ "type": "integer",
54
+ "minimum": 1,
55
+ "description": "`didcomm` only: trust-ping round-trip budget. Default 10."
56
+ }
57
+ }
58
+ },
59
+ "ext": {
60
+ "$ref": "#/$defs/Ext"
61
+ },
62
+ "drainTtlSecs": {
63
+ "type": "integer",
64
+ "minimum": 0,
65
+ "description": "Mediated transports only (`didcomm`, `tsp`): how long the replaced mediator keeps accepting delivery for correspondents still holding the previous DID document. Refused for `rest` and `webauthn`. Absent takes the agent's default. The agent may raise a value below its floor to the floor — and does, over a request that arrived through the mediator being replaced — and one mediator carrying both mediated transports drains once for both, so read `drainUntil` in the result for the window actually applied."
66
+ }
67
+ },
68
+ "$defs": {
69
+ "Response": {
70
+ "$anchor": "response",
71
+ "title": "VTA Services — Update — response payload",
72
+ "description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.1#response.",
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "result"
77
+ ],
78
+ "properties": {
79
+ "result": {
80
+ "$ref": "#/$defs/ServiceMutationResult"
81
+ },
82
+ "ext": {
83
+ "$ref": "#/$defs/Ext"
84
+ }
85
+ }
86
+ },
87
+ "Ext": {
88
+ "title": "Ext",
89
+ "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.",
90
+ "type": "object",
91
+ "minProperties": 1,
92
+ "additionalProperties": true,
93
+ "propertyNames": {
94
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
95
+ }
96
+ },
97
+ "ServiceMutationResult": {
98
+ "title": "ServiceMutationResult",
99
+ "description": "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.",
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": [
103
+ "logEntryVersionId",
104
+ "effectiveAt"
105
+ ],
106
+ "properties": {
107
+ "logEntryVersionId": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
111
+ },
112
+ "effectiveAt": {
113
+ "type": "string",
114
+ "format": "date-time",
115
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
116
+ },
117
+ "drainUntil": {
118
+ "type": "string",
119
+ "format": "date-time",
120
+ "description": "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong."
121
+ },
122
+ "drainingMediator": {
123
+ "type": "string",
124
+ "description": "The mediator being drained, when `drainUntil` is present."
125
+ },
126
+ "vtaDid": {
127
+ "type": "string",
128
+ "description": "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip."
129
+ },
130
+ "serverless": {
131
+ "type": "boolean",
132
+ "description": "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.",
133
+ "default": false
134
+ },
135
+ "ext": {
136
+ "$ref": "#/$defs/Ext"
137
+ }
138
+ }
139
+ },
140
+ "ServiceKind": {
141
+ "title": "ServiceKind",
142
+ "description": "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.",
143
+ "type": "string",
144
+ "enum": [
145
+ "didcomm",
146
+ "rest",
147
+ "tsp",
148
+ "webauthn"
149
+ ]
150
+ }
151
+ }
152
+ };
153
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
154
+ export const RESPONSE_PAYLOAD_SCHEMA = {
155
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
156
+ "$ref": "#/$defs/Response",
157
+ "$defs": {
158
+ "Response": {
159
+ "$anchor": "response",
160
+ "title": "VTA Services — Update — response payload",
161
+ "description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.1#response.",
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "required": [
165
+ "result"
166
+ ],
167
+ "properties": {
168
+ "result": {
169
+ "$ref": "#/$defs/ServiceMutationResult"
170
+ },
171
+ "ext": {
172
+ "$ref": "#/$defs/Ext"
173
+ }
174
+ }
175
+ },
176
+ "Ext": {
177
+ "title": "Ext",
178
+ "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.",
179
+ "type": "object",
180
+ "minProperties": 1,
181
+ "additionalProperties": true,
182
+ "propertyNames": {
183
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
184
+ }
185
+ },
186
+ "ServiceMutationResult": {
187
+ "title": "ServiceMutationResult",
188
+ "description": "The outcome of a change to an advertised service. Every member describes the **log entry the change produced**, because that is what the change actually is: the agent's DID document is the record, and a consumer that treats the response as a mere acknowledgement will miss that a redeploy may be required.",
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": [
192
+ "logEntryVersionId",
193
+ "effectiveAt"
194
+ ],
195
+ "properties": {
196
+ "logEntryVersionId": {
197
+ "type": "string",
198
+ "minLength": 1,
199
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
200
+ },
201
+ "effectiveAt": {
202
+ "type": "string",
203
+ "format": "date-time",
204
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
205
+ },
206
+ "drainUntil": {
207
+ "type": "string",
208
+ "format": "date-time",
209
+ "description": "Present when the change scheduled a DIDComm drain. Its absence means no drain was scheduled, NOT that a drain finished instantly: a consumer reporting 'done' on an absent value would be right, and one reporting it on a present value would be wrong."
210
+ },
211
+ "drainingMediator": {
212
+ "type": "string",
213
+ "description": "The mediator being drained, when `drainUntil` is present."
214
+ },
215
+ "vtaDid": {
216
+ "type": "string",
217
+ "description": "The agent's own DID — subject of the log entry this change wrote. Carried so a caller can follow up without a second round trip."
218
+ },
219
+ "serverless": {
220
+ "type": "boolean",
221
+ "description": "True when the agent's DID is self-hosted. **The change is persisted locally but NOT published**: the operator must fetch the updated `did.jsonl` and redeploy before any verifier sees it. A consumer that ignores this reports success for a change no one else can observe yet.",
222
+ "default": false
223
+ },
224
+ "ext": {
225
+ "$ref": "#/$defs/Ext"
226
+ }
227
+ }
228
+ },
229
+ "ServiceKind": {
230
+ "title": "ServiceKind",
231
+ "description": "Which transport a task is acting on. This is the discriminator: it selects which member of `config` is meaningful, and a payload naming one kind with another's config is malformed rather than merely ignored.",
232
+ "type": "string",
233
+ "enum": [
234
+ "didcomm",
235
+ "rest",
236
+ "tsp",
237
+ "webauthn"
238
+ ]
239
+ }
240
+ }
241
+ };
242
+ /**
243
+ * SPEC.md §7.2 policy for the request variant, from this specification's
244
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
245
+ * per-specification and cannot be derived from the document alone, and
246
+ * item 2 needs the schema this carries.
247
+ */
248
+ export const SPEC = {
249
+ typeUri: TYPE_URI,
250
+ isBearer: false,
251
+ isProofRequired: true,
252
+ isRecipientRequired: true,
253
+ isIssuedAtRequired: true,
254
+ payloadSchema: PAYLOAD_SCHEMA,
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
+ };
269
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/services/update/1.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,qDAA8D,CAAC;AAKvF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,8DAAuE,CAAC;AAKzG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,qDAAqD;IAC5D,OAAO,EAAE,iCAAiC;IAC1C,aAAa,EAAE,2RAA2R;IAC1S,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,SAAS;QACT,QAAQ;KACT;IACD,YAAY,EAAE;QACZ,SAAS,EAAE;YACT,MAAM,EAAE,qBAAqB;SAC9B;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,aAAa,EAAE,qQAAqQ;YACpR,YAAY,EAAE;gBACZ,aAAa,EAAE;oBACb,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;oBACd,aAAa,EAAE,4DAA4D;iBAC5E;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;oBACd,aAAa,EAAE,+NAA+N;iBAC/O;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,SAAS;oBACjB,aAAa,EAAE,8aAA8a;iBAC9b;gBACD,sBAAsB,EAAE;oBACtB,MAAM,EAAE,SAAS;oBACjB,SAAS,EAAE,CAAC;oBACZ,aAAa,EAAE,2DAA2D;iBAC3E;aACF;SACF;QACD,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I;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.1",
3
+ "version": "0.21.3",
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
@@ -437,7 +437,10 @@ export * as VtaAppStateGet_v1_0 from "./vta/app-state/get/1.0/payload.js";
437
437
  export * as VtaAppStateList_v1_0 from "./vta/app-state/list/1.0/payload.js";
438
438
  export * as VtaAppStatePutMany_v1_0 from "./vta/app-state/put-many/1.0/payload.js";
439
439
  export * as VtaAppStatePut_v1_0 from "./vta/app-state/put/1.0/payload.js";
440
+ export * as VtaAttestationConfigReport_v0_1 from "./vta/attestation/config-report/0.1/payload.js";
440
441
  export * as VtaAttestationMnemonicExport_v1_0 from "./vta/attestation/mnemonic-export/1.0/payload.js";
442
+ export * as VtaAttestationReport_v0_1 from "./vta/attestation/report/0.1/payload.js";
443
+ export * as VtaAttestationStatus_v0_1 from "./vta/attestation/status/0.1/payload.js";
441
444
  export * as VtaBackupAbort_v1_0 from "./vta/backup/abort/1.0/payload.js";
442
445
  export * as VtaBackupCompleteExport_v1_0 from "./vta/backup/complete-export/1.0/payload.js";
443
446
  export * as VtaBackupFinalizeImport_v1_0 from "./vta/backup/finalize-import/1.0/payload.js";
@@ -496,8 +499,10 @@ export * as VtaServicesDrainList_v1_0 from "./vta/services/drain/list/1.0/payloa
496
499
  export * as VtaServicesEnable_v1_0 from "./vta/services/enable/1.0/payload.js";
497
500
  export * as VtaServicesGet_v1_0 from "./vta/services/get/1.0/payload.js";
498
501
  export * as VtaServicesList_v1_0 from "./vta/services/list/1.0/payload.js";
502
+ export * as VtaServicesReport_v0_1 from "./vta/services/report/0.1/payload.js";
499
503
  export * as VtaServicesRollback_v1_0 from "./vta/services/rollback/1.0/payload.js";
500
504
  export * as VtaServicesUpdate_v1_0 from "./vta/services/update/1.0/payload.js";
505
+ export * as VtaServicesUpdate_v1_1 from "./vta/services/update/1.1/payload.js";
501
506
  export * as VtaWebvhAgentNameCheck_v1_0 from "./vta/webvh/agent-name/check/1.0/payload.js";
502
507
  export * as VtaWebvhAgentNameDisable_v1_0 from "./vta/webvh/agent-name/disable/1.0/payload.js";
503
508
  export * as VtaWebvhAgentNameEnable_v1_0 from "./vta/webvh/agent-name/enable/1.0/payload.js";
@@ -0,0 +1,273 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/attestation/config-report/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Asks an agent for fresh attestation evidence committing to the configuration it booted, 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.
11
+ */
12
+ export interface VTAAttestationConfigReportPayload {
13
+ /**
14
+ * Thirty-two bytes the verifier generated for this request, lowercase hex. The agent binds exactly this into the evidence.
15
+ */
16
+ nonce: string;
17
+ /**
18
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
19
+ */
20
+ ext?: Ext;
21
+ }
22
+ export interface VTAAttestationConfigReportResponsePayload {
23
+ /**
24
+ * SHA-384 of the decoded configView bytes, base64 (standard). A convenience: the verifier recomputes it, and a mismatch with either the view or the evidence is a refusal.
25
+ */
26
+ configDigestSha384: string;
27
+ /**
28
+ * The canonical, secret-free view of the configuration the agent booted, base64 (standard): the exact bytes whose SHA-384 the evidence binds as its user data.
29
+ */
30
+ configView: string;
31
+ /**
32
+ * The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this.
33
+ */
34
+ nonce: string;
35
+ /**
36
+ * The platform that produced the evidence. Informational and not covered by the evidence.
37
+ */
38
+ teeType: "nitro" | "sev-snp" | "simulated";
39
+ /**
40
+ * The platform's quote, base64 (a COSE_Sign1 attestation document for nitro).
41
+ */
42
+ evidence: string;
43
+ /**
44
+ * When the evidence was produced. Informational: freshness comes from the nonce.
45
+ */
46
+ generatedAt: string;
47
+ /**
48
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
49
+ */
50
+ ext?: Ext;
51
+ }
52
+
53
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
54
+ export type { Ext };
55
+
56
+ /** Trust Task type URI. */
57
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/attestation/config-report/0.1" as const;
58
+
59
+ /** Stable alias for this specification's request payload shape. */
60
+ export type Payload = VTAAttestationConfigReportPayload;
61
+
62
+ /** Trust Task response type URI (request type URI + "#response"). */
63
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/attestation/config-report/0.1#response" as const;
64
+
65
+ /** Stable alias for this specification's success-response payload shape. */
66
+ export type Response = VTAAttestationConfigReportResponsePayload;
67
+
68
+ /**
69
+ * This specification's payload schema, as a value.
70
+ *
71
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
72
+ * rather than only as a `.json` file because TypeScript types are erased
73
+ * at runtime: without a schema a consumer has nothing to validate, and
74
+ * every REQUIRED payload member is optional in practice. Cross-file
75
+ * `$ref`s are already inlined, so it needs no resolver.
76
+ */
77
+ export const PAYLOAD_SCHEMA = {
78
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
79
+ "$id": "https://trusttasks.org/spec/vta/attestation/config-report/0.1",
80
+ "title": "VTA Attestation — Config Report — payload",
81
+ "description": "Asks an agent for fresh attestation evidence committing to the configuration it booted, 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.",
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "nonce"
86
+ ],
87
+ "properties": {
88
+ "nonce": {
89
+ "type": "string",
90
+ "pattern": "^[0-9a-f]{64}$",
91
+ "description": "Thirty-two bytes the verifier generated for this request, lowercase hex. The agent binds exactly this into the evidence."
92
+ },
93
+ "ext": {
94
+ "$ref": "#/$defs/Ext",
95
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
96
+ }
97
+ },
98
+ "$defs": {
99
+ "Response": {
100
+ "$anchor": "response",
101
+ "title": "VTA Attestation Config Report — response payload",
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": [
105
+ "configDigestSha384",
106
+ "configView",
107
+ "nonce",
108
+ "teeType",
109
+ "evidence",
110
+ "generatedAt"
111
+ ],
112
+ "properties": {
113
+ "configDigestSha384": {
114
+ "type": "string",
115
+ "pattern": "^[A-Za-z0-9+/]{64}$",
116
+ "description": "SHA-384 of the decoded configView bytes, base64 (standard). A convenience: the verifier recomputes it, and a mismatch with either the view or the evidence is a refusal."
117
+ },
118
+ "configView": {
119
+ "type": "string",
120
+ "minLength": 1,
121
+ "maxLength": 65536,
122
+ "pattern": "^[A-Za-z0-9+/]+={0,2}$",
123
+ "description": "The canonical, secret-free view of the configuration the agent booted, base64 (standard): the exact bytes whose SHA-384 the evidence binds as its user data."
124
+ },
125
+ "nonce": {
126
+ "type": "string",
127
+ "pattern": "^[0-9a-f]{64}$",
128
+ "description": "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this."
129
+ },
130
+ "teeType": {
131
+ "type": "string",
132
+ "enum": [
133
+ "nitro",
134
+ "sev-snp",
135
+ "simulated"
136
+ ],
137
+ "description": "The platform that produced the evidence. Informational and not covered by the evidence."
138
+ },
139
+ "evidence": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "maxLength": 65536,
143
+ "pattern": "^[A-Za-z0-9+/_-]+={0,2}$",
144
+ "description": "The platform's quote, base64 (a COSE_Sign1 attestation document for nitro)."
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
+ } as const;
169
+
170
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
171
+ export const RESPONSE_PAYLOAD_SCHEMA = {
172
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
173
+ "$ref": "#/$defs/Response",
174
+ "$defs": {
175
+ "Response": {
176
+ "$anchor": "response",
177
+ "title": "VTA Attestation Config Report — response payload",
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "configDigestSha384",
182
+ "configView",
183
+ "nonce",
184
+ "teeType",
185
+ "evidence",
186
+ "generatedAt"
187
+ ],
188
+ "properties": {
189
+ "configDigestSha384": {
190
+ "type": "string",
191
+ "pattern": "^[A-Za-z0-9+/]{64}$",
192
+ "description": "SHA-384 of the decoded configView bytes, base64 (standard). A convenience: the verifier recomputes it, and a mismatch with either the view or the evidence is a refusal."
193
+ },
194
+ "configView": {
195
+ "type": "string",
196
+ "minLength": 1,
197
+ "maxLength": 65536,
198
+ "pattern": "^[A-Za-z0-9+/]+={0,2}$",
199
+ "description": "The canonical, secret-free view of the configuration the agent booted, base64 (standard): the exact bytes whose SHA-384 the evidence binds as its user data."
200
+ },
201
+ "nonce": {
202
+ "type": "string",
203
+ "pattern": "^[0-9a-f]{64}$",
204
+ "description": "The request's nonce, echoed. A verifier checks the nonce inside the evidence, not this."
205
+ },
206
+ "teeType": {
207
+ "type": "string",
208
+ "enum": [
209
+ "nitro",
210
+ "sev-snp",
211
+ "simulated"
212
+ ],
213
+ "description": "The platform that produced the evidence. Informational and not covered by the evidence."
214
+ },
215
+ "evidence": {
216
+ "type": "string",
217
+ "minLength": 1,
218
+ "maxLength": 65536,
219
+ "pattern": "^[A-Za-z0-9+/_-]+={0,2}$",
220
+ "description": "The platform's quote, base64 (a COSE_Sign1 attestation document for nitro)."
221
+ },
222
+ "generatedAt": {
223
+ "type": "string",
224
+ "format": "date-time",
225
+ "description": "When the evidence was produced. Informational: freshness comes from the nonce."
226
+ },
227
+ "ext": {
228
+ "$ref": "#/$defs/Ext",
229
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
230
+ }
231
+ }
232
+ },
233
+ "Ext": {
234
+ "title": "Ext",
235
+ "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.",
236
+ "type": "object",
237
+ "minProperties": 1,
238
+ "additionalProperties": true,
239
+ "propertyNames": {
240
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
241
+ }
242
+ }
243
+ }
244
+ } as const;
245
+
246
+ /**
247
+ * SPEC.md §7.2 policy for the request variant, from this specification's
248
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
249
+ * per-specification and cannot be derived from the document alone, and
250
+ * item 2 needs the schema this carries.
251
+ */
252
+ export const SPEC = {
253
+ typeUri: TYPE_URI,
254
+ isBearer: false,
255
+ isProofRequired: false,
256
+ isRecipientRequired: true,
257
+ isIssuedAtRequired: false,
258
+ payloadSchema: PAYLOAD_SCHEMA,
259
+ } as const;
260
+
261
+ /**
262
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
263
+ * tracks the *issuer* party's requirement because a response swaps the
264
+ * parties (§7.3 item 5).
265
+ */
266
+ export const RESPONSE_SPEC = {
267
+ typeUri: RESPONSE_TYPE_URI,
268
+ isBearer: false,
269
+ isProofRequired: true,
270
+ isRecipientRequired: true,
271
+ isIssuedAtRequired: false,
272
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
273
+ } as const;