@openvtc/trust-tasks 0.16.7 → 0.16.9
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 +144 -0
- package/dist/_shared/components.d.ts +2 -2
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +6 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +6 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +6 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +6 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
- package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/commit/0.1/payload.js +146 -0
- package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
- package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts +323 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.js +171 -0
- package/dist/rooms/keys/open/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts +306 -0
- package/dist/rooms/keys/present/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/present/0.1/payload.js +165 -0
- package/dist/rooms/keys/present/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
- package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.js +277 -0
- package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/abort/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/abort/1.0/payload.js +146 -0
- package/dist/vta/backup/abort/1.0/payload.js.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts +262 -0
- package/dist/vta/backup/complete-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/complete-export/1.0/payload.js +146 -0
- package/dist/vta/backup/complete-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts +477 -0
- package/dist/vta/backup/finalize-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js +249 -0
- package/dist/vta/backup/finalize-import/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts +514 -0
- package/dist/vta/backup/initiate-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js +267 -0
- package/dist/vta/backup/initiate-export/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts +510 -0
- package/dist/vta/backup/initiate-import/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js +266 -0
- package/dist/vta/backup/initiate-import/1.0/payload.js.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts +230 -0
- package/dist/vta/management/reload-services/1.0/payload.d.ts.map +1 -0
- package/dist/vta/management/reload-services/1.0/payload.js +130 -0
- package/dist/vta/management/reload-services/1.0/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +6 -2
- package/src/device/list/0.1/payload.ts +6 -2
- package/src/device/list/0.2/payload.ts +6 -2
- package/src/device/register/0.1/payload.ts +6 -2
- package/src/device/register/0.2/payload.ts +6 -2
- package/src/index.ts +12 -0
- package/src/rooms/keys/commit/0.1/payload.ts +195 -0
- package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
- package/src/rooms/keys/open/0.1/payload.ts +237 -0
- package/src/rooms/keys/present/0.1/payload.ts +224 -0
- package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
- package/src/rooms/records/curate/0.1/payload.ts +357 -0
- package/src/vta/backup/abort/1.0/payload.ts +191 -0
- package/src/vta/backup/complete-export/1.0/payload.ts +191 -0
- package/src/vta/backup/finalize-import/1.0/payload.ts +333 -0
- package/src/vta/backup/initiate-export/1.0/payload.ts +350 -0
- package/src/vta/backup/initiate-import/1.0/payload.ts +349 -0
- package/src/vta/management/reload-services/1.0/payload.ts +167 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/records/curate/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { AuthorityPresentation, Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A member curates a record: demotes it, retracts it, restores it from demotion, or pins it. Distinct from `rooms/records/put`, which replaces content — curation changes a record's standing in the room without a member having to rewrite it, and `curate` is a separate authority action so a community can grant one without the other.
|
|
11
|
+
*/
|
|
12
|
+
export type RoomsRecordsCuratePayload = {
|
|
13
|
+
[k: string]: unknown | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
/**
|
|
16
|
+
* The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own.
|
|
17
|
+
*/
|
|
18
|
+
roomId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The record to curate.
|
|
21
|
+
*/
|
|
22
|
+
key: string;
|
|
23
|
+
/**
|
|
24
|
+
* Must confer the `curate` action at this room's scope. Deliberately not implied by `write`: curation is judgement over what a room's shared knowledge is worth, which is a different grant from the ability to add to it.
|
|
25
|
+
*/
|
|
26
|
+
presentation: AuthorityPresentation;
|
|
27
|
+
/**
|
|
28
|
+
* The standing to move the record to. `deprecated` demotes it — the body is retained and a recalling agent MUST treat it as demoted rather than hidden. `retracted` is a tombstone: the body is dropped and the key, version and epoch remain so incremental sync converges. `active` restores a `deprecated` record; it MUST NOT be accepted for a `retracted` one, whose body is already gone and cannot be restored by a status change.
|
|
29
|
+
*/
|
|
30
|
+
status?: "active" | "deprecated" | "retracted";
|
|
31
|
+
/**
|
|
32
|
+
* Whether the record is pinned. Orthogonal to `status` — a pinned record is still active, deprecated or retracted — because pinning answers 'what matters here' and status answers 'is this still current'. Omit to leave unchanged.
|
|
33
|
+
*/
|
|
34
|
+
pinned?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Why, for the room's audit trail. A retraction without a reason is the one a member cannot interpret later.
|
|
37
|
+
*/
|
|
38
|
+
reason?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Optional precondition: the record's current version. Curation assigns a new version — a demotion other members must converge on is a change like any other — so a caller that read a record before deciding to curate it can require that nothing has replaced it since.
|
|
41
|
+
*/
|
|
42
|
+
expectedVersion?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
45
|
+
*/
|
|
46
|
+
ext?: Ext;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.
|
|
51
|
+
*/
|
|
52
|
+
export interface RoomsRecordsCurateResponsePayload {
|
|
53
|
+
/**
|
|
54
|
+
* The record curated.
|
|
55
|
+
*/
|
|
56
|
+
key: string;
|
|
57
|
+
/**
|
|
58
|
+
* The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version.
|
|
59
|
+
*/
|
|
60
|
+
version: number;
|
|
61
|
+
/**
|
|
62
|
+
* The record's standing after the operation.
|
|
63
|
+
*/
|
|
64
|
+
status: "active" | "deprecated" | "retracted";
|
|
65
|
+
/**
|
|
66
|
+
* Whether the record is pinned after the operation.
|
|
67
|
+
*/
|
|
68
|
+
pinned?: boolean;
|
|
69
|
+
ext?: Ext;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
73
|
+
export type { AuthorityPresentation, Ext };
|
|
74
|
+
|
|
75
|
+
/** Trust Task type URI. */
|
|
76
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/records/curate/0.1" as const;
|
|
77
|
+
|
|
78
|
+
/** Stable alias for this specification's request payload shape. */
|
|
79
|
+
export type Payload = RoomsRecordsCuratePayload;
|
|
80
|
+
|
|
81
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
82
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/records/curate/0.1#response" as const;
|
|
83
|
+
|
|
84
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
85
|
+
export type Response = RoomsRecordsCurateResponsePayload;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* This specification's payload schema, as a value.
|
|
89
|
+
*
|
|
90
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
91
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
92
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
93
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
94
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
95
|
+
*/
|
|
96
|
+
export const PAYLOAD_SCHEMA = {
|
|
97
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
98
|
+
"$id": "https://trusttasks.org/spec/rooms/records/curate/0.1",
|
|
99
|
+
"title": "Rooms Records Curate — payload",
|
|
100
|
+
"description": "A member curates a record: demotes it, retracts it, restores it from demotion, or pins it. Distinct from `rooms/records/put`, which replaces content — curation changes a record's standing in the room without a member having to rewrite it, and `curate` is a separate authority action so a community can grant one without the other.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": [
|
|
104
|
+
"roomId",
|
|
105
|
+
"key",
|
|
106
|
+
"presentation"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"roomId": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own."
|
|
112
|
+
},
|
|
113
|
+
"key": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"maxLength": 512,
|
|
116
|
+
"description": "The record to curate."
|
|
117
|
+
},
|
|
118
|
+
"presentation": {
|
|
119
|
+
"$ref": "#/$defs/AuthorityPresentation",
|
|
120
|
+
"description": "Must confer the `curate` action at this room's scope. Deliberately not implied by `write`: curation is judgement over what a room's shared knowledge is worth, which is a different grant from the ability to add to it."
|
|
121
|
+
},
|
|
122
|
+
"status": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"enum": [
|
|
125
|
+
"active",
|
|
126
|
+
"deprecated",
|
|
127
|
+
"retracted"
|
|
128
|
+
],
|
|
129
|
+
"description": "The standing to move the record to. `deprecated` demotes it — the body is retained and a recalling agent MUST treat it as demoted rather than hidden. `retracted` is a tombstone: the body is dropped and the key, version and epoch remain so incremental sync converges. `active` restores a `deprecated` record; it MUST NOT be accepted for a `retracted` one, whose body is already gone and cannot be restored by a status change."
|
|
130
|
+
},
|
|
131
|
+
"pinned": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"description": "Whether the record is pinned. Orthogonal to `status` — a pinned record is still active, deprecated or retracted — because pinning answers 'what matters here' and status answers 'is this still current'. Omit to leave unchanged."
|
|
134
|
+
},
|
|
135
|
+
"reason": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"maxLength": 512,
|
|
138
|
+
"description": "Why, for the room's audit trail. A retraction without a reason is the one a member cannot interpret later."
|
|
139
|
+
},
|
|
140
|
+
"expectedVersion": {
|
|
141
|
+
"type": "integer",
|
|
142
|
+
"minimum": 1,
|
|
143
|
+
"description": "Optional precondition: the record's current version. Curation assigns a new version — a demotion other members must converge on is a change like any other — so a caller that read a record before deciding to curate it can require that nothing has replaced it since."
|
|
144
|
+
},
|
|
145
|
+
"ext": {
|
|
146
|
+
"$ref": "#/$defs/Ext",
|
|
147
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"anyOf": [
|
|
151
|
+
{
|
|
152
|
+
"required": [
|
|
153
|
+
"status"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"required": [
|
|
158
|
+
"pinned"
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"$defs": {
|
|
163
|
+
"Response": {
|
|
164
|
+
"$anchor": "response",
|
|
165
|
+
"title": "Rooms Records Curate — response payload",
|
|
166
|
+
"description": "Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.",
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"required": [
|
|
170
|
+
"key",
|
|
171
|
+
"version",
|
|
172
|
+
"status"
|
|
173
|
+
],
|
|
174
|
+
"properties": {
|
|
175
|
+
"key": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "The record curated."
|
|
178
|
+
},
|
|
179
|
+
"version": {
|
|
180
|
+
"type": "integer",
|
|
181
|
+
"minimum": 1,
|
|
182
|
+
"description": "The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version."
|
|
183
|
+
},
|
|
184
|
+
"status": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"enum": [
|
|
187
|
+
"active",
|
|
188
|
+
"deprecated",
|
|
189
|
+
"retracted"
|
|
190
|
+
],
|
|
191
|
+
"description": "The record's standing after the operation."
|
|
192
|
+
},
|
|
193
|
+
"pinned": {
|
|
194
|
+
"type": "boolean",
|
|
195
|
+
"description": "Whether the record is pinned after the operation."
|
|
196
|
+
},
|
|
197
|
+
"ext": {
|
|
198
|
+
"$ref": "#/$defs/Ext"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"Ext": {
|
|
203
|
+
"title": "Ext",
|
|
204
|
+
"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.",
|
|
205
|
+
"type": "object",
|
|
206
|
+
"minProperties": 1,
|
|
207
|
+
"additionalProperties": true,
|
|
208
|
+
"propertyNames": {
|
|
209
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"AuthorityPresentation": {
|
|
213
|
+
"title": "AuthorityPresentation",
|
|
214
|
+
"type": "object",
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"required": [
|
|
217
|
+
"membership",
|
|
218
|
+
"authority"
|
|
219
|
+
],
|
|
220
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
221
|
+
"properties": {
|
|
222
|
+
"membership": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
225
|
+
},
|
|
226
|
+
"authority": {
|
|
227
|
+
"type": "array",
|
|
228
|
+
"minItems": 1,
|
|
229
|
+
"maxItems": 8,
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "string"
|
|
232
|
+
},
|
|
233
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
234
|
+
},
|
|
235
|
+
"subjectBinding": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
} as const;
|
|
243
|
+
|
|
244
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
245
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
246
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
247
|
+
"$ref": "#/$defs/Response",
|
|
248
|
+
"$defs": {
|
|
249
|
+
"Response": {
|
|
250
|
+
"$anchor": "response",
|
|
251
|
+
"title": "Rooms Records Curate — response payload",
|
|
252
|
+
"description": "Success response to rooms/records/curate. Type https://trusttasks.org/spec/rooms/records/curate/0.1#response.",
|
|
253
|
+
"type": "object",
|
|
254
|
+
"additionalProperties": false,
|
|
255
|
+
"required": [
|
|
256
|
+
"key",
|
|
257
|
+
"version",
|
|
258
|
+
"status"
|
|
259
|
+
],
|
|
260
|
+
"properties": {
|
|
261
|
+
"key": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"description": "The record curated."
|
|
264
|
+
},
|
|
265
|
+
"version": {
|
|
266
|
+
"type": "integer",
|
|
267
|
+
"minimum": 1,
|
|
268
|
+
"description": "The version the curation assigned. A caller syncing on `sinceVersion` sees the change at this version."
|
|
269
|
+
},
|
|
270
|
+
"status": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"enum": [
|
|
273
|
+
"active",
|
|
274
|
+
"deprecated",
|
|
275
|
+
"retracted"
|
|
276
|
+
],
|
|
277
|
+
"description": "The record's standing after the operation."
|
|
278
|
+
},
|
|
279
|
+
"pinned": {
|
|
280
|
+
"type": "boolean",
|
|
281
|
+
"description": "Whether the record is pinned after the operation."
|
|
282
|
+
},
|
|
283
|
+
"ext": {
|
|
284
|
+
"$ref": "#/$defs/Ext"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"Ext": {
|
|
289
|
+
"title": "Ext",
|
|
290
|
+
"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.",
|
|
291
|
+
"type": "object",
|
|
292
|
+
"minProperties": 1,
|
|
293
|
+
"additionalProperties": true,
|
|
294
|
+
"propertyNames": {
|
|
295
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"AuthorityPresentation": {
|
|
299
|
+
"title": "AuthorityPresentation",
|
|
300
|
+
"type": "object",
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"required": [
|
|
303
|
+
"membership",
|
|
304
|
+
"authority"
|
|
305
|
+
],
|
|
306
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
307
|
+
"properties": {
|
|
308
|
+
"membership": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
311
|
+
},
|
|
312
|
+
"authority": {
|
|
313
|
+
"type": "array",
|
|
314
|
+
"minItems": 1,
|
|
315
|
+
"maxItems": 8,
|
|
316
|
+
"items": {
|
|
317
|
+
"type": "string"
|
|
318
|
+
},
|
|
319
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
320
|
+
},
|
|
321
|
+
"subjectBinding": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
} as const;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
332
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
333
|
+
* per-specification and cannot be derived from the document alone, and
|
|
334
|
+
* item 2 needs the schema this carries.
|
|
335
|
+
*/
|
|
336
|
+
export const SPEC = {
|
|
337
|
+
typeUri: TYPE_URI,
|
|
338
|
+
isBearer: false,
|
|
339
|
+
isProofRequired: true,
|
|
340
|
+
isRecipientRequired: true,
|
|
341
|
+
isIssuedAtRequired: true,
|
|
342
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
343
|
+
} as const;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
347
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
348
|
+
* parties (§7.3 item 5).
|
|
349
|
+
*/
|
|
350
|
+
export const RESPONSE_SPEC = {
|
|
351
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
352
|
+
isBearer: false,
|
|
353
|
+
isProofRequired: true,
|
|
354
|
+
isRecipientRequired: true,
|
|
355
|
+
isIssuedAtRequired: true,
|
|
356
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
357
|
+
} as const;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/backup/abort/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Cancels an in-flight export or import bundle and discards its staged bytes. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTABackupAbortPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Handle from an initiate-export or initiate-import descriptor; either kind is accepted. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.
|
|
15
|
+
*/
|
|
16
|
+
bundleId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
19
|
+
*/
|
|
20
|
+
ext?: Ext;
|
|
21
|
+
}
|
|
22
|
+
export interface VTABackupAbortResponsePayload {
|
|
23
|
+
/**
|
|
24
|
+
* Echoed so the response stands alone as a record.
|
|
25
|
+
*/
|
|
26
|
+
bundleId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether this request is what moved the bundle to a terminal state. False means it was already terminal — a success, not a failure, and the reason abort can be retried safely. Required rather than optional: an absent member on an idempotent no-op would be indistinguishable from a cancellation that happened.
|
|
29
|
+
*/
|
|
30
|
+
aborted: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
33
|
+
*/
|
|
34
|
+
ext?: Ext;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
38
|
+
export type { Ext };
|
|
39
|
+
|
|
40
|
+
/** Trust Task type URI. */
|
|
41
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/backup/abort/1.0" as const;
|
|
42
|
+
|
|
43
|
+
/** Stable alias for this specification's request payload shape. */
|
|
44
|
+
export type Payload = VTABackupAbortPayload;
|
|
45
|
+
|
|
46
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
47
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/backup/abort/1.0#response" as const;
|
|
48
|
+
|
|
49
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
50
|
+
export type Response = VTABackupAbortResponsePayload;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* This specification's payload schema, as a value.
|
|
54
|
+
*
|
|
55
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
56
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
57
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
58
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
59
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
60
|
+
*/
|
|
61
|
+
export const PAYLOAD_SCHEMA = {
|
|
62
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
63
|
+
"$id": "https://trusttasks.org/spec/vta/backup/abort/1.0",
|
|
64
|
+
"title": "VTA Backup — Abort — payload",
|
|
65
|
+
"description": "Cancels an in-flight export or import bundle and discards its staged bytes. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": [
|
|
69
|
+
"bundleId"
|
|
70
|
+
],
|
|
71
|
+
"properties": {
|
|
72
|
+
"bundleId": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
75
|
+
"description": "Handle from an initiate-export or initiate-import descriptor; either kind is accepted. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one."
|
|
76
|
+
},
|
|
77
|
+
"ext": {
|
|
78
|
+
"$ref": "#/$defs/Ext",
|
|
79
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"$defs": {
|
|
83
|
+
"Response": {
|
|
84
|
+
"$anchor": "response",
|
|
85
|
+
"title": "VTA Backup Abort — response payload",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"bundleId",
|
|
90
|
+
"aborted"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"bundleId": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
96
|
+
"description": "Echoed so the response stands alone as a record."
|
|
97
|
+
},
|
|
98
|
+
"aborted": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"description": "Whether this request is what moved the bundle to a terminal state. False means it was already terminal — a success, not a failure, and the reason abort can be retried safely. Required rather than optional: an absent member on an idempotent no-op would be indistinguishable from a cancellation that happened."
|
|
101
|
+
},
|
|
102
|
+
"ext": {
|
|
103
|
+
"$ref": "#/$defs/Ext",
|
|
104
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"Ext": {
|
|
109
|
+
"title": "Ext",
|
|
110
|
+
"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.",
|
|
111
|
+
"type": "object",
|
|
112
|
+
"minProperties": 1,
|
|
113
|
+
"additionalProperties": true,
|
|
114
|
+
"propertyNames": {
|
|
115
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
} as const;
|
|
120
|
+
|
|
121
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
122
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
123
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
124
|
+
"$ref": "#/$defs/Response",
|
|
125
|
+
"$defs": {
|
|
126
|
+
"Response": {
|
|
127
|
+
"$anchor": "response",
|
|
128
|
+
"title": "VTA Backup Abort — response payload",
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": [
|
|
132
|
+
"bundleId",
|
|
133
|
+
"aborted"
|
|
134
|
+
],
|
|
135
|
+
"properties": {
|
|
136
|
+
"bundleId": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
139
|
+
"description": "Echoed so the response stands alone as a record."
|
|
140
|
+
},
|
|
141
|
+
"aborted": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"description": "Whether this request is what moved the bundle to a terminal state. False means it was already terminal — a success, not a failure, and the reason abort can be retried safely. Required rather than optional: an absent member on an idempotent no-op would be indistinguishable from a cancellation that happened."
|
|
144
|
+
},
|
|
145
|
+
"ext": {
|
|
146
|
+
"$ref": "#/$defs/Ext",
|
|
147
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"Ext": {
|
|
152
|
+
"title": "Ext",
|
|
153
|
+
"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.",
|
|
154
|
+
"type": "object",
|
|
155
|
+
"minProperties": 1,
|
|
156
|
+
"additionalProperties": true,
|
|
157
|
+
"propertyNames": {
|
|
158
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
} as const;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
166
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
167
|
+
* per-specification and cannot be derived from the document alone, and
|
|
168
|
+
* item 2 needs the schema this carries.
|
|
169
|
+
*/
|
|
170
|
+
export const SPEC = {
|
|
171
|
+
typeUri: TYPE_URI,
|
|
172
|
+
isBearer: false,
|
|
173
|
+
isProofRequired: true,
|
|
174
|
+
isRecipientRequired: true,
|
|
175
|
+
isIssuedAtRequired: true,
|
|
176
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
177
|
+
} as const;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
181
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
182
|
+
* parties (§7.3 item 5).
|
|
183
|
+
*/
|
|
184
|
+
export const RESPONSE_SPEC = {
|
|
185
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
186
|
+
isBearer: false,
|
|
187
|
+
isProofRequired: true,
|
|
188
|
+
isRecipientRequired: true,
|
|
189
|
+
isIssuedAtRequired: true,
|
|
190
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
191
|
+
} as const;
|