@openvtc/trust-tasks 0.21.2 → 0.21.4

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 (37) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/auth/passkey/admin-list/0.1/payload.d.ts +484 -0
  3. package/dist/auth/passkey/admin-list/0.1/payload.d.ts.map +1 -0
  4. package/dist/auth/passkey/admin-list/0.1/payload.js +257 -0
  5. package/dist/auth/passkey/admin-list/0.1/payload.js.map +1 -0
  6. package/dist/git-ns/namespace/list/0.1/payload.d.ts +1343 -0
  7. package/dist/git-ns/namespace/list/0.1/payload.d.ts.map +1 -0
  8. package/dist/git-ns/namespace/list/0.1/payload.js +704 -0
  9. package/dist/git-ns/namespace/list/0.1/payload.js.map +1 -0
  10. package/dist/git-ns/repo/list/0.1/payload.d.ts +1377 -0
  11. package/dist/git-ns/repo/list/0.1/payload.d.ts.map +1 -0
  12. package/dist/git-ns/repo/list/0.1/payload.js +744 -0
  13. package/dist/git-ns/repo/list/0.1/payload.js.map +1 -0
  14. package/dist/git-ns/view/0.5/payload.d.ts +1722 -0
  15. package/dist/git-ns/view/0.5/payload.d.ts.map +1 -0
  16. package/dist/git-ns/view/0.5/payload.js +1024 -0
  17. package/dist/git-ns/view/0.5/payload.js.map +1 -0
  18. package/dist/index.d.ts +6 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +6 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/vta/services/report/0.1/payload.d.ts +618 -0
  23. package/dist/vta/services/report/0.1/payload.d.ts.map +1 -0
  24. package/dist/vta/services/report/0.1/payload.js +322 -0
  25. package/dist/vta/services/report/0.1/payload.js.map +1 -0
  26. package/dist/vta/services/update/1.1/payload.d.ts +490 -0
  27. package/dist/vta/services/update/1.1/payload.d.ts.map +1 -0
  28. package/dist/vta/services/update/1.1/payload.js +269 -0
  29. package/dist/vta/services/update/1.1/payload.js.map +1 -0
  30. package/package.json +1 -1
  31. package/src/auth/passkey/admin-list/0.1/payload.ts +338 -0
  32. package/src/git-ns/namespace/list/0.1/payload.ts +883 -0
  33. package/src/git-ns/repo/list/0.1/payload.ts +909 -0
  34. package/src/git-ns/view/0.5/payload.ts +1095 -0
  35. package/src/index.ts +6 -0
  36. package/src/vta/services/report/0.1/payload.ts +419 -0
  37. package/src/vta/services/update/1.1/payload.ts +326 -0
@@ -0,0 +1,326 @@
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
+
6
+ import type { Ext, ServiceKind, ServiceMutationResult } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * 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.
11
+ */
12
+ export interface VTAServicesUpdatePayload {
13
+ service: ServiceKind;
14
+ /**
15
+ * 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`.
16
+ */
17
+ config: {
18
+ /**
19
+ * Mediator to route through. Applies to `didcomm` and `tsp`.
20
+ */
21
+ mediatorDid?: string;
22
+ /**
23
+ * 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.
24
+ */
25
+ url?: string;
26
+ /**
27
+ * `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.
28
+ */
29
+ force?: boolean;
30
+ /**
31
+ * `didcomm` only: trust-ping round-trip budget. Default 10.
32
+ */
33
+ handshakeTimeoutSecs?: number;
34
+ };
35
+ ext?: Ext;
36
+ /**
37
+ * 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.
38
+ */
39
+ drainTtlSecs?: number;
40
+ }
41
+ /**
42
+ * Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.1#response.
43
+ */
44
+ export interface VTAServicesUpdateResponsePayload {
45
+ result: ServiceMutationResult;
46
+ ext?: Ext;
47
+ }
48
+
49
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
50
+ export type { Ext, ServiceKind, ServiceMutationResult };
51
+
52
+ /** Trust Task type URI. */
53
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.1" as const;
54
+
55
+ /** Stable alias for this specification's request payload shape. */
56
+ export type Payload = VTAServicesUpdatePayload;
57
+
58
+ /** Trust Task response type URI (request type URI + "#response"). */
59
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.1#response" as const;
60
+
61
+ /** Stable alias for this specification's success-response payload shape. */
62
+ export type Response = VTAServicesUpdateResponsePayload;
63
+
64
+ /**
65
+ * This specification's payload schema, as a value.
66
+ *
67
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
68
+ * rather than only as a `.json` file because TypeScript types are erased
69
+ * at runtime: without a schema a consumer has nothing to validate, and
70
+ * every REQUIRED payload member is optional in practice. Cross-file
71
+ * `$ref`s are already inlined, so it needs no resolver.
72
+ */
73
+ export const PAYLOAD_SCHEMA = {
74
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
75
+ "$id": "https://trusttasks.org/spec/vta/services/update/1.1",
76
+ "title": "VTA Services — Update — payload",
77
+ "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.",
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": [
81
+ "service",
82
+ "config"
83
+ ],
84
+ "properties": {
85
+ "service": {
86
+ "$ref": "#/$defs/ServiceKind"
87
+ },
88
+ "config": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "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`.",
92
+ "properties": {
93
+ "mediatorDid": {
94
+ "type": "string",
95
+ "minLength": 1,
96
+ "description": "Mediator to route through. Applies to `didcomm` and `tsp`."
97
+ },
98
+ "url": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "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."
102
+ },
103
+ "force": {
104
+ "type": "boolean",
105
+ "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."
106
+ },
107
+ "handshakeTimeoutSecs": {
108
+ "type": "integer",
109
+ "minimum": 1,
110
+ "description": "`didcomm` only: trust-ping round-trip budget. Default 10."
111
+ }
112
+ }
113
+ },
114
+ "ext": {
115
+ "$ref": "#/$defs/Ext"
116
+ },
117
+ "drainTtlSecs": {
118
+ "type": "integer",
119
+ "minimum": 0,
120
+ "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."
121
+ }
122
+ },
123
+ "$defs": {
124
+ "Response": {
125
+ "$anchor": "response",
126
+ "title": "VTA Services — Update — response payload",
127
+ "description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.1#response.",
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": [
131
+ "result"
132
+ ],
133
+ "properties": {
134
+ "result": {
135
+ "$ref": "#/$defs/ServiceMutationResult"
136
+ },
137
+ "ext": {
138
+ "$ref": "#/$defs/Ext"
139
+ }
140
+ }
141
+ },
142
+ "Ext": {
143
+ "title": "Ext",
144
+ "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.",
145
+ "type": "object",
146
+ "minProperties": 1,
147
+ "additionalProperties": true,
148
+ "propertyNames": {
149
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
150
+ }
151
+ },
152
+ "ServiceMutationResult": {
153
+ "title": "ServiceMutationResult",
154
+ "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.",
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": [
158
+ "logEntryVersionId",
159
+ "effectiveAt"
160
+ ],
161
+ "properties": {
162
+ "logEntryVersionId": {
163
+ "type": "string",
164
+ "minLength": 1,
165
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
166
+ },
167
+ "effectiveAt": {
168
+ "type": "string",
169
+ "format": "date-time",
170
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
171
+ },
172
+ "drainUntil": {
173
+ "type": "string",
174
+ "format": "date-time",
175
+ "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."
176
+ },
177
+ "drainingMediator": {
178
+ "type": "string",
179
+ "description": "The mediator being drained, when `drainUntil` is present."
180
+ },
181
+ "vtaDid": {
182
+ "type": "string",
183
+ "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."
184
+ },
185
+ "serverless": {
186
+ "type": "boolean",
187
+ "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.",
188
+ "default": false
189
+ },
190
+ "ext": {
191
+ "$ref": "#/$defs/Ext"
192
+ }
193
+ }
194
+ },
195
+ "ServiceKind": {
196
+ "title": "ServiceKind",
197
+ "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.",
198
+ "type": "string",
199
+ "enum": [
200
+ "didcomm",
201
+ "rest",
202
+ "tsp",
203
+ "webauthn"
204
+ ]
205
+ }
206
+ }
207
+ } as const;
208
+
209
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
210
+ export const RESPONSE_PAYLOAD_SCHEMA = {
211
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
212
+ "$ref": "#/$defs/Response",
213
+ "$defs": {
214
+ "Response": {
215
+ "$anchor": "response",
216
+ "title": "VTA Services — Update — response payload",
217
+ "description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.1#response.",
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "required": [
221
+ "result"
222
+ ],
223
+ "properties": {
224
+ "result": {
225
+ "$ref": "#/$defs/ServiceMutationResult"
226
+ },
227
+ "ext": {
228
+ "$ref": "#/$defs/Ext"
229
+ }
230
+ }
231
+ },
232
+ "Ext": {
233
+ "title": "Ext",
234
+ "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.",
235
+ "type": "object",
236
+ "minProperties": 1,
237
+ "additionalProperties": true,
238
+ "propertyNames": {
239
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
240
+ }
241
+ },
242
+ "ServiceMutationResult": {
243
+ "title": "ServiceMutationResult",
244
+ "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.",
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "required": [
248
+ "logEntryVersionId",
249
+ "effectiveAt"
250
+ ],
251
+ "properties": {
252
+ "logEntryVersionId": {
253
+ "type": "string",
254
+ "minLength": 1,
255
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
256
+ },
257
+ "effectiveAt": {
258
+ "type": "string",
259
+ "format": "date-time",
260
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
261
+ },
262
+ "drainUntil": {
263
+ "type": "string",
264
+ "format": "date-time",
265
+ "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."
266
+ },
267
+ "drainingMediator": {
268
+ "type": "string",
269
+ "description": "The mediator being drained, when `drainUntil` is present."
270
+ },
271
+ "vtaDid": {
272
+ "type": "string",
273
+ "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."
274
+ },
275
+ "serverless": {
276
+ "type": "boolean",
277
+ "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.",
278
+ "default": false
279
+ },
280
+ "ext": {
281
+ "$ref": "#/$defs/Ext"
282
+ }
283
+ }
284
+ },
285
+ "ServiceKind": {
286
+ "title": "ServiceKind",
287
+ "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.",
288
+ "type": "string",
289
+ "enum": [
290
+ "didcomm",
291
+ "rest",
292
+ "tsp",
293
+ "webauthn"
294
+ ]
295
+ }
296
+ }
297
+ } as const;
298
+
299
+ /**
300
+ * SPEC.md §7.2 policy for the request variant, from this specification's
301
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
302
+ * per-specification and cannot be derived from the document alone, and
303
+ * item 2 needs the schema this carries.
304
+ */
305
+ export const SPEC = {
306
+ typeUri: TYPE_URI,
307
+ isBearer: false,
308
+ isProofRequired: true,
309
+ isRecipientRequired: true,
310
+ isIssuedAtRequired: true,
311
+ payloadSchema: PAYLOAD_SCHEMA,
312
+ } as const;
313
+
314
+ /**
315
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
316
+ * tracks the *issuer* party's requirement because a response swaps the
317
+ * parties (§7.3 item 5).
318
+ */
319
+ export const RESPONSE_SPEC = {
320
+ typeUri: RESPONSE_TYPE_URI,
321
+ isBearer: false,
322
+ isProofRequired: true,
323
+ isRecipientRequired: true,
324
+ isIssuedAtRequired: true,
325
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
326
+ } as const;