@openvtc/trust-tasks 0.11.0 → 0.12.1

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,170 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/servers/retire-orphan/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/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/webvh/servers/retire-orphan/0.1",
21
+ "title": "VTA WebVH Servers Retire Orphan — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "serverId",
26
+ "slotId"
27
+ ],
28
+ "properties": {
29
+ "serverId": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "description": "The hosting server holding the orphaned slot, as the agent has it registered."
33
+ },
34
+ "slotId": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "description": "The slot to retire, as reported in a reconcile response's hostOnly. The slot identifier rather than the DID, because a slot reserved but never published to has no DID and is exactly as orphaned."
38
+ },
39
+ "expectedDid": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "description": "The DID the producer believes the slot serves. When present the agent MUST refuse unless it matches, so a slotId that has been reused since the report was taken cannot retire something else. Absent for a slot that was never published to."
43
+ },
44
+ "reason": {
45
+ "type": "string",
46
+ "maxLength": 1024,
47
+ "description": "Operator rationale, recorded in the agent's audit trail. The act has no undo, so why it was done outlives the record of what was done."
48
+ },
49
+ "ext": {
50
+ "$ref": "#/$defs/Ext"
51
+ }
52
+ },
53
+ "$defs": {
54
+ "Response": {
55
+ "$anchor": "response",
56
+ "title": "VTA WebVH Servers Retire Orphan — response payload",
57
+ "description": "Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.",
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": [
61
+ "serverId",
62
+ "slotId",
63
+ "retired"
64
+ ],
65
+ "properties": {
66
+ "serverId": {
67
+ "type": "string"
68
+ },
69
+ "slotId": {
70
+ "type": "string"
71
+ },
72
+ "retired": {
73
+ "type": "boolean",
74
+ "description": "Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it."
75
+ },
76
+ "did": {
77
+ "type": "string",
78
+ "description": "The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to."
79
+ },
80
+ "ext": {
81
+ "$ref": "#/$defs/Ext"
82
+ }
83
+ }
84
+ },
85
+ "Ext": {
86
+ "title": "Ext",
87
+ "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.",
88
+ "type": "object",
89
+ "minProperties": 1,
90
+ "additionalProperties": true,
91
+ "propertyNames": {
92
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
93
+ }
94
+ }
95
+ }
96
+ };
97
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
98
+ export const RESPONSE_PAYLOAD_SCHEMA = {
99
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
100
+ "$ref": "#/$defs/Response",
101
+ "$defs": {
102
+ "Response": {
103
+ "$anchor": "response",
104
+ "title": "VTA WebVH Servers Retire Orphan — response payload",
105
+ "description": "Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.",
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "serverId",
110
+ "slotId",
111
+ "retired"
112
+ ],
113
+ "properties": {
114
+ "serverId": {
115
+ "type": "string"
116
+ },
117
+ "slotId": {
118
+ "type": "string"
119
+ },
120
+ "retired": {
121
+ "type": "boolean",
122
+ "description": "Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it."
123
+ },
124
+ "did": {
125
+ "type": "string",
126
+ "description": "The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to."
127
+ },
128
+ "ext": {
129
+ "$ref": "#/$defs/Ext"
130
+ }
131
+ }
132
+ },
133
+ "Ext": {
134
+ "title": "Ext",
135
+ "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.",
136
+ "type": "object",
137
+ "minProperties": 1,
138
+ "additionalProperties": true,
139
+ "propertyNames": {
140
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
141
+ }
142
+ }
143
+ }
144
+ };
145
+ /**
146
+ * SPEC.md §7.2 policy for the request variant, from this specification's
147
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
148
+ * per-specification and cannot be derived from the document alone, and
149
+ * item 2 needs the schema this carries.
150
+ */
151
+ export const SPEC = {
152
+ typeUri: TYPE_URI,
153
+ isBearer: false,
154
+ isProofRequired: true,
155
+ isRecipientRequired: true,
156
+ payloadSchema: PAYLOAD_SCHEMA,
157
+ };
158
+ /**
159
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
160
+ * tracks the *issuer* party's requirement because a response swaps the
161
+ * parties (§7.3 item 5).
162
+ */
163
+ export const RESPONSE_SPEC = {
164
+ typeUri: RESPONSE_TYPE_URI,
165
+ isBearer: false,
166
+ isProofRequired: true,
167
+ isRecipientRequired: true,
168
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
169
+ };
170
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vta/webvh/servers/retire-orphan/0.1/payload.ts"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
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
@@ -317,6 +317,7 @@ export * as VtaWebvhServersList_v1_0 from "./vta/webvh/servers/list/1.0/payload.
317
317
  export * as VtaWebvhServersReconcile_v0_1 from "./vta/webvh/servers/reconcile/0.1/payload.js";
318
318
  export * as VtaWebvhServersRegister_v1_0 from "./vta/webvh/servers/register/1.0/payload.js";
319
319
  export * as VtaWebvhServersRemove_v1_0 from "./vta/webvh/servers/remove/1.0/payload.js";
320
+ export * as VtaWebvhServersRetireOrphan_v0_1 from "./vta/webvh/servers/retire-orphan/0.1/payload.js";
320
321
  export * as BackupShared_v0_1 from "./vtc/_shared/0.1/backup.js";
321
322
  export * as CommunityShared_v0_1 from "./vtc/_shared/0.1/community.js";
322
323
  export * as ConfigPortabilityShared_v0_1 from "./vtc/_shared/0.1/config-portability.js";
@@ -14,6 +14,10 @@ export type ServiceKind = "didcomm" | "rest" | "tsp" | "webauthn";
14
14
  export interface VTAServicesDisablePayload {
15
15
  service: ServiceKind;
16
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;
17
21
  }
18
22
  /**
19
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.
@@ -96,6 +100,11 @@ export const PAYLOAD_SCHEMA = {
96
100
  },
97
101
  "ext": {
98
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."
99
108
  }
100
109
  },
101
110
  "$defs": {
@@ -25,35 +25,39 @@ export interface Ext {
25
25
  * Success response to vta/services/rollback. Type https://trusttasks.org/spec/vta/services/rollback/1.0#response.
26
26
  */
27
27
  export interface VTAServicesRollbackResponsePayload {
28
- result: ServiceMutationResult;
28
+ result: RollbackResult;
29
29
  ext?: Ext;
30
30
  }
31
31
  /**
32
- * 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.
32
+ * The outcome of a rollback. Distinct from ServiceMutationResult because a rollback can legitimately publish nothing: if the previous state already equals the current one there is no change to write, and `kind: "noOp"` says so with `logEntryVersionId` absent. Treating that as a failure would be wrong — the requested state holds — and treating it as an ordinary success would report a log entry that does not exist.
33
33
  */
34
- export interface ServiceMutationResult {
34
+ export interface RollbackResult {
35
35
  /**
36
- * Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history.
36
+ * What the rollback did. `disabled` re-disabled the transport, `enabled` re-advertised it at its prior settings, `updated` restored prior settings on an entry that stayed advertised, and `noOp` means the previous state already matched — nothing was written.
37
37
  */
38
- logEntryVersionId: string;
38
+ kind: "disabled" | "enabled" | "updated" | "noOp";
39
39
  /**
40
- * RFC 3339 instant the change took effect the same instant stamped on the new log entry.
40
+ * Version id of the log entry the rollback wrote. **Absent when `kind` is `noOp`**, and present otherwise.
41
41
  */
42
- effectiveAt: string;
42
+ logEntryVersionId?: string;
43
43
  /**
44
- * 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.
44
+ * RFC 3339 instant the rollback took effect. Absent for `noOp`.
45
45
  */
46
- drainUntil?: string;
46
+ effectiveAt?: string;
47
47
  /**
48
- * The mediator being drained, when `drainUntil` is present.
48
+ * Present when rolling back DIDComm left a mediator draining.
49
49
  */
50
50
  drainingMediator?: string;
51
51
  /**
52
- * 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.
52
+ * When that drain completes.
53
+ */
54
+ drainUntil?: string;
55
+ /**
56
+ * The agent's own DID.
53
57
  */
54
58
  vtaDid?: string;
55
59
  /**
56
- * 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.
60
+ * True when the entry was written locally but not published the operator must redeploy before any verifier sees it.
57
61
  */
58
62
  serverless?: boolean;
59
63
  ext?: Ext;
@@ -110,7 +114,7 @@ export const PAYLOAD_SCHEMA = {
110
114
  ],
111
115
  "properties": {
112
116
  "result": {
113
- "$ref": "#/$defs/ServiceMutationResult"
117
+ "$ref": "#/$defs/RollbackResult"
114
118
  },
115
119
  "ext": {
116
120
  "$ref": "#/$defs/Ext"
@@ -127,43 +131,51 @@ export const PAYLOAD_SCHEMA = {
127
131
  "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
128
132
  }
129
133
  },
130
- "ServiceMutationResult": {
131
- "title": "ServiceMutationResult",
132
- "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.",
134
+ "RollbackResult": {
135
+ "title": "RollbackResult",
136
+ "description": "The outcome of a rollback. Distinct from ServiceMutationResult because a rollback can legitimately publish nothing: if the previous state already equals the current one there is no change to write, and `kind: \"noOp\"` says so with `logEntryVersionId` absent. Treating that as a failure would be wrong — the requested state holds — and treating it as an ordinary success would report a log entry that does not exist.",
133
137
  "type": "object",
134
138
  "additionalProperties": false,
135
139
  "required": [
136
- "logEntryVersionId",
137
- "effectiveAt"
140
+ "kind"
138
141
  ],
139
142
  "properties": {
143
+ "kind": {
144
+ "type": "string",
145
+ "enum": [
146
+ "disabled",
147
+ "enabled",
148
+ "updated",
149
+ "noOp"
150
+ ],
151
+ "description": "What the rollback did. `disabled` re-disabled the transport, `enabled` re-advertised it at its prior settings, `updated` restored prior settings on an entry that stayed advertised, and `noOp` means the previous state already matched — nothing was written."
152
+ },
140
153
  "logEntryVersionId": {
141
154
  "type": "string",
142
- "minLength": 1,
143
- "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
155
+ "description": "Version id of the log entry the rollback wrote. **Absent when `kind` is `noOp`**, and present otherwise."
144
156
  },
145
157
  "effectiveAt": {
146
158
  "type": "string",
147
159
  "format": "date-time",
148
- "description": "RFC 3339 instant the change took effect the same instant stamped on the new log entry."
160
+ "description": "RFC 3339 instant the rollback took effect. Absent for `noOp`."
149
161
  },
150
- "drainUntil": {
162
+ "drainingMediator": {
151
163
  "type": "string",
152
- "format": "date-time",
153
- "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."
164
+ "description": "Present when rolling back DIDComm left a mediator draining."
154
165
  },
155
- "drainingMediator": {
166
+ "drainUntil": {
156
167
  "type": "string",
157
- "description": "The mediator being drained, when `drainUntil` is present."
168
+ "format": "date-time",
169
+ "description": "When that drain completes."
158
170
  },
159
171
  "vtaDid": {
160
172
  "type": "string",
161
- "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."
173
+ "description": "The agent's own DID."
162
174
  },
163
175
  "serverless": {
164
176
  "type": "boolean",
165
- "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.",
166
- "default": false
177
+ "default": false,
178
+ "description": "True when the entry was written locally but not published — the operator must redeploy before any verifier sees it."
167
179
  },
168
180
  "ext": {
169
181
  "$ref": "#/$defs/Ext"
@@ -200,7 +212,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
200
212
  ],
201
213
  "properties": {
202
214
  "result": {
203
- "$ref": "#/$defs/ServiceMutationResult"
215
+ "$ref": "#/$defs/RollbackResult"
204
216
  },
205
217
  "ext": {
206
218
  "$ref": "#/$defs/Ext"
@@ -217,43 +229,51 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
217
229
  "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
218
230
  }
219
231
  },
220
- "ServiceMutationResult": {
221
- "title": "ServiceMutationResult",
222
- "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
+ "RollbackResult": {
233
+ "title": "RollbackResult",
234
+ "description": "The outcome of a rollback. Distinct from ServiceMutationResult because a rollback can legitimately publish nothing: if the previous state already equals the current one there is no change to write, and `kind: \"noOp\"` says so with `logEntryVersionId` absent. Treating that as a failure would be wrong — the requested state holds — and treating it as an ordinary success would report a log entry that does not exist.",
223
235
  "type": "object",
224
236
  "additionalProperties": false,
225
237
  "required": [
226
- "logEntryVersionId",
227
- "effectiveAt"
238
+ "kind"
228
239
  ],
229
240
  "properties": {
241
+ "kind": {
242
+ "type": "string",
243
+ "enum": [
244
+ "disabled",
245
+ "enabled",
246
+ "updated",
247
+ "noOp"
248
+ ],
249
+ "description": "What the rollback did. `disabled` re-disabled the transport, `enabled` re-advertised it at its prior settings, `updated` restored prior settings on an entry that stayed advertised, and `noOp` means the previous state already matched — nothing was written."
250
+ },
230
251
  "logEntryVersionId": {
231
252
  "type": "string",
232
- "minLength": 1,
233
- "description": "Version id of the new did:webvh log entry this change wrote. Joins the change to the document's history."
253
+ "description": "Version id of the log entry the rollback wrote. **Absent when `kind` is `noOp`**, and present otherwise."
234
254
  },
235
255
  "effectiveAt": {
236
256
  "type": "string",
237
257
  "format": "date-time",
238
- "description": "RFC 3339 instant the change took effect the same instant stamped on the new log entry."
258
+ "description": "RFC 3339 instant the rollback took effect. Absent for `noOp`."
239
259
  },
240
- "drainUntil": {
260
+ "drainingMediator": {
241
261
  "type": "string",
242
- "format": "date-time",
243
- "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."
262
+ "description": "Present when rolling back DIDComm left a mediator draining."
244
263
  },
245
- "drainingMediator": {
264
+ "drainUntil": {
246
265
  "type": "string",
247
- "description": "The mediator being drained, when `drainUntil` is present."
266
+ "format": "date-time",
267
+ "description": "When that drain completes."
248
268
  },
249
269
  "vtaDid": {
250
270
  "type": "string",
251
- "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."
271
+ "description": "The agent's own DID."
252
272
  },
253
273
  "serverless": {
254
274
  "type": "boolean",
255
- "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.",
256
- "default": false
275
+ "default": false,
276
+ "description": "True when the entry was written locally but not published — the operator must redeploy before any verifier sees it."
257
277
  },
258
278
  "ext": {
259
279
  "$ref": "#/$defs/Ext"
@@ -0,0 +1,223 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/servers/retire-orphan/0.1/payload.schema.json
4
+ */
5
+
6
+ export interface VTAWebVHServersRetireOrphanPayload {
7
+ /**
8
+ * The hosting server holding the orphaned slot, as the agent has it registered.
9
+ */
10
+ serverId: string;
11
+ /**
12
+ * The slot to retire, as reported in a reconcile response's hostOnly. The slot identifier rather than the DID, because a slot reserved but never published to has no DID and is exactly as orphaned.
13
+ */
14
+ slotId: string;
15
+ /**
16
+ * The DID the producer believes the slot serves. When present the agent MUST refuse unless it matches, so a slotId that has been reused since the report was taken cannot retire something else. Absent for a slot that was never published to.
17
+ */
18
+ expectedDid?: string;
19
+ /**
20
+ * Operator rationale, recorded in the agent's audit trail. The act has no undo, so why it was done outlives the record of what was done.
21
+ */
22
+ reason?: string;
23
+ ext?: Ext;
24
+ }
25
+ /**
26
+ * 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.
27
+ */
28
+ export interface Ext {
29
+ [k: string]: unknown | undefined;
30
+ }
31
+ /**
32
+ * Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.
33
+ */
34
+ export interface VTAWebVHServersRetireOrphanResponsePayload {
35
+ serverId: string;
36
+ slotId: string;
37
+ /**
38
+ * Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it.
39
+ */
40
+ retired: boolean;
41
+ /**
42
+ * The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to.
43
+ */
44
+ did?: string;
45
+ ext?: Ext;
46
+ }
47
+
48
+ /** Trust Task type URI. */
49
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1" as const;
50
+
51
+ /** Stable alias for this specification's request payload shape. */
52
+ export type Payload = VTAWebVHServersRetireOrphanPayload;
53
+
54
+ /** Trust Task response type URI (request type URI + "#response"). */
55
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response" as const;
56
+
57
+ /** Stable alias for this specification's success-response payload shape. */
58
+ export type Response = VTAWebVHServersRetireOrphanResponsePayload;
59
+
60
+ /**
61
+ * This specification's payload schema, as a value.
62
+ *
63
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
64
+ * rather than only as a `.json` file because TypeScript types are erased
65
+ * at runtime: without a schema a consumer has nothing to validate, and
66
+ * every REQUIRED payload member is optional in practice. Cross-file
67
+ * `$ref`s are already inlined, so it needs no resolver.
68
+ */
69
+ export const PAYLOAD_SCHEMA = {
70
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
71
+ "$id": "https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1",
72
+ "title": "VTA WebVH Servers Retire Orphan — payload",
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "serverId",
77
+ "slotId"
78
+ ],
79
+ "properties": {
80
+ "serverId": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "description": "The hosting server holding the orphaned slot, as the agent has it registered."
84
+ },
85
+ "slotId": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "description": "The slot to retire, as reported in a reconcile response's hostOnly. The slot identifier rather than the DID, because a slot reserved but never published to has no DID and is exactly as orphaned."
89
+ },
90
+ "expectedDid": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "description": "The DID the producer believes the slot serves. When present the agent MUST refuse unless it matches, so a slotId that has been reused since the report was taken cannot retire something else. Absent for a slot that was never published to."
94
+ },
95
+ "reason": {
96
+ "type": "string",
97
+ "maxLength": 1024,
98
+ "description": "Operator rationale, recorded in the agent's audit trail. The act has no undo, so why it was done outlives the record of what was done."
99
+ },
100
+ "ext": {
101
+ "$ref": "#/$defs/Ext"
102
+ }
103
+ },
104
+ "$defs": {
105
+ "Response": {
106
+ "$anchor": "response",
107
+ "title": "VTA WebVH Servers Retire Orphan — response payload",
108
+ "description": "Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.",
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": [
112
+ "serverId",
113
+ "slotId",
114
+ "retired"
115
+ ],
116
+ "properties": {
117
+ "serverId": {
118
+ "type": "string"
119
+ },
120
+ "slotId": {
121
+ "type": "string"
122
+ },
123
+ "retired": {
124
+ "type": "boolean",
125
+ "description": "Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it."
126
+ },
127
+ "did": {
128
+ "type": "string",
129
+ "description": "The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to."
130
+ },
131
+ "ext": {
132
+ "$ref": "#/$defs/Ext"
133
+ }
134
+ }
135
+ },
136
+ "Ext": {
137
+ "title": "Ext",
138
+ "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.",
139
+ "type": "object",
140
+ "minProperties": 1,
141
+ "additionalProperties": true,
142
+ "propertyNames": {
143
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
144
+ }
145
+ }
146
+ }
147
+ } as const;
148
+
149
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
150
+ export const RESPONSE_PAYLOAD_SCHEMA = {
151
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
152
+ "$ref": "#/$defs/Response",
153
+ "$defs": {
154
+ "Response": {
155
+ "$anchor": "response",
156
+ "title": "VTA WebVH Servers Retire Orphan — response payload",
157
+ "description": "Success response to vta/webvh/servers/retire-orphan. Type https://trusttasks.org/spec/vta/webvh/servers/retire-orphan/0.1#response.",
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": [
161
+ "serverId",
162
+ "slotId",
163
+ "retired"
164
+ ],
165
+ "properties": {
166
+ "serverId": {
167
+ "type": "string"
168
+ },
169
+ "slotId": {
170
+ "type": "string"
171
+ },
172
+ "retired": {
173
+ "type": "boolean",
174
+ "description": "Whether the slot is no longer served. False is reported, not inferred: an agent that could not confirm removal with the host MUST NOT claim it."
175
+ },
176
+ "did": {
177
+ "type": "string",
178
+ "description": "The DID the slot was serving, echoed so the record of what was retired survives the slot's disappearance. Absent where the slot was never published to."
179
+ },
180
+ "ext": {
181
+ "$ref": "#/$defs/Ext"
182
+ }
183
+ }
184
+ },
185
+ "Ext": {
186
+ "title": "Ext",
187
+ "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.",
188
+ "type": "object",
189
+ "minProperties": 1,
190
+ "additionalProperties": true,
191
+ "propertyNames": {
192
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
193
+ }
194
+ }
195
+ }
196
+ } as const;
197
+
198
+ /**
199
+ * SPEC.md §7.2 policy for the request variant, from this specification's
200
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
201
+ * per-specification and cannot be derived from the document alone, and
202
+ * item 2 needs the schema this carries.
203
+ */
204
+ export const SPEC = {
205
+ typeUri: TYPE_URI,
206
+ isBearer: false,
207
+ isProofRequired: true,
208
+ isRecipientRequired: true,
209
+ payloadSchema: PAYLOAD_SCHEMA,
210
+ } as const;
211
+
212
+ /**
213
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
214
+ * tracks the *issuer* party's requirement because a response swaps the
215
+ * parties (§7.3 item 5).
216
+ */
217
+ export const RESPONSE_SPEC = {
218
+ typeUri: RESPONSE_TYPE_URI,
219
+ isBearer: false,
220
+ isProofRequired: true,
221
+ isRecipientRequired: true,
222
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
223
+ } as const;