@openvtc/trust-tasks 0.21.13 → 0.21.15
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 +88 -0
- package/dist/_shared/components.d.ts +91 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/_shared/0.3/session.d.ts +16 -0
- package/dist/auth/_shared/0.3/session.d.ts.map +1 -0
- package/dist/auth/_shared/0.3/session.js +6 -0
- package/dist/auth/_shared/0.3/session.js.map +1 -0
- package/dist/auth/authenticate/0.3/payload.d.ts +852 -0
- package/dist/auth/authenticate/0.3/payload.d.ts.map +1 -0
- package/dist/auth/authenticate/0.3/payload.js +442 -0
- package/dist/auth/authenticate/0.3/payload.js.map +1 -0
- package/dist/auth/refresh/0.2/payload.d.ts +729 -0
- package/dist/auth/refresh/0.2/payload.d.ts.map +1 -0
- package/dist/auth/refresh/0.2/payload.js +392 -0
- package/dist/auth/refresh/0.2/payload.js.map +1 -0
- package/dist/git-ns/_shared/0.5/git-ns.d.ts +16 -0
- package/dist/git-ns/_shared/0.5/git-ns.d.ts.map +1 -0
- package/dist/git-ns/_shared/0.5/git-ns.js +6 -0
- package/dist/git-ns/_shared/0.5/git-ns.js.map +1 -0
- package/dist/git-ns/account/list/0.1/payload.d.ts +598 -0
- package/dist/git-ns/account/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/account/list/0.1/payload.js +317 -0
- package/dist/git-ns/account/list/0.1/payload.js.map +1 -0
- package/dist/git-ns/activity/list/0.1/payload.d.ts +642 -0
- package/dist/git-ns/activity/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/activity/list/0.1/payload.js +343 -0
- package/dist/git-ns/activity/list/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/list/0.1/payload.d.ts +697 -0
- package/dist/git-ns/bridge/job/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/list/0.1/payload.js +386 -0
- package/dist/git-ns/bridge/job/list/0.1/payload.js.map +1 -0
- package/dist/git-ns/projection/show/0.1/payload.d.ts +705 -0
- package/dist/git-ns/projection/show/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/projection/show/0.1/payload.js +377 -0
- package/dist/git-ns/projection/show/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts +862 -0
- package/dist/git-ns/right/issued-by-departed/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/issued-by-departed/0.1/payload.js +487 -0
- package/dist/git-ns/right/issued-by-departed/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/list/0.1/payload.d.ts +773 -0
- package/dist/git-ns/right/list/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/list/0.1/payload.js +439 -0
- package/dist/git-ns/right/list/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/relationships/revoke/0.2/payload.d.ts +287 -0
- package/dist/vtc/relationships/revoke/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/revoke/0.2/payload.js +159 -0
- package/dist/vtc/relationships/revoke/0.2/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts +254 -0
- package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/resend/0.2/payload.js +142 -0
- package/dist/vtc/vetting/vetters/resend/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +91 -0
- package/src/auth/_shared/0.3/session.ts +17 -0
- package/src/auth/authenticate/0.3/payload.ts +527 -0
- package/src/auth/refresh/0.2/payload.ts +444 -0
- package/src/git-ns/_shared/0.5/git-ns.ts +17 -0
- package/src/git-ns/account/list/0.1/payload.ts +392 -0
- package/src/git-ns/activity/list/0.1/payload.ts +430 -0
- package/src/git-ns/bridge/job/list/0.1/payload.ts +490 -0
- package/src/git-ns/projection/show/0.1/payload.ts +479 -0
- package/src/git-ns/right/issued-by-departed/0.1/payload.ts +550 -0
- package/src/git-ns/right/list/0.1/payload.ts +493 -0
- package/src/index.ts +12 -0
- package/src/vtc/relationships/revoke/0.2/payload.ts +209 -0
- package/src/vtc/vetting/vetters/resend/0.2/payload.ts +183 -0
|
@@ -0,0 +1,773 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/git-ns/right/list/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 enumerates every git right the VTC knows of, recorded and role-derived alike, across every namespace. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface GitNamespacesListRightsPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Only rights on this resource or inside it. Absent: every resource.
|
|
12
|
+
*/
|
|
13
|
+
resource?: Resource;
|
|
14
|
+
/**
|
|
15
|
+
* Only rights held by this DID. Absent: every subject.
|
|
16
|
+
*/
|
|
17
|
+
subject?: Did;
|
|
18
|
+
/**
|
|
19
|
+
* Opaque continuation token from a previous response's `nextCursor`. A consumer supplying a `cursor` MUST NOT also change `resource` or `subject` from the request that produced it — start a fresh query instead.
|
|
20
|
+
*/
|
|
21
|
+
cursor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Maximum rows to return in this page. A VTC clamps to 1..=500 (default 100).
|
|
24
|
+
*/
|
|
25
|
+
limit?: number;
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The matching rows, ordered by resource then subject.
|
|
30
|
+
*/
|
|
31
|
+
export interface GitNamespacesListRightsResponsePayload {
|
|
32
|
+
/**
|
|
33
|
+
* Rows matching `resource` and `subject`, ordered by `resource` then `subject`. A break-glass record waiting out a policy delay is included — it is exactly the one other administrators have a window to revoke.
|
|
34
|
+
*/
|
|
35
|
+
rights: AdminRightRow[];
|
|
36
|
+
/**
|
|
37
|
+
* Continuation token for the next page, or `null` when this is the last.
|
|
38
|
+
*/
|
|
39
|
+
nextCursor?: string | null;
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
43
|
+
export type { AdminRightRow, BreakGlass, Did, Ext, Resource, Right, RightOrigin };
|
|
44
|
+
/** Trust Task type URI. */
|
|
45
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/git-ns/right/list/0.1";
|
|
46
|
+
/** Stable alias for this specification's request payload shape. */
|
|
47
|
+
export type Payload = GitNamespacesListRightsPayload;
|
|
48
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
49
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/git-ns/right/list/0.1#response";
|
|
50
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
51
|
+
export type Response = GitNamespacesListRightsResponsePayload;
|
|
52
|
+
/**
|
|
53
|
+
* This specification's payload schema, as a value.
|
|
54
|
+
*
|
|
55
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
56
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
57
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
58
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
59
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
60
|
+
*/
|
|
61
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
62
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
63
|
+
readonly $id: "https://trusttasks.org/spec/git-ns/right/list/0.1";
|
|
64
|
+
readonly title: "Git Namespaces — List Rights — payload";
|
|
65
|
+
readonly description: "A community administrator enumerates every git right the VTC knows of, recorded and role-derived alike, across every namespace. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
66
|
+
readonly type: "object";
|
|
67
|
+
readonly additionalProperties: false;
|
|
68
|
+
readonly properties: {
|
|
69
|
+
readonly resource: {
|
|
70
|
+
readonly $ref: "#/$defs/Resource";
|
|
71
|
+
readonly description: "Only rights on this resource or inside it. Absent: every resource.";
|
|
72
|
+
};
|
|
73
|
+
readonly subject: {
|
|
74
|
+
readonly $ref: "#/$defs/Did";
|
|
75
|
+
readonly description: "Only rights held by this DID. Absent: every subject.";
|
|
76
|
+
};
|
|
77
|
+
readonly cursor: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly description: "Opaque continuation token from a previous response's `nextCursor`. A consumer supplying a `cursor` MUST NOT also change `resource` or `subject` from the request that produced it — start a fresh query instead.";
|
|
80
|
+
};
|
|
81
|
+
readonly limit: {
|
|
82
|
+
readonly type: "integer";
|
|
83
|
+
readonly minimum: 1;
|
|
84
|
+
readonly maximum: 500;
|
|
85
|
+
readonly description: "Maximum rows to return in this page. A VTC clamps to 1..=500 (default 100).";
|
|
86
|
+
};
|
|
87
|
+
readonly ext: {
|
|
88
|
+
readonly $ref: "#/$defs/Ext";
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
readonly $defs: {
|
|
92
|
+
readonly Response: {
|
|
93
|
+
readonly $anchor: "response";
|
|
94
|
+
readonly title: "Git Namespaces — List Rights — response payload";
|
|
95
|
+
readonly description: "The matching rows, ordered by resource then subject.";
|
|
96
|
+
readonly type: "object";
|
|
97
|
+
readonly additionalProperties: false;
|
|
98
|
+
readonly required: readonly ["rights"];
|
|
99
|
+
readonly properties: {
|
|
100
|
+
readonly rights: {
|
|
101
|
+
readonly type: "array";
|
|
102
|
+
readonly items: {
|
|
103
|
+
readonly $ref: "#/$defs/AdminRightRow";
|
|
104
|
+
};
|
|
105
|
+
readonly description: "Rows matching `resource` and `subject`, ordered by `resource` then `subject`. A break-glass record waiting out a policy delay is included — it is exactly the one other administrators have a window to revoke.";
|
|
106
|
+
};
|
|
107
|
+
readonly nextCursor: {
|
|
108
|
+
readonly type: readonly ["string", "null"];
|
|
109
|
+
readonly description: "Continuation token for the next page, or `null` when this is the last.";
|
|
110
|
+
};
|
|
111
|
+
readonly ext: {
|
|
112
|
+
readonly $ref: "#/$defs/Ext";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
readonly Ext: {
|
|
117
|
+
readonly title: "Ext";
|
|
118
|
+
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.";
|
|
119
|
+
readonly type: "object";
|
|
120
|
+
readonly minProperties: 1;
|
|
121
|
+
readonly additionalProperties: true;
|
|
122
|
+
readonly propertyNames: {
|
|
123
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
readonly AdminRightRow: {
|
|
127
|
+
readonly title: "AdminRightRow";
|
|
128
|
+
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.";
|
|
129
|
+
readonly type: "object";
|
|
130
|
+
readonly additionalProperties: false;
|
|
131
|
+
readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
|
|
132
|
+
readonly properties: {
|
|
133
|
+
readonly subject: {
|
|
134
|
+
readonly $ref: "#/$defs/Did";
|
|
135
|
+
readonly description: "Who holds the right.";
|
|
136
|
+
};
|
|
137
|
+
readonly right: {
|
|
138
|
+
readonly $ref: "#/$defs/Right";
|
|
139
|
+
};
|
|
140
|
+
readonly resource: {
|
|
141
|
+
readonly $ref: "#/$defs/Resource";
|
|
142
|
+
};
|
|
143
|
+
readonly origin: {
|
|
144
|
+
readonly $ref: "#/$defs/RightOrigin";
|
|
145
|
+
};
|
|
146
|
+
readonly grantedBy: {
|
|
147
|
+
readonly $ref: "#/$defs/Did";
|
|
148
|
+
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.";
|
|
149
|
+
};
|
|
150
|
+
readonly grantedAt: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
readonly format: "date-time";
|
|
153
|
+
readonly description: "Present exactly when `origin` is `recorded`.";
|
|
154
|
+
};
|
|
155
|
+
readonly expiresAt: {
|
|
156
|
+
readonly type: "string";
|
|
157
|
+
readonly format: "date-time";
|
|
158
|
+
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`).";
|
|
159
|
+
};
|
|
160
|
+
readonly reason: {
|
|
161
|
+
readonly type: "string";
|
|
162
|
+
readonly maxLength: 1024;
|
|
163
|
+
readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
|
|
164
|
+
};
|
|
165
|
+
readonly subjectMember: {
|
|
166
|
+
readonly type: "boolean";
|
|
167
|
+
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.";
|
|
168
|
+
};
|
|
169
|
+
readonly granterDeparted: {
|
|
170
|
+
readonly type: "boolean";
|
|
171
|
+
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).";
|
|
172
|
+
};
|
|
173
|
+
readonly breakGlass: {
|
|
174
|
+
readonly $ref: "#/$defs/BreakGlass";
|
|
175
|
+
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.";
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly BreakGlass: {
|
|
180
|
+
readonly title: "BreakGlass";
|
|
181
|
+
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.";
|
|
182
|
+
readonly type: "object";
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
readonly required: readonly ["by", "at", "justification"];
|
|
185
|
+
readonly properties: {
|
|
186
|
+
readonly by: {
|
|
187
|
+
readonly $ref: "#/$defs/Did";
|
|
188
|
+
readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
|
|
189
|
+
};
|
|
190
|
+
readonly at: {
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly format: "date-time";
|
|
193
|
+
readonly description: "When the VTC recorded the break-glass.";
|
|
194
|
+
};
|
|
195
|
+
readonly justification: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
readonly minLength: 1;
|
|
198
|
+
readonly maxLength: 2048;
|
|
199
|
+
readonly pattern: "\\S";
|
|
200
|
+
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.";
|
|
201
|
+
};
|
|
202
|
+
readonly effectiveAt: {
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
readonly format: "date-time";
|
|
205
|
+
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.";
|
|
206
|
+
};
|
|
207
|
+
readonly ratifiedBy: {
|
|
208
|
+
readonly $ref: "#/$defs/Did";
|
|
209
|
+
readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
|
|
210
|
+
};
|
|
211
|
+
readonly ratifiedAt: {
|
|
212
|
+
readonly type: "string";
|
|
213
|
+
readonly format: "date-time";
|
|
214
|
+
readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
readonly Did: {
|
|
219
|
+
readonly title: "Did";
|
|
220
|
+
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.";
|
|
221
|
+
readonly type: "string";
|
|
222
|
+
readonly maxLength: 2048;
|
|
223
|
+
readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
|
|
224
|
+
};
|
|
225
|
+
readonly RightOrigin: {
|
|
226
|
+
readonly title: "RightOrigin";
|
|
227
|
+
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.";
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly enum: readonly ["recorded", "roleDerived"];
|
|
230
|
+
};
|
|
231
|
+
readonly Resource: {
|
|
232
|
+
readonly title: "Resource";
|
|
233
|
+
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`.";
|
|
234
|
+
readonly type: "string";
|
|
235
|
+
readonly maxLength: 455;
|
|
236
|
+
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}$";
|
|
237
|
+
};
|
|
238
|
+
readonly Right: {
|
|
239
|
+
readonly title: "Right";
|
|
240
|
+
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.";
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
247
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
248
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
249
|
+
readonly $ref: "#/$defs/Response";
|
|
250
|
+
readonly $defs: {
|
|
251
|
+
readonly Response: {
|
|
252
|
+
readonly $anchor: "response";
|
|
253
|
+
readonly title: "Git Namespaces — List Rights — response payload";
|
|
254
|
+
readonly description: "The matching rows, ordered by resource then subject.";
|
|
255
|
+
readonly type: "object";
|
|
256
|
+
readonly additionalProperties: false;
|
|
257
|
+
readonly required: readonly ["rights"];
|
|
258
|
+
readonly properties: {
|
|
259
|
+
readonly rights: {
|
|
260
|
+
readonly type: "array";
|
|
261
|
+
readonly items: {
|
|
262
|
+
readonly $ref: "#/$defs/AdminRightRow";
|
|
263
|
+
};
|
|
264
|
+
readonly description: "Rows matching `resource` and `subject`, ordered by `resource` then `subject`. A break-glass record waiting out a policy delay is included — it is exactly the one other administrators have a window to revoke.";
|
|
265
|
+
};
|
|
266
|
+
readonly nextCursor: {
|
|
267
|
+
readonly type: readonly ["string", "null"];
|
|
268
|
+
readonly description: "Continuation token for the next page, or `null` when this is the last.";
|
|
269
|
+
};
|
|
270
|
+
readonly ext: {
|
|
271
|
+
readonly $ref: "#/$defs/Ext";
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
readonly Ext: {
|
|
276
|
+
readonly title: "Ext";
|
|
277
|
+
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.";
|
|
278
|
+
readonly type: "object";
|
|
279
|
+
readonly minProperties: 1;
|
|
280
|
+
readonly additionalProperties: true;
|
|
281
|
+
readonly propertyNames: {
|
|
282
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
readonly AdminRightRow: {
|
|
286
|
+
readonly title: "AdminRightRow";
|
|
287
|
+
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.";
|
|
288
|
+
readonly type: "object";
|
|
289
|
+
readonly additionalProperties: false;
|
|
290
|
+
readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
|
|
291
|
+
readonly properties: {
|
|
292
|
+
readonly subject: {
|
|
293
|
+
readonly $ref: "#/$defs/Did";
|
|
294
|
+
readonly description: "Who holds the right.";
|
|
295
|
+
};
|
|
296
|
+
readonly right: {
|
|
297
|
+
readonly $ref: "#/$defs/Right";
|
|
298
|
+
};
|
|
299
|
+
readonly resource: {
|
|
300
|
+
readonly $ref: "#/$defs/Resource";
|
|
301
|
+
};
|
|
302
|
+
readonly origin: {
|
|
303
|
+
readonly $ref: "#/$defs/RightOrigin";
|
|
304
|
+
};
|
|
305
|
+
readonly grantedBy: {
|
|
306
|
+
readonly $ref: "#/$defs/Did";
|
|
307
|
+
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.";
|
|
308
|
+
};
|
|
309
|
+
readonly grantedAt: {
|
|
310
|
+
readonly type: "string";
|
|
311
|
+
readonly format: "date-time";
|
|
312
|
+
readonly description: "Present exactly when `origin` is `recorded`.";
|
|
313
|
+
};
|
|
314
|
+
readonly expiresAt: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
readonly format: "date-time";
|
|
317
|
+
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`).";
|
|
318
|
+
};
|
|
319
|
+
readonly reason: {
|
|
320
|
+
readonly type: "string";
|
|
321
|
+
readonly maxLength: 1024;
|
|
322
|
+
readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
|
|
323
|
+
};
|
|
324
|
+
readonly subjectMember: {
|
|
325
|
+
readonly type: "boolean";
|
|
326
|
+
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.";
|
|
327
|
+
};
|
|
328
|
+
readonly granterDeparted: {
|
|
329
|
+
readonly type: "boolean";
|
|
330
|
+
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).";
|
|
331
|
+
};
|
|
332
|
+
readonly breakGlass: {
|
|
333
|
+
readonly $ref: "#/$defs/BreakGlass";
|
|
334
|
+
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.";
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
readonly BreakGlass: {
|
|
339
|
+
readonly title: "BreakGlass";
|
|
340
|
+
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.";
|
|
341
|
+
readonly type: "object";
|
|
342
|
+
readonly additionalProperties: false;
|
|
343
|
+
readonly required: readonly ["by", "at", "justification"];
|
|
344
|
+
readonly properties: {
|
|
345
|
+
readonly by: {
|
|
346
|
+
readonly $ref: "#/$defs/Did";
|
|
347
|
+
readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
|
|
348
|
+
};
|
|
349
|
+
readonly at: {
|
|
350
|
+
readonly type: "string";
|
|
351
|
+
readonly format: "date-time";
|
|
352
|
+
readonly description: "When the VTC recorded the break-glass.";
|
|
353
|
+
};
|
|
354
|
+
readonly justification: {
|
|
355
|
+
readonly type: "string";
|
|
356
|
+
readonly minLength: 1;
|
|
357
|
+
readonly maxLength: 2048;
|
|
358
|
+
readonly pattern: "\\S";
|
|
359
|
+
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.";
|
|
360
|
+
};
|
|
361
|
+
readonly effectiveAt: {
|
|
362
|
+
readonly type: "string";
|
|
363
|
+
readonly format: "date-time";
|
|
364
|
+
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.";
|
|
365
|
+
};
|
|
366
|
+
readonly ratifiedBy: {
|
|
367
|
+
readonly $ref: "#/$defs/Did";
|
|
368
|
+
readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
|
|
369
|
+
};
|
|
370
|
+
readonly ratifiedAt: {
|
|
371
|
+
readonly type: "string";
|
|
372
|
+
readonly format: "date-time";
|
|
373
|
+
readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
readonly Did: {
|
|
378
|
+
readonly title: "Did";
|
|
379
|
+
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.";
|
|
380
|
+
readonly type: "string";
|
|
381
|
+
readonly maxLength: 2048;
|
|
382
|
+
readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
|
|
383
|
+
};
|
|
384
|
+
readonly RightOrigin: {
|
|
385
|
+
readonly title: "RightOrigin";
|
|
386
|
+
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.";
|
|
387
|
+
readonly type: "string";
|
|
388
|
+
readonly enum: readonly ["recorded", "roleDerived"];
|
|
389
|
+
};
|
|
390
|
+
readonly Resource: {
|
|
391
|
+
readonly title: "Resource";
|
|
392
|
+
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`.";
|
|
393
|
+
readonly type: "string";
|
|
394
|
+
readonly maxLength: 455;
|
|
395
|
+
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}$";
|
|
396
|
+
};
|
|
397
|
+
readonly Right: {
|
|
398
|
+
readonly title: "Right";
|
|
399
|
+
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.";
|
|
400
|
+
readonly type: "string";
|
|
401
|
+
readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
407
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
408
|
+
* per-specification and cannot be derived from the document alone, and
|
|
409
|
+
* item 2 needs the schema this carries.
|
|
410
|
+
*/
|
|
411
|
+
export declare const SPEC: {
|
|
412
|
+
readonly typeUri: "https://trusttasks.org/spec/git-ns/right/list/0.1";
|
|
413
|
+
readonly isBearer: false;
|
|
414
|
+
readonly isProofRequired: true;
|
|
415
|
+
readonly isRecipientRequired: true;
|
|
416
|
+
readonly isIssuedAtRequired: false;
|
|
417
|
+
readonly payloadSchema: {
|
|
418
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
419
|
+
readonly $id: "https://trusttasks.org/spec/git-ns/right/list/0.1";
|
|
420
|
+
readonly title: "Git Namespaces — List Rights — payload";
|
|
421
|
+
readonly description: "A community administrator enumerates every git right the VTC knows of, recorded and role-derived alike, across every namespace. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
422
|
+
readonly type: "object";
|
|
423
|
+
readonly additionalProperties: false;
|
|
424
|
+
readonly properties: {
|
|
425
|
+
readonly resource: {
|
|
426
|
+
readonly $ref: "#/$defs/Resource";
|
|
427
|
+
readonly description: "Only rights on this resource or inside it. Absent: every resource.";
|
|
428
|
+
};
|
|
429
|
+
readonly subject: {
|
|
430
|
+
readonly $ref: "#/$defs/Did";
|
|
431
|
+
readonly description: "Only rights held by this DID. Absent: every subject.";
|
|
432
|
+
};
|
|
433
|
+
readonly cursor: {
|
|
434
|
+
readonly type: "string";
|
|
435
|
+
readonly description: "Opaque continuation token from a previous response's `nextCursor`. A consumer supplying a `cursor` MUST NOT also change `resource` or `subject` from the request that produced it — start a fresh query instead.";
|
|
436
|
+
};
|
|
437
|
+
readonly limit: {
|
|
438
|
+
readonly type: "integer";
|
|
439
|
+
readonly minimum: 1;
|
|
440
|
+
readonly maximum: 500;
|
|
441
|
+
readonly description: "Maximum rows to return in this page. A VTC clamps to 1..=500 (default 100).";
|
|
442
|
+
};
|
|
443
|
+
readonly ext: {
|
|
444
|
+
readonly $ref: "#/$defs/Ext";
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
readonly $defs: {
|
|
448
|
+
readonly Response: {
|
|
449
|
+
readonly $anchor: "response";
|
|
450
|
+
readonly title: "Git Namespaces — List Rights — response payload";
|
|
451
|
+
readonly description: "The matching rows, ordered by resource then subject.";
|
|
452
|
+
readonly type: "object";
|
|
453
|
+
readonly additionalProperties: false;
|
|
454
|
+
readonly required: readonly ["rights"];
|
|
455
|
+
readonly properties: {
|
|
456
|
+
readonly rights: {
|
|
457
|
+
readonly type: "array";
|
|
458
|
+
readonly items: {
|
|
459
|
+
readonly $ref: "#/$defs/AdminRightRow";
|
|
460
|
+
};
|
|
461
|
+
readonly description: "Rows matching `resource` and `subject`, ordered by `resource` then `subject`. A break-glass record waiting out a policy delay is included — it is exactly the one other administrators have a window to revoke.";
|
|
462
|
+
};
|
|
463
|
+
readonly nextCursor: {
|
|
464
|
+
readonly type: readonly ["string", "null"];
|
|
465
|
+
readonly description: "Continuation token for the next page, or `null` when this is the last.";
|
|
466
|
+
};
|
|
467
|
+
readonly ext: {
|
|
468
|
+
readonly $ref: "#/$defs/Ext";
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
readonly Ext: {
|
|
473
|
+
readonly title: "Ext";
|
|
474
|
+
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.";
|
|
475
|
+
readonly type: "object";
|
|
476
|
+
readonly minProperties: 1;
|
|
477
|
+
readonly additionalProperties: true;
|
|
478
|
+
readonly propertyNames: {
|
|
479
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
readonly AdminRightRow: {
|
|
483
|
+
readonly title: "AdminRightRow";
|
|
484
|
+
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.";
|
|
485
|
+
readonly type: "object";
|
|
486
|
+
readonly additionalProperties: false;
|
|
487
|
+
readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
|
|
488
|
+
readonly properties: {
|
|
489
|
+
readonly subject: {
|
|
490
|
+
readonly $ref: "#/$defs/Did";
|
|
491
|
+
readonly description: "Who holds the right.";
|
|
492
|
+
};
|
|
493
|
+
readonly right: {
|
|
494
|
+
readonly $ref: "#/$defs/Right";
|
|
495
|
+
};
|
|
496
|
+
readonly resource: {
|
|
497
|
+
readonly $ref: "#/$defs/Resource";
|
|
498
|
+
};
|
|
499
|
+
readonly origin: {
|
|
500
|
+
readonly $ref: "#/$defs/RightOrigin";
|
|
501
|
+
};
|
|
502
|
+
readonly grantedBy: {
|
|
503
|
+
readonly $ref: "#/$defs/Did";
|
|
504
|
+
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.";
|
|
505
|
+
};
|
|
506
|
+
readonly grantedAt: {
|
|
507
|
+
readonly type: "string";
|
|
508
|
+
readonly format: "date-time";
|
|
509
|
+
readonly description: "Present exactly when `origin` is `recorded`.";
|
|
510
|
+
};
|
|
511
|
+
readonly expiresAt: {
|
|
512
|
+
readonly type: "string";
|
|
513
|
+
readonly format: "date-time";
|
|
514
|
+
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`).";
|
|
515
|
+
};
|
|
516
|
+
readonly reason: {
|
|
517
|
+
readonly type: "string";
|
|
518
|
+
readonly maxLength: 1024;
|
|
519
|
+
readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
|
|
520
|
+
};
|
|
521
|
+
readonly subjectMember: {
|
|
522
|
+
readonly type: "boolean";
|
|
523
|
+
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.";
|
|
524
|
+
};
|
|
525
|
+
readonly granterDeparted: {
|
|
526
|
+
readonly type: "boolean";
|
|
527
|
+
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).";
|
|
528
|
+
};
|
|
529
|
+
readonly breakGlass: {
|
|
530
|
+
readonly $ref: "#/$defs/BreakGlass";
|
|
531
|
+
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.";
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
readonly BreakGlass: {
|
|
536
|
+
readonly title: "BreakGlass";
|
|
537
|
+
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.";
|
|
538
|
+
readonly type: "object";
|
|
539
|
+
readonly additionalProperties: false;
|
|
540
|
+
readonly required: readonly ["by", "at", "justification"];
|
|
541
|
+
readonly properties: {
|
|
542
|
+
readonly by: {
|
|
543
|
+
readonly $ref: "#/$defs/Did";
|
|
544
|
+
readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
|
|
545
|
+
};
|
|
546
|
+
readonly at: {
|
|
547
|
+
readonly type: "string";
|
|
548
|
+
readonly format: "date-time";
|
|
549
|
+
readonly description: "When the VTC recorded the break-glass.";
|
|
550
|
+
};
|
|
551
|
+
readonly justification: {
|
|
552
|
+
readonly type: "string";
|
|
553
|
+
readonly minLength: 1;
|
|
554
|
+
readonly maxLength: 2048;
|
|
555
|
+
readonly pattern: "\\S";
|
|
556
|
+
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.";
|
|
557
|
+
};
|
|
558
|
+
readonly effectiveAt: {
|
|
559
|
+
readonly type: "string";
|
|
560
|
+
readonly format: "date-time";
|
|
561
|
+
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.";
|
|
562
|
+
};
|
|
563
|
+
readonly ratifiedBy: {
|
|
564
|
+
readonly $ref: "#/$defs/Did";
|
|
565
|
+
readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
|
|
566
|
+
};
|
|
567
|
+
readonly ratifiedAt: {
|
|
568
|
+
readonly type: "string";
|
|
569
|
+
readonly format: "date-time";
|
|
570
|
+
readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
readonly Did: {
|
|
575
|
+
readonly title: "Did";
|
|
576
|
+
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.";
|
|
577
|
+
readonly type: "string";
|
|
578
|
+
readonly maxLength: 2048;
|
|
579
|
+
readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
|
|
580
|
+
};
|
|
581
|
+
readonly RightOrigin: {
|
|
582
|
+
readonly title: "RightOrigin";
|
|
583
|
+
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.";
|
|
584
|
+
readonly type: "string";
|
|
585
|
+
readonly enum: readonly ["recorded", "roleDerived"];
|
|
586
|
+
};
|
|
587
|
+
readonly Resource: {
|
|
588
|
+
readonly title: "Resource";
|
|
589
|
+
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`.";
|
|
590
|
+
readonly type: "string";
|
|
591
|
+
readonly maxLength: 455;
|
|
592
|
+
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}$";
|
|
593
|
+
};
|
|
594
|
+
readonly Right: {
|
|
595
|
+
readonly title: "Right";
|
|
596
|
+
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.";
|
|
597
|
+
readonly type: "string";
|
|
598
|
+
readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
/**
|
|
604
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
605
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
606
|
+
* parties (§7.3 item 5).
|
|
607
|
+
*/
|
|
608
|
+
export declare const RESPONSE_SPEC: {
|
|
609
|
+
readonly typeUri: "https://trusttasks.org/spec/git-ns/right/list/0.1#response";
|
|
610
|
+
readonly isBearer: false;
|
|
611
|
+
readonly isProofRequired: true;
|
|
612
|
+
readonly isRecipientRequired: true;
|
|
613
|
+
readonly isIssuedAtRequired: false;
|
|
614
|
+
readonly payloadSchema: {
|
|
615
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
616
|
+
readonly $ref: "#/$defs/Response";
|
|
617
|
+
readonly $defs: {
|
|
618
|
+
readonly Response: {
|
|
619
|
+
readonly $anchor: "response";
|
|
620
|
+
readonly title: "Git Namespaces — List Rights — response payload";
|
|
621
|
+
readonly description: "The matching rows, ordered by resource then subject.";
|
|
622
|
+
readonly type: "object";
|
|
623
|
+
readonly additionalProperties: false;
|
|
624
|
+
readonly required: readonly ["rights"];
|
|
625
|
+
readonly properties: {
|
|
626
|
+
readonly rights: {
|
|
627
|
+
readonly type: "array";
|
|
628
|
+
readonly items: {
|
|
629
|
+
readonly $ref: "#/$defs/AdminRightRow";
|
|
630
|
+
};
|
|
631
|
+
readonly description: "Rows matching `resource` and `subject`, ordered by `resource` then `subject`. A break-glass record waiting out a policy delay is included — it is exactly the one other administrators have a window to revoke.";
|
|
632
|
+
};
|
|
633
|
+
readonly nextCursor: {
|
|
634
|
+
readonly type: readonly ["string", "null"];
|
|
635
|
+
readonly description: "Continuation token for the next page, or `null` when this is the last.";
|
|
636
|
+
};
|
|
637
|
+
readonly ext: {
|
|
638
|
+
readonly $ref: "#/$defs/Ext";
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
readonly Ext: {
|
|
643
|
+
readonly title: "Ext";
|
|
644
|
+
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.";
|
|
645
|
+
readonly type: "object";
|
|
646
|
+
readonly minProperties: 1;
|
|
647
|
+
readonly additionalProperties: true;
|
|
648
|
+
readonly propertyNames: {
|
|
649
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
readonly AdminRightRow: {
|
|
653
|
+
readonly title: "AdminRightRow";
|
|
654
|
+
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.";
|
|
655
|
+
readonly type: "object";
|
|
656
|
+
readonly additionalProperties: false;
|
|
657
|
+
readonly required: readonly ["subject", "right", "resource", "origin", "subjectMember", "granterDeparted"];
|
|
658
|
+
readonly properties: {
|
|
659
|
+
readonly subject: {
|
|
660
|
+
readonly $ref: "#/$defs/Did";
|
|
661
|
+
readonly description: "Who holds the right.";
|
|
662
|
+
};
|
|
663
|
+
readonly right: {
|
|
664
|
+
readonly $ref: "#/$defs/Right";
|
|
665
|
+
};
|
|
666
|
+
readonly resource: {
|
|
667
|
+
readonly $ref: "#/$defs/Resource";
|
|
668
|
+
};
|
|
669
|
+
readonly origin: {
|
|
670
|
+
readonly $ref: "#/$defs/RightOrigin";
|
|
671
|
+
};
|
|
672
|
+
readonly grantedBy: {
|
|
673
|
+
readonly $ref: "#/$defs/Did";
|
|
674
|
+
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.";
|
|
675
|
+
};
|
|
676
|
+
readonly grantedAt: {
|
|
677
|
+
readonly type: "string";
|
|
678
|
+
readonly format: "date-time";
|
|
679
|
+
readonly description: "Present exactly when `origin` is `recorded`.";
|
|
680
|
+
};
|
|
681
|
+
readonly expiresAt: {
|
|
682
|
+
readonly type: "string";
|
|
683
|
+
readonly format: "date-time";
|
|
684
|
+
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`).";
|
|
685
|
+
};
|
|
686
|
+
readonly reason: {
|
|
687
|
+
readonly type: "string";
|
|
688
|
+
readonly maxLength: 1024;
|
|
689
|
+
readonly description: "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none.";
|
|
690
|
+
};
|
|
691
|
+
readonly subjectMember: {
|
|
692
|
+
readonly type: "boolean";
|
|
693
|
+
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.";
|
|
694
|
+
};
|
|
695
|
+
readonly granterDeparted: {
|
|
696
|
+
readonly type: "boolean";
|
|
697
|
+
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).";
|
|
698
|
+
};
|
|
699
|
+
readonly breakGlass: {
|
|
700
|
+
readonly $ref: "#/$defs/BreakGlass";
|
|
701
|
+
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.";
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
readonly BreakGlass: {
|
|
706
|
+
readonly title: "BreakGlass";
|
|
707
|
+
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.";
|
|
708
|
+
readonly type: "object";
|
|
709
|
+
readonly additionalProperties: false;
|
|
710
|
+
readonly required: readonly ["by", "at", "justification"];
|
|
711
|
+
readonly properties: {
|
|
712
|
+
readonly by: {
|
|
713
|
+
readonly $ref: "#/$defs/Did";
|
|
714
|
+
readonly description: "Who broke the glass: always the record's `subject`, restated so the flag reads on its own.";
|
|
715
|
+
};
|
|
716
|
+
readonly at: {
|
|
717
|
+
readonly type: "string";
|
|
718
|
+
readonly format: "date-time";
|
|
719
|
+
readonly description: "When the VTC recorded the break-glass.";
|
|
720
|
+
};
|
|
721
|
+
readonly justification: {
|
|
722
|
+
readonly type: "string";
|
|
723
|
+
readonly minLength: 1;
|
|
724
|
+
readonly maxLength: 2048;
|
|
725
|
+
readonly pattern: "\\S";
|
|
726
|
+
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.";
|
|
727
|
+
};
|
|
728
|
+
readonly effectiveAt: {
|
|
729
|
+
readonly type: "string";
|
|
730
|
+
readonly format: "date-time";
|
|
731
|
+
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.";
|
|
732
|
+
};
|
|
733
|
+
readonly ratifiedBy: {
|
|
734
|
+
readonly $ref: "#/$defs/Did";
|
|
735
|
+
readonly description: "The administrator who ratified the record — never its subject. Absent while unratified.";
|
|
736
|
+
};
|
|
737
|
+
readonly ratifiedAt: {
|
|
738
|
+
readonly type: "string";
|
|
739
|
+
readonly format: "date-time";
|
|
740
|
+
readonly description: "When it was ratified. Present exactly when `ratifiedBy` is.";
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
readonly Did: {
|
|
745
|
+
readonly title: "Did";
|
|
746
|
+
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.";
|
|
747
|
+
readonly type: "string";
|
|
748
|
+
readonly maxLength: 2048;
|
|
749
|
+
readonly pattern: "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$";
|
|
750
|
+
};
|
|
751
|
+
readonly RightOrigin: {
|
|
752
|
+
readonly title: "RightOrigin";
|
|
753
|
+
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.";
|
|
754
|
+
readonly type: "string";
|
|
755
|
+
readonly enum: readonly ["recorded", "roleDerived"];
|
|
756
|
+
};
|
|
757
|
+
readonly Resource: {
|
|
758
|
+
readonly title: "Resource";
|
|
759
|
+
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`.";
|
|
760
|
+
readonly type: "string";
|
|
761
|
+
readonly maxLength: 455;
|
|
762
|
+
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}$";
|
|
763
|
+
};
|
|
764
|
+
readonly Right: {
|
|
765
|
+
readonly title: "Right";
|
|
766
|
+
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.";
|
|
767
|
+
readonly type: "string";
|
|
768
|
+
readonly enum: readonly ["git.ns.admin", "git.repo.create", "git.repo.own", "git.repo.maintain", "git.commit.sign"];
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
//# sourceMappingURL=payload.d.ts.map
|