@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,258 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/health/details/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/health/details/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/health/details/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/health/details/0.1",
21
+ "title": "VTA Health — Details — payload",
22
+ "description": "Asks a Verifiable Trust Agent for its public health flags: messaging configuration, seal and storage-encryption state, trusted-execution status and transport advertisement. Deliberately carries neither the software version nor the restore record — see vta/restore/status. 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
+ "TeeStatus": {
33
+ "title": "TeeStatus",
34
+ "description": "The trusted execution environment the agent detected at boot. Mirrors the response of vta/attestation/status/0.1 member for member, so a verifier reading either sees the same claim. A claim, not evidence: only vta/attestation/report proves what code runs.",
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": [
38
+ "teeType",
39
+ "detected"
40
+ ],
41
+ "properties": {
42
+ "teeType": {
43
+ "type": "string",
44
+ "enum": [
45
+ "nitro",
46
+ "sev-snp",
47
+ "simulated"
48
+ ],
49
+ "description": "nitro (AWS Nitro Enclaves), sev-snp (AMD SEV-SNP), or simulated (a development build whose evidence no verifier should accept)."
50
+ },
51
+ "detected": {
52
+ "type": "boolean",
53
+ "description": "Whether the agent found the platform at boot. False means it was configured for one it did not find."
54
+ },
55
+ "platformVersion": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 256,
59
+ "description": "The platform's own version string, when it reports one. Informational."
60
+ }
61
+ }
62
+ },
63
+ "Response": {
64
+ "$anchor": "response",
65
+ "title": "VTA Health Details — response payload",
66
+ "description": "The agent's public report on its own deployment, carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/health/details/0.1#response. Fixed for every asker. It MUST NOT carry the software version or the restore record, and additionalProperties: false means it cannot: those are served only by vta/restore/status. Failures use trust-task-error, not this shape.",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "status",
71
+ "sealed",
72
+ "storageEncrypted",
73
+ "tspEnabled"
74
+ ],
75
+ "properties": {
76
+ "status": {
77
+ "type": "string",
78
+ "enum": [
79
+ "ok"
80
+ ],
81
+ "description": "The agent's overall health. `ok` is the only value this version defines: an agent able to answer is serving."
82
+ },
83
+ "mediatorUrl": {
84
+ "type": "string",
85
+ "format": "uri",
86
+ "maxLength": 2048,
87
+ "description": "The endpoint of the mediator the agent's messaging routes through. Absent when the agent has no messaging configured."
88
+ },
89
+ "mediatorDid": {
90
+ "type": "string",
91
+ "pattern": "^did:",
92
+ "maxLength": 2048,
93
+ "description": "The DID of that mediator — the one DIDComm and TSP share. Absent when the agent has no messaging configured."
94
+ },
95
+ "teeStatus": {
96
+ "$ref": "#/$defs/TeeStatus",
97
+ "description": "The trusted execution environment the agent detected at boot. Absent when the agent has no attestation provider."
98
+ },
99
+ "sealed": {
100
+ "type": "boolean",
101
+ "description": "Whether the agent is sealed: offline, host-side commands that would change its access control, keys or configuration, or export secrets, are refused, so it is managed only through authenticated tasks."
102
+ },
103
+ "storageEncrypted": {
104
+ "type": "boolean",
105
+ "description": "Whether the agent's key store is encrypted at rest."
106
+ },
107
+ "tspEnabled": {
108
+ "type": "boolean",
109
+ "description": "Whether the agent advertises the Trust Spanning Protocol as a transport. TSP routes through the same mediator as DIDComm (mediatorDid), so no separate endpoint is reported."
110
+ },
111
+ "ext": {
112
+ "$ref": "#/$defs/Ext",
113
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
114
+ }
115
+ }
116
+ },
117
+ "Ext": {
118
+ "title": "Ext",
119
+ "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.",
120
+ "type": "object",
121
+ "minProperties": 1,
122
+ "additionalProperties": true,
123
+ "propertyNames": {
124
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
125
+ }
126
+ }
127
+ }
128
+ };
129
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
130
+ export const RESPONSE_PAYLOAD_SCHEMA = {
131
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
132
+ "$ref": "#/$defs/Response",
133
+ "$defs": {
134
+ "TeeStatus": {
135
+ "title": "TeeStatus",
136
+ "description": "The trusted execution environment the agent detected at boot. Mirrors the response of vta/attestation/status/0.1 member for member, so a verifier reading either sees the same claim. A claim, not evidence: only vta/attestation/report proves what code runs.",
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": [
140
+ "teeType",
141
+ "detected"
142
+ ],
143
+ "properties": {
144
+ "teeType": {
145
+ "type": "string",
146
+ "enum": [
147
+ "nitro",
148
+ "sev-snp",
149
+ "simulated"
150
+ ],
151
+ "description": "nitro (AWS Nitro Enclaves), sev-snp (AMD SEV-SNP), or simulated (a development build whose evidence no verifier should accept)."
152
+ },
153
+ "detected": {
154
+ "type": "boolean",
155
+ "description": "Whether the agent found the platform at boot. False means it was configured for one it did not find."
156
+ },
157
+ "platformVersion": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 256,
161
+ "description": "The platform's own version string, when it reports one. Informational."
162
+ }
163
+ }
164
+ },
165
+ "Response": {
166
+ "$anchor": "response",
167
+ "title": "VTA Health Details — response payload",
168
+ "description": "The agent's public report on its own deployment, carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/health/details/0.1#response. Fixed for every asker. It MUST NOT carry the software version or the restore record, and additionalProperties: false means it cannot: those are served only by vta/restore/status. Failures use trust-task-error, not this shape.",
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": [
172
+ "status",
173
+ "sealed",
174
+ "storageEncrypted",
175
+ "tspEnabled"
176
+ ],
177
+ "properties": {
178
+ "status": {
179
+ "type": "string",
180
+ "enum": [
181
+ "ok"
182
+ ],
183
+ "description": "The agent's overall health. `ok` is the only value this version defines: an agent able to answer is serving."
184
+ },
185
+ "mediatorUrl": {
186
+ "type": "string",
187
+ "format": "uri",
188
+ "maxLength": 2048,
189
+ "description": "The endpoint of the mediator the agent's messaging routes through. Absent when the agent has no messaging configured."
190
+ },
191
+ "mediatorDid": {
192
+ "type": "string",
193
+ "pattern": "^did:",
194
+ "maxLength": 2048,
195
+ "description": "The DID of that mediator — the one DIDComm and TSP share. Absent when the agent has no messaging configured."
196
+ },
197
+ "teeStatus": {
198
+ "$ref": "#/$defs/TeeStatus",
199
+ "description": "The trusted execution environment the agent detected at boot. Absent when the agent has no attestation provider."
200
+ },
201
+ "sealed": {
202
+ "type": "boolean",
203
+ "description": "Whether the agent is sealed: offline, host-side commands that would change its access control, keys or configuration, or export secrets, are refused, so it is managed only through authenticated tasks."
204
+ },
205
+ "storageEncrypted": {
206
+ "type": "boolean",
207
+ "description": "Whether the agent's key store is encrypted at rest."
208
+ },
209
+ "tspEnabled": {
210
+ "type": "boolean",
211
+ "description": "Whether the agent advertises the Trust Spanning Protocol as a transport. TSP routes through the same mediator as DIDComm (mediatorDid), so no separate endpoint is reported."
212
+ },
213
+ "ext": {
214
+ "$ref": "#/$defs/Ext",
215
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
216
+ }
217
+ }
218
+ },
219
+ "Ext": {
220
+ "title": "Ext",
221
+ "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.",
222
+ "type": "object",
223
+ "minProperties": 1,
224
+ "additionalProperties": true,
225
+ "propertyNames": {
226
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
227
+ }
228
+ }
229
+ }
230
+ };
231
+ /**
232
+ * SPEC.md §7.2 policy for the request variant, from this specification's
233
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
234
+ * per-specification and cannot be derived from the document alone, and
235
+ * item 2 needs the schema this carries.
236
+ */
237
+ export const SPEC = {
238
+ typeUri: TYPE_URI,
239
+ isBearer: false,
240
+ isProofRequired: false,
241
+ isRecipientRequired: true,
242
+ isIssuedAtRequired: false,
243
+ payloadSchema: PAYLOAD_SCHEMA,
244
+ };
245
+ /**
246
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
247
+ * tracks the *issuer* party's requirement because a response swaps the
248
+ * parties (§7.3 item 5).
249
+ */
250
+ export const RESPONSE_SPEC = {
251
+ typeUri: RESPONSE_TYPE_URI,
252
+ isBearer: false,
253
+ isProofRequired: true,
254
+ isRecipientRequired: true,
255
+ isIssuedAtRequired: false,
256
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
257
+ };
258
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/health/details/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ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