@openvtc/trust-tasks 0.20.6 → 0.20.7
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 +51 -0
- package/dist/_shared/components.d.ts +55 -6
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/git-ns/_shared/0.1/git-ns.d.ts +1 -1
- package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -1
- package/dist/git-ns/_shared/0.2/git-ns.d.ts +1 -1
- package/dist/git-ns/_shared/0.2/git-ns.d.ts.map +1 -1
- package/dist/git-ns/_shared/0.3/git-ns.d.ts +16 -0
- package/dist/git-ns/_shared/0.3/git-ns.d.ts.map +1 -0
- package/dist/git-ns/_shared/0.3/git-ns.js +6 -0
- package/dist/git-ns/_shared/0.3/git-ns.js.map +1 -0
- package/dist/git-ns/bridge/job/0.1/payload.d.ts +1 -1
- package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/bridge/job/0.2/payload.d.ts +1 -1
- package/dist/git-ns/bridge/job/0.2/payload.d.ts.map +1 -1
- package/dist/git-ns/bridge/job/0.3/payload.d.ts +1068 -0
- package/dist/git-ns/bridge/job/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/0.3/payload.js +573 -0
- package/dist/git-ns/bridge/job/0.3/payload.js.map +1 -0
- package/dist/git-ns/drift/resolve/0.1/payload.d.ts +1 -1
- package/dist/git-ns/drift/resolve/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/drift/resolve/0.2/payload.d.ts +1060 -0
- package/dist/git-ns/drift/resolve/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/drift/resolve/0.2/payload.js +630 -0
- package/dist/git-ns/drift/resolve/0.2/payload.js.map +1 -0
- package/dist/git-ns/namespace/reseat/0.1/payload.d.ts +1 -1
- package/dist/git-ns/namespace/reseat/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/namespace/reseat/0.2/payload.d.ts +515 -0
- package/dist/git-ns/namespace/reseat/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/reseat/0.2/payload.js +296 -0
- package/dist/git-ns/namespace/reseat/0.2/payload.js.map +1 -0
- package/dist/git-ns/repo/adopt/0.1/payload.d.ts +1 -1
- package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/repo/adopt/0.2/payload.d.ts +962 -0
- package/dist/git-ns/repo/adopt/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/adopt/0.2/payload.js +583 -0
- package/dist/git-ns/repo/adopt/0.2/payload.js.map +1 -0
- package/dist/git-ns/repo/archive/0.1/payload.d.ts +1 -1
- package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/repo/archive/0.2/payload.d.ts +959 -0
- package/dist/git-ns/repo/archive/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/archive/0.2/payload.js +584 -0
- package/dist/git-ns/repo/archive/0.2/payload.js.map +1 -0
- package/dist/git-ns/repo/create/0.1/payload.d.ts +1 -1
- package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/repo/create/0.2/payload.d.ts +1074 -0
- package/dist/git-ns/repo/create/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/create/0.2/payload.js +636 -0
- package/dist/git-ns/repo/create/0.2/payload.js.map +1 -0
- package/dist/git-ns/repo/transfer/0.1/payload.d.ts +1 -1
- package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/repo/transfer/0.2/payload.d.ts +947 -0
- package/dist/git-ns/repo/transfer/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/transfer/0.2/payload.js +577 -0
- package/dist/git-ns/repo/transfer/0.2/payload.js.map +1 -0
- package/dist/git-ns/right/grant/0.1/payload.d.ts +1 -1
- package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/right/grant/0.2/payload.d.ts +506 -0
- package/dist/git-ns/right/grant/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/right/grant/0.2/payload.js +289 -0
- package/dist/git-ns/right/grant/0.2/payload.js.map +1 -0
- package/dist/git-ns/right/revoke/0.1/payload.d.ts +1 -1
- package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/right/revoke/0.2/payload.d.ts +492 -0
- package/dist/git-ns/right/revoke/0.2/payload.d.ts.map +1 -0
- package/dist/git-ns/right/revoke/0.2/payload.js +284 -0
- package/dist/git-ns/right/revoke/0.2/payload.js.map +1 -0
- package/dist/git-ns/view/0.1/payload.d.ts +1 -1
- package/dist/git-ns/view/0.1/payload.d.ts.map +1 -1
- package/dist/git-ns/view/0.2/payload.d.ts +1 -1
- package/dist/git-ns/view/0.2/payload.d.ts.map +1 -1
- package/dist/git-ns/view/0.3/payload.d.ts +1524 -0
- package/dist/git-ns/view/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/view/0.3/payload.js +918 -0
- package/dist/git-ns/view/0.3/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/package.json +1 -1
- package/src/_shared/components.ts +55 -6
- package/src/git-ns/_shared/0.1/git-ns.ts +1 -1
- package/src/git-ns/_shared/0.2/git-ns.ts +1 -1
- package/src/git-ns/_shared/0.3/git-ns.ts +17 -0
- package/src/git-ns/bridge/job/0.1/payload.ts +1 -1
- package/src/git-ns/bridge/job/0.2/payload.ts +1 -1
- package/src/git-ns/bridge/job/0.3/payload.ts +691 -0
- package/src/git-ns/drift/resolve/0.1/payload.ts +1 -1
- package/src/git-ns/drift/resolve/0.2/payload.ts +699 -0
- package/src/git-ns/namespace/reseat/0.1/payload.ts +1 -1
- package/src/git-ns/namespace/reseat/0.2/payload.ts +342 -0
- package/src/git-ns/repo/adopt/0.1/payload.ts +1 -1
- package/src/git-ns/repo/adopt/0.2/payload.ts +628 -0
- package/src/git-ns/repo/archive/0.1/payload.ts +1 -1
- package/src/git-ns/repo/archive/0.2/payload.ts +626 -0
- package/src/git-ns/repo/create/0.1/payload.ts +1 -1
- package/src/git-ns/repo/create/0.2/payload.ts +689 -0
- package/src/git-ns/repo/transfer/0.1/payload.ts +1 -1
- package/src/git-ns/repo/transfer/0.2/payload.ts +619 -0
- package/src/git-ns/right/grant/0.1/payload.ts +1 -1
- package/src/git-ns/right/grant/0.2/payload.ts +340 -0
- package/src/git-ns/right/revoke/0.1/payload.ts +1 -1
- package/src/git-ns/right/revoke/0.2/payload.ts +331 -0
- package/src/git-ns/view/0.1/payload.ts +1 -1
- package/src/git-ns/view/0.2/payload.ts +1 -1
- package/src/git-ns/view/0.3/payload.ts +981 -0
- package/src/index.ts +11 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/git-ns/drift/resolve/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Did_GitNsV0_3 as Did, DriftItem, DriftType, Ext, ForgeAccount, ForgeHost, ForgeId, RepoResource, Resource, Right, RightRecord_GitNsV0_3 as RightRecord, Sync } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An owner of a repository, or a namespace admin over it, resolves one reported drift item: `adopt` records the forge-side role as a VTC right, under the same rules as git-ns/right/grant; `revert` has the bridge undo the forge-side change.
|
|
11
|
+
*/
|
|
12
|
+
export interface GitNamespacesResolveDriftPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The repository whose drift is resolved.
|
|
15
|
+
*/
|
|
16
|
+
resource: RepoResource;
|
|
17
|
+
drift: DriftSelector;
|
|
18
|
+
/**
|
|
19
|
+
* `adopt` — record the forge-side role as a VTC right, so the projection comes to match the forge. `revert` — have the bridge make the forge match the projection again.
|
|
20
|
+
*/
|
|
21
|
+
action: "adopt" | "revert";
|
|
22
|
+
/**
|
|
23
|
+
* Why, in the resolver's words. Kept in the VTC's audit record and, for `adopt`, as the recorded right's `reason`, disclosed only to the repository's owners and namespace admins.
|
|
24
|
+
*/
|
|
25
|
+
reason?: string;
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Which of the repository's outstanding drift items to resolve. Drift items carry no identifier of their own: they are recomputed by the bridge and replaced wholesale by every git-ns/bridge/event. An item is selected by its `type`, and for the three role types also by the account whose role differs, which is unique among a repository's outstanding items.
|
|
30
|
+
*/
|
|
31
|
+
export interface DriftSelector {
|
|
32
|
+
type: DriftType;
|
|
33
|
+
/**
|
|
34
|
+
* The account whose role differs, as the drift item reports it. Required for `roleAdded`, `roleRemoved` and `roleChanged`, and absent for every other type. Matched by `forge` and `id`; `login` is display only.
|
|
35
|
+
*/
|
|
36
|
+
account?: ForgeAccount;
|
|
37
|
+
/**
|
|
38
|
+
* The item's `observed` value as the caller last read it. When present, the item is selected only if the forge still shows exactly this, so a decision made about one state is never applied to another. Required for `adopt`.
|
|
39
|
+
*/
|
|
40
|
+
observed?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* What the resolution did, and where the repository's sync now stands.
|
|
44
|
+
*/
|
|
45
|
+
export interface GitNamespacesResolveDriftResponsePayload {
|
|
46
|
+
/**
|
|
47
|
+
* The action taken, as requested.
|
|
48
|
+
*/
|
|
49
|
+
action: "adopt" | "revert";
|
|
50
|
+
/**
|
|
51
|
+
* For `adopt`: the recorded right — newly recorded, or the live record that already existed. Absent for `revert`.
|
|
52
|
+
*/
|
|
53
|
+
right?: RightRecord;
|
|
54
|
+
/**
|
|
55
|
+
* The repository's sync after the resolution. The resolved item is no longer outstanding; the state is `drift` while other items remain, and otherwise `pending` until the bridge confirms the forge matches.
|
|
56
|
+
*/
|
|
57
|
+
sync: Sync;
|
|
58
|
+
ext?: Ext;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
62
|
+
export type { Did, DriftItem, DriftType, Ext, ForgeAccount, ForgeHost, ForgeId, RepoResource, Resource, Right, RightRecord, Sync };
|
|
63
|
+
|
|
64
|
+
/** Trust Task type URI. */
|
|
65
|
+
export const TYPE_URI = "https://trusttasks.org/spec/git-ns/drift/resolve/0.2" as const;
|
|
66
|
+
|
|
67
|
+
/** Stable alias for this specification's request payload shape. */
|
|
68
|
+
export type Payload = GitNamespacesResolveDriftPayload;
|
|
69
|
+
|
|
70
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
71
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/drift/resolve/0.2#response" as const;
|
|
72
|
+
|
|
73
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
74
|
+
export type Response = GitNamespacesResolveDriftResponsePayload;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* This specification's payload schema, as a value.
|
|
78
|
+
*
|
|
79
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
80
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
81
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
82
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
83
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
84
|
+
*/
|
|
85
|
+
export const PAYLOAD_SCHEMA = {
|
|
86
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
87
|
+
"$id": "https://trusttasks.org/spec/git-ns/drift/resolve/0.2",
|
|
88
|
+
"title": "Git Namespaces — Resolve Drift — payload",
|
|
89
|
+
"description": "An owner of a repository, or a namespace admin over it, resolves one reported drift item: `adopt` records the forge-side role as a VTC right, under the same rules as git-ns/right/grant; `revert` has the bridge undo the forge-side change.",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"resource",
|
|
94
|
+
"drift",
|
|
95
|
+
"action"
|
|
96
|
+
],
|
|
97
|
+
"properties": {
|
|
98
|
+
"resource": {
|
|
99
|
+
"$ref": "#/$defs/RepoResource",
|
|
100
|
+
"description": "The repository whose drift is resolved."
|
|
101
|
+
},
|
|
102
|
+
"drift": {
|
|
103
|
+
"$ref": "#/$defs/DriftSelector"
|
|
104
|
+
},
|
|
105
|
+
"action": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"enum": [
|
|
108
|
+
"adopt",
|
|
109
|
+
"revert"
|
|
110
|
+
],
|
|
111
|
+
"description": "`adopt` — record the forge-side role as a VTC right, so the projection comes to match the forge. `revert` — have the bridge make the forge match the projection again."
|
|
112
|
+
},
|
|
113
|
+
"reason": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"maxLength": 1024,
|
|
116
|
+
"description": "Why, in the resolver's words. Kept in the VTC's audit record and, for `adopt`, as the recorded right's `reason`, disclosed only to the repository's owners and namespace admins."
|
|
117
|
+
},
|
|
118
|
+
"ext": {
|
|
119
|
+
"$ref": "#/$defs/Ext"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"$defs": {
|
|
123
|
+
"DriftSelector": {
|
|
124
|
+
"title": "DriftSelector",
|
|
125
|
+
"description": "Which of the repository's outstanding drift items to resolve. Drift items carry no identifier of their own: they are recomputed by the bridge and replaced wholesale by every git-ns/bridge/event. An item is selected by its `type`, and for the three role types also by the account whose role differs, which is unique among a repository's outstanding items.",
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"required": [
|
|
129
|
+
"type"
|
|
130
|
+
],
|
|
131
|
+
"properties": {
|
|
132
|
+
"type": {
|
|
133
|
+
"$ref": "#/$defs/DriftType"
|
|
134
|
+
},
|
|
135
|
+
"account": {
|
|
136
|
+
"$ref": "#/$defs/ForgeAccount",
|
|
137
|
+
"description": "The account whose role differs, as the drift item reports it. Required for `roleAdded`, `roleRemoved` and `roleChanged`, and absent for every other type. Matched by `forge` and `id`; `login` is display only."
|
|
138
|
+
},
|
|
139
|
+
"observed": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"maxLength": 256,
|
|
142
|
+
"description": "The item's `observed` value as the caller last read it. When present, the item is selected only if the forge still shows exactly this, so a decision made about one state is never applied to another. Required for `adopt`."
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"Response": {
|
|
147
|
+
"$anchor": "response",
|
|
148
|
+
"title": "Git Namespaces — Resolve Drift — response payload",
|
|
149
|
+
"description": "What the resolution did, and where the repository's sync now stands.",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"required": [
|
|
153
|
+
"action",
|
|
154
|
+
"sync"
|
|
155
|
+
],
|
|
156
|
+
"properties": {
|
|
157
|
+
"action": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"enum": [
|
|
160
|
+
"adopt",
|
|
161
|
+
"revert"
|
|
162
|
+
],
|
|
163
|
+
"description": "The action taken, as requested."
|
|
164
|
+
},
|
|
165
|
+
"right": {
|
|
166
|
+
"$ref": "#/$defs/RightRecord",
|
|
167
|
+
"description": "For `adopt`: the recorded right — newly recorded, or the live record that already existed. Absent for `revert`."
|
|
168
|
+
},
|
|
169
|
+
"sync": {
|
|
170
|
+
"$ref": "#/$defs/Sync",
|
|
171
|
+
"description": "The repository's sync after the resolution. The resolved item is no longer outstanding; the state is `drift` while other items remain, and otherwise `pending` until the bridge confirms the forge matches."
|
|
172
|
+
},
|
|
173
|
+
"ext": {
|
|
174
|
+
"$ref": "#/$defs/Ext"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"Ext": {
|
|
179
|
+
"title": "Ext",
|
|
180
|
+
"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.",
|
|
181
|
+
"type": "object",
|
|
182
|
+
"minProperties": 1,
|
|
183
|
+
"additionalProperties": true,
|
|
184
|
+
"propertyNames": {
|
|
185
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"Sync": {
|
|
189
|
+
"title": "Sync",
|
|
190
|
+
"description": "How the forge compares with the VTC's projection for one repository.",
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": [
|
|
194
|
+
"state",
|
|
195
|
+
"drift"
|
|
196
|
+
],
|
|
197
|
+
"properties": {
|
|
198
|
+
"state": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"enum": [
|
|
201
|
+
"inSync",
|
|
202
|
+
"drift",
|
|
203
|
+
"pending",
|
|
204
|
+
"unchecked"
|
|
205
|
+
],
|
|
206
|
+
"description": "`inSync` — the last comparison found no drift. `drift` — it found some, listed in `drift`. `pending` — a change has been sent to the forge and not yet confirmed. `unchecked` — nothing compares this repository (a manual-mode namespace)."
|
|
207
|
+
},
|
|
208
|
+
"checkedAt": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"format": "date-time",
|
|
211
|
+
"description": "When the forge was last compared. Absent if never."
|
|
212
|
+
},
|
|
213
|
+
"drift": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"$ref": "#/$defs/DriftItem"
|
|
217
|
+
},
|
|
218
|
+
"description": "Outstanding drift. Empty unless `state` is `drift`."
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"DriftItem": {
|
|
223
|
+
"title": "DriftItem",
|
|
224
|
+
"description": "One difference between the forge's observed state and the VTC's projection of a repository.",
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"required": [
|
|
228
|
+
"type",
|
|
229
|
+
"resource"
|
|
230
|
+
],
|
|
231
|
+
"properties": {
|
|
232
|
+
"type": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"enum": [
|
|
235
|
+
"roleAdded",
|
|
236
|
+
"roleRemoved",
|
|
237
|
+
"roleChanged",
|
|
238
|
+
"requiredCheckMissing",
|
|
239
|
+
"protectionWeakened",
|
|
240
|
+
"bootstrapMissing"
|
|
241
|
+
],
|
|
242
|
+
"description": "`roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone."
|
|
243
|
+
},
|
|
244
|
+
"resource": {
|
|
245
|
+
"$ref": "#/$defs/RepoResource"
|
|
246
|
+
},
|
|
247
|
+
"account": {
|
|
248
|
+
"$ref": "#/$defs/ForgeAccount",
|
|
249
|
+
"description": "Whose role differs, for the three role types."
|
|
250
|
+
},
|
|
251
|
+
"observed": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"maxLength": 256,
|
|
254
|
+
"description": "What the forge shows, in the forge's own vocabulary (a role name such as `maintain`, a setting name). Absent when nothing is there."
|
|
255
|
+
},
|
|
256
|
+
"expected": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"maxLength": 256,
|
|
259
|
+
"description": "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing."
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"ForgeAccount": {
|
|
264
|
+
"title": "ForgeAccount",
|
|
265
|
+
"description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
|
|
266
|
+
"type": "object",
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"required": [
|
|
269
|
+
"forge",
|
|
270
|
+
"id",
|
|
271
|
+
"login"
|
|
272
|
+
],
|
|
273
|
+
"properties": {
|
|
274
|
+
"forge": {
|
|
275
|
+
"$ref": "#/$defs/ForgeHost"
|
|
276
|
+
},
|
|
277
|
+
"id": {
|
|
278
|
+
"$ref": "#/$defs/ForgeId"
|
|
279
|
+
},
|
|
280
|
+
"login": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"minLength": 1,
|
|
283
|
+
"maxLength": 100,
|
|
284
|
+
"description": "The account's current login, as the forge reported it when last seen. Display only."
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"ForgeId": {
|
|
289
|
+
"title": "ForgeId",
|
|
290
|
+
"description": "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.",
|
|
291
|
+
"type": "string",
|
|
292
|
+
"minLength": 1,
|
|
293
|
+
"maxLength": 64
|
|
294
|
+
},
|
|
295
|
+
"ForgeHost": {
|
|
296
|
+
"title": "ForgeHost",
|
|
297
|
+
"description": "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.",
|
|
298
|
+
"type": "string",
|
|
299
|
+
"minLength": 3,
|
|
300
|
+
"maxLength": 253,
|
|
301
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
|
|
302
|
+
},
|
|
303
|
+
"RepoResource": {
|
|
304
|
+
"title": "RepoResource",
|
|
305
|
+
"description": "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.",
|
|
306
|
+
"type": "string",
|
|
307
|
+
"maxLength": 455,
|
|
308
|
+
"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}/[a-z0-9_-][a-z0-9._-]{0,99}$"
|
|
309
|
+
},
|
|
310
|
+
"RightRecord": {
|
|
311
|
+
"title": "RightRecord",
|
|
312
|
+
"description": "One recorded right. Implied rights (§4.2 of the rights model: `own` implies `maintain` implies `commit.sign` on the same resource; `ns.admin` implies `repo.create` and `own` across its namespace) are not records and never appear as RightRecords.",
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"required": [
|
|
316
|
+
"subject",
|
|
317
|
+
"right",
|
|
318
|
+
"resource",
|
|
319
|
+
"grantedBy",
|
|
320
|
+
"grantedAt"
|
|
321
|
+
],
|
|
322
|
+
"properties": {
|
|
323
|
+
"subject": {
|
|
324
|
+
"$ref": "#/$defs/Did",
|
|
325
|
+
"description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
|
|
326
|
+
},
|
|
327
|
+
"right": {
|
|
328
|
+
"$ref": "#/$defs/Right"
|
|
329
|
+
},
|
|
330
|
+
"resource": {
|
|
331
|
+
"$ref": "#/$defs/Resource"
|
|
332
|
+
},
|
|
333
|
+
"grantedBy": {
|
|
334
|
+
"$ref": "#/$defs/Did",
|
|
335
|
+
"description": "The actor whose task caused the right: the granter, the creator of a repository (for its first `own`), the adopting admin, the transferring owner, or the binding admin (for the first `git.ns.admin`). The VTC's own DID for a right it derives from its configuration."
|
|
336
|
+
},
|
|
337
|
+
"grantedAt": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"format": "date-time"
|
|
340
|
+
},
|
|
341
|
+
"expiresAt": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"format": "date-time",
|
|
344
|
+
"description": "When the right lapses. Absent: no expiry."
|
|
345
|
+
},
|
|
346
|
+
"reason": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"maxLength": 1024,
|
|
349
|
+
"description": "The granter's free-text reason. Disclosed only to holders of `git.repo.own` on the resource and of `git.ns.admin` over it."
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"Did": {
|
|
354
|
+
"title": "Did",
|
|
355
|
+
"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.",
|
|
356
|
+
"type": "string",
|
|
357
|
+
"maxLength": 2048,
|
|
358
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
359
|
+
},
|
|
360
|
+
"Resource": {
|
|
361
|
+
"title": "Resource",
|
|
362
|
+
"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`.",
|
|
363
|
+
"type": "string",
|
|
364
|
+
"maxLength": 455,
|
|
365
|
+
"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}$"
|
|
366
|
+
},
|
|
367
|
+
"Right": {
|
|
368
|
+
"title": "Right",
|
|
369
|
+
"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.",
|
|
370
|
+
"type": "string",
|
|
371
|
+
"enum": [
|
|
372
|
+
"git.ns.admin",
|
|
373
|
+
"git.repo.create",
|
|
374
|
+
"git.repo.own",
|
|
375
|
+
"git.repo.maintain",
|
|
376
|
+
"git.commit.sign"
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
"DriftType": {
|
|
380
|
+
"title": "DriftType",
|
|
381
|
+
"type": "string",
|
|
382
|
+
"enum": [
|
|
383
|
+
"roleAdded",
|
|
384
|
+
"roleRemoved",
|
|
385
|
+
"roleChanged",
|
|
386
|
+
"requiredCheckMissing",
|
|
387
|
+
"protectionWeakened",
|
|
388
|
+
"bootstrapMissing"
|
|
389
|
+
],
|
|
390
|
+
"description": "The kinds of drift, named so that a task can select a drift item by kind. The same values, with the same meanings, as `DriftItem`'s `type`, which keeps its own inline list so that `DriftItem` stays textually identical to 0.1; the two lists change together. `roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone."
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
} as const;
|
|
394
|
+
|
|
395
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
396
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
397
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
398
|
+
"$ref": "#/$defs/Response",
|
|
399
|
+
"$defs": {
|
|
400
|
+
"DriftSelector": {
|
|
401
|
+
"title": "DriftSelector",
|
|
402
|
+
"description": "Which of the repository's outstanding drift items to resolve. Drift items carry no identifier of their own: they are recomputed by the bridge and replaced wholesale by every git-ns/bridge/event. An item is selected by its `type`, and for the three role types also by the account whose role differs, which is unique among a repository's outstanding items.",
|
|
403
|
+
"type": "object",
|
|
404
|
+
"additionalProperties": false,
|
|
405
|
+
"required": [
|
|
406
|
+
"type"
|
|
407
|
+
],
|
|
408
|
+
"properties": {
|
|
409
|
+
"type": {
|
|
410
|
+
"$ref": "#/$defs/DriftType"
|
|
411
|
+
},
|
|
412
|
+
"account": {
|
|
413
|
+
"$ref": "#/$defs/ForgeAccount",
|
|
414
|
+
"description": "The account whose role differs, as the drift item reports it. Required for `roleAdded`, `roleRemoved` and `roleChanged`, and absent for every other type. Matched by `forge` and `id`; `login` is display only."
|
|
415
|
+
},
|
|
416
|
+
"observed": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"maxLength": 256,
|
|
419
|
+
"description": "The item's `observed` value as the caller last read it. When present, the item is selected only if the forge still shows exactly this, so a decision made about one state is never applied to another. Required for `adopt`."
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"Response": {
|
|
424
|
+
"$anchor": "response",
|
|
425
|
+
"title": "Git Namespaces — Resolve Drift — response payload",
|
|
426
|
+
"description": "What the resolution did, and where the repository's sync now stands.",
|
|
427
|
+
"type": "object",
|
|
428
|
+
"additionalProperties": false,
|
|
429
|
+
"required": [
|
|
430
|
+
"action",
|
|
431
|
+
"sync"
|
|
432
|
+
],
|
|
433
|
+
"properties": {
|
|
434
|
+
"action": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"enum": [
|
|
437
|
+
"adopt",
|
|
438
|
+
"revert"
|
|
439
|
+
],
|
|
440
|
+
"description": "The action taken, as requested."
|
|
441
|
+
},
|
|
442
|
+
"right": {
|
|
443
|
+
"$ref": "#/$defs/RightRecord",
|
|
444
|
+
"description": "For `adopt`: the recorded right — newly recorded, or the live record that already existed. Absent for `revert`."
|
|
445
|
+
},
|
|
446
|
+
"sync": {
|
|
447
|
+
"$ref": "#/$defs/Sync",
|
|
448
|
+
"description": "The repository's sync after the resolution. The resolved item is no longer outstanding; the state is `drift` while other items remain, and otherwise `pending` until the bridge confirms the forge matches."
|
|
449
|
+
},
|
|
450
|
+
"ext": {
|
|
451
|
+
"$ref": "#/$defs/Ext"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"Ext": {
|
|
456
|
+
"title": "Ext",
|
|
457
|
+
"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.",
|
|
458
|
+
"type": "object",
|
|
459
|
+
"minProperties": 1,
|
|
460
|
+
"additionalProperties": true,
|
|
461
|
+
"propertyNames": {
|
|
462
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"Sync": {
|
|
466
|
+
"title": "Sync",
|
|
467
|
+
"description": "How the forge compares with the VTC's projection for one repository.",
|
|
468
|
+
"type": "object",
|
|
469
|
+
"additionalProperties": false,
|
|
470
|
+
"required": [
|
|
471
|
+
"state",
|
|
472
|
+
"drift"
|
|
473
|
+
],
|
|
474
|
+
"properties": {
|
|
475
|
+
"state": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"enum": [
|
|
478
|
+
"inSync",
|
|
479
|
+
"drift",
|
|
480
|
+
"pending",
|
|
481
|
+
"unchecked"
|
|
482
|
+
],
|
|
483
|
+
"description": "`inSync` — the last comparison found no drift. `drift` — it found some, listed in `drift`. `pending` — a change has been sent to the forge and not yet confirmed. `unchecked` — nothing compares this repository (a manual-mode namespace)."
|
|
484
|
+
},
|
|
485
|
+
"checkedAt": {
|
|
486
|
+
"type": "string",
|
|
487
|
+
"format": "date-time",
|
|
488
|
+
"description": "When the forge was last compared. Absent if never."
|
|
489
|
+
},
|
|
490
|
+
"drift": {
|
|
491
|
+
"type": "array",
|
|
492
|
+
"items": {
|
|
493
|
+
"$ref": "#/$defs/DriftItem"
|
|
494
|
+
},
|
|
495
|
+
"description": "Outstanding drift. Empty unless `state` is `drift`."
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
"DriftItem": {
|
|
500
|
+
"title": "DriftItem",
|
|
501
|
+
"description": "One difference between the forge's observed state and the VTC's projection of a repository.",
|
|
502
|
+
"type": "object",
|
|
503
|
+
"additionalProperties": false,
|
|
504
|
+
"required": [
|
|
505
|
+
"type",
|
|
506
|
+
"resource"
|
|
507
|
+
],
|
|
508
|
+
"properties": {
|
|
509
|
+
"type": {
|
|
510
|
+
"type": "string",
|
|
511
|
+
"enum": [
|
|
512
|
+
"roleAdded",
|
|
513
|
+
"roleRemoved",
|
|
514
|
+
"roleChanged",
|
|
515
|
+
"requiredCheckMissing",
|
|
516
|
+
"protectionWeakened",
|
|
517
|
+
"bootstrapMissing"
|
|
518
|
+
],
|
|
519
|
+
"description": "`roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone."
|
|
520
|
+
},
|
|
521
|
+
"resource": {
|
|
522
|
+
"$ref": "#/$defs/RepoResource"
|
|
523
|
+
},
|
|
524
|
+
"account": {
|
|
525
|
+
"$ref": "#/$defs/ForgeAccount",
|
|
526
|
+
"description": "Whose role differs, for the three role types."
|
|
527
|
+
},
|
|
528
|
+
"observed": {
|
|
529
|
+
"type": "string",
|
|
530
|
+
"maxLength": 256,
|
|
531
|
+
"description": "What the forge shows, in the forge's own vocabulary (a role name such as `maintain`, a setting name). Absent when nothing is there."
|
|
532
|
+
},
|
|
533
|
+
"expected": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"maxLength": 256,
|
|
536
|
+
"description": "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing."
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"ForgeAccount": {
|
|
541
|
+
"title": "ForgeAccount",
|
|
542
|
+
"description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
|
|
543
|
+
"type": "object",
|
|
544
|
+
"additionalProperties": false,
|
|
545
|
+
"required": [
|
|
546
|
+
"forge",
|
|
547
|
+
"id",
|
|
548
|
+
"login"
|
|
549
|
+
],
|
|
550
|
+
"properties": {
|
|
551
|
+
"forge": {
|
|
552
|
+
"$ref": "#/$defs/ForgeHost"
|
|
553
|
+
},
|
|
554
|
+
"id": {
|
|
555
|
+
"$ref": "#/$defs/ForgeId"
|
|
556
|
+
},
|
|
557
|
+
"login": {
|
|
558
|
+
"type": "string",
|
|
559
|
+
"minLength": 1,
|
|
560
|
+
"maxLength": 100,
|
|
561
|
+
"description": "The account's current login, as the forge reported it when last seen. Display only."
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"ForgeId": {
|
|
566
|
+
"title": "ForgeId",
|
|
567
|
+
"description": "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.",
|
|
568
|
+
"type": "string",
|
|
569
|
+
"minLength": 1,
|
|
570
|
+
"maxLength": 64
|
|
571
|
+
},
|
|
572
|
+
"ForgeHost": {
|
|
573
|
+
"title": "ForgeHost",
|
|
574
|
+
"description": "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.",
|
|
575
|
+
"type": "string",
|
|
576
|
+
"minLength": 3,
|
|
577
|
+
"maxLength": 253,
|
|
578
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
|
|
579
|
+
},
|
|
580
|
+
"RepoResource": {
|
|
581
|
+
"title": "RepoResource",
|
|
582
|
+
"description": "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.",
|
|
583
|
+
"type": "string",
|
|
584
|
+
"maxLength": 455,
|
|
585
|
+
"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}/[a-z0-9_-][a-z0-9._-]{0,99}$"
|
|
586
|
+
},
|
|
587
|
+
"RightRecord": {
|
|
588
|
+
"title": "RightRecord",
|
|
589
|
+
"description": "One recorded right. Implied rights (§4.2 of the rights model: `own` implies `maintain` implies `commit.sign` on the same resource; `ns.admin` implies `repo.create` and `own` across its namespace) are not records and never appear as RightRecords.",
|
|
590
|
+
"type": "object",
|
|
591
|
+
"additionalProperties": false,
|
|
592
|
+
"required": [
|
|
593
|
+
"subject",
|
|
594
|
+
"right",
|
|
595
|
+
"resource",
|
|
596
|
+
"grantedBy",
|
|
597
|
+
"grantedAt"
|
|
598
|
+
],
|
|
599
|
+
"properties": {
|
|
600
|
+
"subject": {
|
|
601
|
+
"$ref": "#/$defs/Did",
|
|
602
|
+
"description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
|
|
603
|
+
},
|
|
604
|
+
"right": {
|
|
605
|
+
"$ref": "#/$defs/Right"
|
|
606
|
+
},
|
|
607
|
+
"resource": {
|
|
608
|
+
"$ref": "#/$defs/Resource"
|
|
609
|
+
},
|
|
610
|
+
"grantedBy": {
|
|
611
|
+
"$ref": "#/$defs/Did",
|
|
612
|
+
"description": "The actor whose task caused the right: the granter, the creator of a repository (for its first `own`), the adopting admin, the transferring owner, or the binding admin (for the first `git.ns.admin`). The VTC's own DID for a right it derives from its configuration."
|
|
613
|
+
},
|
|
614
|
+
"grantedAt": {
|
|
615
|
+
"type": "string",
|
|
616
|
+
"format": "date-time"
|
|
617
|
+
},
|
|
618
|
+
"expiresAt": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"format": "date-time",
|
|
621
|
+
"description": "When the right lapses. Absent: no expiry."
|
|
622
|
+
},
|
|
623
|
+
"reason": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"maxLength": 1024,
|
|
626
|
+
"description": "The granter's free-text reason. Disclosed only to holders of `git.repo.own` on the resource and of `git.ns.admin` over it."
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
"Did": {
|
|
631
|
+
"title": "Did",
|
|
632
|
+
"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.",
|
|
633
|
+
"type": "string",
|
|
634
|
+
"maxLength": 2048,
|
|
635
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
636
|
+
},
|
|
637
|
+
"Resource": {
|
|
638
|
+
"title": "Resource",
|
|
639
|
+
"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`.",
|
|
640
|
+
"type": "string",
|
|
641
|
+
"maxLength": 455,
|
|
642
|
+
"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}$"
|
|
643
|
+
},
|
|
644
|
+
"Right": {
|
|
645
|
+
"title": "Right",
|
|
646
|
+
"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.",
|
|
647
|
+
"type": "string",
|
|
648
|
+
"enum": [
|
|
649
|
+
"git.ns.admin",
|
|
650
|
+
"git.repo.create",
|
|
651
|
+
"git.repo.own",
|
|
652
|
+
"git.repo.maintain",
|
|
653
|
+
"git.commit.sign"
|
|
654
|
+
]
|
|
655
|
+
},
|
|
656
|
+
"DriftType": {
|
|
657
|
+
"title": "DriftType",
|
|
658
|
+
"type": "string",
|
|
659
|
+
"enum": [
|
|
660
|
+
"roleAdded",
|
|
661
|
+
"roleRemoved",
|
|
662
|
+
"roleChanged",
|
|
663
|
+
"requiredCheckMissing",
|
|
664
|
+
"protectionWeakened",
|
|
665
|
+
"bootstrapMissing"
|
|
666
|
+
],
|
|
667
|
+
"description": "The kinds of drift, named so that a task can select a drift item by kind. The same values, with the same meanings, as `DriftItem`'s `type`, which keeps its own inline list so that `DriftItem` stays textually identical to 0.1; the two lists change together. `roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone."
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
} as const;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
674
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
675
|
+
* per-specification and cannot be derived from the document alone, and
|
|
676
|
+
* item 2 needs the schema this carries.
|
|
677
|
+
*/
|
|
678
|
+
export const SPEC = {
|
|
679
|
+
typeUri: TYPE_URI,
|
|
680
|
+
isBearer: false,
|
|
681
|
+
isProofRequired: true,
|
|
682
|
+
isRecipientRequired: true,
|
|
683
|
+
isIssuedAtRequired: true,
|
|
684
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
685
|
+
} as const;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
689
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
690
|
+
* parties (§7.3 item 5).
|
|
691
|
+
*/
|
|
692
|
+
export const RESPONSE_SPEC = {
|
|
693
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
694
|
+
isBearer: false,
|
|
695
|
+
isProofRequired: true,
|
|
696
|
+
isRecipientRequired: true,
|
|
697
|
+
isIssuedAtRequired: true,
|
|
698
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
699
|
+
} as const;
|