@openvtc/trust-tasks 0.21.12 → 0.21.14

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 (65) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/_shared/components.d.ts +91 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/_shared/0.3/session.d.ts +16 -0
  5. package/dist/auth/_shared/0.3/session.d.ts.map +1 -0
  6. package/dist/auth/_shared/0.3/session.js +6 -0
  7. package/dist/auth/_shared/0.3/session.js.map +1 -0
  8. package/dist/auth/authenticate/0.3/payload.d.ts +852 -0
  9. package/dist/auth/authenticate/0.3/payload.d.ts.map +1 -0
  10. package/dist/auth/authenticate/0.3/payload.js +442 -0
  11. package/dist/auth/authenticate/0.3/payload.js.map +1 -0
  12. package/dist/auth/refresh/0.2/payload.d.ts +729 -0
  13. package/dist/auth/refresh/0.2/payload.d.ts.map +1 -0
  14. package/dist/auth/refresh/0.2/payload.js +392 -0
  15. package/dist/auth/refresh/0.2/payload.js.map +1 -0
  16. package/dist/git-ns/_shared/0.5/git-ns.d.ts +16 -0
  17. package/dist/git-ns/_shared/0.5/git-ns.d.ts.map +1 -0
  18. package/dist/git-ns/_shared/0.5/git-ns.js +6 -0
  19. package/dist/git-ns/_shared/0.5/git-ns.js.map +1 -0
  20. package/dist/git-ns/account/list/0.1/payload.d.ts +598 -0
  21. package/dist/git-ns/account/list/0.1/payload.d.ts.map +1 -0
  22. package/dist/git-ns/account/list/0.1/payload.js +317 -0
  23. package/dist/git-ns/account/list/0.1/payload.js.map +1 -0
  24. package/dist/git-ns/activity/list/0.1/payload.d.ts +642 -0
  25. package/dist/git-ns/activity/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/git-ns/activity/list/0.1/payload.js +343 -0
  27. package/dist/git-ns/activity/list/0.1/payload.js.map +1 -0
  28. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts +697 -0
  29. package/dist/git-ns/bridge/job/list/0.1/payload.d.ts.map +1 -0
  30. package/dist/git-ns/bridge/job/list/0.1/payload.js +386 -0
  31. package/dist/git-ns/bridge/job/list/0.1/payload.js.map +1 -0
  32. package/dist/git-ns/projection/show/0.1/payload.d.ts +705 -0
  33. package/dist/git-ns/projection/show/0.1/payload.d.ts.map +1 -0
  34. package/dist/git-ns/projection/show/0.1/payload.js +377 -0
  35. package/dist/git-ns/projection/show/0.1/payload.js.map +1 -0
  36. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts +862 -0
  37. package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts.map +1 -0
  38. package/dist/git-ns/right/issued-by-departed/0.1/payload.js +487 -0
  39. package/dist/git-ns/right/issued-by-departed/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/right/list/0.1/payload.d.ts +773 -0
  41. package/dist/git-ns/right/list/0.1/payload.d.ts.map +1 -0
  42. package/dist/git-ns/right/list/0.1/payload.js +439 -0
  43. package/dist/git-ns/right/list/0.1/payload.js.map +1 -0
  44. package/dist/index.d.ts +11 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +11 -0
  47. package/dist/index.js.map +1 -1
  48. package/dist/vta/contexts/update-did/1.1/payload.d.ts +388 -0
  49. package/dist/vta/contexts/update-did/1.1/payload.d.ts.map +1 -0
  50. package/dist/vta/contexts/update-did/1.1/payload.js +227 -0
  51. package/dist/vta/contexts/update-did/1.1/payload.js.map +1 -0
  52. package/package.json +1 -1
  53. package/src/_shared/components.ts +91 -0
  54. package/src/auth/_shared/0.3/session.ts +17 -0
  55. package/src/auth/authenticate/0.3/payload.ts +527 -0
  56. package/src/auth/refresh/0.2/payload.ts +444 -0
  57. package/src/git-ns/_shared/0.5/git-ns.ts +17 -0
  58. package/src/git-ns/account/list/0.1/payload.ts +392 -0
  59. package/src/git-ns/activity/list/0.1/payload.ts +430 -0
  60. package/src/git-ns/bridge/job/list/0.1/payload.ts +490 -0
  61. package/src/git-ns/projection/show/0.1/payload.ts +479 -0
  62. package/src/git-ns/right/issued-by-departed/0.1/payload.ts +550 -0
  63. package/src/git-ns/right/list/0.1/payload.ts +493 -0
  64. package/src/index.ts +11 -0
  65. package/src/vta/contexts/update-did/1.1/payload.ts +256 -0
@@ -0,0 +1,862 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/right/issued-by-departed/0.1/payload.schema.json
4
+ */
5
+ import type { AdminRightRow, BreakGlass, Did_GitNsV0_3 as Did, Ext, Resource, Right, RightOrigin } from "../../../../_shared/components.js";
6
+ /**
7
+ * A community administrator lists the recorded rights whose granter has since left the community, grouped by granter. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface GitNamespacesRightsIssuedByDepartedMembersPayload {
10
+ /**
11
+ * Opaque continuation token from a previous response's `nextCursor`.
12
+ */
13
+ cursor?: string;
14
+ /**
15
+ * Maximum granters to return in this page. A VTC clamps to 1..=500 (default 100).
16
+ */
17
+ limit?: number;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * Rights grouped by their departed granter, ordered by the granter's DID.
22
+ */
23
+ export interface GitNamespacesRightsIssuedByDepartedMembersResponsePayload {
24
+ /**
25
+ * The community's active `cascade_on_departure` policy setting. `true` means a departure revokes these rights automatically and this list is normally empty; `false` means they stay, for an administrator to review and act on individually.
26
+ */
27
+ cascadeOnDeparture: boolean;
28
+ /**
29
+ * Departed granters with at least one surviving right they issued, ordered by `granter`.
30
+ */
31
+ granters: DepartedGranter[];
32
+ /**
33
+ * Continuation token for the next page of granters, or `null` when this is the last.
34
+ */
35
+ nextCursor?: string | null;
36
+ ext?: Ext;
37
+ }
38
+ /**
39
+ * The rights one departed member issued while they were still a member.
40
+ */
41
+ export interface DepartedGranter {
42
+ /**
43
+ * The member who granted these rights and has since left the community.
44
+ */
45
+ granter: Did;
46
+ /**
47
+ * The rights `granter` issued, still live or awaiting a break-glass ratification. Every row's `origin` is `recorded` and `granterDeparted` is `true` — a role-derived grant has no granter and never appears here.
48
+ */
49
+ rights: AdminRightRow[];
50
+ }
51
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
52
+ export type { AdminRightRow, BreakGlass, Did, Ext, Resource, Right, RightOrigin };
53
+ /** Trust Task type URI. */
54
+ export declare const TYPE_URI: "https://trusttasks.org/spec/git-ns/right/issued-by-departed/0.1";
55
+ /** Stable alias for this specification's request payload shape. */
56
+ export type Payload = GitNamespacesRightsIssuedByDepartedMembersPayload;
57
+ /** Trust Task response type URI (request type URI + "#response"). */
58
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/git-ns/right/issued-by-departed/0.1#response";
59
+ /** Stable alias for this specification's success-response payload shape. */
60
+ export type Response = GitNamespacesRightsIssuedByDepartedMembersResponsePayload;
61
+ /**
62
+ * This specification's payload schema, as a value.
63
+ *
64
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
65
+ * rather than only as a `.json` file because TypeScript types are erased
66
+ * at runtime: without a schema a consumer has nothing to validate, and
67
+ * every REQUIRED payload member is optional in practice. Cross-file
68
+ * `$ref`s are already inlined, so it needs no resolver.
69
+ */
70
+ export declare const PAYLOAD_SCHEMA: {
71
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
72
+ readonly $id: "https://trusttasks.org/spec/git-ns/right/issued-by-departed/0.1";
73
+ readonly title: "Git Namespaces — Rights Issued By Departed Members — payload";
74
+ readonly description: "A community administrator lists the recorded rights whose granter has since left the community, grouped by granter. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
75
+ readonly type: "object";
76
+ readonly additionalProperties: false;
77
+ readonly properties: {
78
+ readonly cursor: {
79
+ readonly type: "string";
80
+ readonly description: "Opaque continuation token from a previous response's `nextCursor`.";
81
+ };
82
+ readonly limit: {
83
+ readonly type: "integer";
84
+ readonly minimum: 1;
85
+ readonly maximum: 500;
86
+ readonly description: "Maximum granters to return in this page. A VTC clamps to 1..=500 (default 100).";
87
+ };
88
+ readonly ext: {
89
+ readonly $ref: "#/$defs/Ext";
90
+ };
91
+ };
92
+ readonly $defs: {
93
+ readonly DepartedGranter: {
94
+ readonly title: "DepartedGranter";
95
+ readonly description: "The rights one departed member issued while they were still a member.";
96
+ readonly type: "object";
97
+ readonly additionalProperties: false;
98
+ readonly required: readonly ["granter", "rights"];
99
+ readonly properties: {
100
+ readonly granter: {
101
+ readonly $ref: "#/$defs/Did";
102
+ readonly description: "The member who granted these rights and has since left the community.";
103
+ };
104
+ readonly rights: {
105
+ readonly type: "array";
106
+ readonly items: {
107
+ readonly $ref: "#/$defs/AdminRightRow";
108
+ };
109
+ readonly description: "The rights `granter` issued, still live or awaiting a break-glass ratification. Every row's `origin` is `recorded` and `granterDeparted` is `true` — a role-derived grant has no granter and never appears here.";
110
+ };
111
+ };
112
+ };
113
+ readonly Response: {
114
+ readonly $anchor: "response";
115
+ readonly title: "Git Namespaces — Rights Issued By Departed Members — response payload";
116
+ readonly type: "object";
117
+ readonly additionalProperties: false;
118
+ readonly required: readonly ["cascadeOnDeparture", "granters"];
119
+ readonly description: "Rights grouped by their departed granter, ordered by the granter's DID.";
120
+ readonly properties: {
121
+ readonly cascadeOnDeparture: {
122
+ readonly type: "boolean";
123
+ readonly description: "The community's active `cascade_on_departure` policy setting. `true` means a departure revokes these rights automatically and this list is normally empty; `false` means they stay, for an administrator to review and act on individually.";
124
+ };
125
+ readonly granters: {
126
+ readonly type: "array";
127
+ readonly items: {
128
+ readonly $ref: "#/$defs/DepartedGranter";
129
+ };
130
+ readonly description: "Departed granters with at least one surviving right they issued, ordered by `granter`.";
131
+ };
132
+ readonly nextCursor: {
133
+ readonly type: readonly ["string", "null"];
134
+ readonly description: "Continuation token for the next page of granters, or `null` when this is the last.";
135
+ };
136
+ readonly ext: {
137
+ readonly $ref: "#/$defs/Ext";
138
+ };
139
+ };
140
+ };
141
+ readonly Ext: {
142
+ readonly title: "Ext";
143
+ 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.";
144
+ readonly type: "object";
145
+ readonly minProperties: 1;
146
+ readonly additionalProperties: true;
147
+ readonly propertyNames: {
148
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
149
+ };
150
+ };
151
+ readonly AdminRightRow: {
152
+ readonly title: "AdminRightRow";
153
+ readonly description: "One right as the administrator's rights console shows it: a recorded `RightRecord` restated with the membership facts an administrator needs (`subjectMember`, `granterDeparted`), or a role-derived grant that carries no record. `git-ns/right/list` and `git-ns/right/issued-by-departed` are its only producers.";
154
+ readonly type: "object";
155
+ readonly additionalProperties: false;
156
+ readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
157
+ readonly properties: {
158
+ readonly subject: {
159
+ readonly $ref: "#/$defs/Did";
160
+ readonly description: "Who holds the right.";
161
+ };
162
+ readonly right: {
163
+ readonly $ref: "#/$defs/Right";
164
+ };
165
+ readonly resource: {
166
+ readonly $ref: "#/$defs/Resource";
167
+ };
168
+ readonly origin: {
169
+ readonly $ref: "#/$defs/RightOrigin";
170
+ };
171
+ readonly grantedBy: {
172
+ readonly $ref: "#/$defs/Did";
173
+ readonly description: "Who caused the right (see `RightRecord.grantedBy`). Present exactly when `origin` is `recorded`; a role-derived grant is published by the hook relay from configuration, not by an actor.";
174
+ };
175
+ readonly grantedAt: {
176
+ readonly type: "string";
177
+ readonly format: "date-time";
178
+ readonly description: "Present exactly when `origin` is `recorded`.";
179
+ };
180
+ readonly expiresAt: {
181
+ readonly type: "string";
182
+ readonly format: "date-time";
183
+ readonly description: "When the right lapses. Absent: no expiry, or `origin` is `roleDerived` (a role-derived grant never expires on its own — it is withdrawn by editing `[hooks.git-trust] grant_on_role`).";
184
+ };
185
+ readonly reason: {
186
+ readonly type: "string";
187
+ readonly maxLength: 1024;
188
+ readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
189
+ };
190
+ readonly subjectMember: {
191
+ readonly type: "boolean";
192
+ readonly description: "Whether `subject` is a current member of the community. `false` marks a right held by someone who has since left, or by an external signer the community never enrolled.";
193
+ };
194
+ readonly granterDeparted: {
195
+ readonly type: "boolean";
196
+ readonly description: "Whether `grantedBy` was a member at the time of the grant and has since left. Always `false` when `origin` is `roleDerived`, or when the record's granter was never itself a member (the VTC's own DID, for a right it derives from configuration).";
197
+ };
198
+ readonly breakGlass: {
199
+ readonly $ref: "#/$defs/BreakGlass";
200
+ readonly description: "Present exactly when `origin` is `recorded` and the record carries `breakGlass` — see `RightRecord.breakGlass`. Absent for a role-derived grant, which cannot be self-granted through break-glass.";
201
+ };
202
+ };
203
+ };
204
+ readonly BreakGlass: {
205
+ readonly title: "BreakGlass";
206
+ readonly description: "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.";
207
+ readonly type: "object";
208
+ readonly additionalProperties: false;
209
+ readonly required: readonly ["by", "at", "justification"];
210
+ readonly properties: {
211
+ readonly by: {
212
+ readonly $ref: "#/$defs/Did";
213
+ readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
214
+ };
215
+ readonly at: {
216
+ readonly type: "string";
217
+ readonly format: "date-time";
218
+ readonly description: "When the VTC recorded the break-glass.";
219
+ };
220
+ readonly justification: {
221
+ readonly type: "string";
222
+ readonly minLength: 1;
223
+ readonly maxLength: 2048;
224
+ readonly pattern: "\\S";
225
+ readonly description: "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published.";
226
+ };
227
+ readonly effectiveAt: {
228
+ readonly type: "string";
229
+ readonly format: "date-time";
230
+ readonly description: "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so.";
231
+ };
232
+ readonly ratifiedBy: {
233
+ readonly $ref: "#/$defs/Did";
234
+ readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
235
+ };
236
+ readonly ratifiedAt: {
237
+ readonly type: "string";
238
+ readonly format: "date-time";
239
+ readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
240
+ };
241
+ };
242
+ };
243
+ readonly Did: {
244
+ readonly title: "Did";
245
+ readonly description: "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.";
246
+ readonly type: "string";
247
+ readonly maxLength: 2048;
248
+ readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
249
+ };
250
+ readonly RightOrigin: {
251
+ readonly title: "RightOrigin";
252
+ readonly description: "Where a right an administrator sees came from. `recorded` — a `git-ns/*` record, governed by the rights model and returned nowhere the subject cannot eventually see it through `git-ns/view`. `roleDerived` — a v0.1 `[hooks.git-trust] grant_on_role` grant: published by the hook relay from the community's own role configuration, never written by any `git-ns/*` task, and not itself a `RightRecord` — it has no `grantedAt`, no `expiresAt` and no `reason`, only a subject, a right and a resource.";
253
+ readonly type: "string";
254
+ readonly enum: readonly ["recorded", "roleDerived"];
255
+ };
256
+ readonly Resource: {
257
+ readonly title: "Resource";
258
+ readonly description: "A forge-qualified resource: `<forge-host>/<owner>` for a namespace, or `<forge-host>/<owner>/<repo>` for one repository, all lowercase — `github.com/acme`, `github.com/acme/widgets`, `codeberg.org/acme`. The forge is never implied: `acme/widgets` alone is not a resource. Containment is by whole segment: `github.com/acme` contains `github.com/acme/widgets` and does not contain `github.com/acme-labs/x` or `codeberg.org/acme/widgets`.";
259
+ readonly type: "string";
260
+ readonly maxLength: 455;
261
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:/[a-z0-9_-][a-z0-9._-]{0,99}){1,2}$";
262
+ };
263
+ readonly Right: {
264
+ readonly title: "Right";
265
+ readonly description: "One of the five git rights. Each string is also the TRQP `action` the VTC publishes the right under in its Trust Registry, so it is carried verbatim. `git.ns.admin` and `git.repo.create` apply to a namespace resource; `git.repo.own` and `git.repo.maintain` to a repository resource; `git.commit.sign` to either.";
266
+ readonly type: "string";
267
+ readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
268
+ };
269
+ };
270
+ };
271
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
272
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
273
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
274
+ readonly $ref: "#/$defs/Response";
275
+ readonly $defs: {
276
+ readonly DepartedGranter: {
277
+ readonly title: "DepartedGranter";
278
+ readonly description: "The rights one departed member issued while they were still a member.";
279
+ readonly type: "object";
280
+ readonly additionalProperties: false;
281
+ readonly required: readonly ["granter", "rights"];
282
+ readonly properties: {
283
+ readonly granter: {
284
+ readonly $ref: "#/$defs/Did";
285
+ readonly description: "The member who granted these rights and has since left the community.";
286
+ };
287
+ readonly rights: {
288
+ readonly type: "array";
289
+ readonly items: {
290
+ readonly $ref: "#/$defs/AdminRightRow";
291
+ };
292
+ readonly description: "The rights `granter` issued, still live or awaiting a break-glass ratification. Every row's `origin` is `recorded` and `granterDeparted` is `true` — a role-derived grant has no granter and never appears here.";
293
+ };
294
+ };
295
+ };
296
+ readonly Response: {
297
+ readonly $anchor: "response";
298
+ readonly title: "Git Namespaces — Rights Issued By Departed Members — response payload";
299
+ readonly type: "object";
300
+ readonly additionalProperties: false;
301
+ readonly required: readonly ["cascadeOnDeparture", "granters"];
302
+ readonly description: "Rights grouped by their departed granter, ordered by the granter's DID.";
303
+ readonly properties: {
304
+ readonly cascadeOnDeparture: {
305
+ readonly type: "boolean";
306
+ readonly description: "The community's active `cascade_on_departure` policy setting. `true` means a departure revokes these rights automatically and this list is normally empty; `false` means they stay, for an administrator to review and act on individually.";
307
+ };
308
+ readonly granters: {
309
+ readonly type: "array";
310
+ readonly items: {
311
+ readonly $ref: "#/$defs/DepartedGranter";
312
+ };
313
+ readonly description: "Departed granters with at least one surviving right they issued, ordered by `granter`.";
314
+ };
315
+ readonly nextCursor: {
316
+ readonly type: readonly ["string", "null"];
317
+ readonly description: "Continuation token for the next page of granters, or `null` when this is the last.";
318
+ };
319
+ readonly ext: {
320
+ readonly $ref: "#/$defs/Ext";
321
+ };
322
+ };
323
+ };
324
+ readonly Ext: {
325
+ readonly title: "Ext";
326
+ 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.";
327
+ readonly type: "object";
328
+ readonly minProperties: 1;
329
+ readonly additionalProperties: true;
330
+ readonly propertyNames: {
331
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
332
+ };
333
+ };
334
+ readonly AdminRightRow: {
335
+ readonly title: "AdminRightRow";
336
+ readonly description: "One right as the administrator's rights console shows it: a recorded `RightRecord` restated with the membership facts an administrator needs (`subjectMember`, `granterDeparted`), or a role-derived grant that carries no record. `git-ns/right/list` and `git-ns/right/issued-by-departed` are its only producers.";
337
+ readonly type: "object";
338
+ readonly additionalProperties: false;
339
+ readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
340
+ readonly properties: {
341
+ readonly subject: {
342
+ readonly $ref: "#/$defs/Did";
343
+ readonly description: "Who holds the right.";
344
+ };
345
+ readonly right: {
346
+ readonly $ref: "#/$defs/Right";
347
+ };
348
+ readonly resource: {
349
+ readonly $ref: "#/$defs/Resource";
350
+ };
351
+ readonly origin: {
352
+ readonly $ref: "#/$defs/RightOrigin";
353
+ };
354
+ readonly grantedBy: {
355
+ readonly $ref: "#/$defs/Did";
356
+ readonly description: "Who caused the right (see `RightRecord.grantedBy`). Present exactly when `origin` is `recorded`; a role-derived grant is published by the hook relay from configuration, not by an actor.";
357
+ };
358
+ readonly grantedAt: {
359
+ readonly type: "string";
360
+ readonly format: "date-time";
361
+ readonly description: "Present exactly when `origin` is `recorded`.";
362
+ };
363
+ readonly expiresAt: {
364
+ readonly type: "string";
365
+ readonly format: "date-time";
366
+ readonly description: "When the right lapses. Absent: no expiry, or `origin` is `roleDerived` (a role-derived grant never expires on its own — it is withdrawn by editing `[hooks.git-trust] grant_on_role`).";
367
+ };
368
+ readonly reason: {
369
+ readonly type: "string";
370
+ readonly maxLength: 1024;
371
+ readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
372
+ };
373
+ readonly subjectMember: {
374
+ readonly type: "boolean";
375
+ readonly description: "Whether `subject` is a current member of the community. `false` marks a right held by someone who has since left, or by an external signer the community never enrolled.";
376
+ };
377
+ readonly granterDeparted: {
378
+ readonly type: "boolean";
379
+ readonly description: "Whether `grantedBy` was a member at the time of the grant and has since left. Always `false` when `origin` is `roleDerived`, or when the record's granter was never itself a member (the VTC's own DID, for a right it derives from configuration).";
380
+ };
381
+ readonly breakGlass: {
382
+ readonly $ref: "#/$defs/BreakGlass";
383
+ readonly description: "Present exactly when `origin` is `recorded` and the record carries `breakGlass` — see `RightRecord.breakGlass`. Absent for a role-derived grant, which cannot be self-granted through break-glass.";
384
+ };
385
+ };
386
+ };
387
+ readonly BreakGlass: {
388
+ readonly title: "BreakGlass";
389
+ readonly description: "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.";
390
+ readonly type: "object";
391
+ readonly additionalProperties: false;
392
+ readonly required: readonly ["by", "at", "justification"];
393
+ readonly properties: {
394
+ readonly by: {
395
+ readonly $ref: "#/$defs/Did";
396
+ readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
397
+ };
398
+ readonly at: {
399
+ readonly type: "string";
400
+ readonly format: "date-time";
401
+ readonly description: "When the VTC recorded the break-glass.";
402
+ };
403
+ readonly justification: {
404
+ readonly type: "string";
405
+ readonly minLength: 1;
406
+ readonly maxLength: 2048;
407
+ readonly pattern: "\\S";
408
+ readonly description: "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published.";
409
+ };
410
+ readonly effectiveAt: {
411
+ readonly type: "string";
412
+ readonly format: "date-time";
413
+ readonly description: "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so.";
414
+ };
415
+ readonly ratifiedBy: {
416
+ readonly $ref: "#/$defs/Did";
417
+ readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
418
+ };
419
+ readonly ratifiedAt: {
420
+ readonly type: "string";
421
+ readonly format: "date-time";
422
+ readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
423
+ };
424
+ };
425
+ };
426
+ readonly Did: {
427
+ readonly title: "Did";
428
+ readonly description: "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.";
429
+ readonly type: "string";
430
+ readonly maxLength: 2048;
431
+ readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
432
+ };
433
+ readonly RightOrigin: {
434
+ readonly title: "RightOrigin";
435
+ readonly description: "Where a right an administrator sees came from. `recorded` — a `git-ns/*` record, governed by the rights model and returned nowhere the subject cannot eventually see it through `git-ns/view`. `roleDerived` — a v0.1 `[hooks.git-trust] grant_on_role` grant: published by the hook relay from the community's own role configuration, never written by any `git-ns/*` task, and not itself a `RightRecord` — it has no `grantedAt`, no `expiresAt` and no `reason`, only a subject, a right and a resource.";
436
+ readonly type: "string";
437
+ readonly enum: readonly ["recorded", "roleDerived"];
438
+ };
439
+ readonly Resource: {
440
+ readonly title: "Resource";
441
+ readonly description: "A forge-qualified resource: `<forge-host>/<owner>` for a namespace, or `<forge-host>/<owner>/<repo>` for one repository, all lowercase — `github.com/acme`, `github.com/acme/widgets`, `codeberg.org/acme`. The forge is never implied: `acme/widgets` alone is not a resource. Containment is by whole segment: `github.com/acme` contains `github.com/acme/widgets` and does not contain `github.com/acme-labs/x` or `codeberg.org/acme/widgets`.";
442
+ readonly type: "string";
443
+ readonly maxLength: 455;
444
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:/[a-z0-9_-][a-z0-9._-]{0,99}){1,2}$";
445
+ };
446
+ readonly Right: {
447
+ readonly title: "Right";
448
+ readonly description: "One of the five git rights. Each string is also the TRQP `action` the VTC publishes the right under in its Trust Registry, so it is carried verbatim. `git.ns.admin` and `git.repo.create` apply to a namespace resource; `git.repo.own` and `git.repo.maintain` to a repository resource; `git.commit.sign` to either.";
449
+ readonly type: "string";
450
+ readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
451
+ };
452
+ };
453
+ };
454
+ /**
455
+ * SPEC.md §7.2 policy for the request variant, from this specification's
456
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
457
+ * per-specification and cannot be derived from the document alone, and
458
+ * item 2 needs the schema this carries.
459
+ */
460
+ export declare const SPEC: {
461
+ readonly typeUri: "https://trusttasks.org/spec/git-ns/right/issued-by-departed/0.1";
462
+ readonly isBearer: false;
463
+ readonly isProofRequired: true;
464
+ readonly isRecipientRequired: true;
465
+ readonly isIssuedAtRequired: false;
466
+ readonly payloadSchema: {
467
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
468
+ readonly $id: "https://trusttasks.org/spec/git-ns/right/issued-by-departed/0.1";
469
+ readonly title: "Git Namespaces — Rights Issued By Departed Members — payload";
470
+ readonly description: "A community administrator lists the recorded rights whose granter has since left the community, grouped by granter. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
471
+ readonly type: "object";
472
+ readonly additionalProperties: false;
473
+ readonly properties: {
474
+ readonly cursor: {
475
+ readonly type: "string";
476
+ readonly description: "Opaque continuation token from a previous response's `nextCursor`.";
477
+ };
478
+ readonly limit: {
479
+ readonly type: "integer";
480
+ readonly minimum: 1;
481
+ readonly maximum: 500;
482
+ readonly description: "Maximum granters to return in this page. A VTC clamps to 1..=500 (default 100).";
483
+ };
484
+ readonly ext: {
485
+ readonly $ref: "#/$defs/Ext";
486
+ };
487
+ };
488
+ readonly $defs: {
489
+ readonly DepartedGranter: {
490
+ readonly title: "DepartedGranter";
491
+ readonly description: "The rights one departed member issued while they were still a member.";
492
+ readonly type: "object";
493
+ readonly additionalProperties: false;
494
+ readonly required: readonly ["granter", "rights"];
495
+ readonly properties: {
496
+ readonly granter: {
497
+ readonly $ref: "#/$defs/Did";
498
+ readonly description: "The member who granted these rights and has since left the community.";
499
+ };
500
+ readonly rights: {
501
+ readonly type: "array";
502
+ readonly items: {
503
+ readonly $ref: "#/$defs/AdminRightRow";
504
+ };
505
+ readonly description: "The rights `granter` issued, still live or awaiting a break-glass ratification. Every row's `origin` is `recorded` and `granterDeparted` is `true` — a role-derived grant has no granter and never appears here.";
506
+ };
507
+ };
508
+ };
509
+ readonly Response: {
510
+ readonly $anchor: "response";
511
+ readonly title: "Git Namespaces — Rights Issued By Departed Members — response payload";
512
+ readonly type: "object";
513
+ readonly additionalProperties: false;
514
+ readonly required: readonly ["cascadeOnDeparture", "granters"];
515
+ readonly description: "Rights grouped by their departed granter, ordered by the granter's DID.";
516
+ readonly properties: {
517
+ readonly cascadeOnDeparture: {
518
+ readonly type: "boolean";
519
+ readonly description: "The community's active `cascade_on_departure` policy setting. `true` means a departure revokes these rights automatically and this list is normally empty; `false` means they stay, for an administrator to review and act on individually.";
520
+ };
521
+ readonly granters: {
522
+ readonly type: "array";
523
+ readonly items: {
524
+ readonly $ref: "#/$defs/DepartedGranter";
525
+ };
526
+ readonly description: "Departed granters with at least one surviving right they issued, ordered by `granter`.";
527
+ };
528
+ readonly nextCursor: {
529
+ readonly type: readonly ["string", "null"];
530
+ readonly description: "Continuation token for the next page of granters, or `null` when this is the last.";
531
+ };
532
+ readonly ext: {
533
+ readonly $ref: "#/$defs/Ext";
534
+ };
535
+ };
536
+ };
537
+ readonly Ext: {
538
+ readonly title: "Ext";
539
+ 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.";
540
+ readonly type: "object";
541
+ readonly minProperties: 1;
542
+ readonly additionalProperties: true;
543
+ readonly propertyNames: {
544
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
545
+ };
546
+ };
547
+ readonly AdminRightRow: {
548
+ readonly title: "AdminRightRow";
549
+ readonly description: "One right as the administrator's rights console shows it: a recorded `RightRecord` restated with the membership facts an administrator needs (`subjectMember`, `granterDeparted`), or a role-derived grant that carries no record. `git-ns/right/list` and `git-ns/right/issued-by-departed` are its only producers.";
550
+ readonly type: "object";
551
+ readonly additionalProperties: false;
552
+ readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
553
+ readonly properties: {
554
+ readonly subject: {
555
+ readonly $ref: "#/$defs/Did";
556
+ readonly description: "Who holds the right.";
557
+ };
558
+ readonly right: {
559
+ readonly $ref: "#/$defs/Right";
560
+ };
561
+ readonly resource: {
562
+ readonly $ref: "#/$defs/Resource";
563
+ };
564
+ readonly origin: {
565
+ readonly $ref: "#/$defs/RightOrigin";
566
+ };
567
+ readonly grantedBy: {
568
+ readonly $ref: "#/$defs/Did";
569
+ readonly description: "Who caused the right (see `RightRecord.grantedBy`). Present exactly when `origin` is `recorded`; a role-derived grant is published by the hook relay from configuration, not by an actor.";
570
+ };
571
+ readonly grantedAt: {
572
+ readonly type: "string";
573
+ readonly format: "date-time";
574
+ readonly description: "Present exactly when `origin` is `recorded`.";
575
+ };
576
+ readonly expiresAt: {
577
+ readonly type: "string";
578
+ readonly format: "date-time";
579
+ readonly description: "When the right lapses. Absent: no expiry, or `origin` is `roleDerived` (a role-derived grant never expires on its own — it is withdrawn by editing `[hooks.git-trust] grant_on_role`).";
580
+ };
581
+ readonly reason: {
582
+ readonly type: "string";
583
+ readonly maxLength: 1024;
584
+ readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
585
+ };
586
+ readonly subjectMember: {
587
+ readonly type: "boolean";
588
+ readonly description: "Whether `subject` is a current member of the community. `false` marks a right held by someone who has since left, or by an external signer the community never enrolled.";
589
+ };
590
+ readonly granterDeparted: {
591
+ readonly type: "boolean";
592
+ readonly description: "Whether `grantedBy` was a member at the time of the grant and has since left. Always `false` when `origin` is `roleDerived`, or when the record's granter was never itself a member (the VTC's own DID, for a right it derives from configuration).";
593
+ };
594
+ readonly breakGlass: {
595
+ readonly $ref: "#/$defs/BreakGlass";
596
+ readonly description: "Present exactly when `origin` is `recorded` and the record carries `breakGlass` — see `RightRecord.breakGlass`. Absent for a role-derived grant, which cannot be self-granted through break-glass.";
597
+ };
598
+ };
599
+ };
600
+ readonly BreakGlass: {
601
+ readonly title: "BreakGlass";
602
+ readonly description: "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.";
603
+ readonly type: "object";
604
+ readonly additionalProperties: false;
605
+ readonly required: readonly ["by", "at", "justification"];
606
+ readonly properties: {
607
+ readonly by: {
608
+ readonly $ref: "#/$defs/Did";
609
+ readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
610
+ };
611
+ readonly at: {
612
+ readonly type: "string";
613
+ readonly format: "date-time";
614
+ readonly description: "When the VTC recorded the break-glass.";
615
+ };
616
+ readonly justification: {
617
+ readonly type: "string";
618
+ readonly minLength: 1;
619
+ readonly maxLength: 2048;
620
+ readonly pattern: "\\S";
621
+ readonly description: "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published.";
622
+ };
623
+ readonly effectiveAt: {
624
+ readonly type: "string";
625
+ readonly format: "date-time";
626
+ readonly description: "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so.";
627
+ };
628
+ readonly ratifiedBy: {
629
+ readonly $ref: "#/$defs/Did";
630
+ readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
631
+ };
632
+ readonly ratifiedAt: {
633
+ readonly type: "string";
634
+ readonly format: "date-time";
635
+ readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
636
+ };
637
+ };
638
+ };
639
+ readonly Did: {
640
+ readonly title: "Did";
641
+ readonly description: "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.";
642
+ readonly type: "string";
643
+ readonly maxLength: 2048;
644
+ readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
645
+ };
646
+ readonly RightOrigin: {
647
+ readonly title: "RightOrigin";
648
+ readonly description: "Where a right an administrator sees came from. `recorded` — a `git-ns/*` record, governed by the rights model and returned nowhere the subject cannot eventually see it through `git-ns/view`. `roleDerived` — a v0.1 `[hooks.git-trust] grant_on_role` grant: published by the hook relay from the community's own role configuration, never written by any `git-ns/*` task, and not itself a `RightRecord` — it has no `grantedAt`, no `expiresAt` and no `reason`, only a subject, a right and a resource.";
649
+ readonly type: "string";
650
+ readonly enum: readonly ["recorded", "roleDerived"];
651
+ };
652
+ readonly Resource: {
653
+ readonly title: "Resource";
654
+ readonly description: "A forge-qualified resource: `<forge-host>/<owner>` for a namespace, or `<forge-host>/<owner>/<repo>` for one repository, all lowercase — `github.com/acme`, `github.com/acme/widgets`, `codeberg.org/acme`. The forge is never implied: `acme/widgets` alone is not a resource. Containment is by whole segment: `github.com/acme` contains `github.com/acme/widgets` and does not contain `github.com/acme-labs/x` or `codeberg.org/acme/widgets`.";
655
+ readonly type: "string";
656
+ readonly maxLength: 455;
657
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:/[a-z0-9_-][a-z0-9._-]{0,99}){1,2}$";
658
+ };
659
+ readonly Right: {
660
+ readonly title: "Right";
661
+ readonly description: "One of the five git rights. Each string is also the TRQP `action` the VTC publishes the right under in its Trust Registry, so it is carried verbatim. `git.ns.admin` and `git.repo.create` apply to a namespace resource; `git.repo.own` and `git.repo.maintain` to a repository resource; `git.commit.sign` to either.";
662
+ readonly type: "string";
663
+ readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
664
+ };
665
+ };
666
+ };
667
+ };
668
+ /**
669
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
670
+ * tracks the *issuer* party's requirement because a response swaps the
671
+ * parties (§7.3 item 5).
672
+ */
673
+ export declare const RESPONSE_SPEC: {
674
+ readonly typeUri: "https://trusttasks.org/spec/git-ns/right/issued-by-departed/0.1#response";
675
+ readonly isBearer: false;
676
+ readonly isProofRequired: true;
677
+ readonly isRecipientRequired: true;
678
+ readonly isIssuedAtRequired: false;
679
+ readonly payloadSchema: {
680
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
681
+ readonly $ref: "#/$defs/Response";
682
+ readonly $defs: {
683
+ readonly DepartedGranter: {
684
+ readonly title: "DepartedGranter";
685
+ readonly description: "The rights one departed member issued while they were still a member.";
686
+ readonly type: "object";
687
+ readonly additionalProperties: false;
688
+ readonly required: readonly ["granter", "rights"];
689
+ readonly properties: {
690
+ readonly granter: {
691
+ readonly $ref: "#/$defs/Did";
692
+ readonly description: "The member who granted these rights and has since left the community.";
693
+ };
694
+ readonly rights: {
695
+ readonly type: "array";
696
+ readonly items: {
697
+ readonly $ref: "#/$defs/AdminRightRow";
698
+ };
699
+ readonly description: "The rights `granter` issued, still live or awaiting a break-glass ratification. Every row's `origin` is `recorded` and `granterDeparted` is `true` — a role-derived grant has no granter and never appears here.";
700
+ };
701
+ };
702
+ };
703
+ readonly Response: {
704
+ readonly $anchor: "response";
705
+ readonly title: "Git Namespaces — Rights Issued By Departed Members — response payload";
706
+ readonly type: "object";
707
+ readonly additionalProperties: false;
708
+ readonly required: readonly ["cascadeOnDeparture", "granters"];
709
+ readonly description: "Rights grouped by their departed granter, ordered by the granter's DID.";
710
+ readonly properties: {
711
+ readonly cascadeOnDeparture: {
712
+ readonly type: "boolean";
713
+ readonly description: "The community's active `cascade_on_departure` policy setting. `true` means a departure revokes these rights automatically and this list is normally empty; `false` means they stay, for an administrator to review and act on individually.";
714
+ };
715
+ readonly granters: {
716
+ readonly type: "array";
717
+ readonly items: {
718
+ readonly $ref: "#/$defs/DepartedGranter";
719
+ };
720
+ readonly description: "Departed granters with at least one surviving right they issued, ordered by `granter`.";
721
+ };
722
+ readonly nextCursor: {
723
+ readonly type: readonly ["string", "null"];
724
+ readonly description: "Continuation token for the next page of granters, or `null` when this is the last.";
725
+ };
726
+ readonly ext: {
727
+ readonly $ref: "#/$defs/Ext";
728
+ };
729
+ };
730
+ };
731
+ readonly Ext: {
732
+ readonly title: "Ext";
733
+ 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.";
734
+ readonly type: "object";
735
+ readonly minProperties: 1;
736
+ readonly additionalProperties: true;
737
+ readonly propertyNames: {
738
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
739
+ };
740
+ };
741
+ readonly AdminRightRow: {
742
+ readonly title: "AdminRightRow";
743
+ readonly description: "One right as the administrator's rights console shows it: a recorded `RightRecord` restated with the membership facts an administrator needs (`subjectMember`, `granterDeparted`), or a role-derived grant that carries no record. `git-ns/right/list` and `git-ns/right/issued-by-departed` are its only producers.";
744
+ readonly type: "object";
745
+ readonly additionalProperties: false;
746
+ readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
747
+ readonly properties: {
748
+ readonly subject: {
749
+ readonly $ref: "#/$defs/Did";
750
+ readonly description: "Who holds the right.";
751
+ };
752
+ readonly right: {
753
+ readonly $ref: "#/$defs/Right";
754
+ };
755
+ readonly resource: {
756
+ readonly $ref: "#/$defs/Resource";
757
+ };
758
+ readonly origin: {
759
+ readonly $ref: "#/$defs/RightOrigin";
760
+ };
761
+ readonly grantedBy: {
762
+ readonly $ref: "#/$defs/Did";
763
+ readonly description: "Who caused the right (see `RightRecord.grantedBy`). Present exactly when `origin` is `recorded`; a role-derived grant is published by the hook relay from configuration, not by an actor.";
764
+ };
765
+ readonly grantedAt: {
766
+ readonly type: "string";
767
+ readonly format: "date-time";
768
+ readonly description: "Present exactly when `origin` is `recorded`.";
769
+ };
770
+ readonly expiresAt: {
771
+ readonly type: "string";
772
+ readonly format: "date-time";
773
+ readonly description: "When the right lapses. Absent: no expiry, or `origin` is `roleDerived` (a role-derived grant never expires on its own — it is withdrawn by editing `[hooks.git-trust] grant_on_role`).";
774
+ };
775
+ readonly reason: {
776
+ readonly type: "string";
777
+ readonly maxLength: 1024;
778
+ readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
779
+ };
780
+ readonly subjectMember: {
781
+ readonly type: "boolean";
782
+ readonly description: "Whether `subject` is a current member of the community. `false` marks a right held by someone who has since left, or by an external signer the community never enrolled.";
783
+ };
784
+ readonly granterDeparted: {
785
+ readonly type: "boolean";
786
+ readonly description: "Whether `grantedBy` was a member at the time of the grant and has since left. Always `false` when `origin` is `roleDerived`, or when the record's granter was never itself a member (the VTC's own DID, for a right it derives from configuration).";
787
+ };
788
+ readonly breakGlass: {
789
+ readonly $ref: "#/$defs/BreakGlass";
790
+ readonly description: "Present exactly when `origin` is `recorded` and the record carries `breakGlass` — see `RightRecord.breakGlass`. Absent for a role-derived grant, which cannot be self-granted through break-glass.";
791
+ };
792
+ };
793
+ };
794
+ readonly BreakGlass: {
795
+ readonly title: "BreakGlass";
796
+ readonly description: "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.";
797
+ readonly type: "object";
798
+ readonly additionalProperties: false;
799
+ readonly required: readonly ["by", "at", "justification"];
800
+ readonly properties: {
801
+ readonly by: {
802
+ readonly $ref: "#/$defs/Did";
803
+ readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
804
+ };
805
+ readonly at: {
806
+ readonly type: "string";
807
+ readonly format: "date-time";
808
+ readonly description: "When the VTC recorded the break-glass.";
809
+ };
810
+ readonly justification: {
811
+ readonly type: "string";
812
+ readonly minLength: 1;
813
+ readonly maxLength: 2048;
814
+ readonly pattern: "\\S";
815
+ readonly description: "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published.";
816
+ };
817
+ readonly effectiveAt: {
818
+ readonly type: "string";
819
+ readonly format: "date-time";
820
+ readonly description: "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so.";
821
+ };
822
+ readonly ratifiedBy: {
823
+ readonly $ref: "#/$defs/Did";
824
+ readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
825
+ };
826
+ readonly ratifiedAt: {
827
+ readonly type: "string";
828
+ readonly format: "date-time";
829
+ readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
830
+ };
831
+ };
832
+ };
833
+ readonly Did: {
834
+ readonly title: "Did";
835
+ readonly description: "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.";
836
+ readonly type: "string";
837
+ readonly maxLength: 2048;
838
+ readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
839
+ };
840
+ readonly RightOrigin: {
841
+ readonly title: "RightOrigin";
842
+ readonly description: "Where a right an administrator sees came from. `recorded` — a `git-ns/*` record, governed by the rights model and returned nowhere the subject cannot eventually see it through `git-ns/view`. `roleDerived` — a v0.1 `[hooks.git-trust] grant_on_role` grant: published by the hook relay from the community's own role configuration, never written by any `git-ns/*` task, and not itself a `RightRecord` — it has no `grantedAt`, no `expiresAt` and no `reason`, only a subject, a right and a resource.";
843
+ readonly type: "string";
844
+ readonly enum: readonly ["recorded", "roleDerived"];
845
+ };
846
+ readonly Resource: {
847
+ readonly title: "Resource";
848
+ readonly description: "A forge-qualified resource: `<forge-host>/<owner>` for a namespace, or `<forge-host>/<owner>/<repo>` for one repository, all lowercase — `github.com/acme`, `github.com/acme/widgets`, `codeberg.org/acme`. The forge is never implied: `acme/widgets` alone is not a resource. Containment is by whole segment: `github.com/acme` contains `github.com/acme/widgets` and does not contain `github.com/acme-labs/x` or `codeberg.org/acme/widgets`.";
849
+ readonly type: "string";
850
+ readonly maxLength: 455;
851
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:/[a-z0-9_-][a-z0-9._-]{0,99}){1,2}$";
852
+ };
853
+ readonly Right: {
854
+ readonly title: "Right";
855
+ readonly description: "One of the five git rights. Each string is also the TRQP `action` the VTC publishes the right under in its Trust Registry, so it is carried verbatim. `git.ns.admin` and `git.repo.create` apply to a namespace resource; `git.repo.own` and `git.repo.maintain` to a repository resource; `git.commit.sign` to either.";
856
+ readonly type: "string";
857
+ readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
858
+ };
859
+ };
860
+ };
861
+ };
862
+ //# sourceMappingURL=payload.d.ts.map