@openvtc/trust-tasks 0.19.17 → 0.19.19
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 +46 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
- package/dist/persona/attribute/list/1.0/payload.d.ts +124 -4
- package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/attribute/list/1.0/payload.js +72 -2
- package/dist/persona/attribute/list/1.0/payload.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/attribute/put/1.0/payload.d.ts +110 -4
- package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/attribute/put/1.0/payload.js +62 -2
- package/dist/persona/attribute/put/1.0/payload.js.map +1 -1
- 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/contact/get/1.0/payload.d.ts +84 -4
- package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/contact/get/1.0/payload.js +52 -2
- package/dist/persona/contact/get/1.0/payload.js.map +1 -1
- package/dist/persona/contact/put/1.0/payload.d.ts +84 -4
- package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/contact/put/1.0/payload.js +52 -2
- package/dist/persona/contact/put/1.0/payload.js.map +1 -1
- package/dist/persona/disclosure/preview/1.0/payload.d.ts +5 -5
- package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -1
- package/dist/persona/disclosure/preview/1.0/payload.js +4 -2
- package/dist/persona/disclosure/preview/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 +965 -0
- package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/compose/1.0/payload.js +531 -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 +345 -6
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/get/1.0/payload.js +206 -2
- package/dist/persona/profile/get/1.0/payload.js.map +1 -1
- package/dist/persona/profile/list/1.0/payload.d.ts +288 -6
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/list/1.0/payload.js +173 -2
- package/dist/persona/profile/list/1.0/payload.js.map +1 -1
- package/dist/persona/profile/put/1.0/payload.d.ts +230 -6
- package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/put/1.0/payload.js +138 -2
- package/dist/persona/profile/put/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/persona/profile/timeline/1.0/payload.d.ts +588 -0
- package/dist/persona/profile/timeline/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/timeline/1.0/payload.js +322 -0
- package/dist/persona/profile/timeline/1.0/payload.js.map +1 -0
- package/dist/persona/profile/usage/1.0/payload.d.ts +533 -0
- package/dist/persona/profile/usage/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/usage/1.0/payload.js +302 -0
- package/dist/persona/profile/usage/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/dist/vtc/invitations/deliver/0.1/payload.d.ts +318 -0
- package/dist/vtc/invitations/deliver/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/invitations/deliver/0.1/payload.js +183 -0
- package/dist/vtc/invitations/deliver/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_runtime/consume.ts +2 -2
- package/src/_shared/components.ts +49 -0
- package/src/index.ts +8 -0
- package/src/persona/_shared/0.1/persona-record.ts +1 -1
- package/src/persona/attribute/list/1.0/payload.ts +72 -2
- package/src/persona/attribute/promote/1.0/payload.ts +344 -0
- package/src/persona/attribute/put/1.0/payload.ts +68 -2
- 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/contact/get/1.0/payload.ts +52 -2
- package/src/persona/contact/put/1.0/payload.ts +52 -2
- package/src/persona/disclosure/preview/1.0/payload.ts +5 -3
- package/src/persona/local/binding/set/1.0/payload.ts +9 -0
- package/src/persona/profile/compose/1.0/payload.ts +650 -0
- package/src/persona/profile/delete/1.0/payload.ts +45 -0
- package/src/persona/profile/get/1.0/payload.ts +215 -4
- package/src/persona/profile/list/1.0/payload.ts +179 -4
- package/src/persona/profile/put/1.0/payload.ts +144 -4
- package/src/persona/profile/reinstate/1.0/payload.ts +219 -0
- package/src/persona/profile/retire/1.0/payload.ts +289 -0
- package/src/persona/profile/timeline/1.0/payload.ts +402 -0
- package/src/persona/profile/usage/1.0/payload.ts +354 -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
- package/src/vtc/invitations/deliver/0.1/payload.ts +234 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/profile/usage/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/profile/usage/1.0";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/profile/usage/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/persona/profile/usage/1.0",
|
|
21
|
+
"title": "Persona Profile Usage — payload",
|
|
22
|
+
"description": "Where one face is worn now: every context and persona wearing it. The answer a holder needs to audit a face's reach, and to see the contexts a face is part of before changing or retiring it.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"profileId"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"profileId": {
|
|
30
|
+
"$ref": "#/$defs/Ulid"
|
|
31
|
+
},
|
|
32
|
+
"contextId": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"description": "The context of a context-local face. Omit for a pool face."
|
|
36
|
+
},
|
|
37
|
+
"ext": {
|
|
38
|
+
"$ref": "#/$defs/Ext"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"$defs": {
|
|
42
|
+
"Response": {
|
|
43
|
+
"$anchor": "response",
|
|
44
|
+
"title": "Persona Profile Usage — response payload",
|
|
45
|
+
"description": "Success response to persona/profile/usage. Type https://trusttasks.org/spec/persona/profile/usage/1.0#response. An empty `usage` is a face worn nowhere — a normal state, not an error.",
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": [
|
|
49
|
+
"profileId",
|
|
50
|
+
"usage"
|
|
51
|
+
],
|
|
52
|
+
"properties": {
|
|
53
|
+
"profileId": {
|
|
54
|
+
"$ref": "#/$defs/Ulid"
|
|
55
|
+
},
|
|
56
|
+
"reach": {
|
|
57
|
+
"$ref": "#/$defs/FaceReach",
|
|
58
|
+
"description": "The face's reach, so the answer and the allow-list it is audited against arrive together. Absent for a context-local face."
|
|
59
|
+
},
|
|
60
|
+
"usage": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"maxItems": 1024,
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": [
|
|
67
|
+
"contextId",
|
|
68
|
+
"personaDid",
|
|
69
|
+
"boundAt"
|
|
70
|
+
],
|
|
71
|
+
"properties": {
|
|
72
|
+
"contextId": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1
|
|
75
|
+
},
|
|
76
|
+
"personaDid": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"minLength": 1
|
|
79
|
+
},
|
|
80
|
+
"boundAt": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"format": "date-time"
|
|
83
|
+
},
|
|
84
|
+
"until": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"format": "date-time",
|
|
87
|
+
"description": "When wearing it here ends on its own. Absent when it lasts until changed."
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"ext": {
|
|
93
|
+
"$ref": "#/$defs/Ext"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"Ext": {
|
|
98
|
+
"title": "Ext",
|
|
99
|
+
"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.",
|
|
100
|
+
"type": "object",
|
|
101
|
+
"minProperties": 1,
|
|
102
|
+
"additionalProperties": true,
|
|
103
|
+
"propertyNames": {
|
|
104
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"FaceReach": {
|
|
108
|
+
"title": "FaceReach",
|
|
109
|
+
"description": "Where a pool face may be worn. `anywhere` is the default and what an absent member means. `only` names the contexts it may be worn in, and a maintainer MUST refuse to wear it in any other (persona/binding/set `outsideReach`).\n\nA tagged object rather than a bare list of contexts, deliberately: an empty list has been read as both 'unrestricted' and 'nowhere' in this family's neighbours, and a shape where the two cannot be confused is worth more than one where they must be remembered. So `only` requires at least one context, and 'nowhere' is not a reach — it is a retired face.\n\nA context-local face has no reach: it lives in its context and is worn there by construction.",
|
|
110
|
+
"oneOf": [
|
|
111
|
+
{
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": [
|
|
115
|
+
"kind"
|
|
116
|
+
],
|
|
117
|
+
"properties": {
|
|
118
|
+
"kind": {
|
|
119
|
+
"const": "anywhere"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": [
|
|
127
|
+
"kind",
|
|
128
|
+
"contextIds"
|
|
129
|
+
],
|
|
130
|
+
"properties": {
|
|
131
|
+
"kind": {
|
|
132
|
+
"const": "only"
|
|
133
|
+
},
|
|
134
|
+
"contextIds": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"minItems": 1,
|
|
137
|
+
"maxItems": 256,
|
|
138
|
+
"uniqueItems": true,
|
|
139
|
+
"items": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 1
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"Ulid": {
|
|
149
|
+
"title": "Ulid",
|
|
150
|
+
"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.",
|
|
151
|
+
"type": "string",
|
|
152
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
157
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
158
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
159
|
+
"$ref": "#/$defs/Response",
|
|
160
|
+
"$defs": {
|
|
161
|
+
"Response": {
|
|
162
|
+
"$anchor": "response",
|
|
163
|
+
"title": "Persona Profile Usage — response payload",
|
|
164
|
+
"description": "Success response to persona/profile/usage. Type https://trusttasks.org/spec/persona/profile/usage/1.0#response. An empty `usage` is a face worn nowhere — a normal state, not an error.",
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": [
|
|
168
|
+
"profileId",
|
|
169
|
+
"usage"
|
|
170
|
+
],
|
|
171
|
+
"properties": {
|
|
172
|
+
"profileId": {
|
|
173
|
+
"$ref": "#/$defs/Ulid"
|
|
174
|
+
},
|
|
175
|
+
"reach": {
|
|
176
|
+
"$ref": "#/$defs/FaceReach",
|
|
177
|
+
"description": "The face's reach, so the answer and the allow-list it is audited against arrive together. Absent for a context-local face."
|
|
178
|
+
},
|
|
179
|
+
"usage": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"maxItems": 1024,
|
|
182
|
+
"items": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"additionalProperties": false,
|
|
185
|
+
"required": [
|
|
186
|
+
"contextId",
|
|
187
|
+
"personaDid",
|
|
188
|
+
"boundAt"
|
|
189
|
+
],
|
|
190
|
+
"properties": {
|
|
191
|
+
"contextId": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"minLength": 1
|
|
194
|
+
},
|
|
195
|
+
"personaDid": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"minLength": 1
|
|
198
|
+
},
|
|
199
|
+
"boundAt": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"format": "date-time"
|
|
202
|
+
},
|
|
203
|
+
"until": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"format": "date-time",
|
|
206
|
+
"description": "When wearing it here ends on its own. Absent when it lasts until changed."
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"ext": {
|
|
212
|
+
"$ref": "#/$defs/Ext"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"Ext": {
|
|
217
|
+
"title": "Ext",
|
|
218
|
+
"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.",
|
|
219
|
+
"type": "object",
|
|
220
|
+
"minProperties": 1,
|
|
221
|
+
"additionalProperties": true,
|
|
222
|
+
"propertyNames": {
|
|
223
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"FaceReach": {
|
|
227
|
+
"title": "FaceReach",
|
|
228
|
+
"description": "Where a pool face may be worn. `anywhere` is the default and what an absent member means. `only` names the contexts it may be worn in, and a maintainer MUST refuse to wear it in any other (persona/binding/set `outsideReach`).\n\nA tagged object rather than a bare list of contexts, deliberately: an empty list has been read as both 'unrestricted' and 'nowhere' in this family's neighbours, and a shape where the two cannot be confused is worth more than one where they must be remembered. So `only` requires at least one context, and 'nowhere' is not a reach — it is a retired face.\n\nA context-local face has no reach: it lives in its context and is worn there by construction.",
|
|
229
|
+
"oneOf": [
|
|
230
|
+
{
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": [
|
|
234
|
+
"kind"
|
|
235
|
+
],
|
|
236
|
+
"properties": {
|
|
237
|
+
"kind": {
|
|
238
|
+
"const": "anywhere"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"required": [
|
|
246
|
+
"kind",
|
|
247
|
+
"contextIds"
|
|
248
|
+
],
|
|
249
|
+
"properties": {
|
|
250
|
+
"kind": {
|
|
251
|
+
"const": "only"
|
|
252
|
+
},
|
|
253
|
+
"contextIds": {
|
|
254
|
+
"type": "array",
|
|
255
|
+
"minItems": 1,
|
|
256
|
+
"maxItems": 256,
|
|
257
|
+
"uniqueItems": true,
|
|
258
|
+
"items": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"minLength": 1
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
"Ulid": {
|
|
268
|
+
"title": "Ulid",
|
|
269
|
+
"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.",
|
|
270
|
+
"type": "string",
|
|
271
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
277
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
278
|
+
* per-specification and cannot be derived from the document alone, and
|
|
279
|
+
* item 2 needs the schema this carries.
|
|
280
|
+
*/
|
|
281
|
+
export const SPEC = {
|
|
282
|
+
typeUri: TYPE_URI,
|
|
283
|
+
isBearer: false,
|
|
284
|
+
isProofRequired: false,
|
|
285
|
+
isRecipientRequired: true,
|
|
286
|
+
isIssuedAtRequired: false,
|
|
287
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
291
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
292
|
+
* parties (§7.3 item 5).
|
|
293
|
+
*/
|
|
294
|
+
export const RESPONSE_SPEC = {
|
|
295
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
296
|
+
isBearer: false,
|
|
297
|
+
isProofRequired: false,
|
|
298
|
+
isRecipientRequired: true,
|
|
299
|
+
isIssuedAtRequired: false,
|
|
300
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
301
|
+
};
|
|
302
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/persona/profile/usage/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,uDAAgE,CAAC;AAKzF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,gEAAyE,CAAC;AAK3G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,uDAAuD;IAC9D,OAAO,EAAE,iCAAiC;IAC1C,aAAa,EAAE,gMAAgM;IAC/M,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,WAAW;KACZ;IACD,YAAY,EAAE;QACZ,WAAW,EAAE;YACX,MAAM,EAAE,cAAc;SACvB;QACD,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ;YAChB,WAAW,EAA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KAAK;oBAC7B,UAAU,EAAE;wBACV,MAAM;wBACN,YAAY;qBACb;oBACD,YAAY,EAAE;wBACZ,MAAM,EAAE;4BACN,OAAO,EAAE,MAAM;yBAChB;wBACD,YAAY,EAAE;4BACZ,MAAM,EAAE,OAAO;4BACf,UAAU,EAAE,CAAC;4BACb,UAAU,EAAE,GAAG;4BACf,aAAa,EAAE,IAAI;4BACnB,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,WAAW,EAAE,CAAC;6BACf;yBACF;qBACF;iBACF;aACF;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,waAAwa;YACvb,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,0BAA0B;SACtC;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,KAAK;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,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,KAAK;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/trust-task-control/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The task-control request defined at SPEC.md §
|
|
6
|
+
* The task-control request defined at SPEC.md §11: a producer withdrawing, pausing, or resuming work a consumer has already accepted.
|
|
7
7
|
*
|
|
8
8
|
* 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.
|
|
9
9
|
*
|
|
@@ -13,13 +13,13 @@ export interface TrustTaskControlPayload {
|
|
|
13
13
|
/**
|
|
14
14
|
* The control operation requested.
|
|
15
15
|
*
|
|
16
|
-
* `cancel` stops the task permanently: it is terminal, and a cancelled task MUST NOT be resumed, retried, or cancelled again (SPEC.md §
|
|
16
|
+
* `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).
|
|
17
17
|
*
|
|
18
18
|
* 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.
|
|
19
19
|
*/
|
|
20
20
|
operation: "cancel" | "suspend" | "resume";
|
|
21
21
|
/**
|
|
22
|
-
* The specific Trust Task document this operation applies to. Per SPEC.md §
|
|
22
|
+
* 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.
|
|
23
23
|
*/
|
|
24
24
|
target: {
|
|
25
25
|
/**
|
|
@@ -41,7 +41,7 @@ export interface TrustTaskControlPayload {
|
|
|
41
41
|
ext?: {};
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* 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 §
|
|
44
|
+
* 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.
|
|
45
45
|
*/
|
|
46
46
|
export interface TrustTaskControlResponsePayload {
|
|
47
47
|
/**
|
|
@@ -58,7 +58,7 @@ export interface TrustTaskControlResponsePayload {
|
|
|
58
58
|
/**
|
|
59
59
|
* `applied` — the operation took effect and NO irreversible or externally visible effect had occurred. The only outcome that means the task left no trace.
|
|
60
60
|
*
|
|
61
|
-
* `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 §
|
|
61
|
+
* `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).
|
|
62
62
|
*
|
|
63
63
|
* `alreadyCompleted` — the task finished before the control document was processed. Not a cancellation; whether to compensate is the producer's own decision.
|
|
64
64
|
*
|
|
@@ -108,20 +108,20 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
108
108
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
109
109
|
readonly $id: "https://trusttasks.org/spec/trust-task-control/0.1";
|
|
110
110
|
readonly title: "Trust Task Control — payload";
|
|
111
|
-
readonly description: "The task-control request defined at SPEC.md §
|
|
111
|
+
readonly 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.";
|
|
112
112
|
readonly type: "object";
|
|
113
113
|
readonly additionalProperties: false;
|
|
114
114
|
readonly required: readonly ["operation", "target"];
|
|
115
115
|
readonly properties: {
|
|
116
116
|
readonly operation: {
|
|
117
117
|
readonly enum: readonly ["cancel", "suspend", "resume"];
|
|
118
|
-
readonly 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 §
|
|
118
|
+
readonly 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.";
|
|
119
119
|
};
|
|
120
120
|
readonly target: {
|
|
121
121
|
readonly type: "object";
|
|
122
122
|
readonly additionalProperties: false;
|
|
123
123
|
readonly required: readonly ["id"];
|
|
124
|
-
readonly description: "The specific Trust Task document this operation applies to. Per SPEC.md §
|
|
124
|
+
readonly 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.";
|
|
125
125
|
readonly properties: {
|
|
126
126
|
readonly id: {
|
|
127
127
|
readonly type: "string";
|
|
@@ -150,7 +150,7 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
150
150
|
readonly Response: {
|
|
151
151
|
readonly $anchor: "response";
|
|
152
152
|
readonly title: "Trust Task Control — response payload";
|
|
153
|
-
readonly 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 §
|
|
153
|
+
readonly 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.";
|
|
154
154
|
readonly type: "object";
|
|
155
155
|
readonly additionalProperties: false;
|
|
156
156
|
readonly required: readonly ["operation", "target", "outcome"];
|
|
@@ -178,7 +178,7 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
178
178
|
};
|
|
179
179
|
readonly outcome: {
|
|
180
180
|
readonly enum: readonly ["applied", "appliedWithEffects", "alreadyCompleted", "unknownTask"];
|
|
181
|
-
readonly 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 §
|
|
181
|
+
readonly 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.";
|
|
182
182
|
};
|
|
183
183
|
readonly effects: {
|
|
184
184
|
readonly type: "array";
|
|
@@ -221,7 +221,7 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
221
221
|
readonly Response: {
|
|
222
222
|
readonly $anchor: "response";
|
|
223
223
|
readonly title: "Trust Task Control — response payload";
|
|
224
|
-
readonly 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 §
|
|
224
|
+
readonly 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.";
|
|
225
225
|
readonly type: "object";
|
|
226
226
|
readonly additionalProperties: false;
|
|
227
227
|
readonly required: readonly ["operation", "target", "outcome"];
|
|
@@ -249,7 +249,7 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
249
249
|
};
|
|
250
250
|
readonly outcome: {
|
|
251
251
|
readonly enum: readonly ["applied", "appliedWithEffects", "alreadyCompleted", "unknownTask"];
|
|
252
|
-
readonly 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 §
|
|
252
|
+
readonly 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.";
|
|
253
253
|
};
|
|
254
254
|
readonly effects: {
|
|
255
255
|
readonly type: "array";
|
|
@@ -300,20 +300,20 @@ export declare const SPEC: {
|
|
|
300
300
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
301
301
|
readonly $id: "https://trusttasks.org/spec/trust-task-control/0.1";
|
|
302
302
|
readonly title: "Trust Task Control — payload";
|
|
303
|
-
readonly description: "The task-control request defined at SPEC.md §
|
|
303
|
+
readonly 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.";
|
|
304
304
|
readonly type: "object";
|
|
305
305
|
readonly additionalProperties: false;
|
|
306
306
|
readonly required: readonly ["operation", "target"];
|
|
307
307
|
readonly properties: {
|
|
308
308
|
readonly operation: {
|
|
309
309
|
readonly enum: readonly ["cancel", "suspend", "resume"];
|
|
310
|
-
readonly 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 §
|
|
310
|
+
readonly 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.";
|
|
311
311
|
};
|
|
312
312
|
readonly target: {
|
|
313
313
|
readonly type: "object";
|
|
314
314
|
readonly additionalProperties: false;
|
|
315
315
|
readonly required: readonly ["id"];
|
|
316
|
-
readonly description: "The specific Trust Task document this operation applies to. Per SPEC.md §
|
|
316
|
+
readonly 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.";
|
|
317
317
|
readonly properties: {
|
|
318
318
|
readonly id: {
|
|
319
319
|
readonly type: "string";
|
|
@@ -342,7 +342,7 @@ export declare const SPEC: {
|
|
|
342
342
|
readonly Response: {
|
|
343
343
|
readonly $anchor: "response";
|
|
344
344
|
readonly title: "Trust Task Control — response payload";
|
|
345
|
-
readonly 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 §
|
|
345
|
+
readonly 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.";
|
|
346
346
|
readonly type: "object";
|
|
347
347
|
readonly additionalProperties: false;
|
|
348
348
|
readonly required: readonly ["operation", "target", "outcome"];
|
|
@@ -370,7 +370,7 @@ export declare const SPEC: {
|
|
|
370
370
|
};
|
|
371
371
|
readonly outcome: {
|
|
372
372
|
readonly enum: readonly ["applied", "appliedWithEffects", "alreadyCompleted", "unknownTask"];
|
|
373
|
-
readonly 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 §
|
|
373
|
+
readonly 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.";
|
|
374
374
|
};
|
|
375
375
|
readonly effects: {
|
|
376
376
|
readonly type: "array";
|
|
@@ -424,7 +424,7 @@ export declare const RESPONSE_SPEC: {
|
|
|
424
424
|
readonly Response: {
|
|
425
425
|
readonly $anchor: "response";
|
|
426
426
|
readonly title: "Trust Task Control — response payload";
|
|
427
|
-
readonly 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 §
|
|
427
|
+
readonly 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.";
|
|
428
428
|
readonly type: "object";
|
|
429
429
|
readonly additionalProperties: false;
|
|
430
430
|
readonly required: readonly ["operation", "target", "outcome"];
|
|
@@ -452,7 +452,7 @@ export declare const RESPONSE_SPEC: {
|
|
|
452
452
|
};
|
|
453
453
|
readonly outcome: {
|
|
454
454
|
readonly enum: readonly ["applied", "appliedWithEffects", "alreadyCompleted", "unknownTask"];
|
|
455
|
-
readonly 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 §
|
|
455
|
+
readonly 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.";
|
|
456
456
|
};
|
|
457
457
|
readonly effects: {
|
|
458
458
|
readonly type: "array";
|
|
@@ -19,7 +19,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
19
19
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
20
|
"$id": "https://trusttasks.org/spec/trust-task-control/0.1",
|
|
21
21
|
"title": "Trust Task Control — payload",
|
|
22
|
-
"description": "The task-control request defined at SPEC.md §
|
|
22
|
+
"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.",
|
|
23
23
|
"type": "object",
|
|
24
24
|
"additionalProperties": false,
|
|
25
25
|
"required": [
|
|
@@ -33,7 +33,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
33
33
|
"suspend",
|
|
34
34
|
"resume"
|
|
35
35
|
],
|
|
36
|
-
"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 §
|
|
36
|
+
"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."
|
|
37
37
|
},
|
|
38
38
|
"target": {
|
|
39
39
|
"type": "object",
|
|
@@ -41,7 +41,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
41
41
|
"required": [
|
|
42
42
|
"id"
|
|
43
43
|
],
|
|
44
|
-
"description": "The specific Trust Task document this operation applies to. Per SPEC.md §
|
|
44
|
+
"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.",
|
|
45
45
|
"properties": {
|
|
46
46
|
"id": {
|
|
47
47
|
"type": "string",
|
|
@@ -70,7 +70,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
70
70
|
"Response": {
|
|
71
71
|
"$anchor": "response",
|
|
72
72
|
"title": "Trust Task Control — response payload",
|
|
73
|
-
"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 §
|
|
73
|
+
"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.",
|
|
74
74
|
"type": "object",
|
|
75
75
|
"additionalProperties": false,
|
|
76
76
|
"required": [
|
|
@@ -113,7 +113,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
113
113
|
"alreadyCompleted",
|
|
114
114
|
"unknownTask"
|
|
115
115
|
],
|
|
116
|
-
"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 §
|
|
116
|
+
"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."
|
|
117
117
|
},
|
|
118
118
|
"effects": {
|
|
119
119
|
"type": "array",
|
|
@@ -158,7 +158,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
158
158
|
"Response": {
|
|
159
159
|
"$anchor": "response",
|
|
160
160
|
"title": "Trust Task Control — response payload",
|
|
161
|
-
"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 §
|
|
161
|
+
"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.",
|
|
162
162
|
"type": "object",
|
|
163
163
|
"additionalProperties": false,
|
|
164
164
|
"required": [
|
|
@@ -201,7 +201,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
201
201
|
"alreadyCompleted",
|
|
202
202
|
"unknownTask"
|
|
203
203
|
],
|
|
204
|
-
"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 §
|
|
204
|
+
"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."
|
|
205
205
|
},
|
|
206
206
|
"effects": {
|
|
207
207
|
"type": "array",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export interface TrustTaskDiscoveryPayload {
|
|
9
9
|
/**
|
|
10
|
-
* 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 §
|
|
10
|
+
* 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.
|
|
11
11
|
*
|
|
12
12
|
* @maxItems 16
|
|
13
13
|
*/
|
|
@@ -103,7 +103,7 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
103
103
|
readonly minLength: 1;
|
|
104
104
|
readonly 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 '*'.";
|
|
105
105
|
};
|
|
106
|
-
readonly 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 §
|
|
106
|
+
readonly 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.";
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
readonly $defs: {
|
|
@@ -242,7 +242,7 @@ export declare const SPEC: {
|
|
|
242
242
|
readonly minLength: 1;
|
|
243
243
|
readonly 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 '*'.";
|
|
244
244
|
};
|
|
245
|
-
readonly 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 §
|
|
245
|
+
readonly 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.";
|
|
246
246
|
};
|
|
247
247
|
};
|
|
248
248
|
readonly $defs: {
|
|
@@ -31,7 +31,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
31
31
|
"minLength": 1,
|
|
32
32
|
"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 '*'."
|
|
33
33
|
},
|
|
34
|
-
"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 §
|
|
34
|
+
"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."
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"$defs": {
|