@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.
- package/CHANGELOG.md +85 -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 +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/contexts/update-did/1.1/payload.d.ts +388 -0
- package/dist/vta/contexts/update-did/1.1/payload.d.ts.map +1 -0
- package/dist/vta/contexts/update-did/1.1/payload.js +227 -0
- package/dist/vta/contexts/update-did/1.1/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 +11 -0
- package/src/vta/contexts/update-did/1.1/payload.ts +256 -0
|
@@ -0,0 +1,493 @@
|
|
|
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
|
+
|
|
6
|
+
import type { AdminRightRow, BreakGlass, Did_GitNsV0_3 as Did, Ext, Resource, Right, RightOrigin } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
12
|
+
export interface GitNamespacesListRightsPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Only rights on this resource or inside it. Absent: every resource.
|
|
15
|
+
*/
|
|
16
|
+
resource?: Resource;
|
|
17
|
+
/**
|
|
18
|
+
* Only rights held by this DID. Absent: every subject.
|
|
19
|
+
*/
|
|
20
|
+
subject?: Did;
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
cursor?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum rows to return in this page. A VTC clamps to 1..=500 (default 100).
|
|
27
|
+
*/
|
|
28
|
+
limit?: number;
|
|
29
|
+
ext?: Ext;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The matching rows, ordered by resource then subject.
|
|
33
|
+
*/
|
|
34
|
+
export interface GitNamespacesListRightsResponsePayload {
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*/
|
|
38
|
+
rights: AdminRightRow[];
|
|
39
|
+
/**
|
|
40
|
+
* Continuation token for the next page, or `null` when this is the last.
|
|
41
|
+
*/
|
|
42
|
+
nextCursor?: string | null;
|
|
43
|
+
ext?: Ext;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
47
|
+
export type { AdminRightRow, BreakGlass, Did, Ext, Resource, Right, RightOrigin };
|
|
48
|
+
|
|
49
|
+
/** Trust Task type URI. */
|
|
50
|
+
export const TYPE_URI = "https://trusttasks.org/spec/git-ns/right/list/0.1" as const;
|
|
51
|
+
|
|
52
|
+
/** Stable alias for this specification's request payload shape. */
|
|
53
|
+
export type Payload = GitNamespacesListRightsPayload;
|
|
54
|
+
|
|
55
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
56
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/right/list/0.1#response" as const;
|
|
57
|
+
|
|
58
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
59
|
+
export type Response = GitNamespacesListRightsResponsePayload;
|
|
60
|
+
|
|
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 const PAYLOAD_SCHEMA = {
|
|
71
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
72
|
+
"$id": "https://trusttasks.org/spec/git-ns/right/list/0.1",
|
|
73
|
+
"title": "Git Namespaces — List Rights — payload",
|
|
74
|
+
"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.",
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"resource": {
|
|
79
|
+
"$ref": "#/$defs/Resource",
|
|
80
|
+
"description": "Only rights on this resource or inside it. Absent: every resource."
|
|
81
|
+
},
|
|
82
|
+
"subject": {
|
|
83
|
+
"$ref": "#/$defs/Did",
|
|
84
|
+
"description": "Only rights held by this DID. Absent: every subject."
|
|
85
|
+
},
|
|
86
|
+
"cursor": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"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."
|
|
89
|
+
},
|
|
90
|
+
"limit": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"minimum": 1,
|
|
93
|
+
"maximum": 500,
|
|
94
|
+
"description": "Maximum rows to return in this page. A VTC clamps to 1..=500 (default 100)."
|
|
95
|
+
},
|
|
96
|
+
"ext": {
|
|
97
|
+
"$ref": "#/$defs/Ext"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"$defs": {
|
|
101
|
+
"Response": {
|
|
102
|
+
"$anchor": "response",
|
|
103
|
+
"title": "Git Namespaces — List Rights — response payload",
|
|
104
|
+
"description": "The matching rows, ordered by resource then subject.",
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": [
|
|
108
|
+
"rights"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"rights": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"$ref": "#/$defs/AdminRightRow"
|
|
115
|
+
},
|
|
116
|
+
"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."
|
|
117
|
+
},
|
|
118
|
+
"nextCursor": {
|
|
119
|
+
"type": [
|
|
120
|
+
"string",
|
|
121
|
+
"null"
|
|
122
|
+
],
|
|
123
|
+
"description": "Continuation token for the next page, or `null` when this is the last."
|
|
124
|
+
},
|
|
125
|
+
"ext": {
|
|
126
|
+
"$ref": "#/$defs/Ext"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"Ext": {
|
|
131
|
+
"title": "Ext",
|
|
132
|
+
"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.",
|
|
133
|
+
"type": "object",
|
|
134
|
+
"minProperties": 1,
|
|
135
|
+
"additionalProperties": true,
|
|
136
|
+
"propertyNames": {
|
|
137
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"AdminRightRow": {
|
|
141
|
+
"title": "AdminRightRow",
|
|
142
|
+
"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.",
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": [
|
|
146
|
+
"subject",
|
|
147
|
+
"right",
|
|
148
|
+
"resource",
|
|
149
|
+
"origin",
|
|
150
|
+
"subjectMember",
|
|
151
|
+
"granterDeparted"
|
|
152
|
+
],
|
|
153
|
+
"properties": {
|
|
154
|
+
"subject": {
|
|
155
|
+
"$ref": "#/$defs/Did",
|
|
156
|
+
"description": "Who holds the right."
|
|
157
|
+
},
|
|
158
|
+
"right": {
|
|
159
|
+
"$ref": "#/$defs/Right"
|
|
160
|
+
},
|
|
161
|
+
"resource": {
|
|
162
|
+
"$ref": "#/$defs/Resource"
|
|
163
|
+
},
|
|
164
|
+
"origin": {
|
|
165
|
+
"$ref": "#/$defs/RightOrigin"
|
|
166
|
+
},
|
|
167
|
+
"grantedBy": {
|
|
168
|
+
"$ref": "#/$defs/Did",
|
|
169
|
+
"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."
|
|
170
|
+
},
|
|
171
|
+
"grantedAt": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"format": "date-time",
|
|
174
|
+
"description": "Present exactly when `origin` is `recorded`."
|
|
175
|
+
},
|
|
176
|
+
"expiresAt": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"format": "date-time",
|
|
179
|
+
"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`)."
|
|
180
|
+
},
|
|
181
|
+
"reason": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"maxLength": 1024,
|
|
184
|
+
"description": "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none."
|
|
185
|
+
},
|
|
186
|
+
"subjectMember": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"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."
|
|
189
|
+
},
|
|
190
|
+
"granterDeparted": {
|
|
191
|
+
"type": "boolean",
|
|
192
|
+
"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)."
|
|
193
|
+
},
|
|
194
|
+
"breakGlass": {
|
|
195
|
+
"$ref": "#/$defs/BreakGlass",
|
|
196
|
+
"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."
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"BreakGlass": {
|
|
201
|
+
"title": "BreakGlass",
|
|
202
|
+
"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.",
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"required": [
|
|
206
|
+
"by",
|
|
207
|
+
"at",
|
|
208
|
+
"justification"
|
|
209
|
+
],
|
|
210
|
+
"properties": {
|
|
211
|
+
"by": {
|
|
212
|
+
"$ref": "#/$defs/Did",
|
|
213
|
+
"description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
|
|
214
|
+
},
|
|
215
|
+
"at": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"format": "date-time",
|
|
218
|
+
"description": "When the VTC recorded the break-glass."
|
|
219
|
+
},
|
|
220
|
+
"justification": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 1,
|
|
223
|
+
"maxLength": 2048,
|
|
224
|
+
"pattern": "\\S",
|
|
225
|
+
"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
|
+
"effectiveAt": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"format": "date-time",
|
|
230
|
+
"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
|
+
"ratifiedBy": {
|
|
233
|
+
"$ref": "#/$defs/Did",
|
|
234
|
+
"description": "The administrator who ratified the record — never its subject. Absent while unratified."
|
|
235
|
+
},
|
|
236
|
+
"ratifiedAt": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"format": "date-time",
|
|
239
|
+
"description": "When it was ratified. Present exactly when `ratifiedBy` is."
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"Did": {
|
|
244
|
+
"title": "Did",
|
|
245
|
+
"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
|
+
"type": "string",
|
|
247
|
+
"maxLength": 2048,
|
|
248
|
+
"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
|
+
"RightOrigin": {
|
|
251
|
+
"title": "RightOrigin",
|
|
252
|
+
"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
|
+
"type": "string",
|
|
254
|
+
"enum": [
|
|
255
|
+
"recorded",
|
|
256
|
+
"roleDerived"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"Resource": {
|
|
260
|
+
"title": "Resource",
|
|
261
|
+
"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`.",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"maxLength": 455,
|
|
264
|
+
"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}$"
|
|
265
|
+
},
|
|
266
|
+
"Right": {
|
|
267
|
+
"title": "Right",
|
|
268
|
+
"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.",
|
|
269
|
+
"type": "string",
|
|
270
|
+
"enum": [
|
|
271
|
+
"git.ns.admin",
|
|
272
|
+
"git.repo.create",
|
|
273
|
+
"git.repo.own",
|
|
274
|
+
"git.repo.maintain",
|
|
275
|
+
"git.commit.sign"
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
} as const;
|
|
280
|
+
|
|
281
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
282
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
283
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
284
|
+
"$ref": "#/$defs/Response",
|
|
285
|
+
"$defs": {
|
|
286
|
+
"Response": {
|
|
287
|
+
"$anchor": "response",
|
|
288
|
+
"title": "Git Namespaces — List Rights — response payload",
|
|
289
|
+
"description": "The matching rows, ordered by resource then subject.",
|
|
290
|
+
"type": "object",
|
|
291
|
+
"additionalProperties": false,
|
|
292
|
+
"required": [
|
|
293
|
+
"rights"
|
|
294
|
+
],
|
|
295
|
+
"properties": {
|
|
296
|
+
"rights": {
|
|
297
|
+
"type": "array",
|
|
298
|
+
"items": {
|
|
299
|
+
"$ref": "#/$defs/AdminRightRow"
|
|
300
|
+
},
|
|
301
|
+
"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."
|
|
302
|
+
},
|
|
303
|
+
"nextCursor": {
|
|
304
|
+
"type": [
|
|
305
|
+
"string",
|
|
306
|
+
"null"
|
|
307
|
+
],
|
|
308
|
+
"description": "Continuation token for the next page, or `null` when this is the last."
|
|
309
|
+
},
|
|
310
|
+
"ext": {
|
|
311
|
+
"$ref": "#/$defs/Ext"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"Ext": {
|
|
316
|
+
"title": "Ext",
|
|
317
|
+
"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.",
|
|
318
|
+
"type": "object",
|
|
319
|
+
"minProperties": 1,
|
|
320
|
+
"additionalProperties": true,
|
|
321
|
+
"propertyNames": {
|
|
322
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"AdminRightRow": {
|
|
326
|
+
"title": "AdminRightRow",
|
|
327
|
+
"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.",
|
|
328
|
+
"type": "object",
|
|
329
|
+
"additionalProperties": false,
|
|
330
|
+
"required": [
|
|
331
|
+
"subject",
|
|
332
|
+
"right",
|
|
333
|
+
"resource",
|
|
334
|
+
"origin",
|
|
335
|
+
"subjectMember",
|
|
336
|
+
"granterDeparted"
|
|
337
|
+
],
|
|
338
|
+
"properties": {
|
|
339
|
+
"subject": {
|
|
340
|
+
"$ref": "#/$defs/Did",
|
|
341
|
+
"description": "Who holds the right."
|
|
342
|
+
},
|
|
343
|
+
"right": {
|
|
344
|
+
"$ref": "#/$defs/Right"
|
|
345
|
+
},
|
|
346
|
+
"resource": {
|
|
347
|
+
"$ref": "#/$defs/Resource"
|
|
348
|
+
},
|
|
349
|
+
"origin": {
|
|
350
|
+
"$ref": "#/$defs/RightOrigin"
|
|
351
|
+
},
|
|
352
|
+
"grantedBy": {
|
|
353
|
+
"$ref": "#/$defs/Did",
|
|
354
|
+
"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."
|
|
355
|
+
},
|
|
356
|
+
"grantedAt": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"format": "date-time",
|
|
359
|
+
"description": "Present exactly when `origin` is `recorded`."
|
|
360
|
+
},
|
|
361
|
+
"expiresAt": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"format": "date-time",
|
|
364
|
+
"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`)."
|
|
365
|
+
},
|
|
366
|
+
"reason": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"maxLength": 1024,
|
|
369
|
+
"description": "The granter's free-text reason, restated from the `RightRecord`. Absent when `origin` is `roleDerived`, or the record carries none."
|
|
370
|
+
},
|
|
371
|
+
"subjectMember": {
|
|
372
|
+
"type": "boolean",
|
|
373
|
+
"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."
|
|
374
|
+
},
|
|
375
|
+
"granterDeparted": {
|
|
376
|
+
"type": "boolean",
|
|
377
|
+
"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)."
|
|
378
|
+
},
|
|
379
|
+
"breakGlass": {
|
|
380
|
+
"$ref": "#/$defs/BreakGlass",
|
|
381
|
+
"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."
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"BreakGlass": {
|
|
386
|
+
"title": "BreakGlass",
|
|
387
|
+
"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.",
|
|
388
|
+
"type": "object",
|
|
389
|
+
"additionalProperties": false,
|
|
390
|
+
"required": [
|
|
391
|
+
"by",
|
|
392
|
+
"at",
|
|
393
|
+
"justification"
|
|
394
|
+
],
|
|
395
|
+
"properties": {
|
|
396
|
+
"by": {
|
|
397
|
+
"$ref": "#/$defs/Did",
|
|
398
|
+
"description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
|
|
399
|
+
},
|
|
400
|
+
"at": {
|
|
401
|
+
"type": "string",
|
|
402
|
+
"format": "date-time",
|
|
403
|
+
"description": "When the VTC recorded the break-glass."
|
|
404
|
+
},
|
|
405
|
+
"justification": {
|
|
406
|
+
"type": "string",
|
|
407
|
+
"minLength": 1,
|
|
408
|
+
"maxLength": 2048,
|
|
409
|
+
"pattern": "\\S",
|
|
410
|
+
"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."
|
|
411
|
+
},
|
|
412
|
+
"effectiveAt": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"format": "date-time",
|
|
415
|
+
"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."
|
|
416
|
+
},
|
|
417
|
+
"ratifiedBy": {
|
|
418
|
+
"$ref": "#/$defs/Did",
|
|
419
|
+
"description": "The administrator who ratified the record — never its subject. Absent while unratified."
|
|
420
|
+
},
|
|
421
|
+
"ratifiedAt": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"format": "date-time",
|
|
424
|
+
"description": "When it was ratified. Present exactly when `ratifiedBy` is."
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"Did": {
|
|
429
|
+
"title": "Did",
|
|
430
|
+
"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.",
|
|
431
|
+
"type": "string",
|
|
432
|
+
"maxLength": 2048,
|
|
433
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
434
|
+
},
|
|
435
|
+
"RightOrigin": {
|
|
436
|
+
"title": "RightOrigin",
|
|
437
|
+
"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.",
|
|
438
|
+
"type": "string",
|
|
439
|
+
"enum": [
|
|
440
|
+
"recorded",
|
|
441
|
+
"roleDerived"
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
"Resource": {
|
|
445
|
+
"title": "Resource",
|
|
446
|
+
"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`.",
|
|
447
|
+
"type": "string",
|
|
448
|
+
"maxLength": 455,
|
|
449
|
+
"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}$"
|
|
450
|
+
},
|
|
451
|
+
"Right": {
|
|
452
|
+
"title": "Right",
|
|
453
|
+
"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.",
|
|
454
|
+
"type": "string",
|
|
455
|
+
"enum": [
|
|
456
|
+
"git.ns.admin",
|
|
457
|
+
"git.repo.create",
|
|
458
|
+
"git.repo.own",
|
|
459
|
+
"git.repo.maintain",
|
|
460
|
+
"git.commit.sign"
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
} as const;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
468
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
469
|
+
* per-specification and cannot be derived from the document alone, and
|
|
470
|
+
* item 2 needs the schema this carries.
|
|
471
|
+
*/
|
|
472
|
+
export const SPEC = {
|
|
473
|
+
typeUri: TYPE_URI,
|
|
474
|
+
isBearer: false,
|
|
475
|
+
isProofRequired: true,
|
|
476
|
+
isRecipientRequired: true,
|
|
477
|
+
isIssuedAtRequired: false,
|
|
478
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
479
|
+
} as const;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
483
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
484
|
+
* parties (§7.3 item 5).
|
|
485
|
+
*/
|
|
486
|
+
export const RESPONSE_SPEC = {
|
|
487
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
488
|
+
isBearer: false,
|
|
489
|
+
isProofRequired: true,
|
|
490
|
+
isRecipientRequired: true,
|
|
491
|
+
isIssuedAtRequired: false,
|
|
492
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
493
|
+
} as const;
|
package/src/index.ts
CHANGED
|
@@ -31,8 +31,10 @@ export * as SigningKeyShared_v0_1 from "./auth/_shared/0.1/signing-key.js";
|
|
|
31
31
|
export * as TokensShared_v0_1 from "./auth/_shared/0.1/tokens.js";
|
|
32
32
|
export * as WebauthnShared_v0_1 from "./auth/_shared/0.1/webauthn.js";
|
|
33
33
|
export * as SessionShared_v0_2 from "./auth/_shared/0.2/session.js";
|
|
34
|
+
export * as SessionShared_v0_3 from "./auth/_shared/0.3/session.js";
|
|
34
35
|
export * as AuthAuthenticate_v0_1 from "./auth/authenticate/0.1/payload.js";
|
|
35
36
|
export * as AuthAuthenticate_v0_2 from "./auth/authenticate/0.2/payload.js";
|
|
37
|
+
export * as AuthAuthenticate_v0_3 from "./auth/authenticate/0.3/payload.js";
|
|
36
38
|
export * as AuthChallenge_v0_1 from "./auth/challenge/0.1/payload.js";
|
|
37
39
|
export * as AuthPasskeyAdminList_v0_1 from "./auth/passkey/admin-list/0.1/payload.js";
|
|
38
40
|
export * as AuthPasskeyEnrollFinish_v0_1 from "./auth/passkey/enroll/finish/0.1/payload.js";
|
|
@@ -56,6 +58,7 @@ export * as AuthPasskeyRevokeFinish_v0_2 from "./auth/passkey/revoke/finish/0.2/
|
|
|
56
58
|
export * as AuthPasskeyRevokeStart_v0_1 from "./auth/passkey/revoke/start/0.1/payload.js";
|
|
57
59
|
export * as AuthPasskeyRevokeStart_v0_2 from "./auth/passkey/revoke/start/0.2/payload.js";
|
|
58
60
|
export * as AuthRefresh_v0_1 from "./auth/refresh/0.1/payload.js";
|
|
61
|
+
export * as AuthRefresh_v0_2 from "./auth/refresh/0.2/payload.js";
|
|
59
62
|
export * as AuthRevokeSession_v0_1 from "./auth/revoke-session/0.1/payload.js";
|
|
60
63
|
export * as AuthRevokeSession_v0_2 from "./auth/revoke-session/0.2/payload.js";
|
|
61
64
|
export * as AuthSessionsList_v0_1 from "./auth/sessions/list/0.1/payload.js";
|
|
@@ -183,9 +186,12 @@ export * as GitNsShared_v0_1 from "./git-ns/_shared/0.1/git-ns.js";
|
|
|
183
186
|
export * as GitNsShared_v0_2 from "./git-ns/_shared/0.2/git-ns.js";
|
|
184
187
|
export * as GitNsShared_v0_3 from "./git-ns/_shared/0.3/git-ns.js";
|
|
185
188
|
export * as GitNsShared_v0_4 from "./git-ns/_shared/0.4/git-ns.js";
|
|
189
|
+
export * as GitNsShared_v0_5 from "./git-ns/_shared/0.5/git-ns.js";
|
|
186
190
|
export * as GitNsAccountLinkStatus_v0_1 from "./git-ns/account/link-status/0.1/payload.js";
|
|
187
191
|
export * as GitNsAccountLink_v0_1 from "./git-ns/account/link/0.1/payload.js";
|
|
192
|
+
export * as GitNsAccountList_v0_1 from "./git-ns/account/list/0.1/payload.js";
|
|
188
193
|
export * as GitNsAccountUnlink_v0_1 from "./git-ns/account/unlink/0.1/payload.js";
|
|
194
|
+
export * as GitNsActivityList_v0_1 from "./git-ns/activity/list/0.1/payload.js";
|
|
189
195
|
export * as GitNsBridgeEvent_v0_1 from "./git-ns/bridge/event/0.1/payload.js";
|
|
190
196
|
export * as GitNsBridgeEvent_v0_2 from "./git-ns/bridge/event/0.2/payload.js";
|
|
191
197
|
export * as GitNsBridgeEvent_v0_3 from "./git-ns/bridge/event/0.3/payload.js";
|
|
@@ -193,6 +199,7 @@ export * as GitNsBridgeJob_v0_1 from "./git-ns/bridge/job/0.1/payload.js";
|
|
|
193
199
|
export * as GitNsBridgeJob_v0_2 from "./git-ns/bridge/job/0.2/payload.js";
|
|
194
200
|
export * as GitNsBridgeJob_v0_3 from "./git-ns/bridge/job/0.3/payload.js";
|
|
195
201
|
export * as GitNsBridgeJob_v0_4 from "./git-ns/bridge/job/0.4/payload.js";
|
|
202
|
+
export * as GitNsBridgeJobList_v0_1 from "./git-ns/bridge/job/list/0.1/payload.js";
|
|
196
203
|
export * as GitNsBridgeResult_v0_1 from "./git-ns/bridge/result/0.1/payload.js";
|
|
197
204
|
export * as GitNsDriftResolve_v0_1 from "./git-ns/drift/resolve/0.1/payload.js";
|
|
198
205
|
export * as GitNsDriftResolve_v0_2 from "./git-ns/drift/resolve/0.2/payload.js";
|
|
@@ -203,6 +210,7 @@ export * as GitNsNamespaceReseat_v0_1 from "./git-ns/namespace/reseat/0.1/payloa
|
|
|
203
210
|
export * as GitNsNamespaceReseat_v0_2 from "./git-ns/namespace/reseat/0.2/payload.js";
|
|
204
211
|
export * as GitNsNamespaceReseat_v0_3 from "./git-ns/namespace/reseat/0.3/payload.js";
|
|
205
212
|
export * as GitNsNamespaceUnbind_v0_1 from "./git-ns/namespace/unbind/0.1/payload.js";
|
|
213
|
+
export * as GitNsProjectionShow_v0_1 from "./git-ns/projection/show/0.1/payload.js";
|
|
206
214
|
export * as GitNsRepoAdopt_v0_1 from "./git-ns/repo/adopt/0.1/payload.js";
|
|
207
215
|
export * as GitNsRepoAdopt_v0_2 from "./git-ns/repo/adopt/0.2/payload.js";
|
|
208
216
|
export * as GitNsRepoArchive_v0_1 from "./git-ns/repo/archive/0.1/payload.js";
|
|
@@ -218,6 +226,8 @@ export * as GitNsRightBreakGlass_v0_1 from "./git-ns/right/break-glass/0.1/paylo
|
|
|
218
226
|
export * as GitNsRightGrant_v0_1 from "./git-ns/right/grant/0.1/payload.js";
|
|
219
227
|
export * as GitNsRightGrant_v0_2 from "./git-ns/right/grant/0.2/payload.js";
|
|
220
228
|
export * as GitNsRightGrant_v0_3 from "./git-ns/right/grant/0.3/payload.js";
|
|
229
|
+
export * as GitNsRightIssuedByDeparted_v0_1 from "./git-ns/right/issued-by-departed/0.1/payload.js";
|
|
230
|
+
export * as GitNsRightList_v0_1 from "./git-ns/right/list/0.1/payload.js";
|
|
221
231
|
export * as GitNsRightRatify_v0_1 from "./git-ns/right/ratify/0.1/payload.js";
|
|
222
232
|
export * as GitNsRightRevoke_v0_1 from "./git-ns/right/revoke/0.1/payload.js";
|
|
223
233
|
export * as GitNsRightRevoke_v0_2 from "./git-ns/right/revoke/0.2/payload.js";
|
|
@@ -502,6 +512,7 @@ export * as VtaContextsList_v1_0 from "./vta/contexts/list/1.0/payload.js";
|
|
|
502
512
|
export * as VtaContextsPreviewDelete_v1_0 from "./vta/contexts/preview-delete/1.0/payload.js";
|
|
503
513
|
export * as VtaContextsSecrets_v1_0 from "./vta/contexts/secrets/1.0/payload.js";
|
|
504
514
|
export * as VtaContextsUpdateDid_v1_0 from "./vta/contexts/update-did/1.0/payload.js";
|
|
515
|
+
export * as VtaContextsUpdateDid_v1_1 from "./vta/contexts/update-did/1.1/payload.js";
|
|
505
516
|
export * as VtaContextsUpdate_v1_0 from "./vta/contexts/update/1.0/payload.js";
|
|
506
517
|
export * as VtaCredentialsIssue_v0_1 from "./vta/credentials/issue/0.1/payload.js";
|
|
507
518
|
export * as VtaCredentialsIssue_v0_2 from "./vta/credentials/issue/0.2/payload.js";
|