@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,419 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/services/report/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Asks an agent for its per-mediator inbound counts and each sender's last-seen mediator over a time window. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTAServicesReportPayload {
13
+ /**
14
+ * Lower bound, RFC 3339. Absent means as far back as the agent's telemetry goes.
15
+ */
16
+ since?: string;
17
+ /**
18
+ * Upper bound, RFC 3339. Absent means now.
19
+ */
20
+ until?: string;
21
+ /**
22
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
23
+ */
24
+ ext?: Ext;
25
+ }
26
+ export interface VTAServicesReportResponsePayload {
27
+ /**
28
+ * The lower bound applied, when the request gave one.
29
+ */
30
+ since?: string;
31
+ /**
32
+ * The upper bound applied — now, when the request gave none.
33
+ */
34
+ until: string;
35
+ /**
36
+ * One entry per mediator that carried inbound traffic in the window.
37
+ *
38
+ * @maxItems 1000
39
+ */
40
+ mediators: MediatorStats[];
41
+ /**
42
+ * One entry per sender that reached the agent in the window.
43
+ *
44
+ * @maxItems 100000
45
+ */
46
+ senders: SenderLastSeen[];
47
+ /**
48
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
49
+ */
50
+ ext?: Ext;
51
+ }
52
+ export interface MediatorStats {
53
+ /**
54
+ * The mediator the traffic arrived through.
55
+ */
56
+ mediatorDid: string;
57
+ /**
58
+ * Messages that arrived through it in the window, over every mediated transport.
59
+ */
60
+ inboundCount: number;
61
+ /**
62
+ * The first arrival through it in the window.
63
+ */
64
+ firstSeen: string;
65
+ /**
66
+ * The last arrival through it in the window.
67
+ */
68
+ lastSeen: string;
69
+ }
70
+ export interface SenderLastSeen {
71
+ /**
72
+ * A sender that reached the agent in the window.
73
+ */
74
+ senderDid: string;
75
+ /**
76
+ * The mediator its most recent message arrived through.
77
+ */
78
+ lastSeenMediator: string;
79
+ /**
80
+ * The mediated transport the sender's most recent message arrived by. Absent when the agent's telemetry did not record it.
81
+ */
82
+ lastSeenTransport?: "didcomm" | "tsp";
83
+ /**
84
+ * When that message arrived.
85
+ */
86
+ lastSeenAt: string;
87
+ }
88
+
89
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
90
+ export type { Ext };
91
+
92
+ /** Trust Task type URI. */
93
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/services/report/0.1" as const;
94
+
95
+ /** Stable alias for this specification's request payload shape. */
96
+ export type Payload = VTAServicesReportPayload;
97
+
98
+ /** Trust Task response type URI (request type URI + "#response"). */
99
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/services/report/0.1#response" as const;
100
+
101
+ /** Stable alias for this specification's success-response payload shape. */
102
+ export type Response = VTAServicesReportResponsePayload;
103
+
104
+ /**
105
+ * This specification's payload schema, as a value.
106
+ *
107
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
108
+ * rather than only as a `.json` file because TypeScript types are erased
109
+ * at runtime: without a schema a consumer has nothing to validate, and
110
+ * every REQUIRED payload member is optional in practice. Cross-file
111
+ * `$ref`s are already inlined, so it needs no resolver.
112
+ */
113
+ export const PAYLOAD_SCHEMA = {
114
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
115
+ "$id": "https://trusttasks.org/spec/vta/services/report/0.1",
116
+ "title": "VTA Services — Report — payload",
117
+ "description": "Asks an agent for its per-mediator inbound counts and each sender's last-seen mediator over a time window. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "properties": {
121
+ "since": {
122
+ "type": "string",
123
+ "format": "date-time",
124
+ "description": "Lower bound, RFC 3339. Absent means as far back as the agent's telemetry goes."
125
+ },
126
+ "until": {
127
+ "type": "string",
128
+ "format": "date-time",
129
+ "description": "Upper bound, RFC 3339. Absent means now."
130
+ },
131
+ "ext": {
132
+ "$ref": "#/$defs/Ext",
133
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
134
+ }
135
+ },
136
+ "$defs": {
137
+ "MediatorStats": {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "mediatorDid",
142
+ "inboundCount",
143
+ "firstSeen",
144
+ "lastSeen"
145
+ ],
146
+ "properties": {
147
+ "mediatorDid": {
148
+ "type": "string",
149
+ "minLength": 1,
150
+ "maxLength": 1000,
151
+ "description": "The mediator the traffic arrived through."
152
+ },
153
+ "inboundCount": {
154
+ "type": "integer",
155
+ "minimum": 0,
156
+ "description": "Messages that arrived through it in the window, over every mediated transport."
157
+ },
158
+ "firstSeen": {
159
+ "type": "string",
160
+ "format": "date-time",
161
+ "description": "The first arrival through it in the window."
162
+ },
163
+ "lastSeen": {
164
+ "type": "string",
165
+ "format": "date-time",
166
+ "description": "The last arrival through it in the window."
167
+ }
168
+ }
169
+ },
170
+ "SenderLastSeen": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": [
174
+ "senderDid",
175
+ "lastSeenMediator",
176
+ "lastSeenAt"
177
+ ],
178
+ "properties": {
179
+ "senderDid": {
180
+ "type": "string",
181
+ "minLength": 1,
182
+ "maxLength": 1000,
183
+ "description": "A sender that reached the agent in the window."
184
+ },
185
+ "lastSeenMediator": {
186
+ "type": "string",
187
+ "minLength": 1,
188
+ "maxLength": 1000,
189
+ "description": "The mediator its most recent message arrived through."
190
+ },
191
+ "lastSeenTransport": {
192
+ "type": "string",
193
+ "enum": [
194
+ "didcomm",
195
+ "tsp"
196
+ ],
197
+ "description": "The mediated transport the sender's most recent message arrived by. Absent when the agent's telemetry did not record it."
198
+ },
199
+ "lastSeenAt": {
200
+ "type": "string",
201
+ "format": "date-time",
202
+ "description": "When that message arrived."
203
+ }
204
+ }
205
+ },
206
+ "Response": {
207
+ "$anchor": "response",
208
+ "title": "VTA Services Report — response payload",
209
+ "type": "object",
210
+ "additionalProperties": false,
211
+ "required": [
212
+ "until",
213
+ "mediators",
214
+ "senders"
215
+ ],
216
+ "properties": {
217
+ "since": {
218
+ "type": "string",
219
+ "format": "date-time",
220
+ "description": "The lower bound applied, when the request gave one."
221
+ },
222
+ "until": {
223
+ "type": "string",
224
+ "format": "date-time",
225
+ "description": "The upper bound applied — now, when the request gave none."
226
+ },
227
+ "mediators": {
228
+ "type": "array",
229
+ "maxItems": 1000,
230
+ "items": {
231
+ "$ref": "#/$defs/MediatorStats"
232
+ },
233
+ "description": "One entry per mediator that carried inbound traffic in the window."
234
+ },
235
+ "senders": {
236
+ "type": "array",
237
+ "maxItems": 100000,
238
+ "items": {
239
+ "$ref": "#/$defs/SenderLastSeen"
240
+ },
241
+ "description": "One entry per sender that reached the agent in the window."
242
+ },
243
+ "ext": {
244
+ "$ref": "#/$defs/Ext",
245
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
246
+ }
247
+ }
248
+ },
249
+ "Ext": {
250
+ "title": "Ext",
251
+ "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.",
252
+ "type": "object",
253
+ "minProperties": 1,
254
+ "additionalProperties": true,
255
+ "propertyNames": {
256
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
257
+ }
258
+ }
259
+ }
260
+ } as const;
261
+
262
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
263
+ export const RESPONSE_PAYLOAD_SCHEMA = {
264
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
265
+ "$ref": "#/$defs/Response",
266
+ "$defs": {
267
+ "MediatorStats": {
268
+ "type": "object",
269
+ "additionalProperties": false,
270
+ "required": [
271
+ "mediatorDid",
272
+ "inboundCount",
273
+ "firstSeen",
274
+ "lastSeen"
275
+ ],
276
+ "properties": {
277
+ "mediatorDid": {
278
+ "type": "string",
279
+ "minLength": 1,
280
+ "maxLength": 1000,
281
+ "description": "The mediator the traffic arrived through."
282
+ },
283
+ "inboundCount": {
284
+ "type": "integer",
285
+ "minimum": 0,
286
+ "description": "Messages that arrived through it in the window, over every mediated transport."
287
+ },
288
+ "firstSeen": {
289
+ "type": "string",
290
+ "format": "date-time",
291
+ "description": "The first arrival through it in the window."
292
+ },
293
+ "lastSeen": {
294
+ "type": "string",
295
+ "format": "date-time",
296
+ "description": "The last arrival through it in the window."
297
+ }
298
+ }
299
+ },
300
+ "SenderLastSeen": {
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "required": [
304
+ "senderDid",
305
+ "lastSeenMediator",
306
+ "lastSeenAt"
307
+ ],
308
+ "properties": {
309
+ "senderDid": {
310
+ "type": "string",
311
+ "minLength": 1,
312
+ "maxLength": 1000,
313
+ "description": "A sender that reached the agent in the window."
314
+ },
315
+ "lastSeenMediator": {
316
+ "type": "string",
317
+ "minLength": 1,
318
+ "maxLength": 1000,
319
+ "description": "The mediator its most recent message arrived through."
320
+ },
321
+ "lastSeenTransport": {
322
+ "type": "string",
323
+ "enum": [
324
+ "didcomm",
325
+ "tsp"
326
+ ],
327
+ "description": "The mediated transport the sender's most recent message arrived by. Absent when the agent's telemetry did not record it."
328
+ },
329
+ "lastSeenAt": {
330
+ "type": "string",
331
+ "format": "date-time",
332
+ "description": "When that message arrived."
333
+ }
334
+ }
335
+ },
336
+ "Response": {
337
+ "$anchor": "response",
338
+ "title": "VTA Services Report — response payload",
339
+ "type": "object",
340
+ "additionalProperties": false,
341
+ "required": [
342
+ "until",
343
+ "mediators",
344
+ "senders"
345
+ ],
346
+ "properties": {
347
+ "since": {
348
+ "type": "string",
349
+ "format": "date-time",
350
+ "description": "The lower bound applied, when the request gave one."
351
+ },
352
+ "until": {
353
+ "type": "string",
354
+ "format": "date-time",
355
+ "description": "The upper bound applied — now, when the request gave none."
356
+ },
357
+ "mediators": {
358
+ "type": "array",
359
+ "maxItems": 1000,
360
+ "items": {
361
+ "$ref": "#/$defs/MediatorStats"
362
+ },
363
+ "description": "One entry per mediator that carried inbound traffic in the window."
364
+ },
365
+ "senders": {
366
+ "type": "array",
367
+ "maxItems": 100000,
368
+ "items": {
369
+ "$ref": "#/$defs/SenderLastSeen"
370
+ },
371
+ "description": "One entry per sender that reached the agent in the window."
372
+ },
373
+ "ext": {
374
+ "$ref": "#/$defs/Ext",
375
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
376
+ }
377
+ }
378
+ },
379
+ "Ext": {
380
+ "title": "Ext",
381
+ "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.",
382
+ "type": "object",
383
+ "minProperties": 1,
384
+ "additionalProperties": true,
385
+ "propertyNames": {
386
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
387
+ }
388
+ }
389
+ }
390
+ } as const;
391
+
392
+ /**
393
+ * SPEC.md §7.2 policy for the request variant, from this specification's
394
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
395
+ * per-specification and cannot be derived from the document alone, and
396
+ * item 2 needs the schema this carries.
397
+ */
398
+ export const SPEC = {
399
+ typeUri: TYPE_URI,
400
+ isBearer: false,
401
+ isProofRequired: true,
402
+ isRecipientRequired: true,
403
+ isIssuedAtRequired: false,
404
+ payloadSchema: PAYLOAD_SCHEMA,
405
+ } as const;
406
+
407
+ /**
408
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
409
+ * tracks the *issuer* party's requirement because a response swaps the
410
+ * parties (§7.3 item 5).
411
+ */
412
+ export const RESPONSE_SPEC = {
413
+ typeUri: RESPONSE_TYPE_URI,
414
+ isBearer: false,
415
+ isProofRequired: false,
416
+ isRecipientRequired: true,
417
+ isIssuedAtRequired: false,
418
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
419
+ } as const;