@openvtc/trust-tasks 0.26.8 → 0.26.10

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 (30) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/dist/_shared/components.d.ts +43 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/external/credentials/issue/0.3/payload.d.ts +1523 -0
  5. package/dist/external/credentials/issue/0.3/payload.d.ts.map +1 -0
  6. package/dist/external/credentials/issue/0.3/payload.js +847 -0
  7. package/dist/external/credentials/issue/0.3/payload.js.map +1 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +4 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/vtc/_shared/0.1/admission.d.ts +16 -0
  13. package/dist/vtc/_shared/0.1/admission.d.ts.map +1 -0
  14. package/dist/vtc/_shared/0.1/admission.js +6 -0
  15. package/dist/vtc/_shared/0.1/admission.js.map +1 -0
  16. package/dist/vtc/members/admit/0.1/payload.d.ts +481 -0
  17. package/dist/vtc/members/admit/0.1/payload.d.ts.map +1 -0
  18. package/dist/vtc/members/admit/0.1/payload.js +281 -0
  19. package/dist/vtc/members/admit/0.1/payload.js.map +1 -0
  20. package/dist/vtc/members/make-membership/0.1/payload.d.ts +447 -0
  21. package/dist/vtc/members/make-membership/0.1/payload.d.ts.map +1 -0
  22. package/dist/vtc/members/make-membership/0.1/payload.js +267 -0
  23. package/dist/vtc/members/make-membership/0.1/payload.js.map +1 -0
  24. package/package.json +1 -1
  25. package/src/_shared/components.ts +43 -0
  26. package/src/external/credentials/issue/0.3/payload.ts +999 -0
  27. package/src/index.ts +4 -0
  28. package/src/vtc/_shared/0.1/admission.ts +17 -0
  29. package/src/vtc/members/admit/0.1/payload.ts +326 -0
  30. package/src/vtc/members/make-membership/0.1/payload.ts +304 -0
package/CHANGELOG.md CHANGED
@@ -11,6 +11,132 @@ 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.10 — 2026-10-16
15
+
16
+
17
+ ### Added
18
+
19
+ - **vtc/members**: Admit and make-membership — direct admission by an administrator, decided by the community's admission policy (#784)
20
+
21
+ Two new draft tasks for admitting a member without a join request, as one
22
+ governed ceremony:
23
+
24
+ - vtc/members/admit/0.1 ("Add a member"): a DID with no access-control
25
+ entry (or only an `application` entry) is admitted at a community role the
26
+ administrator names. The community writes the entry, the member record and
27
+ a revocation slot and issues the VMC and role VAC, as a completed join
28
+ would. A former member (removed record, no entry) is re-admitted and
29
+ reported `returning`.
30
+ - vtc/members/make-membership/0.1 ("Make this a membership"): an existing
31
+ live entry with no member record (typically the bootstrap administrator)
32
+ gets the member record and credentials at the role it already holds; the
33
+ entry itself is not changed.
34
+
35
+ The rules no policy can change:
36
+ - the requester holds `vtc.members.manage` (permissionDenied);
37
+ - a role other than `member` takes `vtc.roles.assign`, and the entry it
38
+ seats is bounded by the requester's own;
39
+ - `admin`, `application` and any role conferring authority-conferring
40
+ capabilities are never seated (`roleNotPermitted`);
41
+ - make-membership refuses an `application` entry, an expired or suspended
42
+ entry, a live membership and a removed record.
43
+
44
+ The community's admission policy then admits, refers (parked in the action
45
+ list, answered with trust-task-next-step, approved only by another holder of
46
+ `vtc.members.manage` who is neither requester nor subject, every check
47
+ re-run at execution, exactly once) or refuses (`deniedByPolicy`). Step-up
48
+ and consent are described as the model the tasks are designed for, not
49
+ required (SPEC §7.3 item 13).
50
+
51
+ Both answer with the same AdmittedMembership (subject, role, label?,
52
+ status, returning, approval policyAllowed|approved|waived,
53
+ statusListIndex, vmc, roleVac), shared in vtc/_shared/0.1/admission.
54
+
55
+ The wire shape and codes are those of the Verifiable Trust Infrastructure
56
+ implementation (vtc-service), which bound the tasks ahead of this
57
+ specification with local types; generated types replace them.
58
+
59
+ Bindings regenerated (Rust, TS, Go, Dart).
60
+
61
+
62
+
63
+ ### Specifications
64
+
65
+ - **external**: Credentials/issue 0.3 — details.maxOperations is a guaranteed-to-fit count, clarified in place (#783)
66
+
67
+ 0.3 said `details.maxOperations` on `responseTooLarge` was "how many of the
68
+ batch's operations, taken in order, would fit", which left open whether a
69
+ consumer may rely on it or must treat it as a hint.
70
+
71
+ It is a guarantee, and now says so:
72
+
73
+ - Producer (Conformance item 7): a custodian that gives `maxOperations`
74
+ MUST give a count k such that the same request, with `presign.requests`
75
+ cut to its first k operations (and `uploadId` left out if none of them
76
+ needs one, as item 4 requires), is answered within the bound on
77
+ `sealedCredential`, the account and binding as they were at the refusal.
78
+ It MAY be conservative — a sealed bundle's length varies with its
79
+ ciphertext's randomness, so a count computed from an upper bound on the
80
+ sealed length is sometimes lower than the most that would fit. It MUST
81
+ NOT give a count it has not established fits; it omits the member when it
82
+ cannot compute one or when not even one operation fits. The count speaks
83
+ for those operations in that order only.
84
+ - Consumer (item 5): SHOULD split by it (else in half); the first part fits,
85
+ the rest carries no promise, and the consumer MUST handle another
86
+ `responseTooLarge` on any part or any other batch by splitting again. It
87
+ MUST NOT treat the count as a size that fits other operations. A single
88
+ operation refused this way cannot be split and SHOULD NOT be retried.
89
+ - The `responseTooLarge` meaning, the "What changed from 0.2" list and the
90
+ refusal example say the same.
91
+
92
+ ## 0.26.9 — 2026-10-15
93
+
94
+
95
+ ### Specifications
96
+
97
+ - **external**: Credentials/issue 0.3 — at most 64 presigned requests per batch, responseTooLarge when the sealed answer would exceed its bound (#781)
98
+
99
+ 0.2 let a presign batch hold 128 operations and bounded the response's
100
+ sealedCredential at 262144 characters, on the estimate that 128 presigned
101
+ requests are about 128 KiB of cleartext and a third more once armored.
102
+ That estimate does not hold: a sealed-transfer bundle's overhead depends
103
+ on how its cleartext is encoded inside the seal and can be several times
104
+ the cleartext, and objectKey and uploadId may each be 1024 characters, so
105
+ a long key or upload id lengthens every URL in the set. A batch of 128
106
+ could produce an answer the schema forbids, and 0.2 said nothing about
107
+ what a custodian does then.
108
+
109
+ external/credentials/issue 0.3 (draft; a narrowed constraint, so a new
110
+ MINOR per SPEC §5.2):
111
+ - PresignBatch.requests maxItems 128 -> 64; every prose 128 for this task
112
+ updated (summary, Direct uploads, Definitions, examples, Security).
113
+ - New error external/credentials/issue:responseTooLarge: a custodian whose
114
+ sealed answer to a valid batch would exceed the sealedCredential bound
115
+ refuses it — never truncates the set, never answers over the bound —
116
+ with optional details.maxOperations; the caller SHOULD split and ask
117
+ again. It is a new conformance item 7, after the batch, ceiling and TTL
118
+ checks and before the rate check; a refused batch does not count
119
+ against the binding's rate. The custodian learns the size by presigning
120
+ and sealing (no provider contact), so noKeyAgreement precedes it, and a
121
+ set built and refused is discarded unreturned and unlogged.
122
+ - The maxDocumentBytes rationale is corrected; sealedCredential stays at
123
+ 262144 and maxDocumentBytes at 65536 / 294912, which still hold a bundle
124
+ at its bound plus the echoed batch, envelope and proof.
125
+
126
+ Why cap rather than raise the bound: presigned requests are bearer
127
+ authority until they expire (five minutes at most for direct-upload
128
+ targets), so presigning more than can be used before expiry only widens
129
+ exposure; 64 parts of S3's 5 MiB minimum is 320 MiB per batch, and larger
130
+ uploads use larger parts or ask again; a larger answer must cross
131
+ mediators, DIDComm envelopes whose nesting multiplies base64 expansion,
132
+ and memory-constrained custodians and hosts.
133
+
134
+ Invalid examples: a 65-operation batch (request) and a response echoing
135
+ 65 operations. external/_shared/0.1 already names PresignedRequestSet for
136
+ "0.2 and later" and keeps its own 128 bound for 0.2, so it is unchanged.
137
+ rooms/blobs/upload/begin/0.2's 128 part targets per answer stays true: a
138
+ host fills such an answer with two issuances. Bindings regenerated.
139
+
14
140
  ## 0.26.8 — 2026-10-15
15
141
 
16
142
 
@@ -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
  */