@openvtc/trust-tasks 0.12.1 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/index.d.ts +7 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +7 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/vta/_shared/0.1/app-state-record.d.ts +17 -0
  6. package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -0
  7. package/dist/vta/_shared/0.1/app-state-record.js +6 -0
  8. package/dist/vta/_shared/0.1/app-state-record.js.map +1 -0
  9. package/dist/vta/app-state/delete/1.0/payload.d.ts +488 -0
  10. package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -0
  11. package/dist/vta/app-state/delete/1.0/payload.js +248 -0
  12. package/dist/vta/app-state/delete/1.0/payload.js.map +1 -0
  13. package/dist/vta/app-state/get/1.0/payload.d.ts +611 -0
  14. package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -0
  15. package/dist/vta/app-state/get/1.0/payload.js +306 -0
  16. package/dist/vta/app-state/get/1.0/payload.js.map +1 -0
  17. package/dist/vta/app-state/get-many/1.0/payload.d.ts +716 -0
  18. package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -0
  19. package/dist/vta/app-state/get-many/1.0/payload.js +350 -0
  20. package/dist/vta/app-state/get-many/1.0/payload.js.map +1 -0
  21. package/dist/vta/app-state/list/1.0/payload.d.ts +778 -0
  22. package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -0
  23. package/dist/vta/app-state/list/1.0/payload.js +368 -0
  24. package/dist/vta/app-state/list/1.0/payload.js.map +1 -0
  25. package/dist/vta/app-state/put/1.0/payload.d.ts +560 -0
  26. package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -0
  27. package/dist/vta/app-state/put/1.0/payload.js +291 -0
  28. package/dist/vta/app-state/put/1.0/payload.js.map +1 -0
  29. package/dist/vta/app-state/put-many/1.0/payload.d.ts +856 -0
  30. package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -0
  31. package/dist/vta/app-state/put-many/1.0/payload.js +455 -0
  32. package/dist/vta/app-state/put-many/1.0/payload.js.map +1 -0
  33. package/package.json +1 -1
  34. package/src/index.ts +7 -0
  35. package/src/vta/_shared/0.1/app-state-record.ts +17 -0
  36. package/src/vta/app-state/delete/1.0/payload.ts +323 -0
  37. package/src/vta/app-state/get/1.0/payload.ts +404 -0
  38. package/src/vta/app-state/get-many/1.0/payload.ts +469 -0
  39. package/src/vta/app-state/list/1.0/payload.ts +509 -0
  40. package/src/vta/app-state/put/1.0/payload.ts +382 -0
  41. package/src/vta/app-state/put-many/1.0/payload.ts +584 -0
@@ -0,0 +1,611 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/app-state/get/1.0/payload.schema.json
4
+ */
5
+ /**
6
+ * Scopes one application's records within a context, so several tools can share a context without colliding — `openvtc`, `cnm`, an agent runtime. The maintainer MUST NOT interpret the value; it is an opaque partition name. Namespaces are first-come and unreserved, so an application SHOULD pick a stable, specific one: a future per-namespace ACL would grant on this exact string, which makes renaming a namespace a migration rather than an edit.
7
+ */
8
+ export type Namespace = string;
9
+ /**
10
+ * Application-chosen identifier for a record within a namespace. Opaque to the maintainer: it MUST NOT be parsed, normalized, or case-folded, and prefix matching in `list` is a byte-prefix comparison over the UTF-8 encoding. Applications SHOULD use `/`-delimited hierarchical keys (`community/acme`, `contact/z6Mk…`) so that `prefix` can address a record family, but the delimiter is a convention between an application and itself — the maintainer attaches no meaning to it.
11
+ */
12
+ export type Key = string;
13
+ /**
14
+ * The namespace counter value this record's most recent write took. Supply it as `expectedVersion` on the next write to make that write conditional on nothing having changed in between.
15
+ */
16
+ export type Version = number;
17
+ /**
18
+ * Read one application-state record by its `(contextId, namespace, key)` address. Returns the record with its value and its version; the version is what a subsequent conditional write supplies as `expectedVersion`.
19
+ */
20
+ export interface VTAApplicationStateGetPayload {
21
+ /**
22
+ * The VTA context the record is scoped to; the isolation boundary.
23
+ */
24
+ contextId: string;
25
+ namespace: Namespace;
26
+ key: Key;
27
+ /**
28
+ * Defaults to false. When true, a tombstone at this address is returned as a record with `deleted: true` instead of being reported as absent. Lets a consumer distinguish "deleted, and here is the version that deleted it" from "never existed, or deleted so long ago the tombstone was reaped" — a distinction a repair path needs and a normal read does not.
29
+ */
30
+ includeDeleted?: boolean;
31
+ ext?: Ext;
32
+ }
33
+ /**
34
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
35
+ */
36
+ export interface Ext {
37
+ [k: string]: unknown | undefined;
38
+ }
39
+ /**
40
+ * Success response to vta/app-state/get. Type https://trusttasks.org/spec/vta/app-state/get/1.0#response. An absent record is not a success: it is reported as a trust-task-error carrying vta/app-state/get:notFound.
41
+ */
42
+ export interface VTAApplicationStateGetResponsePayload {
43
+ record: AppStateRecord;
44
+ ext?: Ext1;
45
+ }
46
+ /**
47
+ * The record at the requested address, with its `value` populated (unless it is a tombstone returned under `includeDeleted`).
48
+ */
49
+ export interface AppStateRecord {
50
+ /**
51
+ * The VTA context the record is scoped to; the isolation boundary.
52
+ */
53
+ contextId: string;
54
+ namespace: Namespace;
55
+ key: Key;
56
+ version: Version;
57
+ /**
58
+ * The stored JSON, in whatever shape the owning application chose. Any JSON value, including `null`. The maintainer neither validates nor interprets it. Absent when this is a tombstone or a metadata-only view — see this definition's description for why that is not the same as a null value.
59
+ */
60
+ value?: {
61
+ [k: string]: unknown | undefined;
62
+ };
63
+ /**
64
+ * Size of the stored value in bytes, measured as the maintainer measures it for the per-record cap (see `vta/app-state/put`). Present in metadata-only views so a consumer can decide what to fetch without fetching it; absent on a tombstone.
65
+ */
66
+ valueBytes?: number;
67
+ /**
68
+ * True when this is a tombstone: the record was deleted, and this entry exists so that a consumer syncing incrementally learns of the deletion. Tombstones are reaped after the maintainer's retention window; see `vta/app-state/list`.
69
+ */
70
+ deleted: boolean;
71
+ /**
72
+ * When the record was first created at this address. MAY be absent on a tombstone whose body has been discarded.
73
+ */
74
+ createdAt?: string;
75
+ /**
76
+ * When the write that produced this `version` was applied. For a tombstone, when the delete was applied.
77
+ */
78
+ updatedAt: string;
79
+ /**
80
+ * When the record was deleted. Present only when `deleted` is true; equal to `updatedAt` for a tombstone the maintainer has not since rewritten.
81
+ */
82
+ deletedAt?: string;
83
+ }
84
+ /**
85
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
86
+ */
87
+ export interface Ext1 {
88
+ [k: string]: unknown | undefined;
89
+ }
90
+ /** Trust Task type URI. */
91
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vta/app-state/get/1.0";
92
+ /** Stable alias for this specification's request payload shape. */
93
+ export type Payload = VTAApplicationStateGetPayload;
94
+ /** Trust Task response type URI (request type URI + "#response"). */
95
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/app-state/get/1.0#response";
96
+ /** Stable alias for this specification's success-response payload shape. */
97
+ export type Response = VTAApplicationStateGetResponsePayload;
98
+ /**
99
+ * This specification's payload schema, as a value.
100
+ *
101
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
102
+ * rather than only as a `.json` file because TypeScript types are erased
103
+ * at runtime: without a schema a consumer has nothing to validate, and
104
+ * every REQUIRED payload member is optional in practice. Cross-file
105
+ * `$ref`s are already inlined, so it needs no resolver.
106
+ */
107
+ export declare const PAYLOAD_SCHEMA: {
108
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
109
+ readonly $id: "https://trusttasks.org/spec/vta/app-state/get/1.0";
110
+ readonly title: "VTA Application State Get — payload";
111
+ readonly description: "Read one application-state record by its `(contextId, namespace, key)` address. Returns the record with its value and its version; the version is what a subsequent conditional write supplies as `expectedVersion`.";
112
+ readonly type: "object";
113
+ readonly additionalProperties: false;
114
+ readonly required: readonly ["contextId", "namespace", "key"];
115
+ readonly properties: {
116
+ readonly contextId: {
117
+ readonly type: "string";
118
+ readonly minLength: 1;
119
+ readonly description: "The VTA context the record is scoped to; the isolation boundary.";
120
+ };
121
+ readonly namespace: {
122
+ readonly $ref: "#/$defs/Namespace";
123
+ };
124
+ readonly key: {
125
+ readonly $ref: "#/$defs/Key";
126
+ };
127
+ readonly includeDeleted: {
128
+ readonly type: "boolean";
129
+ readonly description: "Defaults to false. When true, a tombstone at this address is returned as a record with `deleted: true` instead of being reported as absent. Lets a consumer distinguish \"deleted, and here is the version that deleted it\" from \"never existed, or deleted so long ago the tombstone was reaped\" — a distinction a repair path needs and a normal read does not.";
130
+ };
131
+ readonly ext: {
132
+ readonly $ref: "#/$defs/Ext";
133
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
134
+ };
135
+ };
136
+ readonly $defs: {
137
+ readonly Response: {
138
+ readonly $anchor: "response";
139
+ readonly title: "VTA Application State Get — response payload";
140
+ readonly description: "Success response to vta/app-state/get. Type https://trusttasks.org/spec/vta/app-state/get/1.0#response. An absent record is not a success: it is reported as a trust-task-error carrying vta/app-state/get:notFound.";
141
+ readonly type: "object";
142
+ readonly additionalProperties: false;
143
+ readonly required: readonly ["record"];
144
+ readonly properties: {
145
+ readonly record: {
146
+ readonly $ref: "#/$defs/AppStateRecord";
147
+ readonly description: "The record at the requested address, with its `value` populated (unless it is a tombstone returned under `includeDeleted`).";
148
+ };
149
+ readonly ext: {
150
+ readonly $ref: "#/$defs/Ext";
151
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
152
+ };
153
+ };
154
+ };
155
+ readonly Ext: {
156
+ readonly title: "Ext";
157
+ readonly 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.";
158
+ readonly type: "object";
159
+ readonly minProperties: 1;
160
+ readonly additionalProperties: true;
161
+ readonly propertyNames: {
162
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
163
+ };
164
+ };
165
+ readonly AppStateRecord: {
166
+ readonly title: "AppStateRecord";
167
+ readonly description: "A record as the maintainer holds it. `value` is absent in three distinct situations and a consumer MUST NOT conflate them: the record is a tombstone (`deleted` is true); the caller asked for a metadata-only view (`list` without `includeValues`); or the value genuinely is the JSON literal `null`, in which case `value` is PRESENT and null. This is why `deleted` is required rather than defaulted — a consumer that has to infer deletion from an absent value gets the tombstone case wrong exactly when convergence depends on it.";
168
+ readonly type: "object";
169
+ readonly additionalProperties: false;
170
+ readonly required: readonly ["contextId", "namespace", "key", "version", "deleted", "updatedAt"];
171
+ readonly properties: {
172
+ readonly contextId: {
173
+ readonly type: "string";
174
+ readonly minLength: 1;
175
+ readonly description: "The VTA context the record is scoped to; the isolation boundary.";
176
+ };
177
+ readonly namespace: {
178
+ readonly $ref: "#/$defs/Namespace";
179
+ };
180
+ readonly key: {
181
+ readonly $ref: "#/$defs/Key";
182
+ };
183
+ readonly version: {
184
+ readonly $ref: "#/$defs/Version";
185
+ readonly description: "The namespace counter value this record's most recent write took. Supply it as `expectedVersion` on the next write to make that write conditional on nothing having changed in between.";
186
+ };
187
+ readonly value: {
188
+ readonly description: "The stored JSON, in whatever shape the owning application chose. Any JSON value, including `null`. The maintainer neither validates nor interprets it. Absent when this is a tombstone or a metadata-only view — see this definition's description for why that is not the same as a null value.";
189
+ };
190
+ readonly valueBytes: {
191
+ readonly type: "integer";
192
+ readonly minimum: 0;
193
+ readonly description: "Size of the stored value in bytes, measured as the maintainer measures it for the per-record cap (see `vta/app-state/put`). Present in metadata-only views so a consumer can decide what to fetch without fetching it; absent on a tombstone.";
194
+ };
195
+ readonly deleted: {
196
+ readonly type: "boolean";
197
+ readonly description: "True when this is a tombstone: the record was deleted, and this entry exists so that a consumer syncing incrementally learns of the deletion. Tombstones are reaped after the maintainer's retention window; see `vta/app-state/list`.";
198
+ };
199
+ readonly createdAt: {
200
+ readonly type: "string";
201
+ readonly format: "date-time";
202
+ readonly description: "When the record was first created at this address. MAY be absent on a tombstone whose body has been discarded.";
203
+ };
204
+ readonly updatedAt: {
205
+ readonly type: "string";
206
+ readonly format: "date-time";
207
+ readonly description: "When the write that produced this `version` was applied. For a tombstone, when the delete was applied.";
208
+ };
209
+ readonly deletedAt: {
210
+ readonly type: "string";
211
+ readonly format: "date-time";
212
+ readonly description: "When the record was deleted. Present only when `deleted` is true; equal to `updatedAt` for a tombstone the maintainer has not since rewritten.";
213
+ };
214
+ };
215
+ };
216
+ readonly Version: {
217
+ readonly title: "Version";
218
+ readonly description: "A value of the namespace's monotonic write counter (see this schema's description). Server-assigned; a producer never chooses one.";
219
+ readonly type: "integer";
220
+ readonly minimum: 1;
221
+ };
222
+ readonly Key: {
223
+ readonly title: "Key";
224
+ readonly description: "Application-chosen identifier for a record within a namespace. Opaque to the maintainer: it MUST NOT be parsed, normalized, or case-folded, and prefix matching in `list` is a byte-prefix comparison over the UTF-8 encoding. Applications SHOULD use `/`-delimited hierarchical keys (`community/acme`, `contact/z6Mk…`) so that `prefix` can address a record family, but the delimiter is a convention between an application and itself — the maintainer attaches no meaning to it.";
225
+ readonly type: "string";
226
+ readonly minLength: 1;
227
+ readonly maxLength: 512;
228
+ readonly pattern: "^[^\\u0000]+$";
229
+ };
230
+ readonly Namespace: {
231
+ readonly title: "Namespace";
232
+ readonly description: "Scopes one application's records within a context, so several tools can share a context without colliding — `openvtc`, `cnm`, an agent runtime. The maintainer MUST NOT interpret the value; it is an opaque partition name. Namespaces are first-come and unreserved, so an application SHOULD pick a stable, specific one: a future per-namespace ACL would grant on this exact string, which makes renaming a namespace a migration rather than an edit.";
233
+ readonly type: "string";
234
+ readonly minLength: 1;
235
+ readonly maxLength: 64;
236
+ readonly pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$";
237
+ };
238
+ };
239
+ };
240
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
241
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
242
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
243
+ readonly $ref: "#/$defs/Response";
244
+ readonly $defs: {
245
+ readonly Response: {
246
+ readonly $anchor: "response";
247
+ readonly title: "VTA Application State Get — response payload";
248
+ readonly description: "Success response to vta/app-state/get. Type https://trusttasks.org/spec/vta/app-state/get/1.0#response. An absent record is not a success: it is reported as a trust-task-error carrying vta/app-state/get:notFound.";
249
+ readonly type: "object";
250
+ readonly additionalProperties: false;
251
+ readonly required: readonly ["record"];
252
+ readonly properties: {
253
+ readonly record: {
254
+ readonly $ref: "#/$defs/AppStateRecord";
255
+ readonly description: "The record at the requested address, with its `value` populated (unless it is a tombstone returned under `includeDeleted`).";
256
+ };
257
+ readonly ext: {
258
+ readonly $ref: "#/$defs/Ext";
259
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
260
+ };
261
+ };
262
+ };
263
+ readonly Ext: {
264
+ readonly title: "Ext";
265
+ readonly 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.";
266
+ readonly type: "object";
267
+ readonly minProperties: 1;
268
+ readonly additionalProperties: true;
269
+ readonly propertyNames: {
270
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
271
+ };
272
+ };
273
+ readonly AppStateRecord: {
274
+ readonly title: "AppStateRecord";
275
+ readonly description: "A record as the maintainer holds it. `value` is absent in three distinct situations and a consumer MUST NOT conflate them: the record is a tombstone (`deleted` is true); the caller asked for a metadata-only view (`list` without `includeValues`); or the value genuinely is the JSON literal `null`, in which case `value` is PRESENT and null. This is why `deleted` is required rather than defaulted — a consumer that has to infer deletion from an absent value gets the tombstone case wrong exactly when convergence depends on it.";
276
+ readonly type: "object";
277
+ readonly additionalProperties: false;
278
+ readonly required: readonly ["contextId", "namespace", "key", "version", "deleted", "updatedAt"];
279
+ readonly properties: {
280
+ readonly contextId: {
281
+ readonly type: "string";
282
+ readonly minLength: 1;
283
+ readonly description: "The VTA context the record is scoped to; the isolation boundary.";
284
+ };
285
+ readonly namespace: {
286
+ readonly $ref: "#/$defs/Namespace";
287
+ };
288
+ readonly key: {
289
+ readonly $ref: "#/$defs/Key";
290
+ };
291
+ readonly version: {
292
+ readonly $ref: "#/$defs/Version";
293
+ readonly description: "The namespace counter value this record's most recent write took. Supply it as `expectedVersion` on the next write to make that write conditional on nothing having changed in between.";
294
+ };
295
+ readonly value: {
296
+ readonly description: "The stored JSON, in whatever shape the owning application chose. Any JSON value, including `null`. The maintainer neither validates nor interprets it. Absent when this is a tombstone or a metadata-only view — see this definition's description for why that is not the same as a null value.";
297
+ };
298
+ readonly valueBytes: {
299
+ readonly type: "integer";
300
+ readonly minimum: 0;
301
+ readonly description: "Size of the stored value in bytes, measured as the maintainer measures it for the per-record cap (see `vta/app-state/put`). Present in metadata-only views so a consumer can decide what to fetch without fetching it; absent on a tombstone.";
302
+ };
303
+ readonly deleted: {
304
+ readonly type: "boolean";
305
+ readonly description: "True when this is a tombstone: the record was deleted, and this entry exists so that a consumer syncing incrementally learns of the deletion. Tombstones are reaped after the maintainer's retention window; see `vta/app-state/list`.";
306
+ };
307
+ readonly createdAt: {
308
+ readonly type: "string";
309
+ readonly format: "date-time";
310
+ readonly description: "When the record was first created at this address. MAY be absent on a tombstone whose body has been discarded.";
311
+ };
312
+ readonly updatedAt: {
313
+ readonly type: "string";
314
+ readonly format: "date-time";
315
+ readonly description: "When the write that produced this `version` was applied. For a tombstone, when the delete was applied.";
316
+ };
317
+ readonly deletedAt: {
318
+ readonly type: "string";
319
+ readonly format: "date-time";
320
+ readonly description: "When the record was deleted. Present only when `deleted` is true; equal to `updatedAt` for a tombstone the maintainer has not since rewritten.";
321
+ };
322
+ };
323
+ };
324
+ readonly Version: {
325
+ readonly title: "Version";
326
+ readonly description: "A value of the namespace's monotonic write counter (see this schema's description). Server-assigned; a producer never chooses one.";
327
+ readonly type: "integer";
328
+ readonly minimum: 1;
329
+ };
330
+ readonly Key: {
331
+ readonly title: "Key";
332
+ readonly description: "Application-chosen identifier for a record within a namespace. Opaque to the maintainer: it MUST NOT be parsed, normalized, or case-folded, and prefix matching in `list` is a byte-prefix comparison over the UTF-8 encoding. Applications SHOULD use `/`-delimited hierarchical keys (`community/acme`, `contact/z6Mk…`) so that `prefix` can address a record family, but the delimiter is a convention between an application and itself — the maintainer attaches no meaning to it.";
333
+ readonly type: "string";
334
+ readonly minLength: 1;
335
+ readonly maxLength: 512;
336
+ readonly pattern: "^[^\\u0000]+$";
337
+ };
338
+ readonly Namespace: {
339
+ readonly title: "Namespace";
340
+ readonly description: "Scopes one application's records within a context, so several tools can share a context without colliding — `openvtc`, `cnm`, an agent runtime. The maintainer MUST NOT interpret the value; it is an opaque partition name. Namespaces are first-come and unreserved, so an application SHOULD pick a stable, specific one: a future per-namespace ACL would grant on this exact string, which makes renaming a namespace a migration rather than an edit.";
341
+ readonly type: "string";
342
+ readonly minLength: 1;
343
+ readonly maxLength: 64;
344
+ readonly pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$";
345
+ };
346
+ };
347
+ };
348
+ /**
349
+ * SPEC.md §7.2 policy for the request variant, from this specification's
350
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
351
+ * per-specification and cannot be derived from the document alone, and
352
+ * item 2 needs the schema this carries.
353
+ */
354
+ export declare const SPEC: {
355
+ readonly typeUri: "https://trusttasks.org/spec/vta/app-state/get/1.0";
356
+ readonly isBearer: false;
357
+ readonly isProofRequired: false;
358
+ readonly isRecipientRequired: true;
359
+ readonly payloadSchema: {
360
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
361
+ readonly $id: "https://trusttasks.org/spec/vta/app-state/get/1.0";
362
+ readonly title: "VTA Application State Get — payload";
363
+ readonly description: "Read one application-state record by its `(contextId, namespace, key)` address. Returns the record with its value and its version; the version is what a subsequent conditional write supplies as `expectedVersion`.";
364
+ readonly type: "object";
365
+ readonly additionalProperties: false;
366
+ readonly required: readonly ["contextId", "namespace", "key"];
367
+ readonly properties: {
368
+ readonly contextId: {
369
+ readonly type: "string";
370
+ readonly minLength: 1;
371
+ readonly description: "The VTA context the record is scoped to; the isolation boundary.";
372
+ };
373
+ readonly namespace: {
374
+ readonly $ref: "#/$defs/Namespace";
375
+ };
376
+ readonly key: {
377
+ readonly $ref: "#/$defs/Key";
378
+ };
379
+ readonly includeDeleted: {
380
+ readonly type: "boolean";
381
+ readonly description: "Defaults to false. When true, a tombstone at this address is returned as a record with `deleted: true` instead of being reported as absent. Lets a consumer distinguish \"deleted, and here is the version that deleted it\" from \"never existed, or deleted so long ago the tombstone was reaped\" — a distinction a repair path needs and a normal read does not.";
382
+ };
383
+ readonly ext: {
384
+ readonly $ref: "#/$defs/Ext";
385
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
386
+ };
387
+ };
388
+ readonly $defs: {
389
+ readonly Response: {
390
+ readonly $anchor: "response";
391
+ readonly title: "VTA Application State Get — response payload";
392
+ readonly description: "Success response to vta/app-state/get. Type https://trusttasks.org/spec/vta/app-state/get/1.0#response. An absent record is not a success: it is reported as a trust-task-error carrying vta/app-state/get:notFound.";
393
+ readonly type: "object";
394
+ readonly additionalProperties: false;
395
+ readonly required: readonly ["record"];
396
+ readonly properties: {
397
+ readonly record: {
398
+ readonly $ref: "#/$defs/AppStateRecord";
399
+ readonly description: "The record at the requested address, with its `value` populated (unless it is a tombstone returned under `includeDeleted`).";
400
+ };
401
+ readonly ext: {
402
+ readonly $ref: "#/$defs/Ext";
403
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
404
+ };
405
+ };
406
+ };
407
+ readonly Ext: {
408
+ readonly title: "Ext";
409
+ readonly 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.";
410
+ readonly type: "object";
411
+ readonly minProperties: 1;
412
+ readonly additionalProperties: true;
413
+ readonly propertyNames: {
414
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
415
+ };
416
+ };
417
+ readonly AppStateRecord: {
418
+ readonly title: "AppStateRecord";
419
+ readonly description: "A record as the maintainer holds it. `value` is absent in three distinct situations and a consumer MUST NOT conflate them: the record is a tombstone (`deleted` is true); the caller asked for a metadata-only view (`list` without `includeValues`); or the value genuinely is the JSON literal `null`, in which case `value` is PRESENT and null. This is why `deleted` is required rather than defaulted — a consumer that has to infer deletion from an absent value gets the tombstone case wrong exactly when convergence depends on it.";
420
+ readonly type: "object";
421
+ readonly additionalProperties: false;
422
+ readonly required: readonly ["contextId", "namespace", "key", "version", "deleted", "updatedAt"];
423
+ readonly properties: {
424
+ readonly contextId: {
425
+ readonly type: "string";
426
+ readonly minLength: 1;
427
+ readonly description: "The VTA context the record is scoped to; the isolation boundary.";
428
+ };
429
+ readonly namespace: {
430
+ readonly $ref: "#/$defs/Namespace";
431
+ };
432
+ readonly key: {
433
+ readonly $ref: "#/$defs/Key";
434
+ };
435
+ readonly version: {
436
+ readonly $ref: "#/$defs/Version";
437
+ readonly description: "The namespace counter value this record's most recent write took. Supply it as `expectedVersion` on the next write to make that write conditional on nothing having changed in between.";
438
+ };
439
+ readonly value: {
440
+ readonly description: "The stored JSON, in whatever shape the owning application chose. Any JSON value, including `null`. The maintainer neither validates nor interprets it. Absent when this is a tombstone or a metadata-only view — see this definition's description for why that is not the same as a null value.";
441
+ };
442
+ readonly valueBytes: {
443
+ readonly type: "integer";
444
+ readonly minimum: 0;
445
+ readonly description: "Size of the stored value in bytes, measured as the maintainer measures it for the per-record cap (see `vta/app-state/put`). Present in metadata-only views so a consumer can decide what to fetch without fetching it; absent on a tombstone.";
446
+ };
447
+ readonly deleted: {
448
+ readonly type: "boolean";
449
+ readonly description: "True when this is a tombstone: the record was deleted, and this entry exists so that a consumer syncing incrementally learns of the deletion. Tombstones are reaped after the maintainer's retention window; see `vta/app-state/list`.";
450
+ };
451
+ readonly createdAt: {
452
+ readonly type: "string";
453
+ readonly format: "date-time";
454
+ readonly description: "When the record was first created at this address. MAY be absent on a tombstone whose body has been discarded.";
455
+ };
456
+ readonly updatedAt: {
457
+ readonly type: "string";
458
+ readonly format: "date-time";
459
+ readonly description: "When the write that produced this `version` was applied. For a tombstone, when the delete was applied.";
460
+ };
461
+ readonly deletedAt: {
462
+ readonly type: "string";
463
+ readonly format: "date-time";
464
+ readonly description: "When the record was deleted. Present only when `deleted` is true; equal to `updatedAt` for a tombstone the maintainer has not since rewritten.";
465
+ };
466
+ };
467
+ };
468
+ readonly Version: {
469
+ readonly title: "Version";
470
+ readonly description: "A value of the namespace's monotonic write counter (see this schema's description). Server-assigned; a producer never chooses one.";
471
+ readonly type: "integer";
472
+ readonly minimum: 1;
473
+ };
474
+ readonly Key: {
475
+ readonly title: "Key";
476
+ readonly description: "Application-chosen identifier for a record within a namespace. Opaque to the maintainer: it MUST NOT be parsed, normalized, or case-folded, and prefix matching in `list` is a byte-prefix comparison over the UTF-8 encoding. Applications SHOULD use `/`-delimited hierarchical keys (`community/acme`, `contact/z6Mk…`) so that `prefix` can address a record family, but the delimiter is a convention between an application and itself — the maintainer attaches no meaning to it.";
477
+ readonly type: "string";
478
+ readonly minLength: 1;
479
+ readonly maxLength: 512;
480
+ readonly pattern: "^[^\\u0000]+$";
481
+ };
482
+ readonly Namespace: {
483
+ readonly title: "Namespace";
484
+ readonly description: "Scopes one application's records within a context, so several tools can share a context without colliding — `openvtc`, `cnm`, an agent runtime. The maintainer MUST NOT interpret the value; it is an opaque partition name. Namespaces are first-come and unreserved, so an application SHOULD pick a stable, specific one: a future per-namespace ACL would grant on this exact string, which makes renaming a namespace a migration rather than an edit.";
485
+ readonly type: "string";
486
+ readonly minLength: 1;
487
+ readonly maxLength: 64;
488
+ readonly pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$";
489
+ };
490
+ };
491
+ };
492
+ };
493
+ /**
494
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
495
+ * tracks the *issuer* party's requirement because a response swaps the
496
+ * parties (§7.3 item 5).
497
+ */
498
+ export declare const RESPONSE_SPEC: {
499
+ readonly typeUri: "https://trusttasks.org/spec/vta/app-state/get/1.0#response";
500
+ readonly isBearer: false;
501
+ readonly isProofRequired: false;
502
+ readonly isRecipientRequired: true;
503
+ readonly payloadSchema: {
504
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
505
+ readonly $ref: "#/$defs/Response";
506
+ readonly $defs: {
507
+ readonly Response: {
508
+ readonly $anchor: "response";
509
+ readonly title: "VTA Application State Get — response payload";
510
+ readonly description: "Success response to vta/app-state/get. Type https://trusttasks.org/spec/vta/app-state/get/1.0#response. An absent record is not a success: it is reported as a trust-task-error carrying vta/app-state/get:notFound.";
511
+ readonly type: "object";
512
+ readonly additionalProperties: false;
513
+ readonly required: readonly ["record"];
514
+ readonly properties: {
515
+ readonly record: {
516
+ readonly $ref: "#/$defs/AppStateRecord";
517
+ readonly description: "The record at the requested address, with its `value` populated (unless it is a tombstone returned under `includeDeleted`).";
518
+ };
519
+ readonly ext: {
520
+ readonly $ref: "#/$defs/Ext";
521
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
522
+ };
523
+ };
524
+ };
525
+ readonly Ext: {
526
+ readonly title: "Ext";
527
+ readonly 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.";
528
+ readonly type: "object";
529
+ readonly minProperties: 1;
530
+ readonly additionalProperties: true;
531
+ readonly propertyNames: {
532
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
533
+ };
534
+ };
535
+ readonly AppStateRecord: {
536
+ readonly title: "AppStateRecord";
537
+ readonly description: "A record as the maintainer holds it. `value` is absent in three distinct situations and a consumer MUST NOT conflate them: the record is a tombstone (`deleted` is true); the caller asked for a metadata-only view (`list` without `includeValues`); or the value genuinely is the JSON literal `null`, in which case `value` is PRESENT and null. This is why `deleted` is required rather than defaulted — a consumer that has to infer deletion from an absent value gets the tombstone case wrong exactly when convergence depends on it.";
538
+ readonly type: "object";
539
+ readonly additionalProperties: false;
540
+ readonly required: readonly ["contextId", "namespace", "key", "version", "deleted", "updatedAt"];
541
+ readonly properties: {
542
+ readonly contextId: {
543
+ readonly type: "string";
544
+ readonly minLength: 1;
545
+ readonly description: "The VTA context the record is scoped to; the isolation boundary.";
546
+ };
547
+ readonly namespace: {
548
+ readonly $ref: "#/$defs/Namespace";
549
+ };
550
+ readonly key: {
551
+ readonly $ref: "#/$defs/Key";
552
+ };
553
+ readonly version: {
554
+ readonly $ref: "#/$defs/Version";
555
+ readonly description: "The namespace counter value this record's most recent write took. Supply it as `expectedVersion` on the next write to make that write conditional on nothing having changed in between.";
556
+ };
557
+ readonly value: {
558
+ readonly description: "The stored JSON, in whatever shape the owning application chose. Any JSON value, including `null`. The maintainer neither validates nor interprets it. Absent when this is a tombstone or a metadata-only view — see this definition's description for why that is not the same as a null value.";
559
+ };
560
+ readonly valueBytes: {
561
+ readonly type: "integer";
562
+ readonly minimum: 0;
563
+ readonly description: "Size of the stored value in bytes, measured as the maintainer measures it for the per-record cap (see `vta/app-state/put`). Present in metadata-only views so a consumer can decide what to fetch without fetching it; absent on a tombstone.";
564
+ };
565
+ readonly deleted: {
566
+ readonly type: "boolean";
567
+ readonly description: "True when this is a tombstone: the record was deleted, and this entry exists so that a consumer syncing incrementally learns of the deletion. Tombstones are reaped after the maintainer's retention window; see `vta/app-state/list`.";
568
+ };
569
+ readonly createdAt: {
570
+ readonly type: "string";
571
+ readonly format: "date-time";
572
+ readonly description: "When the record was first created at this address. MAY be absent on a tombstone whose body has been discarded.";
573
+ };
574
+ readonly updatedAt: {
575
+ readonly type: "string";
576
+ readonly format: "date-time";
577
+ readonly description: "When the write that produced this `version` was applied. For a tombstone, when the delete was applied.";
578
+ };
579
+ readonly deletedAt: {
580
+ readonly type: "string";
581
+ readonly format: "date-time";
582
+ readonly description: "When the record was deleted. Present only when `deleted` is true; equal to `updatedAt` for a tombstone the maintainer has not since rewritten.";
583
+ };
584
+ };
585
+ };
586
+ readonly Version: {
587
+ readonly title: "Version";
588
+ readonly description: "A value of the namespace's monotonic write counter (see this schema's description). Server-assigned; a producer never chooses one.";
589
+ readonly type: "integer";
590
+ readonly minimum: 1;
591
+ };
592
+ readonly Key: {
593
+ readonly title: "Key";
594
+ readonly description: "Application-chosen identifier for a record within a namespace. Opaque to the maintainer: it MUST NOT be parsed, normalized, or case-folded, and prefix matching in `list` is a byte-prefix comparison over the UTF-8 encoding. Applications SHOULD use `/`-delimited hierarchical keys (`community/acme`, `contact/z6Mk…`) so that `prefix` can address a record family, but the delimiter is a convention between an application and itself — the maintainer attaches no meaning to it.";
595
+ readonly type: "string";
596
+ readonly minLength: 1;
597
+ readonly maxLength: 512;
598
+ readonly pattern: "^[^\\u0000]+$";
599
+ };
600
+ readonly Namespace: {
601
+ readonly title: "Namespace";
602
+ readonly description: "Scopes one application's records within a context, so several tools can share a context without colliding — `openvtc`, `cnm`, an agent runtime. The maintainer MUST NOT interpret the value; it is an opaque partition name. Namespaces are first-come and unreserved, so an application SHOULD pick a stable, specific one: a future per-namespace ACL would grant on this exact string, which makes renaming a namespace a migration rather than an edit.";
603
+ readonly type: "string";
604
+ readonly minLength: 1;
605
+ readonly maxLength: 64;
606
+ readonly pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$";
607
+ };
608
+ };
609
+ };
610
+ };
611
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vta/app-state/get/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC;AACzB;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,GAAG,EAAE,GAAG,CAAC;IACT;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD,MAAM,EAAE,cAAc,CAAC;IACvB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AACD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;IACF;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,mDAA4D,CAAC;AAErF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,6BAA6B,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,4DAAqE,CAAC;AAEvG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,qCAAqC,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmH1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}