@openvtc/trust-tasks 0.28.24 → 0.28.26
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 +107 -0
- package/dist/_extends.d.ts.map +1 -1
- package/dist/_extends.js +9 -0
- package/dist/_extends.js.map +1 -1
- package/dist/_shared/components.d.ts +117 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/acl/_shared/0.3/acl-entry.d.ts +24 -0
- package/dist/acl/_shared/0.3/acl-entry.d.ts.map +1 -0
- package/dist/acl/_shared/0.3/acl-entry.js +6 -0
- package/dist/acl/_shared/0.3/acl-entry.js.map +1 -0
- package/dist/acl/change-role/0.1/payload.d.ts +4 -4
- package/dist/acl/change-role/0.1/payload.js +1 -1
- package/dist/acl/change-role/0.2/payload.d.ts +14 -2
- package/dist/acl/change-role/0.2/payload.d.ts.map +1 -1
- package/dist/acl/change-role/0.2/payload.js +1 -1
- package/dist/acl/change-role/0.2/payload.js.map +1 -1
- package/dist/acl/change-role/0.3/payload.d.ts +1925 -0
- package/dist/acl/change-role/0.3/payload.d.ts.map +1 -0
- package/dist/acl/change-role/0.3/payload.js +1109 -0
- package/dist/acl/change-role/0.3/payload.js.map +1 -0
- package/dist/acl/grant/0.1/payload.d.ts +4 -4
- package/dist/acl/grant/0.1/payload.js +1 -1
- package/dist/acl/grant/0.2/payload.d.ts +14 -2
- package/dist/acl/grant/0.2/payload.d.ts.map +1 -1
- package/dist/acl/grant/0.2/payload.js +1 -1
- package/dist/acl/grant/0.2/payload.js.map +1 -1
- package/dist/acl/grant/0.3/payload.d.ts +1895 -0
- package/dist/acl/grant/0.3/payload.d.ts.map +1 -0
- package/dist/acl/grant/0.3/payload.js +1096 -0
- package/dist/acl/grant/0.3/payload.js.map +1 -0
- package/dist/acl/list/0.1/payload.d.ts +4 -4
- package/dist/acl/list/0.1/payload.js +1 -1
- package/dist/acl/list/0.2/payload.d.ts +4 -4
- package/dist/acl/list/0.2/payload.js +1 -1
- package/dist/acl/list/0.3/payload.d.ts +14 -2
- package/dist/acl/list/0.3/payload.d.ts.map +1 -1
- package/dist/acl/list/0.3/payload.js +1 -1
- package/dist/acl/list/0.3/payload.js.map +1 -1
- package/dist/acl/list/0.4/payload.d.ts +2079 -0
- package/dist/acl/list/0.4/payload.d.ts.map +1 -0
- package/dist/acl/list/0.4/payload.js +1185 -0
- package/dist/acl/list/0.4/payload.js.map +1 -0
- package/dist/acl/revoke/0.1/payload.d.ts +4 -4
- package/dist/acl/revoke/0.1/payload.js +1 -1
- package/dist/acl/revoke/0.2/payload.d.ts +14 -2
- package/dist/acl/revoke/0.2/payload.d.ts.map +1 -1
- package/dist/acl/revoke/0.2/payload.js +1 -1
- package/dist/acl/revoke/0.2/payload.js.map +1 -1
- package/dist/acl/revoke/0.3/payload.d.ts +2090 -0
- package/dist/acl/revoke/0.3/payload.d.ts.map +1 -0
- package/dist/acl/revoke/0.3/payload.js +1206 -0
- package/dist/acl/revoke/0.3/payload.js.map +1 -0
- package/dist/acl/show/0.1/payload.d.ts +4 -4
- package/dist/acl/show/0.1/payload.js +1 -1
- package/dist/acl/show/0.2/payload.d.ts +14 -2
- package/dist/acl/show/0.2/payload.d.ts.map +1 -1
- package/dist/acl/show/0.2/payload.js +1 -1
- package/dist/acl/show/0.2/payload.js.map +1 -1
- package/dist/acl/show/0.3/payload.d.ts +1935 -0
- package/dist/acl/show/0.3/payload.d.ts.map +1 -0
- package/dist/acl/show/0.3/payload.js +1122 -0
- package/dist/acl/show/0.3/payload.js.map +1 -0
- package/dist/acl/update/0.1/payload.d.ts +4 -4
- package/dist/acl/update/0.1/payload.js +1 -1
- package/dist/acl/update/0.2/payload.d.ts +14 -2
- package/dist/acl/update/0.2/payload.d.ts.map +1 -1
- package/dist/acl/update/0.2/payload.js +1 -1
- package/dist/acl/update/0.2/payload.js.map +1 -1
- package/dist/acl/update/0.3/payload.d.ts +2042 -0
- package/dist/acl/update/0.3/payload.d.ts.map +1 -0
- package/dist/acl/update/0.3/payload.js +1163 -0
- package/dist/acl/update/0.3/payload.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.2/room.d.ts +1 -1
- package/dist/rooms/_shared/0.2/room.d.ts.map +1 -1
- package/dist/rooms/keys/file-key/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/file-key/0.1/payload.js +1 -1
- package/dist/rooms/keys/file-key/0.2/payload.d.ts +14 -2
- package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/file-key/0.2/payload.js +1 -1
- package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/file-key/0.3/payload.d.ts +396 -0
- package/dist/rooms/keys/file-key/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/file-key/0.3/payload.js +223 -0
- package/dist/rooms/keys/file-key/0.3/payload.js.map +1 -0
- package/dist/rooms/keys/open/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/open/0.1/payload.js +1 -1
- package/dist/rooms/keys/open/0.2/payload.d.ts +14 -2
- package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/open/0.2/payload.js +1 -1
- package/dist/rooms/keys/open/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/open/0.3/payload.d.ts +413 -0
- package/dist/rooms/keys/open/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/open/0.3/payload.js +227 -0
- package/dist/rooms/keys/open/0.3/payload.js.map +1 -0
- package/dist/rooms/keys/read/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/read/0.1/payload.js +1 -1
- package/dist/rooms/keys/read/0.2/payload.d.ts +14 -2
- package/dist/rooms/keys/read/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/read/0.2/payload.js +1 -1
- package/dist/rooms/keys/read/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/read/0.3/payload.d.ts +1363 -0
- package/dist/rooms/keys/read/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/read/0.3/payload.js +731 -0
- package/dist/rooms/keys/read/0.3/payload.js.map +1 -0
- package/dist/rooms/owner/issue-authority/0.2/payload.d.ts +13 -2
- package/dist/rooms/owner/issue-authority/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/owner/issue-authority/0.2/payload.js +1 -1
- package/dist/rooms/owner/issue-authority/0.2/payload.js.map +1 -1
- package/dist/rooms/owner/issue-authority/0.3/payload.d.ts +557 -0
- package/dist/rooms/owner/issue-authority/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-authority/0.3/payload.js +322 -0
- package/dist/rooms/owner/issue-authority/0.3/payload.js.map +1 -0
- package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.1/payload.js +1 -1
- package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.2/payload.js +1 -1
- package/dist/rooms/records/get/0.3/payload.d.ts +13 -2
- package/dist/rooms/records/get/0.3/payload.d.ts.map +1 -1
- package/dist/rooms/records/get/0.3/payload.js +1 -1
- package/dist/rooms/records/get/0.3/payload.js.map +1 -1
- package/dist/rooms/records/get/0.4/payload.d.ts +1140 -0
- package/dist/rooms/records/get/0.4/payload.d.ts.map +1 -0
- package/dist/rooms/records/get/0.4/payload.js +613 -0
- package/dist/rooms/records/get/0.4/payload.js.map +1 -0
- package/dist/vault/sign-trust-task/0.2/payload.d.ts +5 -5
- package/dist/vault/sign-trust-task/0.2/payload.js +2 -2
- package/dist/vta/_shared/0.1/memory-record.d.ts +1 -1
- package/dist/vta/_shared/0.1/memory-record.d.ts.map +1 -1
- package/dist/vta/memory/delete/0.1/payload.d.ts +4 -4
- package/dist/vta/memory/delete/0.1/payload.js +1 -1
- package/dist/vta/memory/delete/0.2/payload.d.ts +14 -2
- package/dist/vta/memory/delete/0.2/payload.d.ts.map +1 -1
- package/dist/vta/memory/delete/0.2/payload.js +1 -1
- package/dist/vta/memory/delete/0.2/payload.js.map +1 -1
- package/dist/vta/memory/delete/0.3/payload.d.ts +491 -0
- package/dist/vta/memory/delete/0.3/payload.d.ts.map +1 -0
- package/dist/vta/memory/delete/0.3/payload.js +266 -0
- package/dist/vta/memory/delete/0.3/payload.js.map +1 -0
- package/dist/vta/memory/get/0.1/payload.d.ts +14 -2
- package/dist/vta/memory/get/0.1/payload.d.ts.map +1 -1
- package/dist/vta/memory/get/0.1/payload.js +1 -1
- package/dist/vta/memory/get/0.1/payload.js.map +1 -1
- package/dist/vta/memory/get/0.2/payload.d.ts +722 -0
- package/dist/vta/memory/get/0.2/payload.d.ts.map +1 -0
- package/dist/vta/memory/get/0.2/payload.js +391 -0
- package/dist/vta/memory/get/0.2/payload.js.map +1 -0
- package/dist/vta/memory/list/0.1/payload.d.ts +4 -4
- package/dist/vta/memory/list/0.1/payload.js +1 -1
- package/dist/vta/memory/list/0.2/payload.d.ts +14 -2
- package/dist/vta/memory/list/0.2/payload.d.ts.map +1 -1
- package/dist/vta/memory/list/0.2/payload.js +1 -1
- package/dist/vta/memory/list/0.2/payload.js.map +1 -1
- package/dist/vta/memory/list/0.3/payload.d.ts +769 -0
- package/dist/vta/memory/list/0.3/payload.d.ts.map +1 -0
- package/dist/vta/memory/list/0.3/payload.js +405 -0
- package/dist/vta/memory/list/0.3/payload.js.map +1 -0
- package/dist/vta/memory/put/0.1/payload.d.ts +4 -4
- package/dist/vta/memory/put/0.1/payload.js +1 -1
- package/dist/vta/memory/put/0.2/payload.d.ts +14 -2
- package/dist/vta/memory/put/0.2/payload.d.ts.map +1 -1
- package/dist/vta/memory/put/0.2/payload.js +1 -1
- package/dist/vta/memory/put/0.2/payload.js.map +1 -1
- package/dist/vta/memory/put/0.3/payload.d.ts +566 -0
- package/dist/vta/memory/put/0.3/payload.d.ts.map +1 -0
- package/dist/vta/memory/put/0.3/payload.js +306 -0
- package/dist/vta/memory/put/0.3/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_extends.ts +9 -0
- package/src/_shared/components.ts +117 -0
- package/src/acl/_shared/0.3/acl-entry.ts +25 -0
- package/src/acl/change-role/0.1/payload.ts +5 -5
- package/src/acl/change-role/0.2/payload.ts +15 -3
- package/src/acl/change-role/0.3/payload.ts +1167 -0
- package/src/acl/grant/0.1/payload.ts +5 -5
- package/src/acl/grant/0.2/payload.ts +15 -3
- package/src/acl/grant/0.3/payload.ts +1146 -0
- package/src/acl/list/0.1/payload.ts +5 -5
- package/src/acl/list/0.2/payload.ts +5 -5
- package/src/acl/list/0.3/payload.ts +15 -3
- package/src/acl/list/0.4/payload.ts +1267 -0
- package/src/acl/revoke/0.1/payload.ts +5 -5
- package/src/acl/revoke/0.2/payload.ts +15 -3
- package/src/acl/revoke/0.3/payload.ts +1278 -0
- package/src/acl/show/0.1/payload.ts +5 -5
- package/src/acl/show/0.2/payload.ts +15 -3
- package/src/acl/show/0.3/payload.ts +1172 -0
- package/src/acl/update/0.1/payload.ts +5 -5
- package/src/acl/update/0.2/payload.ts +15 -3
- package/src/acl/update/0.3/payload.ts +1258 -0
- package/src/index.ts +48 -0
- package/src/rooms/_shared/0.2/room.ts +1 -1
- package/src/rooms/keys/file-key/0.1/payload.ts +5 -5
- package/src/rooms/keys/file-key/0.2/payload.ts +15 -3
- package/src/rooms/keys/file-key/0.3/payload.ts +286 -0
- package/src/rooms/keys/open/0.1/payload.ts +5 -5
- package/src/rooms/keys/open/0.2/payload.ts +15 -3
- package/src/rooms/keys/open/0.3/payload.ts +299 -0
- package/src/rooms/keys/read/0.1/payload.ts +5 -5
- package/src/rooms/keys/read/0.2/payload.ts +15 -3
- package/src/rooms/keys/read/0.3/payload.ts +901 -0
- package/src/rooms/owner/issue-authority/0.2/payload.ts +14 -3
- package/src/rooms/owner/issue-authority/0.3/payload.ts +388 -0
- package/src/rooms/records/get/0.1/payload.ts +5 -5
- package/src/rooms/records/get/0.2/payload.ts +5 -5
- package/src/rooms/records/get/0.3/payload.ts +14 -3
- package/src/rooms/records/get/0.4/payload.ts +730 -0
- package/src/vault/sign-trust-task/0.2/payload.ts +3 -3
- package/src/vta/_shared/0.1/memory-record.ts +1 -1
- package/src/vta/memory/delete/0.1/payload.ts +5 -5
- package/src/vta/memory/delete/0.2/payload.ts +15 -3
- package/src/vta/memory/delete/0.3/payload.ts +334 -0
- package/src/vta/memory/get/0.1/payload.ts +15 -3
- package/src/vta/memory/get/0.2/payload.ts +460 -0
- package/src/vta/memory/list/0.1/payload.ts +5 -5
- package/src/vta/memory/list/0.2/payload.ts +15 -3
- package/src/vta/memory/list/0.3/payload.ts +491 -0
- package/src/vta/memory/put/0.1/payload.ts +5 -5
- package/src/vta/memory/put/0.2/payload.ts +15 -3
- package/src/vta/memory/put/0.3/payload.ts +379 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/memory/list/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, MemoryKey, MemoryPurpose, MemoryRecord, MemoryValue, MemoryVersion, Purpose_AclV0_3 as Purpose, Purpose_AclV0_31, Purpose_AclV0_32 } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Enumerate the memory items in a context. Two modes, distinguished by whether `sinceVersion` is supplied. Without it this is a SNAPSHOT of live items, optionally narrowed by `prefix`. With it this is a CHANGE FEED: every item in the context whose version exceeds the watermark, tombstones included, which is what lets an agent's local cache on another device converge. Pagination is opaque-cursor based.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTAMemoryListPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The VTA context to enumerate; the isolation boundary.
|
|
15
|
+
*/
|
|
16
|
+
contextId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Restrict to items whose `key` begins with this byte prefix, compared over the UTF-8 encoding. Lets an agent recall one family of items — `contact/`, `preference/` — without dragging the whole context through the response.
|
|
19
|
+
*/
|
|
20
|
+
prefix?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Watermark. Selects change-feed mode: only items whose `version` is strictly greater are returned, tombstones included. Supply the `highWatermark` from the previous sync, or 0 for a first full pull in change-feed form.
|
|
23
|
+
*/
|
|
24
|
+
sinceVersion?: number;
|
|
25
|
+
/**
|
|
26
|
+
* When true, each returned item carries its `value`. Defaults to TRUE — unlike vta/app-state/list — because recalling the text is what an agent lists memory for, and 0.1 always returned values. Set it false for the metadata view (key, version, timestamps, `valueBytes`), which makes a scan of a large context cheap.
|
|
27
|
+
*/
|
|
28
|
+
includeValues?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Snapshot mode only: when true, tombstones still inside the retention window are returned alongside live items. Defaults to false. In change-feed mode tombstones are always returned and this member MUST NOT be set to false — a change feed that omits deletions cannot converge.
|
|
31
|
+
*/
|
|
32
|
+
includeDeleted?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* An opaque continuation token from a previous response's `nextCursor`; a responder MUST NOT accept a cursor it did not issue. Consumers MUST treat it as opaque: never construct, decode, mutate, or infer meaning from one.
|
|
35
|
+
*/
|
|
36
|
+
cursor?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The most items to return; the responder chooses a default and MAY return fewer, which is likely when `includeValues` is in effect and the values are large.
|
|
39
|
+
*/
|
|
40
|
+
limit?: number;
|
|
41
|
+
/**
|
|
42
|
+
* OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103). Granted only as the caller's ACL entry grants it; a purpose the entry does not grant is refused with `purposeNotGranted`. May be omitted where the entry lists exactly one purpose, or states `any`.
|
|
43
|
+
*/
|
|
44
|
+
purpose?: MemoryPurpose;
|
|
45
|
+
/**
|
|
46
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
47
|
+
*/
|
|
48
|
+
ext?: Ext;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Success response to vta/memory/list. Type https://trusttasks.org/spec/vta/memory/list/0.3#response.
|
|
52
|
+
*/
|
|
53
|
+
export interface VTAMemoryListResponsePayload {
|
|
54
|
+
/**
|
|
55
|
+
* Matching items in ascending key order in snapshot mode, and ascending version order in change-feed mode — the latter so that a consumer applying them in order reaches the same state as the maintainer. May be empty.
|
|
56
|
+
*/
|
|
57
|
+
items: MemoryRecord[];
|
|
58
|
+
/**
|
|
59
|
+
* Opaque continuation token for the next page, sent back as the request's `cursor`. Present when more matching items exist beyond this page; absent on the last page.
|
|
60
|
+
*/
|
|
61
|
+
nextCursor?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The context's current counter value; 0 for a context that has never been written. This is what a consumer stores as its next `sinceVersion` — NOT the maximum version among `items`, which is wrong whenever a `prefix` filtered a later change out, and undefined when the page is empty. A paginating consumer MUST NOT advance its stored watermark until it has drained the final page — the one with no `nextCursor` — because the pages of one feed share this value and adopting it early would skip the items still to come.
|
|
64
|
+
*/
|
|
65
|
+
highWatermark: number;
|
|
66
|
+
/**
|
|
67
|
+
* How long this maintainer retains tombstones before reaping them. Advisory, so a consumer can schedule its syncs to stay inside the window rather than discovering it has fallen out of it via vta/memory/list:watermarkTooOld.
|
|
68
|
+
*/
|
|
69
|
+
tombstoneRetentionSeconds?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
72
|
+
*/
|
|
73
|
+
ext?: Ext;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
77
|
+
export type { Ext, MemoryKey, MemoryPurpose, MemoryRecord, MemoryValue, MemoryVersion, Purpose, Purpose_AclV0_31, Purpose_AclV0_32 };
|
|
78
|
+
|
|
79
|
+
/** Trust Task type URI. */
|
|
80
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/memory/list/0.3" as const;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The earlier version of this specification that this one declares it
|
|
84
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
85
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
86
|
+
* `extendsChain` / `readForSpec`.
|
|
87
|
+
*/
|
|
88
|
+
export const EXTENDS: string | null = "0.2";
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
92
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
93
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
94
|
+
* Versions").
|
|
95
|
+
*/
|
|
96
|
+
export const DEPRECATION: string | null = null;
|
|
97
|
+
|
|
98
|
+
/** Stable alias for this specification's request payload shape. */
|
|
99
|
+
export type Payload = VTAMemoryListPayload;
|
|
100
|
+
|
|
101
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
102
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/memory/list/0.3#response" as const;
|
|
103
|
+
|
|
104
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
105
|
+
export type Response = VTAMemoryListResponsePayload;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* This specification's payload schema, as a value.
|
|
109
|
+
*
|
|
110
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
111
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
112
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
113
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
114
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
115
|
+
*/
|
|
116
|
+
export const PAYLOAD_SCHEMA = {
|
|
117
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
118
|
+
"$id": "https://trusttasks.org/spec/vta/memory/list/0.3",
|
|
119
|
+
"title": "VTA Memory List — payload",
|
|
120
|
+
"description": "Enumerate the memory items in a context. Two modes, distinguished by whether `sinceVersion` is supplied. Without it this is a SNAPSHOT of live items, optionally narrowed by `prefix`. With it this is a CHANGE FEED: every item in the context whose version exceeds the watermark, tombstones included, which is what lets an agent's local cache on another device converge. Pagination is opaque-cursor based.",
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": [
|
|
124
|
+
"contextId"
|
|
125
|
+
],
|
|
126
|
+
"properties": {
|
|
127
|
+
"contextId": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"minLength": 1,
|
|
130
|
+
"description": "The VTA context to enumerate; the isolation boundary."
|
|
131
|
+
},
|
|
132
|
+
"prefix": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"minLength": 1,
|
|
135
|
+
"maxLength": 512,
|
|
136
|
+
"description": "Restrict to items whose `key` begins with this byte prefix, compared over the UTF-8 encoding. Lets an agent recall one family of items — `contact/`, `preference/` — without dragging the whole context through the response."
|
|
137
|
+
},
|
|
138
|
+
"sinceVersion": {
|
|
139
|
+
"type": "integer",
|
|
140
|
+
"minimum": 0,
|
|
141
|
+
"description": "Watermark. Selects change-feed mode: only items whose `version` is strictly greater are returned, tombstones included. Supply the `highWatermark` from the previous sync, or 0 for a first full pull in change-feed form."
|
|
142
|
+
},
|
|
143
|
+
"includeValues": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"description": "When true, each returned item carries its `value`. Defaults to TRUE — unlike vta/app-state/list — because recalling the text is what an agent lists memory for, and 0.1 always returned values. Set it false for the metadata view (key, version, timestamps, `valueBytes`), which makes a scan of a large context cheap."
|
|
146
|
+
},
|
|
147
|
+
"includeDeleted": {
|
|
148
|
+
"type": "boolean",
|
|
149
|
+
"description": "Snapshot mode only: when true, tombstones still inside the retention window are returned alongside live items. Defaults to false. In change-feed mode tombstones are always returned and this member MUST NOT be set to false — a change feed that omits deletions cannot converge."
|
|
150
|
+
},
|
|
151
|
+
"cursor": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "An opaque continuation token from a previous response's `nextCursor`; a responder MUST NOT accept a cursor it did not issue. Consumers MUST treat it as opaque: never construct, decode, mutate, or infer meaning from one."
|
|
154
|
+
},
|
|
155
|
+
"limit": {
|
|
156
|
+
"type": "integer",
|
|
157
|
+
"minimum": 1,
|
|
158
|
+
"maximum": 1000,
|
|
159
|
+
"description": "The most items to return; the responder chooses a default and MAY return fewer, which is likely when `includeValues` is in effect and the values are large."
|
|
160
|
+
},
|
|
161
|
+
"purpose": {
|
|
162
|
+
"$ref": "#/$defs/MemoryPurpose",
|
|
163
|
+
"description": "OPTIONAL. The one purpose the caller will use the content this request discloses for (VTI-ACL-103). Granted only as the caller's ACL entry grants it; a purpose the entry does not grant is refused with `purposeNotGranted`. May be omitted where the entry lists exactly one purpose, or states `any`."
|
|
164
|
+
},
|
|
165
|
+
"ext": {
|
|
166
|
+
"$ref": "#/$defs/Ext",
|
|
167
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"$defs": {
|
|
171
|
+
"Response": {
|
|
172
|
+
"$anchor": "response",
|
|
173
|
+
"title": "VTA Memory List — response payload",
|
|
174
|
+
"description": "Success response to vta/memory/list. Type https://trusttasks.org/spec/vta/memory/list/0.3#response.",
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": [
|
|
178
|
+
"items",
|
|
179
|
+
"highWatermark"
|
|
180
|
+
],
|
|
181
|
+
"properties": {
|
|
182
|
+
"items": {
|
|
183
|
+
"type": "array",
|
|
184
|
+
"items": {
|
|
185
|
+
"$ref": "#/$defs/MemoryRecord"
|
|
186
|
+
},
|
|
187
|
+
"description": "Matching items in ascending key order in snapshot mode, and ascending version order in change-feed mode — the latter so that a consumer applying them in order reaches the same state as the maintainer. May be empty."
|
|
188
|
+
},
|
|
189
|
+
"nextCursor": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"description": "Opaque continuation token for the next page, sent back as the request's `cursor`. Present when more matching items exist beyond this page; absent on the last page."
|
|
192
|
+
},
|
|
193
|
+
"highWatermark": {
|
|
194
|
+
"type": "integer",
|
|
195
|
+
"minimum": 0,
|
|
196
|
+
"description": "The context's current counter value; 0 for a context that has never been written. This is what a consumer stores as its next `sinceVersion` — NOT the maximum version among `items`, which is wrong whenever a `prefix` filtered a later change out, and undefined when the page is empty. A paginating consumer MUST NOT advance its stored watermark until it has drained the final page — the one with no `nextCursor` — because the pages of one feed share this value and adopting it early would skip the items still to come."
|
|
197
|
+
},
|
|
198
|
+
"tombstoneRetentionSeconds": {
|
|
199
|
+
"type": "integer",
|
|
200
|
+
"minimum": 0,
|
|
201
|
+
"description": "How long this maintainer retains tombstones before reaping them. Advisory, so a consumer can schedule its syncs to stay inside the window rather than discovering it has fallen out of it via vta/memory/list:watermarkTooOld."
|
|
202
|
+
},
|
|
203
|
+
"ext": {
|
|
204
|
+
"$ref": "#/$defs/Ext",
|
|
205
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"Ext": {
|
|
210
|
+
"title": "Ext",
|
|
211
|
+
"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.",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"minProperties": 1,
|
|
214
|
+
"additionalProperties": true,
|
|
215
|
+
"propertyNames": {
|
|
216
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"MemoryRecord": {
|
|
220
|
+
"title": "MemoryRecord",
|
|
221
|
+
"description": "A memory item as the maintainer holds it. `value` is absent in two distinct situations and a consumer MUST NOT conflate them: the item is a tombstone (`deleted` is true), or the caller asked for a metadata-only view (`vta/memory/list` without `includeValues`). This is why `deleted` is required rather than defaulted — a consumer that infers deletion from an absent value gets the tombstone case wrong exactly when convergence depends on it.",
|
|
222
|
+
"type": "object",
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"required": [
|
|
225
|
+
"contextId",
|
|
226
|
+
"key",
|
|
227
|
+
"version",
|
|
228
|
+
"deleted",
|
|
229
|
+
"updatedAt"
|
|
230
|
+
],
|
|
231
|
+
"properties": {
|
|
232
|
+
"contextId": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"minLength": 1,
|
|
235
|
+
"description": "The VTA context the item is scoped to; the isolation boundary."
|
|
236
|
+
},
|
|
237
|
+
"key": {
|
|
238
|
+
"$ref": "#/$defs/MemoryKey"
|
|
239
|
+
},
|
|
240
|
+
"version": {
|
|
241
|
+
"$ref": "#/$defs/MemoryVersion",
|
|
242
|
+
"description": "The context counter value this item's most recent write took. Supply it as `expectedVersion` on the next write to make that write conditional on nothing having changed in between."
|
|
243
|
+
},
|
|
244
|
+
"value": {
|
|
245
|
+
"$ref": "#/$defs/MemoryValue",
|
|
246
|
+
"description": "The remembered text. Absent when this is a tombstone or a metadata-only view."
|
|
247
|
+
},
|
|
248
|
+
"valueBytes": {
|
|
249
|
+
"type": "integer",
|
|
250
|
+
"minimum": 0,
|
|
251
|
+
"description": "Size of the stored value in bytes over its UTF-8 encoding, as the maintainer measures it for the per-item cap. Present in metadata-only views so a consumer can decide what to fetch without fetching it; absent on a tombstone."
|
|
252
|
+
},
|
|
253
|
+
"deleted": {
|
|
254
|
+
"type": "boolean",
|
|
255
|
+
"description": "True when this is a tombstone: the item 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/memory/list`."
|
|
256
|
+
},
|
|
257
|
+
"createdAt": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"format": "date-time",
|
|
260
|
+
"description": "When the item was first created at this key. MAY be absent on a tombstone whose body has been discarded, and on an item written before the maintainer kept versions."
|
|
261
|
+
},
|
|
262
|
+
"updatedAt": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"format": "date-time",
|
|
265
|
+
"description": "When the write that produced this `version` was applied. For a tombstone, when the delete was applied."
|
|
266
|
+
},
|
|
267
|
+
"deletedAt": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"format": "date-time",
|
|
270
|
+
"description": "When the item was deleted. Present only when `deleted` is true; equal to `updatedAt` for a tombstone the maintainer has not since rewritten."
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"MemoryValue": {
|
|
275
|
+
"title": "MemoryValue",
|
|
276
|
+
"description": "The remembered text: a fact, a summary, a preference. Opaque to the maintainer, which stores it as given and never interprets, rewrites or summarises it. The maintainer enforces a documented per-item cap on its size (see `vta/memory/put`).",
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"MemoryVersion": {
|
|
280
|
+
"title": "MemoryVersion",
|
|
281
|
+
"description": "A value of the context's monotonic write counter (see this schema's description). Server-assigned; a producer never chooses one.",
|
|
282
|
+
"type": "integer",
|
|
283
|
+
"minimum": 1
|
|
284
|
+
},
|
|
285
|
+
"MemoryKey": {
|
|
286
|
+
"title": "MemoryKey",
|
|
287
|
+
"description": "Agent-chosen identifier for an item within a context. Opaque to the maintainer: it MUST NOT be parsed, normalized, or case-folded, and prefix matching in `vta/memory/list` is a byte-prefix comparison over the UTF-8 encoding. Agents SHOULD use `/`-delimited hierarchical keys (`contact/billing`, `preference/timezone`) so that `prefix` can address a family of items, but the delimiter is a convention between an agent and itself. A key is content as well as an address: a key naming a person, a condition or a dispute discloses something to anyone who can list the context, even without its value.",
|
|
288
|
+
"type": "string",
|
|
289
|
+
"minLength": 1,
|
|
290
|
+
"maxLength": 512,
|
|
291
|
+
"pattern": "^[^\\u0000]+$"
|
|
292
|
+
},
|
|
293
|
+
"MemoryPurpose": {
|
|
294
|
+
"title": "MemoryPurpose",
|
|
295
|
+
"description": "The one purpose for which the caller will use the memory content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. The VTA grants it only if the caller's ACL entry does — `any` grants every purpose but `modelTraining` — refuses it otherwise (`purposeNotGranted`), and records it in the audit record of the read. Optional where the entry lists exactly one purpose (that one applies) or states `any` (the read is recorded as for no stated purpose).",
|
|
296
|
+
"$ref": "#/$defs/Purpose"
|
|
297
|
+
},
|
|
298
|
+
"Purpose": {
|
|
299
|
+
"title": "Purpose",
|
|
300
|
+
"description": "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.",
|
|
301
|
+
"type": "string",
|
|
302
|
+
"maxLength": 2048,
|
|
303
|
+
"anyOf": [
|
|
304
|
+
{
|
|
305
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,63}$"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$"
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
} as const;
|
|
314
|
+
|
|
315
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
316
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
317
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
318
|
+
"$ref": "#/$defs/Response",
|
|
319
|
+
"$defs": {
|
|
320
|
+
"Response": {
|
|
321
|
+
"$anchor": "response",
|
|
322
|
+
"title": "VTA Memory List — response payload",
|
|
323
|
+
"description": "Success response to vta/memory/list. Type https://trusttasks.org/spec/vta/memory/list/0.3#response.",
|
|
324
|
+
"type": "object",
|
|
325
|
+
"additionalProperties": false,
|
|
326
|
+
"required": [
|
|
327
|
+
"items",
|
|
328
|
+
"highWatermark"
|
|
329
|
+
],
|
|
330
|
+
"properties": {
|
|
331
|
+
"items": {
|
|
332
|
+
"type": "array",
|
|
333
|
+
"items": {
|
|
334
|
+
"$ref": "#/$defs/MemoryRecord"
|
|
335
|
+
},
|
|
336
|
+
"description": "Matching items in ascending key order in snapshot mode, and ascending version order in change-feed mode — the latter so that a consumer applying them in order reaches the same state as the maintainer. May be empty."
|
|
337
|
+
},
|
|
338
|
+
"nextCursor": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"description": "Opaque continuation token for the next page, sent back as the request's `cursor`. Present when more matching items exist beyond this page; absent on the last page."
|
|
341
|
+
},
|
|
342
|
+
"highWatermark": {
|
|
343
|
+
"type": "integer",
|
|
344
|
+
"minimum": 0,
|
|
345
|
+
"description": "The context's current counter value; 0 for a context that has never been written. This is what a consumer stores as its next `sinceVersion` — NOT the maximum version among `items`, which is wrong whenever a `prefix` filtered a later change out, and undefined when the page is empty. A paginating consumer MUST NOT advance its stored watermark until it has drained the final page — the one with no `nextCursor` — because the pages of one feed share this value and adopting it early would skip the items still to come."
|
|
346
|
+
},
|
|
347
|
+
"tombstoneRetentionSeconds": {
|
|
348
|
+
"type": "integer",
|
|
349
|
+
"minimum": 0,
|
|
350
|
+
"description": "How long this maintainer retains tombstones before reaping them. Advisory, so a consumer can schedule its syncs to stay inside the window rather than discovering it has fallen out of it via vta/memory/list:watermarkTooOld."
|
|
351
|
+
},
|
|
352
|
+
"ext": {
|
|
353
|
+
"$ref": "#/$defs/Ext",
|
|
354
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"Ext": {
|
|
359
|
+
"title": "Ext",
|
|
360
|
+
"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.",
|
|
361
|
+
"type": "object",
|
|
362
|
+
"minProperties": 1,
|
|
363
|
+
"additionalProperties": true,
|
|
364
|
+
"propertyNames": {
|
|
365
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"MemoryRecord": {
|
|
369
|
+
"title": "MemoryRecord",
|
|
370
|
+
"description": "A memory item as the maintainer holds it. `value` is absent in two distinct situations and a consumer MUST NOT conflate them: the item is a tombstone (`deleted` is true), or the caller asked for a metadata-only view (`vta/memory/list` without `includeValues`). This is why `deleted` is required rather than defaulted — a consumer that infers deletion from an absent value gets the tombstone case wrong exactly when convergence depends on it.",
|
|
371
|
+
"type": "object",
|
|
372
|
+
"additionalProperties": false,
|
|
373
|
+
"required": [
|
|
374
|
+
"contextId",
|
|
375
|
+
"key",
|
|
376
|
+
"version",
|
|
377
|
+
"deleted",
|
|
378
|
+
"updatedAt"
|
|
379
|
+
],
|
|
380
|
+
"properties": {
|
|
381
|
+
"contextId": {
|
|
382
|
+
"type": "string",
|
|
383
|
+
"minLength": 1,
|
|
384
|
+
"description": "The VTA context the item is scoped to; the isolation boundary."
|
|
385
|
+
},
|
|
386
|
+
"key": {
|
|
387
|
+
"$ref": "#/$defs/MemoryKey"
|
|
388
|
+
},
|
|
389
|
+
"version": {
|
|
390
|
+
"$ref": "#/$defs/MemoryVersion",
|
|
391
|
+
"description": "The context counter value this item's most recent write took. Supply it as `expectedVersion` on the next write to make that write conditional on nothing having changed in between."
|
|
392
|
+
},
|
|
393
|
+
"value": {
|
|
394
|
+
"$ref": "#/$defs/MemoryValue",
|
|
395
|
+
"description": "The remembered text. Absent when this is a tombstone or a metadata-only view."
|
|
396
|
+
},
|
|
397
|
+
"valueBytes": {
|
|
398
|
+
"type": "integer",
|
|
399
|
+
"minimum": 0,
|
|
400
|
+
"description": "Size of the stored value in bytes over its UTF-8 encoding, as the maintainer measures it for the per-item cap. Present in metadata-only views so a consumer can decide what to fetch without fetching it; absent on a tombstone."
|
|
401
|
+
},
|
|
402
|
+
"deleted": {
|
|
403
|
+
"type": "boolean",
|
|
404
|
+
"description": "True when this is a tombstone: the item 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/memory/list`."
|
|
405
|
+
},
|
|
406
|
+
"createdAt": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"format": "date-time",
|
|
409
|
+
"description": "When the item was first created at this key. MAY be absent on a tombstone whose body has been discarded, and on an item written before the maintainer kept versions."
|
|
410
|
+
},
|
|
411
|
+
"updatedAt": {
|
|
412
|
+
"type": "string",
|
|
413
|
+
"format": "date-time",
|
|
414
|
+
"description": "When the write that produced this `version` was applied. For a tombstone, when the delete was applied."
|
|
415
|
+
},
|
|
416
|
+
"deletedAt": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"format": "date-time",
|
|
419
|
+
"description": "When the item was deleted. Present only when `deleted` is true; equal to `updatedAt` for a tombstone the maintainer has not since rewritten."
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"MemoryValue": {
|
|
424
|
+
"title": "MemoryValue",
|
|
425
|
+
"description": "The remembered text: a fact, a summary, a preference. Opaque to the maintainer, which stores it as given and never interprets, rewrites or summarises it. The maintainer enforces a documented per-item cap on its size (see `vta/memory/put`).",
|
|
426
|
+
"type": "string"
|
|
427
|
+
},
|
|
428
|
+
"MemoryVersion": {
|
|
429
|
+
"title": "MemoryVersion",
|
|
430
|
+
"description": "A value of the context's monotonic write counter (see this schema's description). Server-assigned; a producer never chooses one.",
|
|
431
|
+
"type": "integer",
|
|
432
|
+
"minimum": 1
|
|
433
|
+
},
|
|
434
|
+
"MemoryKey": {
|
|
435
|
+
"title": "MemoryKey",
|
|
436
|
+
"description": "Agent-chosen identifier for an item within a context. Opaque to the maintainer: it MUST NOT be parsed, normalized, or case-folded, and prefix matching in `vta/memory/list` is a byte-prefix comparison over the UTF-8 encoding. Agents SHOULD use `/`-delimited hierarchical keys (`contact/billing`, `preference/timezone`) so that `prefix` can address a family of items, but the delimiter is a convention between an agent and itself. A key is content as well as an address: a key naming a person, a condition or a dispute discloses something to anyone who can list the context, even without its value.",
|
|
437
|
+
"type": "string",
|
|
438
|
+
"minLength": 1,
|
|
439
|
+
"maxLength": 512,
|
|
440
|
+
"pattern": "^[^\\u0000]+$"
|
|
441
|
+
},
|
|
442
|
+
"MemoryPurpose": {
|
|
443
|
+
"title": "MemoryPurpose",
|
|
444
|
+
"description": "The one purpose for which the caller will use the memory content a request discloses (VTI-ACL-103): a name registered in the VTI specification's purpose registry (`personalisation`, `taskExecution`, `analytics`, `modelTraining`) or an absolute IRI. The VTA grants it only if the caller's ACL entry does — `any` grants every purpose but `modelTraining` — refuses it otherwise (`purposeNotGranted`), and records it in the audit record of the read. Optional where the entry lists exactly one purpose (that one applies) or states `any` (the read is recorded as for no stated purpose).",
|
|
445
|
+
"$ref": "#/$defs/Purpose"
|
|
446
|
+
},
|
|
447
|
+
"Purpose": {
|
|
448
|
+
"title": "Purpose",
|
|
449
|
+
"description": "What content is used for: a lowerCamelCase name registered in the VTI specification's purpose registry (Appendix H) — `personalisation`, `taskExecution`, `analytics`, `modelTraining` at the time of writing — or an absolute IRI naming a purpose defined elsewhere, such as a purpose of the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#ServicePersonalisation`). Compared by exact string equality: a consumer MUST NOT treat a purpose it does not recognise as equal to any other, and grants only a request naming exactly a listed purpose (VTI-ACL-109). A registered name is never an IRI, because it contains no `:`.",
|
|
450
|
+
"type": "string",
|
|
451
|
+
"maxLength": 2048,
|
|
452
|
+
"anyOf": [
|
|
453
|
+
{
|
|
454
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,63}$"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]+$"
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
} as const;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
466
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
467
|
+
* per-specification and cannot be derived from the document alone, and
|
|
468
|
+
* item 2 needs the schema this carries.
|
|
469
|
+
*/
|
|
470
|
+
export const SPEC = {
|
|
471
|
+
typeUri: TYPE_URI,
|
|
472
|
+
isBearer: false,
|
|
473
|
+
isProofRequired: false,
|
|
474
|
+
isRecipientRequired: true,
|
|
475
|
+
isIssuedAtRequired: true,
|
|
476
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
477
|
+
} as const;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
481
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
482
|
+
* parties (§7.3 item 5).
|
|
483
|
+
*/
|
|
484
|
+
export const RESPONSE_SPEC = {
|
|
485
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
486
|
+
isBearer: false,
|
|
487
|
+
isProofRequired: true,
|
|
488
|
+
isRecipientRequired: true,
|
|
489
|
+
isIssuedAtRequired: true,
|
|
490
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
491
|
+
} as const;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { Ext } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
/** @deprecated superseded by vta/memory/put/0.
|
|
9
|
+
/** @deprecated superseded by vta/memory/put/0.3 */
|
|
10
10
|
export interface VTAMemoryPutPayload {
|
|
11
11
|
/**
|
|
12
12
|
* The VTA context the memory item is scoped to (the isolation boundary).
|
|
@@ -28,7 +28,7 @@ export interface VTAMemoryPutPayload {
|
|
|
28
28
|
/**
|
|
29
29
|
* Success response to vta/memory/put. Type https://trusttasks.org/spec/vta/memory/put/0.1#response.
|
|
30
30
|
*
|
|
31
|
-
* @deprecated superseded by vta/memory/put/0.
|
|
31
|
+
* @deprecated superseded by vta/memory/put/0.3
|
|
32
32
|
*/
|
|
33
33
|
export interface VTAMemoryPutResponsePayload {
|
|
34
34
|
/**
|
|
@@ -58,12 +58,12 @@ export const EXTENDS: string | null = null;
|
|
|
58
58
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
59
59
|
* Versions").
|
|
60
60
|
*/
|
|
61
|
-
export const DEPRECATION: string | null = "superseded by vta/memory/put/0.
|
|
61
|
+
export const DEPRECATION: string | null = "superseded by vta/memory/put/0.3";
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Stable alias for this specification's request payload shape.
|
|
65
65
|
*
|
|
66
|
-
* @deprecated superseded by vta/memory/put/0.
|
|
66
|
+
* @deprecated superseded by vta/memory/put/0.3
|
|
67
67
|
*/
|
|
68
68
|
export type Payload = VTAMemoryPutPayload;
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/memory/put/0.1
|
|
|
73
73
|
/**
|
|
74
74
|
* Stable alias for this specification's success-response payload shape.
|
|
75
75
|
*
|
|
76
|
-
* @deprecated superseded by vta/memory/put/0.
|
|
76
|
+
* @deprecated superseded by vta/memory/put/0.3
|
|
77
77
|
*/
|
|
78
78
|
export type Response = VTAMemoryPutResponsePayload;
|
|
79
79
|
|
|
@@ -8,6 +8,8 @@ import type { Ext, MemoryExpectedVersion, MemoryKey, MemoryValue, MemoryVersion
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Store one memory item at its `(contextId, key)` address. `expectedVersion` makes the write conditional: a positive value requires the item to be at exactly that version, and zero requires that no live item exists.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated superseded by vta/memory/put/0.3
|
|
11
13
|
*/
|
|
12
14
|
export interface VTAMemoryPutPayload {
|
|
13
15
|
/**
|
|
@@ -27,6 +29,8 @@ export interface VTAMemoryPutPayload {
|
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Success response to vta/memory/put. Type https://trusttasks.org/spec/vta/memory/put/0.2#response. A failed precondition is not a success: it is a trust-task-error carrying vta/memory/put:versionConflict, whose details carry the maintainer's current version and value.
|
|
32
|
+
*
|
|
33
|
+
* @deprecated superseded by vta/memory/put/0.3
|
|
30
34
|
*/
|
|
31
35
|
export interface VTAMemoryPutResponsePayload {
|
|
32
36
|
/**
|
|
@@ -76,15 +80,23 @@ export const EXTENDS: string | null = null;
|
|
|
76
80
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
77
81
|
* Versions").
|
|
78
82
|
*/
|
|
79
|
-
export const DEPRECATION: string | null =
|
|
83
|
+
export const DEPRECATION: string | null = "superseded by vta/memory/put/0.3";
|
|
80
84
|
|
|
81
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Stable alias for this specification's request payload shape.
|
|
87
|
+
*
|
|
88
|
+
* @deprecated superseded by vta/memory/put/0.3
|
|
89
|
+
*/
|
|
82
90
|
export type Payload = VTAMemoryPutPayload;
|
|
83
91
|
|
|
84
92
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
85
93
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/memory/put/0.2#response" as const;
|
|
86
94
|
|
|
87
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Stable alias for this specification's success-response payload shape.
|
|
97
|
+
*
|
|
98
|
+
* @deprecated superseded by vta/memory/put/0.3
|
|
99
|
+
*/
|
|
88
100
|
export type Response = VTAMemoryPutResponsePayload;
|
|
89
101
|
|
|
90
102
|
/**
|