@openvtc/trust-tasks 0.10.0 → 0.12.0

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 (51) hide show
  1. package/dist/index.d.ts +9 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +9 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/vta/_shared/0.1/service.d.ts +11 -0
  6. package/dist/vta/_shared/0.1/service.d.ts.map +1 -0
  7. package/dist/vta/_shared/0.1/service.js +6 -0
  8. package/dist/vta/_shared/0.1/service.js.map +1 -0
  9. package/dist/vta/services/disable/1.0/payload.d.ts +452 -0
  10. package/dist/vta/services/disable/1.0/payload.d.ts.map +1 -0
  11. package/dist/vta/services/disable/1.0/payload.js +240 -0
  12. package/dist/vta/services/disable/1.0/payload.js.map +1 -0
  13. package/dist/vta/services/drain/cancel/1.0/payload.d.ts +234 -0
  14. package/dist/vta/services/drain/cancel/1.0/payload.d.ts.map +1 -0
  15. package/dist/vta/services/drain/cancel/1.0/payload.js +131 -0
  16. package/dist/vta/services/drain/cancel/1.0/payload.js.map +1 -0
  17. package/dist/vta/services/drain/list/1.0/payload.d.ts +352 -0
  18. package/dist/vta/services/drain/list/1.0/payload.d.ts.map +1 -0
  19. package/dist/vta/services/drain/list/1.0/payload.js +189 -0
  20. package/dist/vta/services/drain/list/1.0/payload.js.map +1 -0
  21. package/dist/vta/services/enable/1.0/payload.d.ts +511 -0
  22. package/dist/vta/services/enable/1.0/payload.d.ts.map +1 -0
  23. package/dist/vta/services/enable/1.0/payload.js +262 -0
  24. package/dist/vta/services/enable/1.0/payload.js.map +1 -0
  25. package/dist/vta/services/get/1.0/payload.d.ts +399 -0
  26. package/dist/vta/services/get/1.0/payload.d.ts.map +1 -0
  27. package/dist/vta/services/get/1.0/payload.js +219 -0
  28. package/dist/vta/services/get/1.0/payload.js.map +1 -0
  29. package/dist/vta/services/list/1.0/payload.d.ts +409 -0
  30. package/dist/vta/services/list/1.0/payload.d.ts.map +1 -0
  31. package/dist/vta/services/list/1.0/payload.js +221 -0
  32. package/dist/vta/services/list/1.0/payload.js.map +1 -0
  33. package/dist/vta/services/rollback/1.0/payload.d.ts +458 -0
  34. package/dist/vta/services/rollback/1.0/payload.d.ts.map +1 -0
  35. package/dist/vta/services/rollback/1.0/payload.js +251 -0
  36. package/dist/vta/services/rollback/1.0/payload.js.map +1 -0
  37. package/dist/vta/services/update/1.0/payload.d.ts +511 -0
  38. package/dist/vta/services/update/1.0/payload.d.ts.map +1 -0
  39. package/dist/vta/services/update/1.0/payload.js +262 -0
  40. package/dist/vta/services/update/1.0/payload.js.map +1 -0
  41. package/package.json +1 -1
  42. package/src/index.ts +9 -0
  43. package/src/vta/_shared/0.1/service.ts +11 -0
  44. package/src/vta/services/disable/1.0/payload.ts +311 -0
  45. package/src/vta/services/drain/cancel/1.0/payload.ts +169 -0
  46. package/src/vta/services/drain/list/1.0/payload.ts +241 -0
  47. package/src/vta/services/enable/1.0/payload.ts +350 -0
  48. package/src/vta/services/get/1.0/payload.ts +279 -0
  49. package/src/vta/services/list/1.0/payload.ts +283 -0
  50. package/src/vta/services/rollback/1.0/payload.ts +322 -0
  51. package/src/vta/services/update/1.0/payload.ts +350 -0
@@ -0,0 +1,262 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/services/update/1.0/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.0";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/services/update/1.0#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.0",
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
+ },
63
+ "$defs": {
64
+ "Response": {
65
+ "$anchor": "response",
66
+ "title": "VTA Services — Update — response payload",
67
+ "description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.0#response.",
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "result"
72
+ ],
73
+ "properties": {
74
+ "result": {
75
+ "$ref": "#/$defs/ServiceMutationResult"
76
+ },
77
+ "ext": {
78
+ "$ref": "#/$defs/Ext"
79
+ }
80
+ }
81
+ },
82
+ "Ext": {
83
+ "title": "Ext",
84
+ "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.",
85
+ "type": "object",
86
+ "minProperties": 1,
87
+ "additionalProperties": true,
88
+ "propertyNames": {
89
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
90
+ }
91
+ },
92
+ "ServiceMutationResult": {
93
+ "title": "ServiceMutationResult",
94
+ "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.",
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": [
98
+ "logEntryVersionId",
99
+ "effectiveAt"
100
+ ],
101
+ "properties": {
102
+ "logEntryVersionId": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
106
+ },
107
+ "effectiveAt": {
108
+ "type": "string",
109
+ "format": "date-time",
110
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
111
+ },
112
+ "drainUntil": {
113
+ "type": "string",
114
+ "format": "date-time",
115
+ "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."
116
+ },
117
+ "drainingMediator": {
118
+ "type": "string",
119
+ "description": "The mediator being drained, when `drainUntil` is present."
120
+ },
121
+ "vtaDid": {
122
+ "type": "string",
123
+ "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."
124
+ },
125
+ "serverless": {
126
+ "type": "boolean",
127
+ "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.",
128
+ "default": false
129
+ },
130
+ "ext": {
131
+ "$ref": "#/$defs/Ext"
132
+ }
133
+ }
134
+ },
135
+ "ServiceKind": {
136
+ "title": "ServiceKind",
137
+ "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.",
138
+ "type": "string",
139
+ "enum": [
140
+ "didcomm",
141
+ "rest",
142
+ "tsp",
143
+ "webauthn"
144
+ ]
145
+ }
146
+ }
147
+ };
148
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
149
+ export const RESPONSE_PAYLOAD_SCHEMA = {
150
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
151
+ "$ref": "#/$defs/Response",
152
+ "$defs": {
153
+ "Response": {
154
+ "$anchor": "response",
155
+ "title": "VTA Services — Update — response payload",
156
+ "description": "Success response to vta/services/update. Type https://trusttasks.org/spec/vta/services/update/1.0#response.",
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "result"
161
+ ],
162
+ "properties": {
163
+ "result": {
164
+ "$ref": "#/$defs/ServiceMutationResult"
165
+ },
166
+ "ext": {
167
+ "$ref": "#/$defs/Ext"
168
+ }
169
+ }
170
+ },
171
+ "Ext": {
172
+ "title": "Ext",
173
+ "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.",
174
+ "type": "object",
175
+ "minProperties": 1,
176
+ "additionalProperties": true,
177
+ "propertyNames": {
178
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
179
+ }
180
+ },
181
+ "ServiceMutationResult": {
182
+ "title": "ServiceMutationResult",
183
+ "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.",
184
+ "type": "object",
185
+ "additionalProperties": false,
186
+ "required": [
187
+ "logEntryVersionId",
188
+ "effectiveAt"
189
+ ],
190
+ "properties": {
191
+ "logEntryVersionId": {
192
+ "type": "string",
193
+ "minLength": 1,
194
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
195
+ },
196
+ "effectiveAt": {
197
+ "type": "string",
198
+ "format": "date-time",
199
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
200
+ },
201
+ "drainUntil": {
202
+ "type": "string",
203
+ "format": "date-time",
204
+ "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."
205
+ },
206
+ "drainingMediator": {
207
+ "type": "string",
208
+ "description": "The mediator being drained, when `drainUntil` is present."
209
+ },
210
+ "vtaDid": {
211
+ "type": "string",
212
+ "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."
213
+ },
214
+ "serverless": {
215
+ "type": "boolean",
216
+ "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.",
217
+ "default": false
218
+ },
219
+ "ext": {
220
+ "$ref": "#/$defs/Ext"
221
+ }
222
+ }
223
+ },
224
+ "ServiceKind": {
225
+ "title": "ServiceKind",
226
+ "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.",
227
+ "type": "string",
228
+ "enum": [
229
+ "didcomm",
230
+ "rest",
231
+ "tsp",
232
+ "webauthn"
233
+ ]
234
+ }
235
+ }
236
+ };
237
+ /**
238
+ * SPEC.md §7.2 policy for the request variant, from this specification's
239
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
240
+ * per-specification and cannot be derived from the document alone, and
241
+ * item 2 needs the schema this carries.
242
+ */
243
+ export const SPEC = {
244
+ typeUri: TYPE_URI,
245
+ isBearer: false,
246
+ isProofRequired: true,
247
+ isRecipientRequired: true,
248
+ payloadSchema: PAYLOAD_SCHEMA,
249
+ };
250
+ /**
251
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
252
+ * tracks the *issuer* party's requirement because a response swaps the
253
+ * parties (§7.3 item 5).
254
+ */
255
+ export const RESPONSE_SPEC = {
256
+ typeUri: RESPONSE_TYPE_URI,
257
+ isBearer: false,
258
+ isProofRequired: true,
259
+ isRecipientRequired: true,
260
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
261
+ };
262
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/services/update/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+EH,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,EA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;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
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
@@ -254,6 +254,7 @@ export * as VrcRelationshipsPropose_v0_1 from "./vrc/relationships/propose/0.1/p
254
254
  export * as ContextShared_v0_1 from "./vta/_shared/0.1/context.js";
255
255
  export * as DidTemplateShared_v0_1 from "./vta/_shared/0.1/did-template.js";
256
256
  export * as PasskeyVmShared_v0_1 from "./vta/_shared/0.1/passkey-vm.js";
257
+ export * as ServiceShared_v0_1 from "./vta/_shared/0.1/service.js";
257
258
  export * as WebvhRecordsShared_v0_1 from "./vta/_shared/0.1/webvh-records.js";
258
259
  export * as VtaContextsCreate_v1_0 from "./vta/contexts/create/1.0/payload.js";
259
260
  export * as VtaContextsDelete_v1_0 from "./vta/contexts/delete/1.0/payload.js";
@@ -290,6 +291,14 @@ export * as VtaPasskeyVmsEnrollChallenge_v0_1 from "./vta/passkey-vms/enroll-cha
290
291
  export * as VtaPasskeyVmsEnrollSubmit_v0_1 from "./vta/passkey-vms/enroll-submit/0.1/payload.js";
291
292
  export * as VtaPasskeyVmsList_v0_1 from "./vta/passkey-vms/list/0.1/payload.js";
292
293
  export * as VtaPasskeyVmsRevoke_v0_1 from "./vta/passkey-vms/revoke/0.1/payload.js";
294
+ export * as VtaServicesDisable_v1_0 from "./vta/services/disable/1.0/payload.js";
295
+ export * as VtaServicesDrainCancel_v1_0 from "./vta/services/drain/cancel/1.0/payload.js";
296
+ export * as VtaServicesDrainList_v1_0 from "./vta/services/drain/list/1.0/payload.js";
297
+ export * as VtaServicesEnable_v1_0 from "./vta/services/enable/1.0/payload.js";
298
+ export * as VtaServicesGet_v1_0 from "./vta/services/get/1.0/payload.js";
299
+ export * as VtaServicesList_v1_0 from "./vta/services/list/1.0/payload.js";
300
+ export * as VtaServicesRollback_v1_0 from "./vta/services/rollback/1.0/payload.js";
301
+ export * as VtaServicesUpdate_v1_0 from "./vta/services/update/1.0/payload.js";
293
302
  export * as VtaWebvhAgentNameCheck_v1_0 from "./vta/webvh/agent-name/check/1.0/payload.js";
294
303
  export * as VtaWebvhAgentNameDisable_v1_0 from "./vta/webvh/agent-name/disable/1.0/payload.js";
295
304
  export * as VtaWebvhAgentNameEnable_v1_0 from "./vta/webvh/agent-name/enable/1.0/payload.js";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/_shared/0.1/service.schema.json
4
+ */
5
+
6
+ /**
7
+ * A *service* is a transport the agent advertises in its own DID document: DIDComm mediation, a REST endpoint, TSP mediation, or a WebAuthn origin. Enabling or disabling one edits `service` in the agent's did:webvh document and republishes the signed log, so every mutation in this family produces a new log entry rather than flipping a runtime flag — which is why they all return `ServiceMutationResult`. These shapes are defined once because `enable`, `disable`, `update` and `rollback` return the same result, and `list` and `get` return the same state; an inline copy per task would fork the moment one of them gained a member.
8
+ */
9
+ export interface ServiceDefinitionsSharedAcrossTheVtaServicesSpecFamily {
10
+ [k: string]: unknown | undefined;
11
+ }
@@ -0,0 +1,311 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/services/disable/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * 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.
8
+ */
9
+ export type ServiceKind = "didcomm" | "rest" | "tsp" | "webauthn";
10
+
11
+ /**
12
+ * Request payload for vta/services/disable. Stops advertising a transport and republishes the log. For `didcomm` this schedules a drain rather than cutting delivery immediately — see `drainUntil` in the result.
13
+ */
14
+ export interface VTAServicesDisablePayload {
15
+ service: ServiceKind;
16
+ ext?: Ext;
17
+ /**
18
+ * `didcomm` only: how long the unadvertised mediator keeps accepting delivery. Absent takes the agent's default. **0 means immediate teardown, and is only honoured when the request did not arrive through the mediator being torn down** — over a DIDComm-carried request the agent enforces a floor (1 hour), because cutting the mediator mid-request would discard the reply to the very task asking for it. A caller cannot rely on 0 being obeyed; read `drainUntil` in the result to learn what actually happened.
19
+ */
20
+ drainTtlSecs?: number;
21
+ }
22
+ /**
23
+ * 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.
24
+ */
25
+ export interface Ext {
26
+ [k: string]: unknown | undefined;
27
+ }
28
+ /**
29
+ * Success response to vta/services/disable. Type https://trusttasks.org/spec/vta/services/disable/1.0#response.
30
+ */
31
+ export interface VTAServicesDisableResponsePayload {
32
+ result: ServiceMutationResult;
33
+ ext?: Ext;
34
+ }
35
+ /**
36
+ * 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.
37
+ */
38
+ export interface ServiceMutationResult {
39
+ /**
40
+ * Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history.
41
+ */
42
+ logEntryVersionId: string;
43
+ /**
44
+ * RFC 3339 instant the change took effect — the same instant stamped on the new log entry.
45
+ */
46
+ effectiveAt: string;
47
+ /**
48
+ * 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.
49
+ */
50
+ drainUntil?: string;
51
+ /**
52
+ * The mediator being drained, when `drainUntil` is present.
53
+ */
54
+ drainingMediator?: string;
55
+ /**
56
+ * 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.
57
+ */
58
+ vtaDid?: string;
59
+ /**
60
+ * 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.
61
+ */
62
+ serverless?: boolean;
63
+ ext?: Ext;
64
+ }
65
+
66
+ /** Trust Task type URI. */
67
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/services/disable/1.0" as const;
68
+
69
+ /** Stable alias for this specification's request payload shape. */
70
+ export type Payload = VTAServicesDisablePayload;
71
+
72
+ /** Trust Task response type URI (request type URI + "#response"). */
73
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/services/disable/1.0#response" as const;
74
+
75
+ /** Stable alias for this specification's success-response payload shape. */
76
+ export type Response = VTAServicesDisableResponsePayload;
77
+
78
+ /**
79
+ * This specification's payload schema, as a value.
80
+ *
81
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
82
+ * rather than only as a `.json` file because TypeScript types are erased
83
+ * at runtime: without a schema a consumer has nothing to validate, and
84
+ * every REQUIRED payload member is optional in practice. Cross-file
85
+ * `$ref`s are already inlined, so it needs no resolver.
86
+ */
87
+ export const PAYLOAD_SCHEMA = {
88
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
89
+ "$id": "https://trusttasks.org/spec/vta/services/disable/1.0",
90
+ "title": "VTA Services — Disable — payload",
91
+ "description": "Request payload for vta/services/disable. Stops advertising a transport and republishes the log. For `didcomm` this schedules a drain rather than cutting delivery immediately — see `drainUntil` in the result.",
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": [
95
+ "service"
96
+ ],
97
+ "properties": {
98
+ "service": {
99
+ "$ref": "#/$defs/ServiceKind"
100
+ },
101
+ "ext": {
102
+ "$ref": "#/$defs/Ext"
103
+ },
104
+ "drainTtlSecs": {
105
+ "type": "integer",
106
+ "minimum": 0,
107
+ "description": "`didcomm` only: how long the unadvertised mediator keeps accepting delivery. Absent takes the agent's default. **0 means immediate teardown, and is only honoured when the request did not arrive through the mediator being torn down** — over a DIDComm-carried request the agent enforces a floor (1 hour), because cutting the mediator mid-request would discard the reply to the very task asking for it. A caller cannot rely on 0 being obeyed; read `drainUntil` in the result to learn what actually happened."
108
+ }
109
+ },
110
+ "$defs": {
111
+ "Response": {
112
+ "$anchor": "response",
113
+ "title": "VTA Services — Disable — response payload",
114
+ "description": "Success response to vta/services/disable. Type https://trusttasks.org/spec/vta/services/disable/1.0#response.",
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": [
118
+ "result"
119
+ ],
120
+ "properties": {
121
+ "result": {
122
+ "$ref": "#/$defs/ServiceMutationResult"
123
+ },
124
+ "ext": {
125
+ "$ref": "#/$defs/Ext"
126
+ }
127
+ }
128
+ },
129
+ "Ext": {
130
+ "title": "Ext",
131
+ "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.",
132
+ "type": "object",
133
+ "minProperties": 1,
134
+ "additionalProperties": true,
135
+ "propertyNames": {
136
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
137
+ }
138
+ },
139
+ "ServiceMutationResult": {
140
+ "title": "ServiceMutationResult",
141
+ "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.",
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": [
145
+ "logEntryVersionId",
146
+ "effectiveAt"
147
+ ],
148
+ "properties": {
149
+ "logEntryVersionId": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
153
+ },
154
+ "effectiveAt": {
155
+ "type": "string",
156
+ "format": "date-time",
157
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
158
+ },
159
+ "drainUntil": {
160
+ "type": "string",
161
+ "format": "date-time",
162
+ "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."
163
+ },
164
+ "drainingMediator": {
165
+ "type": "string",
166
+ "description": "The mediator being drained, when `drainUntil` is present."
167
+ },
168
+ "vtaDid": {
169
+ "type": "string",
170
+ "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."
171
+ },
172
+ "serverless": {
173
+ "type": "boolean",
174
+ "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.",
175
+ "default": false
176
+ },
177
+ "ext": {
178
+ "$ref": "#/$defs/Ext"
179
+ }
180
+ }
181
+ },
182
+ "ServiceKind": {
183
+ "title": "ServiceKind",
184
+ "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.",
185
+ "type": "string",
186
+ "enum": [
187
+ "didcomm",
188
+ "rest",
189
+ "tsp",
190
+ "webauthn"
191
+ ]
192
+ }
193
+ }
194
+ } as const;
195
+
196
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
197
+ export const RESPONSE_PAYLOAD_SCHEMA = {
198
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
199
+ "$ref": "#/$defs/Response",
200
+ "$defs": {
201
+ "Response": {
202
+ "$anchor": "response",
203
+ "title": "VTA Services — Disable — response payload",
204
+ "description": "Success response to vta/services/disable. Type https://trusttasks.org/spec/vta/services/disable/1.0#response.",
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": [
208
+ "result"
209
+ ],
210
+ "properties": {
211
+ "result": {
212
+ "$ref": "#/$defs/ServiceMutationResult"
213
+ },
214
+ "ext": {
215
+ "$ref": "#/$defs/Ext"
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
+ "ServiceMutationResult": {
230
+ "title": "ServiceMutationResult",
231
+ "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.",
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": [
235
+ "logEntryVersionId",
236
+ "effectiveAt"
237
+ ],
238
+ "properties": {
239
+ "logEntryVersionId": {
240
+ "type": "string",
241
+ "minLength": 1,
242
+ "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
243
+ },
244
+ "effectiveAt": {
245
+ "type": "string",
246
+ "format": "date-time",
247
+ "description": "RFC 3339 instant the change took effect — the same instant stamped on the new log entry."
248
+ },
249
+ "drainUntil": {
250
+ "type": "string",
251
+ "format": "date-time",
252
+ "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."
253
+ },
254
+ "drainingMediator": {
255
+ "type": "string",
256
+ "description": "The mediator being drained, when `drainUntil` is present."
257
+ },
258
+ "vtaDid": {
259
+ "type": "string",
260
+ "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."
261
+ },
262
+ "serverless": {
263
+ "type": "boolean",
264
+ "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.",
265
+ "default": false
266
+ },
267
+ "ext": {
268
+ "$ref": "#/$defs/Ext"
269
+ }
270
+ }
271
+ },
272
+ "ServiceKind": {
273
+ "title": "ServiceKind",
274
+ "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.",
275
+ "type": "string",
276
+ "enum": [
277
+ "didcomm",
278
+ "rest",
279
+ "tsp",
280
+ "webauthn"
281
+ ]
282
+ }
283
+ }
284
+ } as const;
285
+
286
+ /**
287
+ * SPEC.md §7.2 policy for the request variant, from this specification's
288
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
289
+ * per-specification and cannot be derived from the document alone, and
290
+ * item 2 needs the schema this carries.
291
+ */
292
+ export const SPEC = {
293
+ typeUri: TYPE_URI,
294
+ isBearer: false,
295
+ isProofRequired: true,
296
+ isRecipientRequired: true,
297
+ payloadSchema: PAYLOAD_SCHEMA,
298
+ } as const;
299
+
300
+ /**
301
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
302
+ * tracks the *issuer* party's requirement because a response swaps the
303
+ * parties (§7.3 item 5).
304
+ */
305
+ export const RESPONSE_SPEC = {
306
+ typeUri: RESPONSE_TYPE_URI,
307
+ isBearer: false,
308
+ isProofRequired: true,
309
+ isRecipientRequired: true,
310
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
311
+ } as const;