@openvtc/trust-tasks 0.19.16 → 0.19.18
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.
- package/CHANGELOG.md +4 -0
- package/dist/_runtime/consume.d.ts +1 -1
- package/dist/_runtime/consume.js +2 -2
- package/dist/_shared/components.d.ts +8 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/attribute/promote/1.0/payload.d.ts +506 -0
- package/dist/persona/attribute/promote/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/promote/1.0/payload.js +263 -0
- package/dist/persona/attribute/promote/1.0/payload.js.map +1 -0
- package/dist/persona/binding/get/1.0/payload.d.ts +24 -0
- package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/get/1.0/payload.js +10 -0
- package/dist/persona/binding/get/1.0/payload.js.map +1 -1
- package/dist/persona/binding/list/1.0/payload.d.ts +24 -0
- package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/list/1.0/payload.js +10 -0
- package/dist/persona/binding/list/1.0/payload.js.map +1 -1
- package/dist/persona/binding/set/1.0/payload.d.ts +38 -0
- package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/set/1.0/payload.js +15 -0
- package/dist/persona/binding/set/1.0/payload.js.map +1 -1
- package/dist/persona/local/binding/set/1.0/payload.d.ts +14 -0
- package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -1
- package/dist/persona/local/binding/set/1.0/payload.js +5 -0
- package/dist/persona/local/binding/set/1.0/payload.js.map +1 -1
- package/dist/persona/profile/compose/1.0/payload.d.ts +951 -0
- package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/compose/1.0/payload.js +526 -0
- package/dist/persona/profile/compose/1.0/payload.js.map +1 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts +71 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/delete/1.0/payload.js +38 -0
- package/dist/persona/profile/delete/1.0/payload.js.map +1 -1
- package/dist/persona/profile/get/1.0/payload.d.ts +115 -0
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/get/1.0/payload.js +66 -0
- package/dist/persona/profile/get/1.0/payload.js.map +1 -1
- package/dist/persona/profile/list/1.0/payload.d.ts +58 -0
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/list/1.0/payload.js +33 -0
- package/dist/persona/profile/list/1.0/payload.js.map +1 -1
- package/dist/persona/profile/reinstate/1.0/payload.d.ts +325 -0
- package/dist/persona/profile/reinstate/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/reinstate/1.0/payload.js +181 -0
- package/dist/persona/profile/reinstate/1.0/payload.js.map +1 -0
- package/dist/persona/profile/retire/1.0/payload.d.ts +436 -0
- package/dist/persona/profile/retire/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/retire/1.0/payload.js +238 -0
- package/dist/persona/profile/retire/1.0/payload.js.map +1 -0
- package/dist/trust-task-control/0.1/payload.d.ts +19 -19
- package/dist/trust-task-control/0.1/payload.js +7 -7
- package/dist/trust-task-discovery/0.1/payload.d.ts +3 -3
- package/dist/trust-task-discovery/0.1/payload.js +1 -1
- package/dist/trust-task-discovery/0.2/payload.d.ts +368 -0
- package/dist/trust-task-discovery/0.2/payload.d.ts.map +1 -0
- package/dist/trust-task-discovery/0.2/payload.js +186 -0
- package/dist/trust-task-discovery/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_runtime/consume.ts +2 -2
- package/src/_shared/components.ts +8 -0
- package/src/index.ts +5 -0
- package/src/persona/attribute/promote/1.0/payload.ts +344 -0
- package/src/persona/binding/get/1.0/payload.ts +14 -0
- package/src/persona/binding/list/1.0/payload.ts +14 -0
- package/src/persona/binding/set/1.0/payload.ts +23 -0
- package/src/persona/local/binding/set/1.0/payload.ts +9 -0
- package/src/persona/profile/compose/1.0/payload.ts +641 -0
- package/src/persona/profile/delete/1.0/payload.ts +45 -0
- package/src/persona/profile/get/1.0/payload.ts +73 -0
- package/src/persona/profile/list/1.0/payload.ts +37 -0
- package/src/persona/profile/reinstate/1.0/payload.ts +219 -0
- package/src/persona/profile/retire/1.0/payload.ts +289 -0
- package/src/trust-task-control/0.1/payload.ts +12 -12
- package/src/trust-task-discovery/0.1/payload.ts +2 -2
- package/src/trust-task-discovery/0.2/payload.ts +286 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/profile/retire/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, Ulid, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Stop being a face everywhere, and keep it. The face is taken off every persona wearing it, left out of pickers and default listings, and cannot be worn until reinstated; its values and its disclosure history are kept. The reversible middle between 'not here' (a null persona/binding/set) and 'gone' (persona/profile/delete).
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaProfileRetirePayload {
|
|
13
|
+
/**
|
|
14
|
+
* A pool face, or a context-local one.
|
|
15
|
+
*/
|
|
16
|
+
profileId: Ulid;
|
|
17
|
+
/**
|
|
18
|
+
* The context a context-local face lives in. Omit for a pool face.
|
|
19
|
+
*/
|
|
20
|
+
contextId?: string;
|
|
21
|
+
expectedVersion?: ExpectedVersion;
|
|
22
|
+
ext?: Ext;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Success response to persona/profile/retire. Type https://trusttasks.org/spec/persona/profile/retire/1.0#response. Retiring a face already retired is a success that changes nothing and takes no new version, so a repeated retire converges.
|
|
26
|
+
*/
|
|
27
|
+
export interface PersonaProfileRetireResponsePayload {
|
|
28
|
+
profileId: Ulid;
|
|
29
|
+
version: Version;
|
|
30
|
+
retiredAt: string;
|
|
31
|
+
/**
|
|
32
|
+
* Where the face was worn and no longer is. Absent when it was worn nowhere.
|
|
33
|
+
*
|
|
34
|
+
* @maxItems 256
|
|
35
|
+
*/
|
|
36
|
+
unbound?: {
|
|
37
|
+
contextId: string;
|
|
38
|
+
personaDid: string;
|
|
39
|
+
}[];
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
44
|
+
export type { ExpectedVersion, Ext, Ulid, Version };
|
|
45
|
+
|
|
46
|
+
/** Trust Task type URI. */
|
|
47
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/profile/retire/1.0" as const;
|
|
48
|
+
|
|
49
|
+
/** Stable alias for this specification's request payload shape. */
|
|
50
|
+
export type Payload = PersonaProfileRetirePayload;
|
|
51
|
+
|
|
52
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
53
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/profile/retire/1.0#response" as const;
|
|
54
|
+
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = PersonaProfileRetireResponsePayload;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export const PAYLOAD_SCHEMA = {
|
|
68
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
69
|
+
"$id": "https://trusttasks.org/spec/persona/profile/retire/1.0",
|
|
70
|
+
"title": "Persona Profile Retire — payload",
|
|
71
|
+
"description": "Stop being a face everywhere, and keep it. The face is taken off every persona wearing it, left out of pickers and default listings, and cannot be worn until reinstated; its values and its disclosure history are kept. The reversible middle between 'not here' (a null persona/binding/set) and 'gone' (persona/profile/delete).",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": [
|
|
75
|
+
"profileId"
|
|
76
|
+
],
|
|
77
|
+
"properties": {
|
|
78
|
+
"profileId": {
|
|
79
|
+
"$ref": "#/$defs/Ulid",
|
|
80
|
+
"description": "A pool face, or a context-local one."
|
|
81
|
+
},
|
|
82
|
+
"contextId": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1,
|
|
85
|
+
"description": "The context a context-local face lives in. Omit for a pool face."
|
|
86
|
+
},
|
|
87
|
+
"expectedVersion": {
|
|
88
|
+
"$ref": "#/$defs/ExpectedVersion"
|
|
89
|
+
},
|
|
90
|
+
"ext": {
|
|
91
|
+
"$ref": "#/$defs/Ext"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"$defs": {
|
|
95
|
+
"Response": {
|
|
96
|
+
"$anchor": "response",
|
|
97
|
+
"title": "Persona Profile Retire — response payload",
|
|
98
|
+
"description": "Success response to persona/profile/retire. Type https://trusttasks.org/spec/persona/profile/retire/1.0#response. Retiring a face already retired is a success that changes nothing and takes no new version, so a repeated retire converges.",
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"required": [
|
|
102
|
+
"profileId",
|
|
103
|
+
"version",
|
|
104
|
+
"retiredAt"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"profileId": {
|
|
108
|
+
"$ref": "#/$defs/Ulid"
|
|
109
|
+
},
|
|
110
|
+
"version": {
|
|
111
|
+
"$ref": "#/$defs/Version"
|
|
112
|
+
},
|
|
113
|
+
"retiredAt": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"format": "date-time"
|
|
116
|
+
},
|
|
117
|
+
"unbound": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"maxItems": 256,
|
|
120
|
+
"description": "Where the face was worn and no longer is. Absent when it was worn nowhere.",
|
|
121
|
+
"items": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": [
|
|
125
|
+
"contextId",
|
|
126
|
+
"personaDid"
|
|
127
|
+
],
|
|
128
|
+
"properties": {
|
|
129
|
+
"contextId": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"minLength": 1
|
|
132
|
+
},
|
|
133
|
+
"personaDid": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"ext": {
|
|
141
|
+
"$ref": "#/$defs/Ext"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"Ext": {
|
|
146
|
+
"title": "Ext",
|
|
147
|
+
"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.",
|
|
148
|
+
"type": "object",
|
|
149
|
+
"minProperties": 1,
|
|
150
|
+
"additionalProperties": true,
|
|
151
|
+
"propertyNames": {
|
|
152
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"Version": {
|
|
156
|
+
"title": "Version",
|
|
157
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"minimum": 1
|
|
160
|
+
},
|
|
161
|
+
"Ulid": {
|
|
162
|
+
"title": "Ulid",
|
|
163
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
164
|
+
"type": "string",
|
|
165
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
166
|
+
},
|
|
167
|
+
"ExpectedVersion": {
|
|
168
|
+
"title": "ExpectedVersion",
|
|
169
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"minimum": 0
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
} as const;
|
|
175
|
+
|
|
176
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
177
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
178
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
179
|
+
"$ref": "#/$defs/Response",
|
|
180
|
+
"$defs": {
|
|
181
|
+
"Response": {
|
|
182
|
+
"$anchor": "response",
|
|
183
|
+
"title": "Persona Profile Retire — response payload",
|
|
184
|
+
"description": "Success response to persona/profile/retire. Type https://trusttasks.org/spec/persona/profile/retire/1.0#response. Retiring a face already retired is a success that changes nothing and takes no new version, so a repeated retire converges.",
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": [
|
|
188
|
+
"profileId",
|
|
189
|
+
"version",
|
|
190
|
+
"retiredAt"
|
|
191
|
+
],
|
|
192
|
+
"properties": {
|
|
193
|
+
"profileId": {
|
|
194
|
+
"$ref": "#/$defs/Ulid"
|
|
195
|
+
},
|
|
196
|
+
"version": {
|
|
197
|
+
"$ref": "#/$defs/Version"
|
|
198
|
+
},
|
|
199
|
+
"retiredAt": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"format": "date-time"
|
|
202
|
+
},
|
|
203
|
+
"unbound": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"maxItems": 256,
|
|
206
|
+
"description": "Where the face was worn and no longer is. Absent when it was worn nowhere.",
|
|
207
|
+
"items": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"additionalProperties": false,
|
|
210
|
+
"required": [
|
|
211
|
+
"contextId",
|
|
212
|
+
"personaDid"
|
|
213
|
+
],
|
|
214
|
+
"properties": {
|
|
215
|
+
"contextId": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"minLength": 1
|
|
218
|
+
},
|
|
219
|
+
"personaDid": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"minLength": 1
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"ext": {
|
|
227
|
+
"$ref": "#/$defs/Ext"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"Ext": {
|
|
232
|
+
"title": "Ext",
|
|
233
|
+
"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.",
|
|
234
|
+
"type": "object",
|
|
235
|
+
"minProperties": 1,
|
|
236
|
+
"additionalProperties": true,
|
|
237
|
+
"propertyNames": {
|
|
238
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"Version": {
|
|
242
|
+
"title": "Version",
|
|
243
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
244
|
+
"type": "integer",
|
|
245
|
+
"minimum": 1
|
|
246
|
+
},
|
|
247
|
+
"Ulid": {
|
|
248
|
+
"title": "Ulid",
|
|
249
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
250
|
+
"type": "string",
|
|
251
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
252
|
+
},
|
|
253
|
+
"ExpectedVersion": {
|
|
254
|
+
"title": "ExpectedVersion",
|
|
255
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
256
|
+
"type": "integer",
|
|
257
|
+
"minimum": 0
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
} as const;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
264
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
265
|
+
* per-specification and cannot be derived from the document alone, and
|
|
266
|
+
* item 2 needs the schema this carries.
|
|
267
|
+
*/
|
|
268
|
+
export const SPEC = {
|
|
269
|
+
typeUri: TYPE_URI,
|
|
270
|
+
isBearer: false,
|
|
271
|
+
isProofRequired: true,
|
|
272
|
+
isRecipientRequired: true,
|
|
273
|
+
isIssuedAtRequired: true,
|
|
274
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
275
|
+
} as const;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
279
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
280
|
+
* parties (§7.3 item 5).
|
|
281
|
+
*/
|
|
282
|
+
export const RESPONSE_SPEC = {
|
|
283
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
284
|
+
isBearer: false,
|
|
285
|
+
isProofRequired: true,
|
|
286
|
+
isRecipientRequired: true,
|
|
287
|
+
isIssuedAtRequired: true,
|
|
288
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
289
|
+
} as const;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The task-control request defined at SPEC.md §
|
|
7
|
+
* The task-control request defined at SPEC.md §11: a producer withdrawing, pausing, or resuming work a consumer has already accepted.
|
|
8
8
|
*
|
|
9
9
|
* This is a REQUEST, not a response. A consumer that stops work on its own initiative does not send one of these — it returns a trust-task-error carrying `cancelled`, so that a withdrawal and a refusal remain distinguishable to every party and to any auditor reading the retained documents afterwards.
|
|
10
10
|
*
|
|
@@ -14,13 +14,13 @@ export interface TrustTaskControlPayload {
|
|
|
14
14
|
/**
|
|
15
15
|
* The control operation requested.
|
|
16
16
|
*
|
|
17
|
-
* `cancel` stops the task permanently: it is terminal, and a cancelled task MUST NOT be resumed, retried, or cancelled again (SPEC.md §
|
|
17
|
+
* `cancel` stops the task permanently: it is terminal, and a cancelled task MUST NOT be resumed, retried, or cancelled again (SPEC.md §11.3). `suspend` halts further effects while preserving the consumer's current execution state — it does not undo work already performed. `resume` continues a suspended task from the state the consumer holds; a consumer MUST NOT resume after the target document's `expiresAt` (SPEC.md §11.5).
|
|
18
18
|
*
|
|
19
19
|
* This is a discriminating field. A consumer that does not recognize a value MUST reject the document rather than apply a default — silently downgrading an unrecognized operation to a known one would let a producer's intent be replaced by the consumer's guess.
|
|
20
20
|
*/
|
|
21
21
|
operation: "cancel" | "suspend" | "resume";
|
|
22
22
|
/**
|
|
23
|
-
* The specific Trust Task document this operation applies to. Per SPEC.md §
|
|
23
|
+
* The specific Trust Task document this operation applies to. Per SPEC.md §11.2, `threadId`, `parentThreadId` and ceremony membership MUST NOT identify the target on their own: more than one document can occur in a single exchange or enactment.
|
|
24
24
|
*/
|
|
25
25
|
target: {
|
|
26
26
|
/**
|
|
@@ -42,7 +42,7 @@ export interface TrustTaskControlPayload {
|
|
|
42
42
|
ext?: {};
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* What the consumer did. The `outcome` is the load-bearing member: it is what tells the producer whether a compensating action is required, since SPEC.md §
|
|
45
|
+
* What the consumer did. The `outcome` is the load-bearing member: it is what tells the producer whether a compensating action is required, since SPEC.md §11.4 declines to require rollback.
|
|
46
46
|
*/
|
|
47
47
|
export interface TrustTaskControlResponsePayload {
|
|
48
48
|
/**
|
|
@@ -59,7 +59,7 @@ export interface TrustTaskControlResponsePayload {
|
|
|
59
59
|
/**
|
|
60
60
|
* `applied` — the operation took effect and NO irreversible or externally visible effect had occurred. The only outcome that means the task left no trace.
|
|
61
61
|
*
|
|
62
|
-
* `appliedWithEffects` — the operation took effect, but effects had already occurred before it did. `effects` describes them. A consumer MUST NOT report `applied` in this case (SPEC.md §
|
|
62
|
+
* `appliedWithEffects` — the operation took effect, but effects had already occurred before it did. `effects` describes them. A consumer MUST NOT report `applied` in this case (SPEC.md §11.3).
|
|
63
63
|
*
|
|
64
64
|
* `alreadyCompleted` — the task finished before the control document was processed. Not a cancellation; whether to compensate is the producer's own decision.
|
|
65
65
|
*
|
|
@@ -114,7 +114,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
114
114
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
115
115
|
"$id": "https://trusttasks.org/spec/trust-task-control/0.1",
|
|
116
116
|
"title": "Trust Task Control — payload",
|
|
117
|
-
"description": "The task-control request defined at SPEC.md §
|
|
117
|
+
"description": "The task-control request defined at SPEC.md §11: a producer withdrawing, pausing, or resuming work a consumer has already accepted.\n\nThis is a REQUEST, not a response. A consumer that stops work on its own initiative does not send one of these — it returns a trust-task-error carrying `cancelled`, so that a withdrawal and a refusal remain distinguishable to every party and to any auditor reading the retained documents afterwards.\n\nThe operation takes effect through SPEC.md §7.2 item 12: a valid, authorized control operation is one of the conditions a consumer re-evaluates immediately before each irreversible or externally visible effect. There is no separate race protocol.",
|
|
118
118
|
"type": "object",
|
|
119
119
|
"additionalProperties": false,
|
|
120
120
|
"required": [
|
|
@@ -128,7 +128,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
128
128
|
"suspend",
|
|
129
129
|
"resume"
|
|
130
130
|
],
|
|
131
|
-
"description": "The control operation requested.\n\n`cancel` stops the task permanently: it is terminal, and a cancelled task MUST NOT be resumed, retried, or cancelled again (SPEC.md §
|
|
131
|
+
"description": "The control operation requested.\n\n`cancel` stops the task permanently: it is terminal, and a cancelled task MUST NOT be resumed, retried, or cancelled again (SPEC.md §11.3). `suspend` halts further effects while preserving the consumer's current execution state — it does not undo work already performed. `resume` continues a suspended task from the state the consumer holds; a consumer MUST NOT resume after the target document's `expiresAt` (SPEC.md §11.5).\n\nThis is a discriminating field. A consumer that does not recognize a value MUST reject the document rather than apply a default — silently downgrading an unrecognized operation to a known one would let a producer's intent be replaced by the consumer's guess."
|
|
132
132
|
},
|
|
133
133
|
"target": {
|
|
134
134
|
"type": "object",
|
|
@@ -136,7 +136,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
136
136
|
"required": [
|
|
137
137
|
"id"
|
|
138
138
|
],
|
|
139
|
-
"description": "The specific Trust Task document this operation applies to. Per SPEC.md §
|
|
139
|
+
"description": "The specific Trust Task document this operation applies to. Per SPEC.md §11.2, `threadId`, `parentThreadId` and ceremony membership MUST NOT identify the target on their own: more than one document can occur in a single exchange or enactment.",
|
|
140
140
|
"properties": {
|
|
141
141
|
"id": {
|
|
142
142
|
"type": "string",
|
|
@@ -165,7 +165,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
165
165
|
"Response": {
|
|
166
166
|
"$anchor": "response",
|
|
167
167
|
"title": "Trust Task Control — response payload",
|
|
168
|
-
"description": "What the consumer did. The `outcome` is the load-bearing member: it is what tells the producer whether a compensating action is required, since SPEC.md §
|
|
168
|
+
"description": "What the consumer did. The `outcome` is the load-bearing member: it is what tells the producer whether a compensating action is required, since SPEC.md §11.4 declines to require rollback.",
|
|
169
169
|
"type": "object",
|
|
170
170
|
"additionalProperties": false,
|
|
171
171
|
"required": [
|
|
@@ -208,7 +208,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
208
208
|
"alreadyCompleted",
|
|
209
209
|
"unknownTask"
|
|
210
210
|
],
|
|
211
|
-
"description": "`applied` — the operation took effect and NO irreversible or externally visible effect had occurred. The only outcome that means the task left no trace.\n\n`appliedWithEffects` — the operation took effect, but effects had already occurred before it did. `effects` describes them. A consumer MUST NOT report `applied` in this case (SPEC.md §
|
|
211
|
+
"description": "`applied` — the operation took effect and NO irreversible or externally visible effect had occurred. The only outcome that means the task left no trace.\n\n`appliedWithEffects` — the operation took effect, but effects had already occurred before it did. `effects` describes them. A consumer MUST NOT report `applied` in this case (SPEC.md §11.3).\n\n`alreadyCompleted` — the task finished before the control document was processed. Not a cancellation; whether to compensate is the producer's own decision.\n\n`unknownTask` — the consumer holds no record of the target `id`, either because it never received it or because its acceptance window has lapsed. A consumer that records the operation as a tombstone against a not-yet-arrived document reports `applied`, not this."
|
|
212
212
|
},
|
|
213
213
|
"effects": {
|
|
214
214
|
"type": "array",
|
|
@@ -254,7 +254,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
254
254
|
"Response": {
|
|
255
255
|
"$anchor": "response",
|
|
256
256
|
"title": "Trust Task Control — response payload",
|
|
257
|
-
"description": "What the consumer did. The `outcome` is the load-bearing member: it is what tells the producer whether a compensating action is required, since SPEC.md §
|
|
257
|
+
"description": "What the consumer did. The `outcome` is the load-bearing member: it is what tells the producer whether a compensating action is required, since SPEC.md §11.4 declines to require rollback.",
|
|
258
258
|
"type": "object",
|
|
259
259
|
"additionalProperties": false,
|
|
260
260
|
"required": [
|
|
@@ -297,7 +297,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
297
297
|
"alreadyCompleted",
|
|
298
298
|
"unknownTask"
|
|
299
299
|
],
|
|
300
|
-
"description": "`applied` — the operation took effect and NO irreversible or externally visible effect had occurred. The only outcome that means the task left no trace.\n\n`appliedWithEffects` — the operation took effect, but effects had already occurred before it did. `effects` describes them. A consumer MUST NOT report `applied` in this case (SPEC.md §
|
|
300
|
+
"description": "`applied` — the operation took effect and NO irreversible or externally visible effect had occurred. The only outcome that means the task left no trace.\n\n`appliedWithEffects` — the operation took effect, but effects had already occurred before it did. `effects` describes them. A consumer MUST NOT report `applied` in this case (SPEC.md §11.3).\n\n`alreadyCompleted` — the task finished before the control document was processed. Not a cancellation; whether to compensate is the producer's own decision.\n\n`unknownTask` — the consumer holds no record of the target `id`, either because it never received it or because its acceptance window has lapsed. A consumer that records the operation as a tombstone against a not-yet-arrived document reports `applied`, not this."
|
|
301
301
|
},
|
|
302
302
|
"effects": {
|
|
303
303
|
"type": "array",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export interface TrustTaskDiscoveryPayload {
|
|
10
10
|
/**
|
|
11
|
-
* Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §
|
|
11
|
+
* Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §12.2), not as a capability limit: matching an unbounded pattern list against every published slug is work a responder does on an unauthenticated request, and a discoverer wanting more asks for '*' and filters locally.
|
|
12
12
|
*
|
|
13
13
|
* @maxItems 16
|
|
14
14
|
*/
|
|
@@ -129,7 +129,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
129
129
|
"minLength": 1,
|
|
130
130
|
"description": "Slug-glob pattern. Matches: '*' (every slug); '<prefix>/*' (any slug starting with '<prefix>/' — e.g. 'acl/*' matches 'acl/grant', 'acl/revoke', 'acl/grant/sub'); otherwise an exact slug match. Wildcards anywhere other than as a trailing segment are not interpreted — the only sigils are the trailing '/*' and the bare '*'."
|
|
131
131
|
},
|
|
132
|
-
"description": "Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §
|
|
132
|
+
"description": "Patterns are ORed: a slug matches the query if at least one pattern matches it. If the array is omitted or empty, the responder MUST treat the query as ['*'] — return every supported task. Bounded at 16 entries as parser hardening (SPEC.md §12.2), not as a capability limit: matching an unbounded pattern list against every published slug is work a responder does on an unauthenticated request, and a discoverer wanting more asks for '*' and filters locally."
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
"$defs": {
|