@openvtc/trust-tasks 0.26.9 → 0.26.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/dist/_shared/components.d.ts +43 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +6 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/keys/act/0.2/payload.d.ts +546 -0
  9. package/dist/rooms/keys/act/0.2/payload.d.ts.map +1 -0
  10. package/dist/rooms/keys/act/0.2/payload.js +305 -0
  11. package/dist/rooms/keys/act/0.2/payload.js.map +1 -0
  12. package/dist/rooms/keys/file-key/0.2/payload.d.ts +306 -0
  13. package/dist/rooms/keys/file-key/0.2/payload.d.ts.map +1 -0
  14. package/dist/rooms/keys/file-key/0.2/payload.js +167 -0
  15. package/dist/rooms/keys/file-key/0.2/payload.js.map +1 -0
  16. package/dist/rooms/keys/open/0.2/payload.d.ts +323 -0
  17. package/dist/rooms/keys/open/0.2/payload.d.ts.map +1 -0
  18. package/dist/rooms/keys/open/0.2/payload.js +171 -0
  19. package/dist/rooms/keys/open/0.2/payload.js.map +1 -0
  20. package/dist/vtc/_shared/0.1/admission.d.ts +16 -0
  21. package/dist/vtc/_shared/0.1/admission.d.ts.map +1 -0
  22. package/dist/vtc/_shared/0.1/admission.js +6 -0
  23. package/dist/vtc/_shared/0.1/admission.js.map +1 -0
  24. package/dist/vtc/members/admit/0.1/payload.d.ts +481 -0
  25. package/dist/vtc/members/admit/0.1/payload.d.ts.map +1 -0
  26. package/dist/vtc/members/admit/0.1/payload.js +281 -0
  27. package/dist/vtc/members/admit/0.1/payload.js.map +1 -0
  28. package/dist/vtc/members/make-membership/0.1/payload.d.ts +447 -0
  29. package/dist/vtc/members/make-membership/0.1/payload.d.ts.map +1 -0
  30. package/dist/vtc/members/make-membership/0.1/payload.js +267 -0
  31. package/dist/vtc/members/make-membership/0.1/payload.js.map +1 -0
  32. package/package.json +1 -1
  33. package/src/_shared/components.ts +43 -0
  34. package/src/index.ts +6 -0
  35. package/src/rooms/keys/act/0.2/payload.ts +380 -0
  36. package/src/rooms/keys/file-key/0.2/payload.ts +224 -0
  37. package/src/rooms/keys/open/0.2/payload.ts +237 -0
  38. package/src/vtc/_shared/0.1/admission.ts +17 -0
  39. package/src/vtc/members/admit/0.1/payload.ts +326 -0
  40. package/src/vtc/members/make-membership/0.1/payload.ts +304 -0
package/CHANGELOG.md CHANGED
@@ -11,6 +11,161 @@ The package versions over **its own API** — what a consumer compiles against
11
11
  not over `SPEC.md`. Below 1.0 a breaking change bumps the leading non-zero
12
12
  component.
13
13
 
14
+ ## 0.26.11 — 2026-10-16
15
+
16
+
17
+ ### Specifications
18
+
19
+ - **rooms/keys**: Act 0.2 — the member is the subject, and a document that names no room names its member (#787)
20
+
21
+ `rooms/keys/act/0.1` declared `subjectPath: /document/payload/roomId` and
22
+ resolved the member to act as "among the members of the document's room".
23
+ Three types in its own table carry no `roomId` — `rooms/blobs/chunk/0.1`
24
+ (`downloadId`, `index`) and `rooms/blobs/upload/{commit,abort}/0.2`
25
+ (`uploadId`) — and for them 0.1 defined neither the subject nor how the
26
+ recipient finds the document's room, while a producer MAY omit `issuer`.
27
+ A conforming request could leave the recipient nothing to resolve the
28
+ member from.
29
+
30
+ act 0.2:
31
+ - The table: these types carry no `roomId`; the member is the document's
32
+ `issuer`, which the producer MUST set to the member whose request
33
+ opened the transfer.
34
+ - Producer item 2: `issuer` MUST be set for a type that names no room
35
+ (MAY → MUST for those types; unchanged otherwise).
36
+ - Recipient item 2a: for a type that names no room, act as `issuer` if it
37
+ is a member the recipient holds keys for and the caller may act as;
38
+ otherwise `issuerNotPrincipal`; `issuer` absent is `principalAmbiguous`.
39
+ The recipient MUST NOT pick a member for the caller (not its only one,
40
+ not one inferred from the transfer identifier).
41
+ - `subjectPath` moves to `/document/issuer`. The subject is the party
42
+ whose authority the task exercises (`actsAsSubject: true`) — the
43
+ member, whose key signs — which is the question a delegated-execution
44
+ policy point asks of `subjectPath` ("does the executing agent speak
45
+ for this subject?") and exactly what Recipient item 2 decides. The room
46
+ is the resource the completed document addresses, not a party the caller
47
+ speaks for, and three of the table's types do not name one. Where
48
+ `issuer` is absent (a room-naming type, one candidate member) the
49
+ subject is the member item 2 resolves, and a recipient evaluating
50
+ policy or audit against the subject MUST use it and MUST NOT treat the
51
+ unresolved pointer as "no subject".
52
+ - `principalAmbiguous` / `issuerNotPrincipal` meanings cover the
53
+ room-less case. No code added; payload and response schemas unchanged
54
+ except the `issuer` description.
55
+ - Examples: a direct upload's commit completed as the member; a chunk
56
+ refused `principalAmbiguous`. Invalid example: a non-DID `issuer`.
57
+
58
+ - **rooms/keys**: File-key and open 0.2 — unknownEpoch says `removed` when catching up cannot help (#786)
59
+
60
+ `rooms/keys/file-key/0.1` gave `unknownEpoch` two reasons in a closed
61
+ details schema — `notDelivered` and `beyondChain` — and defined
62
+ `notDelivered` as "E is later than any epoch it holds". A removal leaves
63
+ the oracle's group where it was, so a file sealed after the oracle's
64
+ principal was removed matches that definition too. The oracle could only
65
+ say `notDelivered`, telling the caller to catch up with the room's
66
+ commits, and no commit will ever make that epoch derivable for a removed
67
+ member: a caller following the reason retried forever.
68
+ `rooms/keys/open/0.1` declared `unknownEpoch` with no details schema at
69
+ all, so a caller could not tell the two cases apart there either, and an
70
+ implementation already sends an undeclared `reason: removed`.
71
+
72
+ file-key 0.2:
73
+ - `unknownEpoch.details.reason` gains `removed`, and `details` gains
74
+ `removedAtEpoch` (integer, minimum 1).
75
+ - Oracle item 4: `removed`, with `removedAtEpoch`, when a commit the
76
+ oracle processed removed its principal from the room's group at
77
+ `removedAtEpoch` and E is at or after it — no later commit will make E
78
+ derivable, so the caller MUST NOT be told to catch up. It takes
79
+ precedence: an oracle that knows of such a removal MUST NOT answer
80
+ `notDelivered` for an E at or after it.
81
+ - Caller: acts on `details.reason`, never on the message; after `removed`
82
+ it MUST NOT retry after catching up.
83
+ - A `removed` refusal example, a Security & Privacy sentence, and a
84
+ "What changed from 0.1" section.
85
+
86
+ open 0.2 declares the same three reasons and the same details schema for
87
+ `rooms/keys/open:unknownEpoch`, with the same conformance text
88
+ (`beyondChain` for an epoch earlier than the oracle's current one that its
89
+ retained chain does not reach).
90
+
91
+ ## 0.26.10 — 2026-10-16
92
+
93
+
94
+ ### Added
95
+
96
+ - **vtc/members**: Admit and make-membership — direct admission by an administrator, decided by the community's admission policy (#784)
97
+
98
+ Two new draft tasks for admitting a member without a join request, as one
99
+ governed ceremony:
100
+
101
+ - vtc/members/admit/0.1 ("Add a member"): a DID with no access-control
102
+ entry (or only an `application` entry) is admitted at a community role the
103
+ administrator names. The community writes the entry, the member record and
104
+ a revocation slot and issues the VMC and role VAC, as a completed join
105
+ would. A former member (removed record, no entry) is re-admitted and
106
+ reported `returning`.
107
+ - vtc/members/make-membership/0.1 ("Make this a membership"): an existing
108
+ live entry with no member record (typically the bootstrap administrator)
109
+ gets the member record and credentials at the role it already holds; the
110
+ entry itself is not changed.
111
+
112
+ The rules no policy can change:
113
+ - the requester holds `vtc.members.manage` (permissionDenied);
114
+ - a role other than `member` takes `vtc.roles.assign`, and the entry it
115
+ seats is bounded by the requester's own;
116
+ - `admin`, `application` and any role conferring authority-conferring
117
+ capabilities are never seated (`roleNotPermitted`);
118
+ - make-membership refuses an `application` entry, an expired or suspended
119
+ entry, a live membership and a removed record.
120
+
121
+ The community's admission policy then admits, refers (parked in the action
122
+ list, answered with trust-task-next-step, approved only by another holder of
123
+ `vtc.members.manage` who is neither requester nor subject, every check
124
+ re-run at execution, exactly once) or refuses (`deniedByPolicy`). Step-up
125
+ and consent are described as the model the tasks are designed for, not
126
+ required (SPEC §7.3 item 13).
127
+
128
+ Both answer with the same AdmittedMembership (subject, role, label?,
129
+ status, returning, approval policyAllowed|approved|waived,
130
+ statusListIndex, vmc, roleVac), shared in vtc/_shared/0.1/admission.
131
+
132
+ The wire shape and codes are those of the Verifiable Trust Infrastructure
133
+ implementation (vtc-service), which bound the tasks ahead of this
134
+ specification with local types; generated types replace them.
135
+
136
+ Bindings regenerated (Rust, TS, Go, Dart).
137
+
138
+
139
+
140
+ ### Specifications
141
+
142
+ - **external**: Credentials/issue 0.3 — details.maxOperations is a guaranteed-to-fit count, clarified in place (#783)
143
+
144
+ 0.3 said `details.maxOperations` on `responseTooLarge` was "how many of the
145
+ batch's operations, taken in order, would fit", which left open whether a
146
+ consumer may rely on it or must treat it as a hint.
147
+
148
+ It is a guarantee, and now says so:
149
+
150
+ - Producer (Conformance item 7): a custodian that gives `maxOperations`
151
+ MUST give a count k such that the same request, with `presign.requests`
152
+ cut to its first k operations (and `uploadId` left out if none of them
153
+ needs one, as item 4 requires), is answered within the bound on
154
+ `sealedCredential`, the account and binding as they were at the refusal.
155
+ It MAY be conservative — a sealed bundle's length varies with its
156
+ ciphertext's randomness, so a count computed from an upper bound on the
157
+ sealed length is sometimes lower than the most that would fit. It MUST
158
+ NOT give a count it has not established fits; it omits the member when it
159
+ cannot compute one or when not even one operation fits. The count speaks
160
+ for those operations in that order only.
161
+ - Consumer (item 5): SHOULD split by it (else in half); the first part fits,
162
+ the rest carries no promise, and the consumer MUST handle another
163
+ `responseTooLarge` on any part or any other batch by splitting again. It
164
+ MUST NOT treat the count as a size that fits other operations. A single
165
+ operation refused this way cannot be split and SHOULD NOT be retried.
166
+ - The `responseTooLarge` meaning, the "What changed from 0.2" list and the
167
+ refusal example say the same.
168
+
14
169
  ## 0.26.9 — 2026-10-15
15
170
 
16
171
 
@@ -337,6 +337,10 @@ export type Admission = "automatic" | "review";
337
337
  * Deliberately not a duration. A room that promised "daily" would be making a claim its owner's availability cannot keep, and a member comparing against a clock would read an owner's holiday as a host's misbehaviour.
338
338
  */
339
339
  export type AnchorCadence = "never" | "renewal" | "manual";
340
+ /**
341
+ * How the admission came to execute. `policyAllowed`: the community's policy admitted it at once. `approved`: the policy referred it, the community parked it, and another administrator approved it. `waived`: the policy referred it, and the community's single-administrator mode waived the approval on the requester's own re-authentication bound to the operation.
342
+ */
343
+ export type Approval = "policyAllowed" | "approved" | "waived";
340
344
  /**
341
345
  * An explicit statement of the capabilities a subject may approve. Exactly one of `ceiling` (the role's full approve ceiling), `none`, or `listed` with a NON-EMPTY list of CapabilityRef.
342
346
  */
@@ -3533,6 +3537,45 @@ export interface AdminRightRow {
3533
3537
  */
3534
3538
  breakGlass?: BreakGlass;
3535
3539
  }
3540
+ /**
3541
+ * A membership admitted directly, with the credentials issued for it — the success payload of vtc/members/admit and vtc/members/make-membership.
3542
+ */
3543
+ export interface AdmittedMembership {
3544
+ /**
3545
+ * The DID admitted.
3546
+ */
3547
+ subject: string;
3548
+ /**
3549
+ * The community role the membership holds: for vtc/members/admit the one requested, for vtc/members/make-membership the role the entry already held.
3550
+ */
3551
+ role: string;
3552
+ /**
3553
+ * The new entry's label, when vtc/members/admit was given one. Absent for vtc/members/make-membership, which writes no entry.
3554
+ */
3555
+ label?: string;
3556
+ /**
3557
+ * Always `admitted`: a refusal is a trust-task-error, and a referred admission is answered with trust-task-next-step until it executes.
3558
+ */
3559
+ status: "admitted";
3560
+ /**
3561
+ * True when vtc/members/admit re-admitted a former member (a removed member record, no entry), as a rejoin would re-admit them. Always false for vtc/members/make-membership, which refuses a removed record.
3562
+ */
3563
+ returning: boolean;
3564
+ approval: Approval;
3565
+ /**
3566
+ * The membership's slot on the community's revocation status list, which the VMC's credentialStatus names.
3567
+ */
3568
+ statusListIndex: number;
3569
+ /**
3570
+ * The Verifiable Membership Credential issued for the admission, delivered inline as vtc/join-requests/decide delivers it.
3571
+ */
3572
+ vmc: {};
3573
+ /**
3574
+ * The role credential issued for the admission: a Verifiable Authority Credential issued by the community whose `credentialSubject.authority` is `{ scope: <community DID>, actions: ["role:<name>"] }`, the shape vtc/join-requests/decide returns.
3575
+ */
3576
+ roleVac: {};
3577
+ ext?: Ext;
3578
+ }
3536
3579
  /**
3537
3580
  * An agent name bound to a DID. A name is only ever authoritative in the DID→name direction: the DID document's `alsoKnownAs` is what proves the binding, because anyone controlling a domain can point a name at somebody else's DID.
3538
3581
  */