@openvtc/trust-tasks 0.27.0 → 0.27.2
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 +267 -0
- package/dist/_runtime/freshness.d.ts +3 -1
- package/dist/_runtime/freshness.d.ts.map +1 -1
- package/dist/_runtime/freshness.js +4 -2
- package/dist/_runtime/freshness.js.map +1 -1
- package/dist/_shared/components.d.ts +361 -24
- 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 +4 -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 +4 -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 +4 -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 +4 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/create/0.2/payload.d.ts +534 -0
- package/dist/rooms/create/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/create/0.2/payload.js +293 -0
- package/dist/rooms/create/0.2/payload.js.map +1 -0
- package/dist/rooms/epoch/chain/0.2/payload.d.ts +534 -0
- package/dist/rooms/epoch/chain/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/chain/0.2/payload.js +292 -0
- package/dist/rooms/epoch/chain/0.2/payload.js.map +1 -0
- package/dist/rooms/epoch/prune/0.2/payload.d.ts +467 -0
- package/dist/rooms/epoch/prune/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/prune/0.2/payload.js +251 -0
- package/dist/rooms/epoch/prune/0.2/payload.js.map +1 -0
- package/dist/rooms/info/0.2/payload.d.ts +1129 -0
- package/dist/rooms/info/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/info/0.2/payload.js +618 -0
- package/dist/rooms/info/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/backfill/0.2/payload.d.ts +380 -0
- package/dist/rooms/keys/backfill/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/backfill/0.2/payload.js +197 -0
- package/dist/rooms/keys/backfill/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/browse/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/browse/0.1/payload.js +2 -2
- package/dist/rooms/keys/browse/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/browse/0.2/payload.d.ts +941 -0
- package/dist/rooms/keys/browse/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/browse/0.2/payload.js +558 -0
- package/dist/rooms/keys/browse/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/chain/0.2/payload.d.ts +450 -0
- package/dist/rooms/keys/chain/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/chain/0.2/payload.js +248 -0
- package/dist/rooms/keys/chain/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/profile/read/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/profile/read/0.1/payload.js +2 -2
- package/dist/rooms/keys/profile/read/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/read/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/read/0.1/payload.js +2 -2
- package/dist/rooms/keys/read/0.1/payload.js.map +1 -1
- package/dist/rooms/owner/anchor/0.1/payload.d.ts +4 -4
- package/dist/rooms/owner/anchor/0.1/payload.js +2 -2
- package/dist/rooms/owner/anchor/0.1/payload.js.map +1 -1
- package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.1/payload.js +2 -2
- package/dist/rooms/records/get/0.1/payload.js.map +1 -1
- package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.2/payload.js +2 -2
- package/dist/rooms/records/get/0.2/payload.js.map +1 -1
- package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.1/payload.js +2 -2
- package/dist/rooms/records/list/0.1/payload.js.map +1 -1
- package/dist/rooms/records/list/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.2/payload.js +2 -2
- package/dist/rooms/records/list/0.2/payload.js.map +1 -1
- package/dist/rooms/records/list/0.3/payload.d.ts +970 -0
- package/dist/rooms/records/list/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/records/list/0.3/payload.js +526 -0
- package/dist/rooms/records/list/0.3/payload.js.map +1 -0
- package/dist/rooms/records/prune/0.1/payload.d.ts +706 -0
- package/dist/rooms/records/prune/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/records/prune/0.1/payload.js +374 -0
- package/dist/rooms/records/prune/0.1/payload.js.map +1 -0
- package/dist/rooms/records/put/0.3/payload.d.ts +1212 -0
- package/dist/rooms/records/put/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/records/put/0.3/payload.js +646 -0
- package/dist/rooms/records/put/0.3/payload.js.map +1 -0
- package/dist/rooms/records/retention/set/0.1/payload.d.ts +521 -0
- package/dist/rooms/records/retention/set/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/records/retention/set/0.1/payload.js +276 -0
- package/dist/rooms/records/retention/set/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/present/0.1/payload.d.ts +407 -0
- package/dist/vault/credentials/present/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/present/0.1/payload.js +217 -0
- package/dist/vault/credentials/present/0.1/payload.js.map +1 -0
- package/dist/voting/_shared/0.1/voting.d.ts +1 -1
- package/dist/voting/_shared/0.1/voting.d.ts.map +1 -1
- package/dist/voting/board/read/0.1/payload.d.ts +58 -2
- package/dist/voting/board/read/0.1/payload.d.ts.map +1 -1
- package/dist/voting/board/read/0.1/payload.js +36 -0
- package/dist/voting/board/read/0.1/payload.js.map +1 -1
- package/dist/voting/trustees/authorize/0.1/payload.d.ts +617 -0
- package/dist/voting/trustees/authorize/0.1/payload.d.ts.map +1 -0
- package/dist/voting/trustees/authorize/0.1/payload.js +386 -0
- package/dist/voting/trustees/authorize/0.1/payload.js.map +1 -0
- package/dist/voting/trustees/status/0.1/payload.d.ts +106 -2
- package/dist/voting/trustees/status/0.1/payload.d.ts.map +1 -1
- package/dist/voting/trustees/status/0.1/payload.js +48 -0
- package/dist/voting/trustees/status/0.1/payload.js.map +1 -1
- package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts +1832 -0
- package/dist/vta/pcs/trustee/deal/0.2/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/deal/0.2/payload.js +1077 -0
- package/dist/vta/pcs/trustee/deal/0.2/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/decrypt/0.2/payload.d.ts +758 -0
- package/dist/vta/pcs/trustee/decrypt/0.2/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/decrypt/0.2/payload.js +423 -0
- package/dist/vta/pcs/trustee/decrypt/0.2/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts +1867 -0
- package/dist/vta/pcs/trustee/justify/0.2/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/justify/0.2/payload.js +1095 -0
- package/dist/vta/pcs/trustee/justify/0.2/payload.js.map +1 -0
- package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts +1912 -0
- package/dist/vta/pcs/trustee/keys/0.2/payload.d.ts.map +1 -0
- package/dist/vta/pcs/trustee/keys/0.2/payload.js +1115 -0
- package/dist/vta/pcs/trustee/keys/0.2/payload.js.map +1 -0
- package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts +2228 -0
- package/dist/vta/pcs/vote-encrypted/0.2/payload.d.ts.map +1 -0
- package/dist/vta/pcs/vote-encrypted/0.2/payload.js +1300 -0
- package/dist/vta/pcs/vote-encrypted/0.2/payload.js.map +1 -0
- package/dist/vta/webvh/dids/create/1.2/payload.d.ts +961 -0
- package/dist/vta/webvh/dids/create/1.2/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/create/1.2/payload.js +480 -0
- package/dist/vta/webvh/dids/create/1.2/payload.js.map +1 -0
- package/dist/vtc/_shared/0.1/room-migration.d.ts +16 -0
- package/dist/vtc/_shared/0.1/room-migration.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/room-migration.js +6 -0
- package/dist/vtc/_shared/0.1/room-migration.js.map +1 -0
- package/dist/vtc/_shared/0.1/room-storage.d.ts +1 -1
- package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -1
- package/dist/vtc/_shared/0.2/room-storage.d.ts +16 -0
- package/dist/vtc/_shared/0.2/room-storage.d.ts.map +1 -0
- package/dist/vtc/_shared/0.2/room-storage.js +6 -0
- package/dist/vtc/_shared/0.2/room-storage.js.map +1 -0
- package/dist/vtc/admin/events/_shared/0.4/topic.d.ts +31 -0
- package/dist/vtc/admin/events/_shared/0.4/topic.d.ts.map +1 -0
- package/dist/vtc/admin/events/_shared/0.4/topic.js +6 -0
- package/dist/vtc/admin/events/_shared/0.4/topic.js.map +1 -0
- package/dist/vtc/admin/events/event/0.4/payload.d.ts +172 -0
- package/dist/vtc/admin/events/event/0.4/payload.d.ts.map +1 -0
- package/dist/vtc/admin/events/event/0.4/payload.js +103 -0
- package/dist/vtc/admin/events/event/0.4/payload.js.map +1 -0
- package/dist/vtc/admin/events/subscribe/0.4/payload.d.ts +409 -0
- package/dist/vtc/admin/events/subscribe/0.4/payload.d.ts.map +1 -0
- package/dist/vtc/admin/events/subscribe/0.4/payload.js +238 -0
- package/dist/vtc/admin/events/subscribe/0.4/payload.js.map +1 -0
- package/dist/vtc/elections/show/0.1/payload.d.ts +86 -2
- package/dist/vtc/elections/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/elections/show/0.1/payload.js +40 -0
- package/dist/vtc/elections/show/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/get/0.2/payload.d.ts +1966 -0
- package/dist/vtc/rooms/get/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/get/0.2/payload.js +976 -0
- package/dist/vtc/rooms/get/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/storage/migrate/0.2/payload.d.ts +595 -0
- package/dist/vtc/rooms/storage/migrate/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/storage/migrate/0.2/payload.js +336 -0
- package/dist/vtc/rooms/storage/migrate/0.2/payload.js.map +1 -0
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts +1 -1
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/create/0.2/payload.d.ts +1360 -0
- package/dist/vtc/storage/configs/create/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/create/0.2/payload.js +783 -0
- package/dist/vtc/storage/configs/create/0.2/payload.js.map +1 -0
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts +1 -1
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/get/0.2/payload.d.ts +1854 -0
- package/dist/vtc/storage/configs/get/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/get/0.2/payload.js +1075 -0
- package/dist/vtc/storage/configs/get/0.2/payload.js.map +1 -0
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts +1 -1
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/list/0.2/payload.d.ts +1955 -0
- package/dist/vtc/storage/configs/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/list/0.2/payload.js +1125 -0
- package/dist/vtc/storage/configs/list/0.2/payload.js.map +1 -0
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts +1 -1
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/update/0.2/payload.d.ts +1362 -0
- package/dist/vtc/storage/configs/update/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/update/0.2/payload.js +782 -0
- package/dist/vtc/storage/configs/update/0.2/payload.js.map +1 -0
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +1 -1
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/credentials/set/0.2/payload.d.ts +979 -0
- package/dist/vtc/storage/credentials/set/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/storage/credentials/set/0.2/payload.js +573 -0
- package/dist/vtc/storage/credentials/set/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_runtime/freshness.ts +4 -2
- package/src/_shared/components.ts +388 -24
- package/src/device/list/0.1/payload.ts +4 -2
- package/src/device/list/0.2/payload.ts +4 -2
- package/src/device/register/0.1/payload.ts +4 -2
- package/src/device/register/0.2/payload.ts +4 -2
- package/src/index.ts +31 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/create/0.2/payload.ts +364 -0
- package/src/rooms/epoch/chain/0.2/payload.ts +347 -0
- package/src/rooms/epoch/prune/0.2/payload.ts +315 -0
- package/src/rooms/info/0.2/payload.ts +700 -0
- package/src/rooms/keys/backfill/0.2/payload.ts +260 -0
- package/src/rooms/keys/browse/0.1/payload.ts +2 -2
- package/src/rooms/keys/browse/0.2/payload.ts +628 -0
- package/src/rooms/keys/chain/0.2/payload.ts +308 -0
- package/src/rooms/keys/profile/read/0.1/payload.ts +2 -2
- package/src/rooms/keys/read/0.1/payload.ts +2 -2
- package/src/rooms/owner/anchor/0.1/payload.ts +2 -2
- package/src/rooms/records/get/0.1/payload.ts +2 -2
- package/src/rooms/records/get/0.2/payload.ts +2 -2
- package/src/rooms/records/list/0.1/payload.ts +2 -2
- package/src/rooms/records/list/0.2/payload.ts +2 -2
- package/src/rooms/records/list/0.3/payload.ts +601 -0
- package/src/rooms/records/prune/0.1/payload.ts +451 -0
- package/src/rooms/records/put/0.3/payload.ts +741 -0
- package/src/rooms/records/retention/set/0.1/payload.ts +338 -0
- package/src/vault/credentials/present/0.1/payload.ts +283 -0
- package/src/voting/_shared/0.1/voting.ts +1 -1
- package/src/voting/board/read/0.1/payload.ts +38 -2
- package/src/voting/trustees/authorize/0.1/payload.ts +434 -0
- package/src/voting/trustees/status/0.1/payload.ts +58 -2
- package/src/vta/pcs/trustee/deal/0.2/payload.ts +1148 -0
- package/src/vta/pcs/trustee/decrypt/0.2/payload.ts +500 -0
- package/src/vta/pcs/trustee/justify/0.2/payload.ts +1167 -0
- package/src/vta/pcs/trustee/keys/0.2/payload.ts +1194 -0
- package/src/vta/pcs/vote-encrypted/0.2/payload.ts +1369 -0
- package/src/vta/webvh/dids/create/1.2/payload.ts +660 -0
- package/src/vtc/_shared/0.1/room-migration.ts +17 -0
- package/src/vtc/_shared/0.1/room-storage.ts +1 -1
- package/src/vtc/_shared/0.2/room-storage.ts +17 -0
- package/src/vtc/admin/events/_shared/0.4/topic.ts +32 -0
- package/src/vtc/admin/events/event/0.4/payload.ts +137 -0
- package/src/vtc/admin/events/subscribe/0.4/payload.ts +318 -0
- package/src/vtc/elections/show/0.1/payload.ts +46 -2
- package/src/vtc/rooms/get/0.2/payload.ts +1372 -0
- package/src/vtc/rooms/storage/migrate/0.2/payload.ts +408 -0
- package/src/vtc/storage/configs/create/0.1/payload.ts +1 -1
- package/src/vtc/storage/configs/create/0.2/payload.ts +830 -0
- package/src/vtc/storage/configs/get/0.1/payload.ts +1 -1
- package/src/vtc/storage/configs/get/0.2/payload.ts +1110 -0
- package/src/vtc/storage/configs/list/0.1/payload.ts +1 -1
- package/src/vtc/storage/configs/list/0.2/payload.ts +1177 -0
- package/src/vtc/storage/configs/update/0.1/payload.ts +1 -1
- package/src/vtc/storage/configs/update/0.2/payload.ts +829 -0
- package/src/vtc/storage/credentials/set/0.1/payload.ts +1 -1
- package/src/vtc/storage/credentials/set/0.2/payload.ts +619 -0
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/records/put/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { AuthorityPresentation, BlobRef, DigestMultibase, Ext, PermittedUse, RecordBasis, RecordConfidence, RecordEvidence, RecordEvidenceCredential, RecordEvidenceList, RecordEvidenceRecord, RecordValidUntil, SealedRecord } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* A member writes a record to a data room, authorized by an authority chain the room itself issued. 0.2 added `blobs`: a record can carry a file, whose ciphertext the host stores outside the record and whose description is sealed inside it. 0.3 lets an `open` room's `cleartext` carry the record's provenance — `basis`, `confidence`, `evidence`, `validFor` — and its `validUntil`, which the sealed tiers carry inside the signed `SealedRecordBody`.
|
|
8
|
+
*/
|
|
9
|
+
export interface RoomsRecordsPutPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own — which is what lets a room move hosts without reissuing a credential.
|
|
12
|
+
*/
|
|
13
|
+
roomId: string;
|
|
14
|
+
/**
|
|
15
|
+
* The record's key within the room. MUST be opaque on an `attributed` or `private` room; see RecordMetadata.key.
|
|
16
|
+
*/
|
|
17
|
+
key: string;
|
|
18
|
+
/**
|
|
19
|
+
* Must confer the `write` action at this room's scope.
|
|
20
|
+
*/
|
|
21
|
+
presentation: AuthorityPresentation;
|
|
22
|
+
/**
|
|
23
|
+
* Optional precondition. Omit to overwrite unconditionally; `0` means create-only and fails if the key exists. On mismatch the host returns `rooms/records/put:versionConflict` CARRYING THE CURRENT VERSION AND RECORD — a bare rejection would force a re-read, and between rejection and re-read the record can change again, so the pattern has no fixed point under contention.
|
|
24
|
+
*/
|
|
25
|
+
expectedVersion?: number;
|
|
26
|
+
/**
|
|
27
|
+
* REQUIRED on an `attributed` or `private` room. Mutually exclusive with `cleartext`.
|
|
28
|
+
*/
|
|
29
|
+
sealed?: SealedRecord;
|
|
30
|
+
/**
|
|
31
|
+
* REQUIRED on an `open` room, where the host reads records and can therefore search them. Mutually exclusive with `sealed`. On this tier the record is not signed by its author: every member here is the writer's claim as the host stores it, provenance and expiry included.
|
|
32
|
+
*/
|
|
33
|
+
cleartext?: {
|
|
34
|
+
title?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
body: string;
|
|
37
|
+
/**
|
|
38
|
+
* @maxItems 32
|
|
39
|
+
*/
|
|
40
|
+
tags?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* What kind of claim the record is. A writer SHOULD set it; an agent writer that does not know SHOULD write `inferred`. Provenance for display and weighting, never authority.
|
|
43
|
+
*/
|
|
44
|
+
basis?: RecordBasis;
|
|
45
|
+
confidence?: RecordConfidence;
|
|
46
|
+
evidence?: RecordEvidenceList;
|
|
47
|
+
validFor?: PermittedUse;
|
|
48
|
+
/**
|
|
49
|
+
* When the writer stops standing behind the record as current. Readers hide the record once it has passed and show it only on explicit request. A host stores and serves it like any other cleartext member and MUST NOT act on it: it neither hides, refuses nor deletes an expired record.
|
|
50
|
+
*/
|
|
51
|
+
validUntil?: RecordValidUntil;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The blobs this record keeps alive: today at most one, the file the record carries. Cleartext on every tier, because the host must know which blobs a record references to refuse a record naming a blob it does not hold, to count usage, and to collect a blob no record names. Every blob named MUST have been committed in THIS room (rooms/blobs/upload/commit). An array so that several files per record is a later minor version rather than a reshaped member. Omit for a record with no file; a rewrite that omits it releases whatever blob the previous version named.
|
|
55
|
+
*
|
|
56
|
+
* @minItems 1
|
|
57
|
+
* @maxItems 1
|
|
58
|
+
*/
|
|
59
|
+
blobs?: [BlobRef];
|
|
60
|
+
/**
|
|
61
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
62
|
+
*/
|
|
63
|
+
ext?: Ext;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.3#response.
|
|
67
|
+
*/
|
|
68
|
+
export interface RoomsRecordsPutResponsePayload {
|
|
69
|
+
/**
|
|
70
|
+
* The stored record's key.
|
|
71
|
+
*/
|
|
72
|
+
key: string;
|
|
73
|
+
/**
|
|
74
|
+
* The version assigned, monotonic per room.
|
|
75
|
+
*/
|
|
76
|
+
version: number;
|
|
77
|
+
/**
|
|
78
|
+
* The epoch the record was stored under.
|
|
79
|
+
*/
|
|
80
|
+
epoch?: number;
|
|
81
|
+
ext?: Ext;
|
|
82
|
+
}
|
|
83
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
84
|
+
export type { AuthorityPresentation, BlobRef, DigestMultibase, Ext, PermittedUse, RecordBasis, RecordConfidence, RecordEvidence, RecordEvidenceCredential, RecordEvidenceList, RecordEvidenceRecord, RecordValidUntil, SealedRecord };
|
|
85
|
+
/** Trust Task type URI. */
|
|
86
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/records/put/0.3";
|
|
87
|
+
/** Stable alias for this specification's request payload shape. */
|
|
88
|
+
export type Payload = RoomsRecordsPutPayload;
|
|
89
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
90
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/records/put/0.3#response";
|
|
91
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
92
|
+
export type Response = RoomsRecordsPutResponsePayload;
|
|
93
|
+
/**
|
|
94
|
+
* This specification's payload schema, as a value.
|
|
95
|
+
*
|
|
96
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
97
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
98
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
99
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
100
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
101
|
+
*/
|
|
102
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
103
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
104
|
+
readonly $id: "https://trusttasks.org/spec/rooms/records/put/0.3";
|
|
105
|
+
readonly title: "Rooms Records Put — payload";
|
|
106
|
+
readonly description: "A member writes a record to a data room, authorized by an authority chain the room itself issued. 0.2 added `blobs`: a record can carry a file, whose ciphertext the host stores outside the record and whose description is sealed inside it. 0.3 lets an `open` room's `cleartext` carry the record's provenance — `basis`, `confidence`, `evidence`, `validFor` — and its `validUntil`, which the sealed tiers carry inside the signed `SealedRecordBody`.";
|
|
107
|
+
readonly type: "object";
|
|
108
|
+
readonly additionalProperties: false;
|
|
109
|
+
readonly required: readonly ["roomId", "key", "presentation"];
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly roomId: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
readonly description: "The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own — which is what lets a room move hosts without reissuing a credential.";
|
|
114
|
+
};
|
|
115
|
+
readonly key: {
|
|
116
|
+
readonly type: "string";
|
|
117
|
+
readonly maxLength: 512;
|
|
118
|
+
readonly description: "The record's key within the room. MUST be opaque on an `attributed` or `private` room; see RecordMetadata.key.";
|
|
119
|
+
};
|
|
120
|
+
readonly presentation: {
|
|
121
|
+
readonly $ref: "#/$defs/AuthorityPresentation";
|
|
122
|
+
readonly description: "Must confer the `write` action at this room's scope.";
|
|
123
|
+
};
|
|
124
|
+
readonly expectedVersion: {
|
|
125
|
+
readonly type: "integer";
|
|
126
|
+
readonly minimum: 0;
|
|
127
|
+
readonly description: "Optional precondition. Omit to overwrite unconditionally; `0` means create-only and fails if the key exists. On mismatch the host returns `rooms/records/put:versionConflict` CARRYING THE CURRENT VERSION AND RECORD — a bare rejection would force a re-read, and between rejection and re-read the record can change again, so the pattern has no fixed point under contention.";
|
|
128
|
+
};
|
|
129
|
+
readonly sealed: {
|
|
130
|
+
readonly $ref: "#/$defs/SealedRecord";
|
|
131
|
+
readonly description: "REQUIRED on an `attributed` or `private` room. Mutually exclusive with `cleartext`.";
|
|
132
|
+
};
|
|
133
|
+
readonly cleartext: {
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly additionalProperties: false;
|
|
136
|
+
readonly required: readonly ["body"];
|
|
137
|
+
readonly description: "REQUIRED on an `open` room, where the host reads records and can therefore search them. Mutually exclusive with `sealed`. On this tier the record is not signed by its author: every member here is the writer's claim as the host stores it, provenance and expiry included.";
|
|
138
|
+
readonly properties: {
|
|
139
|
+
readonly title: {
|
|
140
|
+
readonly type: "string";
|
|
141
|
+
readonly maxLength: 512;
|
|
142
|
+
};
|
|
143
|
+
readonly description: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly maxLength: 2048;
|
|
146
|
+
};
|
|
147
|
+
readonly body: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly maxLength: 1048576;
|
|
150
|
+
};
|
|
151
|
+
readonly tags: {
|
|
152
|
+
readonly type: "array";
|
|
153
|
+
readonly items: {
|
|
154
|
+
readonly type: "string";
|
|
155
|
+
readonly maxLength: 64;
|
|
156
|
+
};
|
|
157
|
+
readonly maxItems: 32;
|
|
158
|
+
};
|
|
159
|
+
readonly basis: {
|
|
160
|
+
readonly $ref: "#/$defs/RecordBasis";
|
|
161
|
+
readonly description: "What kind of claim the record is. A writer SHOULD set it; an agent writer that does not know SHOULD write `inferred`. Provenance for display and weighting, never authority.";
|
|
162
|
+
};
|
|
163
|
+
readonly confidence: {
|
|
164
|
+
readonly $ref: "#/$defs/RecordConfidence";
|
|
165
|
+
};
|
|
166
|
+
readonly evidence: {
|
|
167
|
+
readonly $ref: "#/$defs/RecordEvidenceList";
|
|
168
|
+
};
|
|
169
|
+
readonly validFor: {
|
|
170
|
+
readonly $ref: "#/$defs/PermittedUse";
|
|
171
|
+
};
|
|
172
|
+
readonly validUntil: {
|
|
173
|
+
readonly $ref: "#/$defs/RecordValidUntil";
|
|
174
|
+
readonly description: "When the writer stops standing behind the record as current. Readers hide the record once it has passed and show it only on explicit request. A host stores and serves it like any other cleartext member and MUST NOT act on it: it neither hides, refuses nor deletes an expired record.";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
readonly blobs: {
|
|
179
|
+
readonly type: "array";
|
|
180
|
+
readonly minItems: 1;
|
|
181
|
+
readonly maxItems: 1;
|
|
182
|
+
readonly uniqueItems: true;
|
|
183
|
+
readonly items: {
|
|
184
|
+
readonly $ref: "#/$defs/BlobRef";
|
|
185
|
+
};
|
|
186
|
+
readonly description: "The blobs this record keeps alive: today at most one, the file the record carries. Cleartext on every tier, because the host must know which blobs a record references to refuse a record naming a blob it does not hold, to count usage, and to collect a blob no record names. Every blob named MUST have been committed in THIS room (rooms/blobs/upload/commit). An array so that several files per record is a later minor version rather than a reshaped member. Omit for a record with no file; a rewrite that omits it releases whatever blob the previous version named.";
|
|
187
|
+
};
|
|
188
|
+
readonly ext: {
|
|
189
|
+
readonly $ref: "#/$defs/Ext";
|
|
190
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
readonly $defs: {
|
|
194
|
+
readonly Response: {
|
|
195
|
+
readonly $anchor: "response";
|
|
196
|
+
readonly title: "Rooms Records Put — response payload";
|
|
197
|
+
readonly description: "Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.3#response.";
|
|
198
|
+
readonly type: "object";
|
|
199
|
+
readonly additionalProperties: false;
|
|
200
|
+
readonly required: readonly ["key", "version"];
|
|
201
|
+
readonly properties: {
|
|
202
|
+
readonly key: {
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
readonly maxLength: 512;
|
|
205
|
+
readonly description: "The stored record's key.";
|
|
206
|
+
};
|
|
207
|
+
readonly version: {
|
|
208
|
+
readonly type: "integer";
|
|
209
|
+
readonly minimum: 1;
|
|
210
|
+
readonly description: "The version assigned, monotonic per room.";
|
|
211
|
+
};
|
|
212
|
+
readonly epoch: {
|
|
213
|
+
readonly type: "integer";
|
|
214
|
+
readonly minimum: 1;
|
|
215
|
+
readonly description: "The epoch the record was stored under.";
|
|
216
|
+
};
|
|
217
|
+
readonly ext: {
|
|
218
|
+
readonly $ref: "#/$defs/Ext";
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
readonly Ext: {
|
|
223
|
+
readonly title: "Ext";
|
|
224
|
+
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.";
|
|
225
|
+
readonly type: "object";
|
|
226
|
+
readonly minProperties: 1;
|
|
227
|
+
readonly additionalProperties: true;
|
|
228
|
+
readonly propertyNames: {
|
|
229
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
readonly BlobRef: {
|
|
233
|
+
readonly title: "BlobRef";
|
|
234
|
+
readonly description: "The name of one blob: the digest of its BlobManifest, taken over the manifest's RFC 8785 (JCS) canonicalization. sha2-256 is RECOMMENDED and MUST be implemented. Content addressing over ciphertext, never plaintext, so a BlobRef says nothing about what the file contains, and two uploads of one file have different BlobRefs (a fresh `fileId` gives a different key, and so different ciphertext). Rooms cannot be correlated by the files they share. Compared as decoded multihash bytes, never as encoded strings. A BlobRef is defined over the manifest's JSON, as this schema states it and RFC 8785 canonicalizes it, never over any binding's generated type: two bindings that model the manifest as distinct types still compute the same BlobRef from the same JSON.";
|
|
235
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
236
|
+
};
|
|
237
|
+
readonly DigestMultibase: {
|
|
238
|
+
readonly title: "DigestMultibase";
|
|
239
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
240
|
+
readonly type: "string";
|
|
241
|
+
readonly minLength: 16;
|
|
242
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
243
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
244
|
+
};
|
|
245
|
+
readonly RecordValidUntil: {
|
|
246
|
+
readonly title: "RecordValidUntil";
|
|
247
|
+
readonly type: "string";
|
|
248
|
+
readonly format: "date-time";
|
|
249
|
+
readonly description: "The instant after which the record's author no longer stands behind it as current. OPTIONAL; absent means the record does not expire. A reader hides a record whose `validUntil` has passed from default listings, search and recall, and shows it only on explicit request (`SealedRecordBody`, **Expiry**). No host enforces it.";
|
|
250
|
+
};
|
|
251
|
+
readonly PermittedUse: {
|
|
252
|
+
readonly title: "PermittedUse";
|
|
253
|
+
readonly type: "object";
|
|
254
|
+
readonly additionalProperties: false;
|
|
255
|
+
readonly minProperties: 1;
|
|
256
|
+
readonly description: "What the author permits the record to be used for — for example, that a learner's record is for instructional personalisation only. OPTIONAL; absent means the author stated no limit beyond the room's own terms.\n\n**Two halves, because purpose has both a machine and a human reading.** `purposes` names purposes by IRI, so that an agent can match them without parsing prose; `note` says it in words, for the nuance an identifier cannot carry. Either may be given alone.\n\n**No vocabulary of this family's own.** Purpose vocabularies exist and are maintained elsewhere — the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#…`) is the one a writer SHOULD reach for first — and a short list defined here would be one more to translate between, and would be wrong at its edges for every domain that uses rooms. An IRI is the extension path: a community that needs a purpose no published vocabulary has names it under an IRI it controls.\n\n**A statement, not an enforcement.** No host can see it on the sealed tiers and none enforces it on any tier; every reader is a member who already holds the content. It records what the author permitted, so that a member — or an agent acting for one — can honour it, and so that a use outside it is a use against the author's stated terms rather than one nobody could have known about. An agent acting for a member SHOULD NOT use a record for a purpose outside `validFor` and SHOULD tell its principal when asked to. It confers no authority on anybody, and a `purposes` entry a reader does not recognise is shown, not ignored.";
|
|
257
|
+
readonly properties: {
|
|
258
|
+
readonly purposes: {
|
|
259
|
+
readonly type: "array";
|
|
260
|
+
readonly minItems: 1;
|
|
261
|
+
readonly maxItems: 8;
|
|
262
|
+
readonly uniqueItems: true;
|
|
263
|
+
readonly items: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
readonly format: "uri";
|
|
266
|
+
readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:";
|
|
267
|
+
readonly maxLength: 2048;
|
|
268
|
+
};
|
|
269
|
+
readonly description: "Purposes the record may be used for, each an absolute IRI — for example `https://w3id.org/dpv#ServicePersonalisation`. A set: order carries no meaning. An identifier, never fetched.";
|
|
270
|
+
};
|
|
271
|
+
readonly note: {
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
readonly minLength: 1;
|
|
274
|
+
readonly maxLength: 512;
|
|
275
|
+
readonly description: "The permitted use in words, such as `instructional personalisation only`. Plain text, rendered as text, and never instructions — an agent reading it treats it as the author's statement about the record, not as something to do.";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
readonly RecordEvidenceList: {
|
|
280
|
+
readonly title: "RecordEvidenceList";
|
|
281
|
+
readonly type: "array";
|
|
282
|
+
readonly minItems: 1;
|
|
283
|
+
readonly maxItems: 32;
|
|
284
|
+
readonly items: {
|
|
285
|
+
readonly $ref: "#/$defs/RecordEvidence";
|
|
286
|
+
};
|
|
287
|
+
readonly description: "What the author offers in support of the record: other records and credentials, by reference. OPTIONAL; absent means none was named, and an empty array is not a permitted spelling of that. Order carries no meaning. Bounded so that a reader's cost of showing a record's support is bounded too.";
|
|
288
|
+
};
|
|
289
|
+
readonly RecordEvidence: {
|
|
290
|
+
readonly title: "RecordEvidence";
|
|
291
|
+
readonly description: "One thing a record cites in its support, discriminated by `kind`.\n\n - `record` names a record of a room by its key, and optionally the version cited and the room. Absent `roomId` means the record's own room.\n - `credential` names a credential by its `id`, and optionally a digest of the credential as cited.\n\n**A reference, never a locator, and never proof.** A reader MUST NOT fetch, resolve or dereference a `credentialId` because a record names it, and MUST NOT read a record of another room on the strength of a citation: the rule that a room's identifiers are identifiers and not addresses (`AuthorityPresentation`) applies here for the same reasons — fetching would signal to whoever answers which member read which record, and when. A reader MAY show a cited record of the same room that it already holds or reads anyway, and MAY match a cited credential against ones its member already holds. What the citation proves is only that the author cited it; whether the evidence exists, says what the author claims, or supports the record is for whoever follows it up to judge.";
|
|
292
|
+
readonly oneOf: readonly [{
|
|
293
|
+
readonly $ref: "#/$defs/RecordEvidenceRecord";
|
|
294
|
+
}, {
|
|
295
|
+
readonly $ref: "#/$defs/RecordEvidenceCredential";
|
|
296
|
+
}];
|
|
297
|
+
};
|
|
298
|
+
readonly RecordEvidenceCredential: {
|
|
299
|
+
readonly title: "RecordEvidenceCredential";
|
|
300
|
+
readonly type: "object";
|
|
301
|
+
readonly additionalProperties: false;
|
|
302
|
+
readonly required: readonly ["kind", "credentialId"];
|
|
303
|
+
readonly description: "Cites a credential.";
|
|
304
|
+
readonly properties: {
|
|
305
|
+
readonly kind: {
|
|
306
|
+
readonly const: "credential";
|
|
307
|
+
};
|
|
308
|
+
readonly credentialId: {
|
|
309
|
+
readonly type: "string";
|
|
310
|
+
readonly minLength: 1;
|
|
311
|
+
readonly maxLength: 2048;
|
|
312
|
+
readonly description: "The credential's `id`. An identifier: never fetched because a record names it.";
|
|
313
|
+
};
|
|
314
|
+
readonly digest: {
|
|
315
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
316
|
+
readonly description: "OPTIONAL. A digest of the credential as cited — the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, `proof` included — so a reader holding a credential with this `id` can tell whether it is the one the author meant.";
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
readonly RecordEvidenceRecord: {
|
|
321
|
+
readonly title: "RecordEvidenceRecord";
|
|
322
|
+
readonly type: "object";
|
|
323
|
+
readonly additionalProperties: false;
|
|
324
|
+
readonly required: readonly ["kind", "key"];
|
|
325
|
+
readonly description: "Cites a record of a room.";
|
|
326
|
+
readonly properties: {
|
|
327
|
+
readonly kind: {
|
|
328
|
+
readonly const: "record";
|
|
329
|
+
};
|
|
330
|
+
readonly key: {
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
readonly minLength: 1;
|
|
333
|
+
readonly maxLength: 512;
|
|
334
|
+
readonly description: "The cited record's key, as in `rooms/records/put`. Opaque on the sealed tiers, like every key there.";
|
|
335
|
+
};
|
|
336
|
+
readonly version: {
|
|
337
|
+
readonly type: "integer";
|
|
338
|
+
readonly minimum: 1;
|
|
339
|
+
readonly description: "The version cited. OPTIONAL; present, it pins the citation to what the record said then, since a record can be rewritten under the same key. A reader that shows a later version SHOULD say that it is not the one cited.";
|
|
340
|
+
};
|
|
341
|
+
readonly roomId: {
|
|
342
|
+
readonly type: "string";
|
|
343
|
+
readonly pattern: "^did:";
|
|
344
|
+
readonly maxLength: 2048;
|
|
345
|
+
readonly description: "The cited record's room. Absent means the citing record's own room. A citation into another room tells the reader that room's identifier, so a writer SHOULD NOT cite into a room the citing room's readers are not meant to learn of.";
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
readonly RecordConfidence: {
|
|
350
|
+
readonly title: "RecordConfidence";
|
|
351
|
+
readonly type: "number";
|
|
352
|
+
readonly minimum: 0;
|
|
353
|
+
readonly maximum: 1;
|
|
354
|
+
readonly description: "The author's own estimate, from 0 to 1, that what the record says is correct. OPTIONAL; absent means no estimate was given, never 1. Meaningful only beside the author who gave it: two writers' numbers are not on one scale, so a reader MUST NOT rank records by `confidence` across authors as though they were, and an agent that weights by it SHOULD weight within an author's own records. Never authority.";
|
|
355
|
+
};
|
|
356
|
+
readonly RecordBasis: {
|
|
357
|
+
readonly title: "RecordBasis";
|
|
358
|
+
readonly type: "string";
|
|
359
|
+
readonly enum: readonly ["declared", "observed", "verified", "inferred"];
|
|
360
|
+
readonly description: "What kind of claim a record is, as its author states it. OPTIONAL wherever it appears; absent means the author did not say, and a reader shows it as unstated rather than assuming any of these.\n\n - `declared` — the author's own statement: a decision, a preference, an intention, a commitment. True because the author says so, and only as far as the author speaks for it.\n - `observed` — something the author saw, measured or was told directly, recorded as found.\n - `verified` — checked against evidence that somebody else can check again, such as a credential or another record. A record that says `verified` SHOULD name that evidence in `evidence`; one that does not is an unsupported claim to have checked, and a reader SHOULD present it so.\n - `inferred` — derived by reasoning from other information: an agent's conclusion, a summary's generalisation, a model's guess. The value an agent writer uses when it does not know which of the others applies.\n\nThe values are the author's account of their own record, signed with it. They are not checked by anybody, confer nothing, and say nothing about whether the record is right — `inferred` can be correct and `observed` mistaken. Aligned with the provenance vocabulary of personal agent memory, so that a record moved between a member's memory and a room keeps its meaning.";
|
|
361
|
+
};
|
|
362
|
+
readonly SealedRecord: {
|
|
363
|
+
readonly title: "SealedRecord";
|
|
364
|
+
readonly type: "object";
|
|
365
|
+
readonly additionalProperties: false;
|
|
366
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
367
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
368
|
+
readonly properties: {
|
|
369
|
+
readonly ciphertext: {
|
|
370
|
+
readonly type: "string";
|
|
371
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, the version it was sealed at, and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it. The version it was sealed at is `version` below where present, and the record's own `version` otherwise.";
|
|
372
|
+
};
|
|
373
|
+
readonly nonce: {
|
|
374
|
+
readonly type: "string";
|
|
375
|
+
readonly description: "AEAD nonce, base64url.";
|
|
376
|
+
};
|
|
377
|
+
readonly epoch: {
|
|
378
|
+
readonly type: "integer";
|
|
379
|
+
readonly minimum: 1;
|
|
380
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
381
|
+
};
|
|
382
|
+
readonly version: {
|
|
383
|
+
readonly type: "integer";
|
|
384
|
+
readonly minimum: 1;
|
|
385
|
+
readonly description: "The version this ciphertext was sealed at, where that is no longer the record's own `version`. A record's version moves when it is curated (`rooms/records/curate`, which MUST assign a new one so that every `sinceVersion` watermark sees the change), but a curation other than a retraction keeps the body — and the body is bound, by the AEAD and by its author's signature (`SealedRecordBody`), to the version it was written at. Without this member a curated record would be opened at a version it was never sealed for, and would not open for anyone.\n\nA host MUST record the version a body was sealed at when it stores it, MUST NOT change it while that body is kept — a curation alters a record's standing, never its sealed content — and MUST include it whenever it differs from the record's `version`. It is absent where the two are equal, which is every record that has not been curated since it was written, so the members a record carries are unchanged until a curation needs this one. It is part of `sealed`, and so of the record the data commitment covers (`CommittedRecord`): a host cannot change it without changing the root.\n\nA reader opens and verifies the body at this version, and MUST refuse a record whose `sealed.version` is greater than its own `version` — a body cannot have been sealed for a version the room had not reached. A host that pairs a newer version with an older body of the same key is rolling the record back; that is a change to the committed record like any other, visible to the comparisons `CommittedRecord` exists for.";
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
readonly AuthorityPresentation: {
|
|
390
|
+
readonly title: "AuthorityPresentation";
|
|
391
|
+
readonly type: "object";
|
|
392
|
+
readonly additionalProperties: false;
|
|
393
|
+
readonly required: readonly ["membership", "authority"];
|
|
394
|
+
readonly 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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
|
|
395
|
+
readonly properties: {
|
|
396
|
+
readonly membership: {
|
|
397
|
+
readonly type: "string";
|
|
398
|
+
readonly 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.";
|
|
399
|
+
};
|
|
400
|
+
readonly authority: {
|
|
401
|
+
readonly type: "array";
|
|
402
|
+
readonly minItems: 1;
|
|
403
|
+
readonly maxItems: 8;
|
|
404
|
+
readonly items: {
|
|
405
|
+
readonly type: "string";
|
|
406
|
+
};
|
|
407
|
+
readonly 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.";
|
|
408
|
+
};
|
|
409
|
+
readonly subjectBinding: {
|
|
410
|
+
readonly type: "string";
|
|
411
|
+
readonly 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.";
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
418
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
419
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
420
|
+
readonly $ref: "#/$defs/Response";
|
|
421
|
+
readonly $defs: {
|
|
422
|
+
readonly Response: {
|
|
423
|
+
readonly $anchor: "response";
|
|
424
|
+
readonly title: "Rooms Records Put — response payload";
|
|
425
|
+
readonly description: "Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.3#response.";
|
|
426
|
+
readonly type: "object";
|
|
427
|
+
readonly additionalProperties: false;
|
|
428
|
+
readonly required: readonly ["key", "version"];
|
|
429
|
+
readonly properties: {
|
|
430
|
+
readonly key: {
|
|
431
|
+
readonly type: "string";
|
|
432
|
+
readonly maxLength: 512;
|
|
433
|
+
readonly description: "The stored record's key.";
|
|
434
|
+
};
|
|
435
|
+
readonly version: {
|
|
436
|
+
readonly type: "integer";
|
|
437
|
+
readonly minimum: 1;
|
|
438
|
+
readonly description: "The version assigned, monotonic per room.";
|
|
439
|
+
};
|
|
440
|
+
readonly epoch: {
|
|
441
|
+
readonly type: "integer";
|
|
442
|
+
readonly minimum: 1;
|
|
443
|
+
readonly description: "The epoch the record was stored under.";
|
|
444
|
+
};
|
|
445
|
+
readonly ext: {
|
|
446
|
+
readonly $ref: "#/$defs/Ext";
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
readonly Ext: {
|
|
451
|
+
readonly title: "Ext";
|
|
452
|
+
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.";
|
|
453
|
+
readonly type: "object";
|
|
454
|
+
readonly minProperties: 1;
|
|
455
|
+
readonly additionalProperties: true;
|
|
456
|
+
readonly propertyNames: {
|
|
457
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
readonly BlobRef: {
|
|
461
|
+
readonly title: "BlobRef";
|
|
462
|
+
readonly description: "The name of one blob: the digest of its BlobManifest, taken over the manifest's RFC 8785 (JCS) canonicalization. sha2-256 is RECOMMENDED and MUST be implemented. Content addressing over ciphertext, never plaintext, so a BlobRef says nothing about what the file contains, and two uploads of one file have different BlobRefs (a fresh `fileId` gives a different key, and so different ciphertext). Rooms cannot be correlated by the files they share. Compared as decoded multihash bytes, never as encoded strings. A BlobRef is defined over the manifest's JSON, as this schema states it and RFC 8785 canonicalizes it, never over any binding's generated type: two bindings that model the manifest as distinct types still compute the same BlobRef from the same JSON.";
|
|
463
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
464
|
+
};
|
|
465
|
+
readonly DigestMultibase: {
|
|
466
|
+
readonly title: "DigestMultibase";
|
|
467
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
468
|
+
readonly type: "string";
|
|
469
|
+
readonly minLength: 16;
|
|
470
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
471
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
472
|
+
};
|
|
473
|
+
readonly RecordValidUntil: {
|
|
474
|
+
readonly title: "RecordValidUntil";
|
|
475
|
+
readonly type: "string";
|
|
476
|
+
readonly format: "date-time";
|
|
477
|
+
readonly description: "The instant after which the record's author no longer stands behind it as current. OPTIONAL; absent means the record does not expire. A reader hides a record whose `validUntil` has passed from default listings, search and recall, and shows it only on explicit request (`SealedRecordBody`, **Expiry**). No host enforces it.";
|
|
478
|
+
};
|
|
479
|
+
readonly PermittedUse: {
|
|
480
|
+
readonly title: "PermittedUse";
|
|
481
|
+
readonly type: "object";
|
|
482
|
+
readonly additionalProperties: false;
|
|
483
|
+
readonly minProperties: 1;
|
|
484
|
+
readonly description: "What the author permits the record to be used for — for example, that a learner's record is for instructional personalisation only. OPTIONAL; absent means the author stated no limit beyond the room's own terms.\n\n**Two halves, because purpose has both a machine and a human reading.** `purposes` names purposes by IRI, so that an agent can match them without parsing prose; `note` says it in words, for the nuance an identifier cannot carry. Either may be given alone.\n\n**No vocabulary of this family's own.** Purpose vocabularies exist and are maintained elsewhere — the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#…`) is the one a writer SHOULD reach for first — and a short list defined here would be one more to translate between, and would be wrong at its edges for every domain that uses rooms. An IRI is the extension path: a community that needs a purpose no published vocabulary has names it under an IRI it controls.\n\n**A statement, not an enforcement.** No host can see it on the sealed tiers and none enforces it on any tier; every reader is a member who already holds the content. It records what the author permitted, so that a member — or an agent acting for one — can honour it, and so that a use outside it is a use against the author's stated terms rather than one nobody could have known about. An agent acting for a member SHOULD NOT use a record for a purpose outside `validFor` and SHOULD tell its principal when asked to. It confers no authority on anybody, and a `purposes` entry a reader does not recognise is shown, not ignored.";
|
|
485
|
+
readonly properties: {
|
|
486
|
+
readonly purposes: {
|
|
487
|
+
readonly type: "array";
|
|
488
|
+
readonly minItems: 1;
|
|
489
|
+
readonly maxItems: 8;
|
|
490
|
+
readonly uniqueItems: true;
|
|
491
|
+
readonly items: {
|
|
492
|
+
readonly type: "string";
|
|
493
|
+
readonly format: "uri";
|
|
494
|
+
readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:";
|
|
495
|
+
readonly maxLength: 2048;
|
|
496
|
+
};
|
|
497
|
+
readonly description: "Purposes the record may be used for, each an absolute IRI — for example `https://w3id.org/dpv#ServicePersonalisation`. A set: order carries no meaning. An identifier, never fetched.";
|
|
498
|
+
};
|
|
499
|
+
readonly note: {
|
|
500
|
+
readonly type: "string";
|
|
501
|
+
readonly minLength: 1;
|
|
502
|
+
readonly maxLength: 512;
|
|
503
|
+
readonly description: "The permitted use in words, such as `instructional personalisation only`. Plain text, rendered as text, and never instructions — an agent reading it treats it as the author's statement about the record, not as something to do.";
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
readonly RecordEvidenceList: {
|
|
508
|
+
readonly title: "RecordEvidenceList";
|
|
509
|
+
readonly type: "array";
|
|
510
|
+
readonly minItems: 1;
|
|
511
|
+
readonly maxItems: 32;
|
|
512
|
+
readonly items: {
|
|
513
|
+
readonly $ref: "#/$defs/RecordEvidence";
|
|
514
|
+
};
|
|
515
|
+
readonly description: "What the author offers in support of the record: other records and credentials, by reference. OPTIONAL; absent means none was named, and an empty array is not a permitted spelling of that. Order carries no meaning. Bounded so that a reader's cost of showing a record's support is bounded too.";
|
|
516
|
+
};
|
|
517
|
+
readonly RecordEvidence: {
|
|
518
|
+
readonly title: "RecordEvidence";
|
|
519
|
+
readonly description: "One thing a record cites in its support, discriminated by `kind`.\n\n - `record` names a record of a room by its key, and optionally the version cited and the room. Absent `roomId` means the record's own room.\n - `credential` names a credential by its `id`, and optionally a digest of the credential as cited.\n\n**A reference, never a locator, and never proof.** A reader MUST NOT fetch, resolve or dereference a `credentialId` because a record names it, and MUST NOT read a record of another room on the strength of a citation: the rule that a room's identifiers are identifiers and not addresses (`AuthorityPresentation`) applies here for the same reasons — fetching would signal to whoever answers which member read which record, and when. A reader MAY show a cited record of the same room that it already holds or reads anyway, and MAY match a cited credential against ones its member already holds. What the citation proves is only that the author cited it; whether the evidence exists, says what the author claims, or supports the record is for whoever follows it up to judge.";
|
|
520
|
+
readonly oneOf: readonly [{
|
|
521
|
+
readonly $ref: "#/$defs/RecordEvidenceRecord";
|
|
522
|
+
}, {
|
|
523
|
+
readonly $ref: "#/$defs/RecordEvidenceCredential";
|
|
524
|
+
}];
|
|
525
|
+
};
|
|
526
|
+
readonly RecordEvidenceCredential: {
|
|
527
|
+
readonly title: "RecordEvidenceCredential";
|
|
528
|
+
readonly type: "object";
|
|
529
|
+
readonly additionalProperties: false;
|
|
530
|
+
readonly required: readonly ["kind", "credentialId"];
|
|
531
|
+
readonly description: "Cites a credential.";
|
|
532
|
+
readonly properties: {
|
|
533
|
+
readonly kind: {
|
|
534
|
+
readonly const: "credential";
|
|
535
|
+
};
|
|
536
|
+
readonly credentialId: {
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
readonly minLength: 1;
|
|
539
|
+
readonly maxLength: 2048;
|
|
540
|
+
readonly description: "The credential's `id`. An identifier: never fetched because a record names it.";
|
|
541
|
+
};
|
|
542
|
+
readonly digest: {
|
|
543
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
544
|
+
readonly description: "OPTIONAL. A digest of the credential as cited — the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, `proof` included — so a reader holding a credential with this `id` can tell whether it is the one the author meant.";
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
readonly RecordEvidenceRecord: {
|
|
549
|
+
readonly title: "RecordEvidenceRecord";
|
|
550
|
+
readonly type: "object";
|
|
551
|
+
readonly additionalProperties: false;
|
|
552
|
+
readonly required: readonly ["kind", "key"];
|
|
553
|
+
readonly description: "Cites a record of a room.";
|
|
554
|
+
readonly properties: {
|
|
555
|
+
readonly kind: {
|
|
556
|
+
readonly const: "record";
|
|
557
|
+
};
|
|
558
|
+
readonly key: {
|
|
559
|
+
readonly type: "string";
|
|
560
|
+
readonly minLength: 1;
|
|
561
|
+
readonly maxLength: 512;
|
|
562
|
+
readonly description: "The cited record's key, as in `rooms/records/put`. Opaque on the sealed tiers, like every key there.";
|
|
563
|
+
};
|
|
564
|
+
readonly version: {
|
|
565
|
+
readonly type: "integer";
|
|
566
|
+
readonly minimum: 1;
|
|
567
|
+
readonly description: "The version cited. OPTIONAL; present, it pins the citation to what the record said then, since a record can be rewritten under the same key. A reader that shows a later version SHOULD say that it is not the one cited.";
|
|
568
|
+
};
|
|
569
|
+
readonly roomId: {
|
|
570
|
+
readonly type: "string";
|
|
571
|
+
readonly pattern: "^did:";
|
|
572
|
+
readonly maxLength: 2048;
|
|
573
|
+
readonly description: "The cited record's room. Absent means the citing record's own room. A citation into another room tells the reader that room's identifier, so a writer SHOULD NOT cite into a room the citing room's readers are not meant to learn of.";
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
readonly RecordConfidence: {
|
|
578
|
+
readonly title: "RecordConfidence";
|
|
579
|
+
readonly type: "number";
|
|
580
|
+
readonly minimum: 0;
|
|
581
|
+
readonly maximum: 1;
|
|
582
|
+
readonly description: "The author's own estimate, from 0 to 1, that what the record says is correct. OPTIONAL; absent means no estimate was given, never 1. Meaningful only beside the author who gave it: two writers' numbers are not on one scale, so a reader MUST NOT rank records by `confidence` across authors as though they were, and an agent that weights by it SHOULD weight within an author's own records. Never authority.";
|
|
583
|
+
};
|
|
584
|
+
readonly RecordBasis: {
|
|
585
|
+
readonly title: "RecordBasis";
|
|
586
|
+
readonly type: "string";
|
|
587
|
+
readonly enum: readonly ["declared", "observed", "verified", "inferred"];
|
|
588
|
+
readonly description: "What kind of claim a record is, as its author states it. OPTIONAL wherever it appears; absent means the author did not say, and a reader shows it as unstated rather than assuming any of these.\n\n - `declared` — the author's own statement: a decision, a preference, an intention, a commitment. True because the author says so, and only as far as the author speaks for it.\n - `observed` — something the author saw, measured or was told directly, recorded as found.\n - `verified` — checked against evidence that somebody else can check again, such as a credential or another record. A record that says `verified` SHOULD name that evidence in `evidence`; one that does not is an unsupported claim to have checked, and a reader SHOULD present it so.\n - `inferred` — derived by reasoning from other information: an agent's conclusion, a summary's generalisation, a model's guess. The value an agent writer uses when it does not know which of the others applies.\n\nThe values are the author's account of their own record, signed with it. They are not checked by anybody, confer nothing, and say nothing about whether the record is right — `inferred` can be correct and `observed` mistaken. Aligned with the provenance vocabulary of personal agent memory, so that a record moved between a member's memory and a room keeps its meaning.";
|
|
589
|
+
};
|
|
590
|
+
readonly SealedRecord: {
|
|
591
|
+
readonly title: "SealedRecord";
|
|
592
|
+
readonly type: "object";
|
|
593
|
+
readonly additionalProperties: false;
|
|
594
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
595
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
596
|
+
readonly properties: {
|
|
597
|
+
readonly ciphertext: {
|
|
598
|
+
readonly type: "string";
|
|
599
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, the version it was sealed at, and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it. The version it was sealed at is `version` below where present, and the record's own `version` otherwise.";
|
|
600
|
+
};
|
|
601
|
+
readonly nonce: {
|
|
602
|
+
readonly type: "string";
|
|
603
|
+
readonly description: "AEAD nonce, base64url.";
|
|
604
|
+
};
|
|
605
|
+
readonly epoch: {
|
|
606
|
+
readonly type: "integer";
|
|
607
|
+
readonly minimum: 1;
|
|
608
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
609
|
+
};
|
|
610
|
+
readonly version: {
|
|
611
|
+
readonly type: "integer";
|
|
612
|
+
readonly minimum: 1;
|
|
613
|
+
readonly description: "The version this ciphertext was sealed at, where that is no longer the record's own `version`. A record's version moves when it is curated (`rooms/records/curate`, which MUST assign a new one so that every `sinceVersion` watermark sees the change), but a curation other than a retraction keeps the body — and the body is bound, by the AEAD and by its author's signature (`SealedRecordBody`), to the version it was written at. Without this member a curated record would be opened at a version it was never sealed for, and would not open for anyone.\n\nA host MUST record the version a body was sealed at when it stores it, MUST NOT change it while that body is kept — a curation alters a record's standing, never its sealed content — and MUST include it whenever it differs from the record's `version`. It is absent where the two are equal, which is every record that has not been curated since it was written, so the members a record carries are unchanged until a curation needs this one. It is part of `sealed`, and so of the record the data commitment covers (`CommittedRecord`): a host cannot change it without changing the root.\n\nA reader opens and verifies the body at this version, and MUST refuse a record whose `sealed.version` is greater than its own `version` — a body cannot have been sealed for a version the room had not reached. A host that pairs a newer version with an older body of the same key is rolling the record back; that is a change to the committed record like any other, visible to the comparisons `CommittedRecord` exists for.";
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
readonly AuthorityPresentation: {
|
|
618
|
+
readonly title: "AuthorityPresentation";
|
|
619
|
+
readonly type: "object";
|
|
620
|
+
readonly additionalProperties: false;
|
|
621
|
+
readonly required: readonly ["membership", "authority"];
|
|
622
|
+
readonly 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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
|
|
623
|
+
readonly properties: {
|
|
624
|
+
readonly membership: {
|
|
625
|
+
readonly type: "string";
|
|
626
|
+
readonly 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.";
|
|
627
|
+
};
|
|
628
|
+
readonly authority: {
|
|
629
|
+
readonly type: "array";
|
|
630
|
+
readonly minItems: 1;
|
|
631
|
+
readonly maxItems: 8;
|
|
632
|
+
readonly items: {
|
|
633
|
+
readonly type: "string";
|
|
634
|
+
};
|
|
635
|
+
readonly 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.";
|
|
636
|
+
};
|
|
637
|
+
readonly subjectBinding: {
|
|
638
|
+
readonly type: "string";
|
|
639
|
+
readonly 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.";
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
};
|
|
645
|
+
/**
|
|
646
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
647
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
648
|
+
* per-specification and cannot be derived from the document alone, and
|
|
649
|
+
* item 2 needs the schema this carries.
|
|
650
|
+
*/
|
|
651
|
+
export declare const SPEC: {
|
|
652
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/records/put/0.3";
|
|
653
|
+
readonly isBearer: false;
|
|
654
|
+
readonly isProofRequired: true;
|
|
655
|
+
readonly isRecipientRequired: true;
|
|
656
|
+
readonly isIssuedAtRequired: true;
|
|
657
|
+
readonly payloadSchema: {
|
|
658
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
659
|
+
readonly $id: "https://trusttasks.org/spec/rooms/records/put/0.3";
|
|
660
|
+
readonly title: "Rooms Records Put — payload";
|
|
661
|
+
readonly description: "A member writes a record to a data room, authorized by an authority chain the room itself issued. 0.2 added `blobs`: a record can carry a file, whose ciphertext the host stores outside the record and whose description is sealed inside it. 0.3 lets an `open` room's `cleartext` carry the record's provenance — `basis`, `confidence`, `evidence`, `validFor` — and its `validUntil`, which the sealed tiers carry inside the signed `SealedRecordBody`.";
|
|
662
|
+
readonly type: "object";
|
|
663
|
+
readonly additionalProperties: false;
|
|
664
|
+
readonly required: readonly ["roomId", "key", "presentation"];
|
|
665
|
+
readonly properties: {
|
|
666
|
+
readonly roomId: {
|
|
667
|
+
readonly type: "string";
|
|
668
|
+
readonly description: "The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own — which is what lets a room move hosts without reissuing a credential.";
|
|
669
|
+
};
|
|
670
|
+
readonly key: {
|
|
671
|
+
readonly type: "string";
|
|
672
|
+
readonly maxLength: 512;
|
|
673
|
+
readonly description: "The record's key within the room. MUST be opaque on an `attributed` or `private` room; see RecordMetadata.key.";
|
|
674
|
+
};
|
|
675
|
+
readonly presentation: {
|
|
676
|
+
readonly $ref: "#/$defs/AuthorityPresentation";
|
|
677
|
+
readonly description: "Must confer the `write` action at this room's scope.";
|
|
678
|
+
};
|
|
679
|
+
readonly expectedVersion: {
|
|
680
|
+
readonly type: "integer";
|
|
681
|
+
readonly minimum: 0;
|
|
682
|
+
readonly description: "Optional precondition. Omit to overwrite unconditionally; `0` means create-only and fails if the key exists. On mismatch the host returns `rooms/records/put:versionConflict` CARRYING THE CURRENT VERSION AND RECORD — a bare rejection would force a re-read, and between rejection and re-read the record can change again, so the pattern has no fixed point under contention.";
|
|
683
|
+
};
|
|
684
|
+
readonly sealed: {
|
|
685
|
+
readonly $ref: "#/$defs/SealedRecord";
|
|
686
|
+
readonly description: "REQUIRED on an `attributed` or `private` room. Mutually exclusive with `cleartext`.";
|
|
687
|
+
};
|
|
688
|
+
readonly cleartext: {
|
|
689
|
+
readonly type: "object";
|
|
690
|
+
readonly additionalProperties: false;
|
|
691
|
+
readonly required: readonly ["body"];
|
|
692
|
+
readonly description: "REQUIRED on an `open` room, where the host reads records and can therefore search them. Mutually exclusive with `sealed`. On this tier the record is not signed by its author: every member here is the writer's claim as the host stores it, provenance and expiry included.";
|
|
693
|
+
readonly properties: {
|
|
694
|
+
readonly title: {
|
|
695
|
+
readonly type: "string";
|
|
696
|
+
readonly maxLength: 512;
|
|
697
|
+
};
|
|
698
|
+
readonly description: {
|
|
699
|
+
readonly type: "string";
|
|
700
|
+
readonly maxLength: 2048;
|
|
701
|
+
};
|
|
702
|
+
readonly body: {
|
|
703
|
+
readonly type: "string";
|
|
704
|
+
readonly maxLength: 1048576;
|
|
705
|
+
};
|
|
706
|
+
readonly tags: {
|
|
707
|
+
readonly type: "array";
|
|
708
|
+
readonly items: {
|
|
709
|
+
readonly type: "string";
|
|
710
|
+
readonly maxLength: 64;
|
|
711
|
+
};
|
|
712
|
+
readonly maxItems: 32;
|
|
713
|
+
};
|
|
714
|
+
readonly basis: {
|
|
715
|
+
readonly $ref: "#/$defs/RecordBasis";
|
|
716
|
+
readonly description: "What kind of claim the record is. A writer SHOULD set it; an agent writer that does not know SHOULD write `inferred`. Provenance for display and weighting, never authority.";
|
|
717
|
+
};
|
|
718
|
+
readonly confidence: {
|
|
719
|
+
readonly $ref: "#/$defs/RecordConfidence";
|
|
720
|
+
};
|
|
721
|
+
readonly evidence: {
|
|
722
|
+
readonly $ref: "#/$defs/RecordEvidenceList";
|
|
723
|
+
};
|
|
724
|
+
readonly validFor: {
|
|
725
|
+
readonly $ref: "#/$defs/PermittedUse";
|
|
726
|
+
};
|
|
727
|
+
readonly validUntil: {
|
|
728
|
+
readonly $ref: "#/$defs/RecordValidUntil";
|
|
729
|
+
readonly description: "When the writer stops standing behind the record as current. Readers hide the record once it has passed and show it only on explicit request. A host stores and serves it like any other cleartext member and MUST NOT act on it: it neither hides, refuses nor deletes an expired record.";
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
readonly blobs: {
|
|
734
|
+
readonly type: "array";
|
|
735
|
+
readonly minItems: 1;
|
|
736
|
+
readonly maxItems: 1;
|
|
737
|
+
readonly uniqueItems: true;
|
|
738
|
+
readonly items: {
|
|
739
|
+
readonly $ref: "#/$defs/BlobRef";
|
|
740
|
+
};
|
|
741
|
+
readonly description: "The blobs this record keeps alive: today at most one, the file the record carries. Cleartext on every tier, because the host must know which blobs a record references to refuse a record naming a blob it does not hold, to count usage, and to collect a blob no record names. Every blob named MUST have been committed in THIS room (rooms/blobs/upload/commit). An array so that several files per record is a later minor version rather than a reshaped member. Omit for a record with no file; a rewrite that omits it releases whatever blob the previous version named.";
|
|
742
|
+
};
|
|
743
|
+
readonly ext: {
|
|
744
|
+
readonly $ref: "#/$defs/Ext";
|
|
745
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
readonly $defs: {
|
|
749
|
+
readonly Response: {
|
|
750
|
+
readonly $anchor: "response";
|
|
751
|
+
readonly title: "Rooms Records Put — response payload";
|
|
752
|
+
readonly description: "Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.3#response.";
|
|
753
|
+
readonly type: "object";
|
|
754
|
+
readonly additionalProperties: false;
|
|
755
|
+
readonly required: readonly ["key", "version"];
|
|
756
|
+
readonly properties: {
|
|
757
|
+
readonly key: {
|
|
758
|
+
readonly type: "string";
|
|
759
|
+
readonly maxLength: 512;
|
|
760
|
+
readonly description: "The stored record's key.";
|
|
761
|
+
};
|
|
762
|
+
readonly version: {
|
|
763
|
+
readonly type: "integer";
|
|
764
|
+
readonly minimum: 1;
|
|
765
|
+
readonly description: "The version assigned, monotonic per room.";
|
|
766
|
+
};
|
|
767
|
+
readonly epoch: {
|
|
768
|
+
readonly type: "integer";
|
|
769
|
+
readonly minimum: 1;
|
|
770
|
+
readonly description: "The epoch the record was stored under.";
|
|
771
|
+
};
|
|
772
|
+
readonly ext: {
|
|
773
|
+
readonly $ref: "#/$defs/Ext";
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
readonly Ext: {
|
|
778
|
+
readonly title: "Ext";
|
|
779
|
+
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.";
|
|
780
|
+
readonly type: "object";
|
|
781
|
+
readonly minProperties: 1;
|
|
782
|
+
readonly additionalProperties: true;
|
|
783
|
+
readonly propertyNames: {
|
|
784
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
785
|
+
};
|
|
786
|
+
};
|
|
787
|
+
readonly BlobRef: {
|
|
788
|
+
readonly title: "BlobRef";
|
|
789
|
+
readonly description: "The name of one blob: the digest of its BlobManifest, taken over the manifest's RFC 8785 (JCS) canonicalization. sha2-256 is RECOMMENDED and MUST be implemented. Content addressing over ciphertext, never plaintext, so a BlobRef says nothing about what the file contains, and two uploads of one file have different BlobRefs (a fresh `fileId` gives a different key, and so different ciphertext). Rooms cannot be correlated by the files they share. Compared as decoded multihash bytes, never as encoded strings. A BlobRef is defined over the manifest's JSON, as this schema states it and RFC 8785 canonicalizes it, never over any binding's generated type: two bindings that model the manifest as distinct types still compute the same BlobRef from the same JSON.";
|
|
790
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
791
|
+
};
|
|
792
|
+
readonly DigestMultibase: {
|
|
793
|
+
readonly title: "DigestMultibase";
|
|
794
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
795
|
+
readonly type: "string";
|
|
796
|
+
readonly minLength: 16;
|
|
797
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
798
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
799
|
+
};
|
|
800
|
+
readonly RecordValidUntil: {
|
|
801
|
+
readonly title: "RecordValidUntil";
|
|
802
|
+
readonly type: "string";
|
|
803
|
+
readonly format: "date-time";
|
|
804
|
+
readonly description: "The instant after which the record's author no longer stands behind it as current. OPTIONAL; absent means the record does not expire. A reader hides a record whose `validUntil` has passed from default listings, search and recall, and shows it only on explicit request (`SealedRecordBody`, **Expiry**). No host enforces it.";
|
|
805
|
+
};
|
|
806
|
+
readonly PermittedUse: {
|
|
807
|
+
readonly title: "PermittedUse";
|
|
808
|
+
readonly type: "object";
|
|
809
|
+
readonly additionalProperties: false;
|
|
810
|
+
readonly minProperties: 1;
|
|
811
|
+
readonly description: "What the author permits the record to be used for — for example, that a learner's record is for instructional personalisation only. OPTIONAL; absent means the author stated no limit beyond the room's own terms.\n\n**Two halves, because purpose has both a machine and a human reading.** `purposes` names purposes by IRI, so that an agent can match them without parsing prose; `note` says it in words, for the nuance an identifier cannot carry. Either may be given alone.\n\n**No vocabulary of this family's own.** Purpose vocabularies exist and are maintained elsewhere — the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#…`) is the one a writer SHOULD reach for first — and a short list defined here would be one more to translate between, and would be wrong at its edges for every domain that uses rooms. An IRI is the extension path: a community that needs a purpose no published vocabulary has names it under an IRI it controls.\n\n**A statement, not an enforcement.** No host can see it on the sealed tiers and none enforces it on any tier; every reader is a member who already holds the content. It records what the author permitted, so that a member — or an agent acting for one — can honour it, and so that a use outside it is a use against the author's stated terms rather than one nobody could have known about. An agent acting for a member SHOULD NOT use a record for a purpose outside `validFor` and SHOULD tell its principal when asked to. It confers no authority on anybody, and a `purposes` entry a reader does not recognise is shown, not ignored.";
|
|
812
|
+
readonly properties: {
|
|
813
|
+
readonly purposes: {
|
|
814
|
+
readonly type: "array";
|
|
815
|
+
readonly minItems: 1;
|
|
816
|
+
readonly maxItems: 8;
|
|
817
|
+
readonly uniqueItems: true;
|
|
818
|
+
readonly items: {
|
|
819
|
+
readonly type: "string";
|
|
820
|
+
readonly format: "uri";
|
|
821
|
+
readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:";
|
|
822
|
+
readonly maxLength: 2048;
|
|
823
|
+
};
|
|
824
|
+
readonly description: "Purposes the record may be used for, each an absolute IRI — for example `https://w3id.org/dpv#ServicePersonalisation`. A set: order carries no meaning. An identifier, never fetched.";
|
|
825
|
+
};
|
|
826
|
+
readonly note: {
|
|
827
|
+
readonly type: "string";
|
|
828
|
+
readonly minLength: 1;
|
|
829
|
+
readonly maxLength: 512;
|
|
830
|
+
readonly description: "The permitted use in words, such as `instructional personalisation only`. Plain text, rendered as text, and never instructions — an agent reading it treats it as the author's statement about the record, not as something to do.";
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
readonly RecordEvidenceList: {
|
|
835
|
+
readonly title: "RecordEvidenceList";
|
|
836
|
+
readonly type: "array";
|
|
837
|
+
readonly minItems: 1;
|
|
838
|
+
readonly maxItems: 32;
|
|
839
|
+
readonly items: {
|
|
840
|
+
readonly $ref: "#/$defs/RecordEvidence";
|
|
841
|
+
};
|
|
842
|
+
readonly description: "What the author offers in support of the record: other records and credentials, by reference. OPTIONAL; absent means none was named, and an empty array is not a permitted spelling of that. Order carries no meaning. Bounded so that a reader's cost of showing a record's support is bounded too.";
|
|
843
|
+
};
|
|
844
|
+
readonly RecordEvidence: {
|
|
845
|
+
readonly title: "RecordEvidence";
|
|
846
|
+
readonly description: "One thing a record cites in its support, discriminated by `kind`.\n\n - `record` names a record of a room by its key, and optionally the version cited and the room. Absent `roomId` means the record's own room.\n - `credential` names a credential by its `id`, and optionally a digest of the credential as cited.\n\n**A reference, never a locator, and never proof.** A reader MUST NOT fetch, resolve or dereference a `credentialId` because a record names it, and MUST NOT read a record of another room on the strength of a citation: the rule that a room's identifiers are identifiers and not addresses (`AuthorityPresentation`) applies here for the same reasons — fetching would signal to whoever answers which member read which record, and when. A reader MAY show a cited record of the same room that it already holds or reads anyway, and MAY match a cited credential against ones its member already holds. What the citation proves is only that the author cited it; whether the evidence exists, says what the author claims, or supports the record is for whoever follows it up to judge.";
|
|
847
|
+
readonly oneOf: readonly [{
|
|
848
|
+
readonly $ref: "#/$defs/RecordEvidenceRecord";
|
|
849
|
+
}, {
|
|
850
|
+
readonly $ref: "#/$defs/RecordEvidenceCredential";
|
|
851
|
+
}];
|
|
852
|
+
};
|
|
853
|
+
readonly RecordEvidenceCredential: {
|
|
854
|
+
readonly title: "RecordEvidenceCredential";
|
|
855
|
+
readonly type: "object";
|
|
856
|
+
readonly additionalProperties: false;
|
|
857
|
+
readonly required: readonly ["kind", "credentialId"];
|
|
858
|
+
readonly description: "Cites a credential.";
|
|
859
|
+
readonly properties: {
|
|
860
|
+
readonly kind: {
|
|
861
|
+
readonly const: "credential";
|
|
862
|
+
};
|
|
863
|
+
readonly credentialId: {
|
|
864
|
+
readonly type: "string";
|
|
865
|
+
readonly minLength: 1;
|
|
866
|
+
readonly maxLength: 2048;
|
|
867
|
+
readonly description: "The credential's `id`. An identifier: never fetched because a record names it.";
|
|
868
|
+
};
|
|
869
|
+
readonly digest: {
|
|
870
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
871
|
+
readonly description: "OPTIONAL. A digest of the credential as cited — the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, `proof` included — so a reader holding a credential with this `id` can tell whether it is the one the author meant.";
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
readonly RecordEvidenceRecord: {
|
|
876
|
+
readonly title: "RecordEvidenceRecord";
|
|
877
|
+
readonly type: "object";
|
|
878
|
+
readonly additionalProperties: false;
|
|
879
|
+
readonly required: readonly ["kind", "key"];
|
|
880
|
+
readonly description: "Cites a record of a room.";
|
|
881
|
+
readonly properties: {
|
|
882
|
+
readonly kind: {
|
|
883
|
+
readonly const: "record";
|
|
884
|
+
};
|
|
885
|
+
readonly key: {
|
|
886
|
+
readonly type: "string";
|
|
887
|
+
readonly minLength: 1;
|
|
888
|
+
readonly maxLength: 512;
|
|
889
|
+
readonly description: "The cited record's key, as in `rooms/records/put`. Opaque on the sealed tiers, like every key there.";
|
|
890
|
+
};
|
|
891
|
+
readonly version: {
|
|
892
|
+
readonly type: "integer";
|
|
893
|
+
readonly minimum: 1;
|
|
894
|
+
readonly description: "The version cited. OPTIONAL; present, it pins the citation to what the record said then, since a record can be rewritten under the same key. A reader that shows a later version SHOULD say that it is not the one cited.";
|
|
895
|
+
};
|
|
896
|
+
readonly roomId: {
|
|
897
|
+
readonly type: "string";
|
|
898
|
+
readonly pattern: "^did:";
|
|
899
|
+
readonly maxLength: 2048;
|
|
900
|
+
readonly description: "The cited record's room. Absent means the citing record's own room. A citation into another room tells the reader that room's identifier, so a writer SHOULD NOT cite into a room the citing room's readers are not meant to learn of.";
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
readonly RecordConfidence: {
|
|
905
|
+
readonly title: "RecordConfidence";
|
|
906
|
+
readonly type: "number";
|
|
907
|
+
readonly minimum: 0;
|
|
908
|
+
readonly maximum: 1;
|
|
909
|
+
readonly description: "The author's own estimate, from 0 to 1, that what the record says is correct. OPTIONAL; absent means no estimate was given, never 1. Meaningful only beside the author who gave it: two writers' numbers are not on one scale, so a reader MUST NOT rank records by `confidence` across authors as though they were, and an agent that weights by it SHOULD weight within an author's own records. Never authority.";
|
|
910
|
+
};
|
|
911
|
+
readonly RecordBasis: {
|
|
912
|
+
readonly title: "RecordBasis";
|
|
913
|
+
readonly type: "string";
|
|
914
|
+
readonly enum: readonly ["declared", "observed", "verified", "inferred"];
|
|
915
|
+
readonly description: "What kind of claim a record is, as its author states it. OPTIONAL wherever it appears; absent means the author did not say, and a reader shows it as unstated rather than assuming any of these.\n\n - `declared` — the author's own statement: a decision, a preference, an intention, a commitment. True because the author says so, and only as far as the author speaks for it.\n - `observed` — something the author saw, measured or was told directly, recorded as found.\n - `verified` — checked against evidence that somebody else can check again, such as a credential or another record. A record that says `verified` SHOULD name that evidence in `evidence`; one that does not is an unsupported claim to have checked, and a reader SHOULD present it so.\n - `inferred` — derived by reasoning from other information: an agent's conclusion, a summary's generalisation, a model's guess. The value an agent writer uses when it does not know which of the others applies.\n\nThe values are the author's account of their own record, signed with it. They are not checked by anybody, confer nothing, and say nothing about whether the record is right — `inferred` can be correct and `observed` mistaken. Aligned with the provenance vocabulary of personal agent memory, so that a record moved between a member's memory and a room keeps its meaning.";
|
|
916
|
+
};
|
|
917
|
+
readonly SealedRecord: {
|
|
918
|
+
readonly title: "SealedRecord";
|
|
919
|
+
readonly type: "object";
|
|
920
|
+
readonly additionalProperties: false;
|
|
921
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
922
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
923
|
+
readonly properties: {
|
|
924
|
+
readonly ciphertext: {
|
|
925
|
+
readonly type: "string";
|
|
926
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, the version it was sealed at, and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it. The version it was sealed at is `version` below where present, and the record's own `version` otherwise.";
|
|
927
|
+
};
|
|
928
|
+
readonly nonce: {
|
|
929
|
+
readonly type: "string";
|
|
930
|
+
readonly description: "AEAD nonce, base64url.";
|
|
931
|
+
};
|
|
932
|
+
readonly epoch: {
|
|
933
|
+
readonly type: "integer";
|
|
934
|
+
readonly minimum: 1;
|
|
935
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
936
|
+
};
|
|
937
|
+
readonly version: {
|
|
938
|
+
readonly type: "integer";
|
|
939
|
+
readonly minimum: 1;
|
|
940
|
+
readonly description: "The version this ciphertext was sealed at, where that is no longer the record's own `version`. A record's version moves when it is curated (`rooms/records/curate`, which MUST assign a new one so that every `sinceVersion` watermark sees the change), but a curation other than a retraction keeps the body — and the body is bound, by the AEAD and by its author's signature (`SealedRecordBody`), to the version it was written at. Without this member a curated record would be opened at a version it was never sealed for, and would not open for anyone.\n\nA host MUST record the version a body was sealed at when it stores it, MUST NOT change it while that body is kept — a curation alters a record's standing, never its sealed content — and MUST include it whenever it differs from the record's `version`. It is absent where the two are equal, which is every record that has not been curated since it was written, so the members a record carries are unchanged until a curation needs this one. It is part of `sealed`, and so of the record the data commitment covers (`CommittedRecord`): a host cannot change it without changing the root.\n\nA reader opens and verifies the body at this version, and MUST refuse a record whose `sealed.version` is greater than its own `version` — a body cannot have been sealed for a version the room had not reached. A host that pairs a newer version with an older body of the same key is rolling the record back; that is a change to the committed record like any other, visible to the comparisons `CommittedRecord` exists for.";
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
readonly AuthorityPresentation: {
|
|
945
|
+
readonly title: "AuthorityPresentation";
|
|
946
|
+
readonly type: "object";
|
|
947
|
+
readonly additionalProperties: false;
|
|
948
|
+
readonly required: readonly ["membership", "authority"];
|
|
949
|
+
readonly 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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
|
|
950
|
+
readonly properties: {
|
|
951
|
+
readonly membership: {
|
|
952
|
+
readonly type: "string";
|
|
953
|
+
readonly 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.";
|
|
954
|
+
};
|
|
955
|
+
readonly authority: {
|
|
956
|
+
readonly type: "array";
|
|
957
|
+
readonly minItems: 1;
|
|
958
|
+
readonly maxItems: 8;
|
|
959
|
+
readonly items: {
|
|
960
|
+
readonly type: "string";
|
|
961
|
+
};
|
|
962
|
+
readonly 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.";
|
|
963
|
+
};
|
|
964
|
+
readonly subjectBinding: {
|
|
965
|
+
readonly type: "string";
|
|
966
|
+
readonly 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.";
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
/**
|
|
974
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
975
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
976
|
+
* parties (§7.3 item 5).
|
|
977
|
+
*/
|
|
978
|
+
export declare const RESPONSE_SPEC: {
|
|
979
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/records/put/0.3#response";
|
|
980
|
+
readonly isBearer: false;
|
|
981
|
+
readonly isProofRequired: true;
|
|
982
|
+
readonly isRecipientRequired: true;
|
|
983
|
+
readonly isIssuedAtRequired: true;
|
|
984
|
+
readonly payloadSchema: {
|
|
985
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
986
|
+
readonly $ref: "#/$defs/Response";
|
|
987
|
+
readonly $defs: {
|
|
988
|
+
readonly Response: {
|
|
989
|
+
readonly $anchor: "response";
|
|
990
|
+
readonly title: "Rooms Records Put — response payload";
|
|
991
|
+
readonly description: "Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.3#response.";
|
|
992
|
+
readonly type: "object";
|
|
993
|
+
readonly additionalProperties: false;
|
|
994
|
+
readonly required: readonly ["key", "version"];
|
|
995
|
+
readonly properties: {
|
|
996
|
+
readonly key: {
|
|
997
|
+
readonly type: "string";
|
|
998
|
+
readonly maxLength: 512;
|
|
999
|
+
readonly description: "The stored record's key.";
|
|
1000
|
+
};
|
|
1001
|
+
readonly version: {
|
|
1002
|
+
readonly type: "integer";
|
|
1003
|
+
readonly minimum: 1;
|
|
1004
|
+
readonly description: "The version assigned, monotonic per room.";
|
|
1005
|
+
};
|
|
1006
|
+
readonly epoch: {
|
|
1007
|
+
readonly type: "integer";
|
|
1008
|
+
readonly minimum: 1;
|
|
1009
|
+
readonly description: "The epoch the record was stored under.";
|
|
1010
|
+
};
|
|
1011
|
+
readonly ext: {
|
|
1012
|
+
readonly $ref: "#/$defs/Ext";
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
readonly Ext: {
|
|
1017
|
+
readonly title: "Ext";
|
|
1018
|
+
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.";
|
|
1019
|
+
readonly type: "object";
|
|
1020
|
+
readonly minProperties: 1;
|
|
1021
|
+
readonly additionalProperties: true;
|
|
1022
|
+
readonly propertyNames: {
|
|
1023
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
readonly BlobRef: {
|
|
1027
|
+
readonly title: "BlobRef";
|
|
1028
|
+
readonly description: "The name of one blob: the digest of its BlobManifest, taken over the manifest's RFC 8785 (JCS) canonicalization. sha2-256 is RECOMMENDED and MUST be implemented. Content addressing over ciphertext, never plaintext, so a BlobRef says nothing about what the file contains, and two uploads of one file have different BlobRefs (a fresh `fileId` gives a different key, and so different ciphertext). Rooms cannot be correlated by the files they share. Compared as decoded multihash bytes, never as encoded strings. A BlobRef is defined over the manifest's JSON, as this schema states it and RFC 8785 canonicalizes it, never over any binding's generated type: two bindings that model the manifest as distinct types still compute the same BlobRef from the same JSON.";
|
|
1029
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1030
|
+
};
|
|
1031
|
+
readonly DigestMultibase: {
|
|
1032
|
+
readonly title: "DigestMultibase";
|
|
1033
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
1034
|
+
readonly type: "string";
|
|
1035
|
+
readonly minLength: 16;
|
|
1036
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
1037
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
1038
|
+
};
|
|
1039
|
+
readonly RecordValidUntil: {
|
|
1040
|
+
readonly title: "RecordValidUntil";
|
|
1041
|
+
readonly type: "string";
|
|
1042
|
+
readonly format: "date-time";
|
|
1043
|
+
readonly description: "The instant after which the record's author no longer stands behind it as current. OPTIONAL; absent means the record does not expire. A reader hides a record whose `validUntil` has passed from default listings, search and recall, and shows it only on explicit request (`SealedRecordBody`, **Expiry**). No host enforces it.";
|
|
1044
|
+
};
|
|
1045
|
+
readonly PermittedUse: {
|
|
1046
|
+
readonly title: "PermittedUse";
|
|
1047
|
+
readonly type: "object";
|
|
1048
|
+
readonly additionalProperties: false;
|
|
1049
|
+
readonly minProperties: 1;
|
|
1050
|
+
readonly description: "What the author permits the record to be used for — for example, that a learner's record is for instructional personalisation only. OPTIONAL; absent means the author stated no limit beyond the room's own terms.\n\n**Two halves, because purpose has both a machine and a human reading.** `purposes` names purposes by IRI, so that an agent can match them without parsing prose; `note` says it in words, for the nuance an identifier cannot carry. Either may be given alone.\n\n**No vocabulary of this family's own.** Purpose vocabularies exist and are maintained elsewhere — the W3C Data Privacy Vocabulary (`https://w3id.org/dpv#…`) is the one a writer SHOULD reach for first — and a short list defined here would be one more to translate between, and would be wrong at its edges for every domain that uses rooms. An IRI is the extension path: a community that needs a purpose no published vocabulary has names it under an IRI it controls.\n\n**A statement, not an enforcement.** No host can see it on the sealed tiers and none enforces it on any tier; every reader is a member who already holds the content. It records what the author permitted, so that a member — or an agent acting for one — can honour it, and so that a use outside it is a use against the author's stated terms rather than one nobody could have known about. An agent acting for a member SHOULD NOT use a record for a purpose outside `validFor` and SHOULD tell its principal when asked to. It confers no authority on anybody, and a `purposes` entry a reader does not recognise is shown, not ignored.";
|
|
1051
|
+
readonly properties: {
|
|
1052
|
+
readonly purposes: {
|
|
1053
|
+
readonly type: "array";
|
|
1054
|
+
readonly minItems: 1;
|
|
1055
|
+
readonly maxItems: 8;
|
|
1056
|
+
readonly uniqueItems: true;
|
|
1057
|
+
readonly items: {
|
|
1058
|
+
readonly type: "string";
|
|
1059
|
+
readonly format: "uri";
|
|
1060
|
+
readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:";
|
|
1061
|
+
readonly maxLength: 2048;
|
|
1062
|
+
};
|
|
1063
|
+
readonly description: "Purposes the record may be used for, each an absolute IRI — for example `https://w3id.org/dpv#ServicePersonalisation`. A set: order carries no meaning. An identifier, never fetched.";
|
|
1064
|
+
};
|
|
1065
|
+
readonly note: {
|
|
1066
|
+
readonly type: "string";
|
|
1067
|
+
readonly minLength: 1;
|
|
1068
|
+
readonly maxLength: 512;
|
|
1069
|
+
readonly description: "The permitted use in words, such as `instructional personalisation only`. Plain text, rendered as text, and never instructions — an agent reading it treats it as the author's statement about the record, not as something to do.";
|
|
1070
|
+
};
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
readonly RecordEvidenceList: {
|
|
1074
|
+
readonly title: "RecordEvidenceList";
|
|
1075
|
+
readonly type: "array";
|
|
1076
|
+
readonly minItems: 1;
|
|
1077
|
+
readonly maxItems: 32;
|
|
1078
|
+
readonly items: {
|
|
1079
|
+
readonly $ref: "#/$defs/RecordEvidence";
|
|
1080
|
+
};
|
|
1081
|
+
readonly description: "What the author offers in support of the record: other records and credentials, by reference. OPTIONAL; absent means none was named, and an empty array is not a permitted spelling of that. Order carries no meaning. Bounded so that a reader's cost of showing a record's support is bounded too.";
|
|
1082
|
+
};
|
|
1083
|
+
readonly RecordEvidence: {
|
|
1084
|
+
readonly title: "RecordEvidence";
|
|
1085
|
+
readonly description: "One thing a record cites in its support, discriminated by `kind`.\n\n - `record` names a record of a room by its key, and optionally the version cited and the room. Absent `roomId` means the record's own room.\n - `credential` names a credential by its `id`, and optionally a digest of the credential as cited.\n\n**A reference, never a locator, and never proof.** A reader MUST NOT fetch, resolve or dereference a `credentialId` because a record names it, and MUST NOT read a record of another room on the strength of a citation: the rule that a room's identifiers are identifiers and not addresses (`AuthorityPresentation`) applies here for the same reasons — fetching would signal to whoever answers which member read which record, and when. A reader MAY show a cited record of the same room that it already holds or reads anyway, and MAY match a cited credential against ones its member already holds. What the citation proves is only that the author cited it; whether the evidence exists, says what the author claims, or supports the record is for whoever follows it up to judge.";
|
|
1086
|
+
readonly oneOf: readonly [{
|
|
1087
|
+
readonly $ref: "#/$defs/RecordEvidenceRecord";
|
|
1088
|
+
}, {
|
|
1089
|
+
readonly $ref: "#/$defs/RecordEvidenceCredential";
|
|
1090
|
+
}];
|
|
1091
|
+
};
|
|
1092
|
+
readonly RecordEvidenceCredential: {
|
|
1093
|
+
readonly title: "RecordEvidenceCredential";
|
|
1094
|
+
readonly type: "object";
|
|
1095
|
+
readonly additionalProperties: false;
|
|
1096
|
+
readonly required: readonly ["kind", "credentialId"];
|
|
1097
|
+
readonly description: "Cites a credential.";
|
|
1098
|
+
readonly properties: {
|
|
1099
|
+
readonly kind: {
|
|
1100
|
+
readonly const: "credential";
|
|
1101
|
+
};
|
|
1102
|
+
readonly credentialId: {
|
|
1103
|
+
readonly type: "string";
|
|
1104
|
+
readonly minLength: 1;
|
|
1105
|
+
readonly maxLength: 2048;
|
|
1106
|
+
readonly description: "The credential's `id`. An identifier: never fetched because a record names it.";
|
|
1107
|
+
};
|
|
1108
|
+
readonly digest: {
|
|
1109
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1110
|
+
readonly description: "OPTIONAL. A digest of the credential as cited — the SHA-256 multihash of its RFC 8785 (JCS) canonicalization, `proof` included — so a reader holding a credential with this `id` can tell whether it is the one the author meant.";
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
readonly RecordEvidenceRecord: {
|
|
1115
|
+
readonly title: "RecordEvidenceRecord";
|
|
1116
|
+
readonly type: "object";
|
|
1117
|
+
readonly additionalProperties: false;
|
|
1118
|
+
readonly required: readonly ["kind", "key"];
|
|
1119
|
+
readonly description: "Cites a record of a room.";
|
|
1120
|
+
readonly properties: {
|
|
1121
|
+
readonly kind: {
|
|
1122
|
+
readonly const: "record";
|
|
1123
|
+
};
|
|
1124
|
+
readonly key: {
|
|
1125
|
+
readonly type: "string";
|
|
1126
|
+
readonly minLength: 1;
|
|
1127
|
+
readonly maxLength: 512;
|
|
1128
|
+
readonly description: "The cited record's key, as in `rooms/records/put`. Opaque on the sealed tiers, like every key there.";
|
|
1129
|
+
};
|
|
1130
|
+
readonly version: {
|
|
1131
|
+
readonly type: "integer";
|
|
1132
|
+
readonly minimum: 1;
|
|
1133
|
+
readonly description: "The version cited. OPTIONAL; present, it pins the citation to what the record said then, since a record can be rewritten under the same key. A reader that shows a later version SHOULD say that it is not the one cited.";
|
|
1134
|
+
};
|
|
1135
|
+
readonly roomId: {
|
|
1136
|
+
readonly type: "string";
|
|
1137
|
+
readonly pattern: "^did:";
|
|
1138
|
+
readonly maxLength: 2048;
|
|
1139
|
+
readonly description: "The cited record's room. Absent means the citing record's own room. A citation into another room tells the reader that room's identifier, so a writer SHOULD NOT cite into a room the citing room's readers are not meant to learn of.";
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1143
|
+
readonly RecordConfidence: {
|
|
1144
|
+
readonly title: "RecordConfidence";
|
|
1145
|
+
readonly type: "number";
|
|
1146
|
+
readonly minimum: 0;
|
|
1147
|
+
readonly maximum: 1;
|
|
1148
|
+
readonly description: "The author's own estimate, from 0 to 1, that what the record says is correct. OPTIONAL; absent means no estimate was given, never 1. Meaningful only beside the author who gave it: two writers' numbers are not on one scale, so a reader MUST NOT rank records by `confidence` across authors as though they were, and an agent that weights by it SHOULD weight within an author's own records. Never authority.";
|
|
1149
|
+
};
|
|
1150
|
+
readonly RecordBasis: {
|
|
1151
|
+
readonly title: "RecordBasis";
|
|
1152
|
+
readonly type: "string";
|
|
1153
|
+
readonly enum: readonly ["declared", "observed", "verified", "inferred"];
|
|
1154
|
+
readonly description: "What kind of claim a record is, as its author states it. OPTIONAL wherever it appears; absent means the author did not say, and a reader shows it as unstated rather than assuming any of these.\n\n - `declared` — the author's own statement: a decision, a preference, an intention, a commitment. True because the author says so, and only as far as the author speaks for it.\n - `observed` — something the author saw, measured or was told directly, recorded as found.\n - `verified` — checked against evidence that somebody else can check again, such as a credential or another record. A record that says `verified` SHOULD name that evidence in `evidence`; one that does not is an unsupported claim to have checked, and a reader SHOULD present it so.\n - `inferred` — derived by reasoning from other information: an agent's conclusion, a summary's generalisation, a model's guess. The value an agent writer uses when it does not know which of the others applies.\n\nThe values are the author's account of their own record, signed with it. They are not checked by anybody, confer nothing, and say nothing about whether the record is right — `inferred` can be correct and `observed` mistaken. Aligned with the provenance vocabulary of personal agent memory, so that a record moved between a member's memory and a room keeps its meaning.";
|
|
1155
|
+
};
|
|
1156
|
+
readonly SealedRecord: {
|
|
1157
|
+
readonly title: "SealedRecord";
|
|
1158
|
+
readonly type: "object";
|
|
1159
|
+
readonly additionalProperties: false;
|
|
1160
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
1161
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
1162
|
+
readonly properties: {
|
|
1163
|
+
readonly ciphertext: {
|
|
1164
|
+
readonly type: "string";
|
|
1165
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, the version it was sealed at, and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it. The version it was sealed at is `version` below where present, and the record's own `version` otherwise.";
|
|
1166
|
+
};
|
|
1167
|
+
readonly nonce: {
|
|
1168
|
+
readonly type: "string";
|
|
1169
|
+
readonly description: "AEAD nonce, base64url.";
|
|
1170
|
+
};
|
|
1171
|
+
readonly epoch: {
|
|
1172
|
+
readonly type: "integer";
|
|
1173
|
+
readonly minimum: 1;
|
|
1174
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
1175
|
+
};
|
|
1176
|
+
readonly version: {
|
|
1177
|
+
readonly type: "integer";
|
|
1178
|
+
readonly minimum: 1;
|
|
1179
|
+
readonly description: "The version this ciphertext was sealed at, where that is no longer the record's own `version`. A record's version moves when it is curated (`rooms/records/curate`, which MUST assign a new one so that every `sinceVersion` watermark sees the change), but a curation other than a retraction keeps the body — and the body is bound, by the AEAD and by its author's signature (`SealedRecordBody`), to the version it was written at. Without this member a curated record would be opened at a version it was never sealed for, and would not open for anyone.\n\nA host MUST record the version a body was sealed at when it stores it, MUST NOT change it while that body is kept — a curation alters a record's standing, never its sealed content — and MUST include it whenever it differs from the record's `version`. It is absent where the two are equal, which is every record that has not been curated since it was written, so the members a record carries are unchanged until a curation needs this one. It is part of `sealed`, and so of the record the data commitment covers (`CommittedRecord`): a host cannot change it without changing the root.\n\nA reader opens and verifies the body at this version, and MUST refuse a record whose `sealed.version` is greater than its own `version` — a body cannot have been sealed for a version the room had not reached. A host that pairs a newer version with an older body of the same key is rolling the record back; that is a change to the committed record like any other, visible to the comparisons `CommittedRecord` exists for.";
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
readonly AuthorityPresentation: {
|
|
1184
|
+
readonly title: "AuthorityPresentation";
|
|
1185
|
+
readonly type: "object";
|
|
1186
|
+
readonly additionalProperties: false;
|
|
1187
|
+
readonly required: readonly ["membership", "authority"];
|
|
1188
|
+
readonly 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. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.";
|
|
1189
|
+
readonly properties: {
|
|
1190
|
+
readonly membership: {
|
|
1191
|
+
readonly type: "string";
|
|
1192
|
+
readonly 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.";
|
|
1193
|
+
};
|
|
1194
|
+
readonly authority: {
|
|
1195
|
+
readonly type: "array";
|
|
1196
|
+
readonly minItems: 1;
|
|
1197
|
+
readonly maxItems: 8;
|
|
1198
|
+
readonly items: {
|
|
1199
|
+
readonly type: "string";
|
|
1200
|
+
};
|
|
1201
|
+
readonly 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.";
|
|
1202
|
+
};
|
|
1203
|
+
readonly subjectBinding: {
|
|
1204
|
+
readonly type: "string";
|
|
1205
|
+
readonly 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.";
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
};
|
|
1210
|
+
};
|
|
1211
|
+
};
|
|
1212
|
+
//# sourceMappingURL=payload.d.ts.map
|