@openvtc/trust-tasks 0.20.5 → 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.
Files changed (112) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/_shared/components.d.ts +55 -6
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/git-ns/_shared/0.1/git-ns.d.ts +1 -1
  5. package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -1
  6. package/dist/git-ns/_shared/0.2/git-ns.d.ts +1 -1
  7. package/dist/git-ns/_shared/0.2/git-ns.d.ts.map +1 -1
  8. package/dist/git-ns/_shared/0.3/git-ns.d.ts +16 -0
  9. package/dist/git-ns/_shared/0.3/git-ns.d.ts.map +1 -0
  10. package/dist/git-ns/_shared/0.3/git-ns.js +6 -0
  11. package/dist/git-ns/_shared/0.3/git-ns.js.map +1 -0
  12. package/dist/git-ns/bridge/event/0.2/payload.d.ts +1348 -0
  13. package/dist/git-ns/bridge/event/0.2/payload.d.ts.map +1 -0
  14. package/dist/git-ns/bridge/event/0.2/payload.js +785 -0
  15. package/dist/git-ns/bridge/event/0.2/payload.js.map +1 -0
  16. package/dist/git-ns/bridge/job/0.1/payload.d.ts +1 -1
  17. package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -1
  18. package/dist/git-ns/bridge/job/0.2/payload.d.ts +1 -1
  19. package/dist/git-ns/bridge/job/0.2/payload.d.ts.map +1 -1
  20. package/dist/git-ns/bridge/job/0.3/payload.d.ts +1068 -0
  21. package/dist/git-ns/bridge/job/0.3/payload.d.ts.map +1 -0
  22. package/dist/git-ns/bridge/job/0.3/payload.js +573 -0
  23. package/dist/git-ns/bridge/job/0.3/payload.js.map +1 -0
  24. package/dist/git-ns/drift/resolve/0.1/payload.d.ts +1 -1
  25. package/dist/git-ns/drift/resolve/0.1/payload.d.ts.map +1 -1
  26. package/dist/git-ns/drift/resolve/0.2/payload.d.ts +1060 -0
  27. package/dist/git-ns/drift/resolve/0.2/payload.d.ts.map +1 -0
  28. package/dist/git-ns/drift/resolve/0.2/payload.js +630 -0
  29. package/dist/git-ns/drift/resolve/0.2/payload.js.map +1 -0
  30. package/dist/git-ns/namespace/reseat/0.1/payload.d.ts +1 -1
  31. package/dist/git-ns/namespace/reseat/0.1/payload.d.ts.map +1 -1
  32. package/dist/git-ns/namespace/reseat/0.2/payload.d.ts +515 -0
  33. package/dist/git-ns/namespace/reseat/0.2/payload.d.ts.map +1 -0
  34. package/dist/git-ns/namespace/reseat/0.2/payload.js +296 -0
  35. package/dist/git-ns/namespace/reseat/0.2/payload.js.map +1 -0
  36. package/dist/git-ns/repo/adopt/0.1/payload.d.ts +1 -1
  37. package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -1
  38. package/dist/git-ns/repo/adopt/0.2/payload.d.ts +962 -0
  39. package/dist/git-ns/repo/adopt/0.2/payload.d.ts.map +1 -0
  40. package/dist/git-ns/repo/adopt/0.2/payload.js +583 -0
  41. package/dist/git-ns/repo/adopt/0.2/payload.js.map +1 -0
  42. package/dist/git-ns/repo/archive/0.1/payload.d.ts +1 -1
  43. package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -1
  44. package/dist/git-ns/repo/archive/0.2/payload.d.ts +959 -0
  45. package/dist/git-ns/repo/archive/0.2/payload.d.ts.map +1 -0
  46. package/dist/git-ns/repo/archive/0.2/payload.js +584 -0
  47. package/dist/git-ns/repo/archive/0.2/payload.js.map +1 -0
  48. package/dist/git-ns/repo/create/0.1/payload.d.ts +1 -1
  49. package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -1
  50. package/dist/git-ns/repo/create/0.2/payload.d.ts +1074 -0
  51. package/dist/git-ns/repo/create/0.2/payload.d.ts.map +1 -0
  52. package/dist/git-ns/repo/create/0.2/payload.js +636 -0
  53. package/dist/git-ns/repo/create/0.2/payload.js.map +1 -0
  54. package/dist/git-ns/repo/transfer/0.1/payload.d.ts +1 -1
  55. package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -1
  56. package/dist/git-ns/repo/transfer/0.2/payload.d.ts +947 -0
  57. package/dist/git-ns/repo/transfer/0.2/payload.d.ts.map +1 -0
  58. package/dist/git-ns/repo/transfer/0.2/payload.js +577 -0
  59. package/dist/git-ns/repo/transfer/0.2/payload.js.map +1 -0
  60. package/dist/git-ns/right/grant/0.1/payload.d.ts +1 -1
  61. package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -1
  62. package/dist/git-ns/right/grant/0.2/payload.d.ts +506 -0
  63. package/dist/git-ns/right/grant/0.2/payload.d.ts.map +1 -0
  64. package/dist/git-ns/right/grant/0.2/payload.js +289 -0
  65. package/dist/git-ns/right/grant/0.2/payload.js.map +1 -0
  66. package/dist/git-ns/right/revoke/0.1/payload.d.ts +1 -1
  67. package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -1
  68. package/dist/git-ns/right/revoke/0.2/payload.d.ts +492 -0
  69. package/dist/git-ns/right/revoke/0.2/payload.d.ts.map +1 -0
  70. package/dist/git-ns/right/revoke/0.2/payload.js +284 -0
  71. package/dist/git-ns/right/revoke/0.2/payload.js.map +1 -0
  72. package/dist/git-ns/view/0.1/payload.d.ts +1 -1
  73. package/dist/git-ns/view/0.1/payload.d.ts.map +1 -1
  74. package/dist/git-ns/view/0.2/payload.d.ts +1 -1
  75. package/dist/git-ns/view/0.2/payload.d.ts.map +1 -1
  76. package/dist/git-ns/view/0.3/payload.d.ts +1524 -0
  77. package/dist/git-ns/view/0.3/payload.d.ts.map +1 -0
  78. package/dist/git-ns/view/0.3/payload.js +918 -0
  79. package/dist/git-ns/view/0.3/payload.js.map +1 -0
  80. package/dist/index.d.ts +12 -0
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +12 -0
  83. package/dist/index.js.map +1 -1
  84. package/package.json +1 -1
  85. package/src/_shared/components.ts +55 -6
  86. package/src/git-ns/_shared/0.1/git-ns.ts +1 -1
  87. package/src/git-ns/_shared/0.2/git-ns.ts +1 -1
  88. package/src/git-ns/_shared/0.3/git-ns.ts +17 -0
  89. package/src/git-ns/bridge/event/0.2/payload.ts +902 -0
  90. package/src/git-ns/bridge/job/0.1/payload.ts +1 -1
  91. package/src/git-ns/bridge/job/0.2/payload.ts +1 -1
  92. package/src/git-ns/bridge/job/0.3/payload.ts +691 -0
  93. package/src/git-ns/drift/resolve/0.1/payload.ts +1 -1
  94. package/src/git-ns/drift/resolve/0.2/payload.ts +699 -0
  95. package/src/git-ns/namespace/reseat/0.1/payload.ts +1 -1
  96. package/src/git-ns/namespace/reseat/0.2/payload.ts +342 -0
  97. package/src/git-ns/repo/adopt/0.1/payload.ts +1 -1
  98. package/src/git-ns/repo/adopt/0.2/payload.ts +628 -0
  99. package/src/git-ns/repo/archive/0.1/payload.ts +1 -1
  100. package/src/git-ns/repo/archive/0.2/payload.ts +626 -0
  101. package/src/git-ns/repo/create/0.1/payload.ts +1 -1
  102. package/src/git-ns/repo/create/0.2/payload.ts +689 -0
  103. package/src/git-ns/repo/transfer/0.1/payload.ts +1 -1
  104. package/src/git-ns/repo/transfer/0.2/payload.ts +619 -0
  105. package/src/git-ns/right/grant/0.1/payload.ts +1 -1
  106. package/src/git-ns/right/grant/0.2/payload.ts +340 -0
  107. package/src/git-ns/right/revoke/0.1/payload.ts +1 -1
  108. package/src/git-ns/right/revoke/0.2/payload.ts +331 -0
  109. package/src/git-ns/view/0.1/payload.ts +1 -1
  110. package/src/git-ns/view/0.2/payload.ts +1 -1
  111. package/src/git-ns/view/0.3/payload.ts +981 -0
  112. package/src/index.ts +12 -0
@@ -0,0 +1,626 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/repo/archive/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Bootstrap, Did_GitNsV0_3 as Did, DriftItem, Ext, ForgeAccount, ForgeHost, ForgeId, RepoResource, RepoSummary_GitNsV0_3 as RepoSummary, RepoVisibility, Sync } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An owner archives a repository. The forge makes it read-only, and every `git.commit.sign` right recorded on it is revoked and withdrawn from the Trust Registry.
11
+ */
12
+ export interface GitNamespacesArchiveRepositoryPayload {
13
+ /**
14
+ * The repository to archive.
15
+ */
16
+ resource: RepoResource;
17
+ ext?: Ext;
18
+ }
19
+ /**
20
+ * The archived repository.
21
+ */
22
+ export interface GitNamespacesArchiveRepositoryResponsePayload {
23
+ /**
24
+ * The repository, now `archived`.
25
+ */
26
+ repo: RepoSummary;
27
+ /**
28
+ * How many `git.commit.sign` records were revoked. 0 when the repository was already archived.
29
+ */
30
+ rightsRevoked: number;
31
+ ext?: Ext;
32
+ }
33
+
34
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
35
+ export type { Bootstrap, Did, DriftItem, Ext, ForgeAccount, ForgeHost, ForgeId, RepoResource, RepoSummary, RepoVisibility, Sync };
36
+
37
+ /** Trust Task type URI. */
38
+ export const TYPE_URI = "https://trusttasks.org/spec/git-ns/repo/archive/0.2" as const;
39
+
40
+ /** Stable alias for this specification's request payload shape. */
41
+ export type Payload = GitNamespacesArchiveRepositoryPayload;
42
+
43
+ /** Trust Task response type URI (request type URI + "#response"). */
44
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/repo/archive/0.2#response" as const;
45
+
46
+ /** Stable alias for this specification's success-response payload shape. */
47
+ export type Response = GitNamespacesArchiveRepositoryResponsePayload;
48
+
49
+ /**
50
+ * This specification's payload schema, as a value.
51
+ *
52
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
53
+ * rather than only as a `.json` file because TypeScript types are erased
54
+ * at runtime: without a schema a consumer has nothing to validate, and
55
+ * every REQUIRED payload member is optional in practice. Cross-file
56
+ * `$ref`s are already inlined, so it needs no resolver.
57
+ */
58
+ export const PAYLOAD_SCHEMA = {
59
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
60
+ "$id": "https://trusttasks.org/spec/git-ns/repo/archive/0.2",
61
+ "title": "Git Namespaces — Archive Repository — payload",
62
+ "description": "An owner archives a repository. The forge makes it read-only, and every `git.commit.sign` right recorded on it is revoked and withdrawn from the Trust Registry.",
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "resource"
67
+ ],
68
+ "properties": {
69
+ "resource": {
70
+ "$ref": "#/$defs/RepoResource",
71
+ "description": "The repository to archive."
72
+ },
73
+ "ext": {
74
+ "$ref": "#/$defs/Ext"
75
+ }
76
+ },
77
+ "$defs": {
78
+ "Response": {
79
+ "$anchor": "response",
80
+ "title": "Git Namespaces — Archive Repository — response payload",
81
+ "description": "The archived repository.",
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "repo",
86
+ "rightsRevoked"
87
+ ],
88
+ "properties": {
89
+ "repo": {
90
+ "$ref": "#/$defs/RepoSummary",
91
+ "description": "The repository, now `archived`."
92
+ },
93
+ "rightsRevoked": {
94
+ "type": "integer",
95
+ "minimum": 0,
96
+ "description": "How many `git.commit.sign` records were revoked. 0 when the repository was already archived."
97
+ },
98
+ "ext": {
99
+ "$ref": "#/$defs/Ext"
100
+ }
101
+ }
102
+ },
103
+ "Ext": {
104
+ "title": "Ext",
105
+ "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.",
106
+ "type": "object",
107
+ "minProperties": 1,
108
+ "additionalProperties": true,
109
+ "propertyNames": {
110
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
111
+ }
112
+ },
113
+ "RepoSummary": {
114
+ "title": "RepoSummary",
115
+ "description": "One repository as the VTC records it.",
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": [
119
+ "resource",
120
+ "visibility",
121
+ "state",
122
+ "owners",
123
+ "bootstrap",
124
+ "sync"
125
+ ],
126
+ "properties": {
127
+ "resource": {
128
+ "$ref": "#/$defs/RepoResource"
129
+ },
130
+ "forgeId": {
131
+ "$ref": "#/$defs/ForgeId",
132
+ "description": "The forge's repository id. Absent until the forge has confirmed the repository exists (a `pendingCreate` repository, or one adopted in bridge mode before the first inspection)."
133
+ },
134
+ "visibility": {
135
+ "$ref": "#/$defs/RepoVisibility"
136
+ },
137
+ "state": {
138
+ "type": "string",
139
+ "enum": [
140
+ "pendingCreate",
141
+ "active",
142
+ "archived",
143
+ "detached",
144
+ "orphaned",
145
+ "unmanaged"
146
+ ],
147
+ "description": "`pendingCreate` — the name is reserved and the repository is not yet confirmed on the forge. `active` — managed. `archived` — archived through git-ns/repo/archive; commit rights on it are revoked. `detached` — no longer governed: its namespace was unbound, or it moved outside the namespace. `orphaned` — its last owner left the community and ownership passed to the namespace admins, who have not yet named a new owner. `unmanaged` — it exists on the forge inside a bound namespace but was never created or adopted through the VTC."
148
+ },
149
+ "owners": {
150
+ "type": "array",
151
+ "uniqueItems": true,
152
+ "items": {
153
+ "$ref": "#/$defs/Did"
154
+ },
155
+ "description": "The DIDs holding `git.repo.own` on this repository by an explicit grant. Empty only for an `unmanaged` repository, and for an `orphaned` one whose ownership rests with the namespace admins by implication."
156
+ },
157
+ "bootstrap": {
158
+ "$ref": "#/$defs/Bootstrap"
159
+ },
160
+ "sync": {
161
+ "$ref": "#/$defs/Sync"
162
+ }
163
+ }
164
+ },
165
+ "Sync": {
166
+ "title": "Sync",
167
+ "description": "How the forge compares with the VTC's projection for one repository.",
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": [
171
+ "state",
172
+ "drift"
173
+ ],
174
+ "properties": {
175
+ "state": {
176
+ "type": "string",
177
+ "enum": [
178
+ "inSync",
179
+ "drift",
180
+ "pending",
181
+ "unchecked"
182
+ ],
183
+ "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)."
184
+ },
185
+ "checkedAt": {
186
+ "type": "string",
187
+ "format": "date-time",
188
+ "description": "When the forge was last compared. Absent if never."
189
+ },
190
+ "drift": {
191
+ "type": "array",
192
+ "items": {
193
+ "$ref": "#/$defs/DriftItem"
194
+ },
195
+ "description": "Outstanding drift. Empty unless `state` is `drift`."
196
+ }
197
+ }
198
+ },
199
+ "DriftItem": {
200
+ "title": "DriftItem",
201
+ "description": "One difference between the forge's observed state and the VTC's projection of a repository.",
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "required": [
205
+ "type",
206
+ "resource"
207
+ ],
208
+ "properties": {
209
+ "type": {
210
+ "type": "string",
211
+ "enum": [
212
+ "roleAdded",
213
+ "roleRemoved",
214
+ "roleChanged",
215
+ "requiredCheckMissing",
216
+ "protectionWeakened",
217
+ "bootstrapMissing"
218
+ ],
219
+ "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."
220
+ },
221
+ "resource": {
222
+ "$ref": "#/$defs/RepoResource"
223
+ },
224
+ "account": {
225
+ "$ref": "#/$defs/ForgeAccount",
226
+ "description": "Whose role differs, for the three role types."
227
+ },
228
+ "observed": {
229
+ "type": "string",
230
+ "maxLength": 256,
231
+ "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."
232
+ },
233
+ "expected": {
234
+ "type": "string",
235
+ "maxLength": 256,
236
+ "description": "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing."
237
+ }
238
+ }
239
+ },
240
+ "ForgeAccount": {
241
+ "title": "ForgeAccount",
242
+ "description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "required": [
246
+ "forge",
247
+ "id",
248
+ "login"
249
+ ],
250
+ "properties": {
251
+ "forge": {
252
+ "$ref": "#/$defs/ForgeHost"
253
+ },
254
+ "id": {
255
+ "$ref": "#/$defs/ForgeId"
256
+ },
257
+ "login": {
258
+ "type": "string",
259
+ "minLength": 1,
260
+ "maxLength": 100,
261
+ "description": "The account's current login, as the forge reported it when last seen. Display only."
262
+ }
263
+ }
264
+ },
265
+ "ForgeId": {
266
+ "title": "ForgeId",
267
+ "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.",
268
+ "type": "string",
269
+ "minLength": 1,
270
+ "maxLength": 64
271
+ },
272
+ "ForgeHost": {
273
+ "title": "ForgeHost",
274
+ "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.",
275
+ "type": "string",
276
+ "minLength": 3,
277
+ "maxLength": 253,
278
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
279
+ },
280
+ "RepoResource": {
281
+ "title": "RepoResource",
282
+ "description": "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.",
283
+ "type": "string",
284
+ "maxLength": 455,
285
+ "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}$"
286
+ },
287
+ "Bootstrap": {
288
+ "title": "Bootstrap",
289
+ "description": "Whether each step that turns commit trust on for a repository is in place, as last reported. A step that this forge's plan does not need reads `true`.",
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "required": [
293
+ "workflow",
294
+ "keyring",
295
+ "variables",
296
+ "requiredCheck"
297
+ ],
298
+ "properties": {
299
+ "workflow": {
300
+ "type": "boolean",
301
+ "description": "The verify-trust check runs on the repository's pull requests — from a workflow committed to it, or, where the forge supports it, required on it from the namespace's own bridge-managed workflow repository at a pinned commit."
302
+ },
303
+ "keyring": {
304
+ "type": "boolean",
305
+ "description": "The exempt platform keyring for forge-signed merge commits is committed, or the forge's plan does not need one."
306
+ },
307
+ "variables": {
308
+ "type": "boolean",
309
+ "description": "The repository names the Trust Registry and this VTC as its trust anchors."
310
+ },
311
+ "requiredCheck": {
312
+ "type": "boolean",
313
+ "description": "The forge refuses to merge into the default branch unless the verify-trust check passes, with no bypass, and a pull request cannot change what that check runs: an organisation-required workflow, code-owner review of workflow files, or protected workflow paths, as the forge allows."
314
+ }
315
+ }
316
+ },
317
+ "Did": {
318
+ "title": "Did",
319
+ "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.",
320
+ "type": "string",
321
+ "maxLength": 2048,
322
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
323
+ },
324
+ "RepoVisibility": {
325
+ "title": "RepoVisibility",
326
+ "type": "string",
327
+ "enum": [
328
+ "public",
329
+ "private"
330
+ ],
331
+ "description": "Repository visibility on the forge."
332
+ }
333
+ }
334
+ } as const;
335
+
336
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
337
+ export const RESPONSE_PAYLOAD_SCHEMA = {
338
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
339
+ "$ref": "#/$defs/Response",
340
+ "$defs": {
341
+ "Response": {
342
+ "$anchor": "response",
343
+ "title": "Git Namespaces — Archive Repository — response payload",
344
+ "description": "The archived repository.",
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "required": [
348
+ "repo",
349
+ "rightsRevoked"
350
+ ],
351
+ "properties": {
352
+ "repo": {
353
+ "$ref": "#/$defs/RepoSummary",
354
+ "description": "The repository, now `archived`."
355
+ },
356
+ "rightsRevoked": {
357
+ "type": "integer",
358
+ "minimum": 0,
359
+ "description": "How many `git.commit.sign` records were revoked. 0 when the repository was already archived."
360
+ },
361
+ "ext": {
362
+ "$ref": "#/$defs/Ext"
363
+ }
364
+ }
365
+ },
366
+ "Ext": {
367
+ "title": "Ext",
368
+ "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.",
369
+ "type": "object",
370
+ "minProperties": 1,
371
+ "additionalProperties": true,
372
+ "propertyNames": {
373
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
374
+ }
375
+ },
376
+ "RepoSummary": {
377
+ "title": "RepoSummary",
378
+ "description": "One repository as the VTC records it.",
379
+ "type": "object",
380
+ "additionalProperties": false,
381
+ "required": [
382
+ "resource",
383
+ "visibility",
384
+ "state",
385
+ "owners",
386
+ "bootstrap",
387
+ "sync"
388
+ ],
389
+ "properties": {
390
+ "resource": {
391
+ "$ref": "#/$defs/RepoResource"
392
+ },
393
+ "forgeId": {
394
+ "$ref": "#/$defs/ForgeId",
395
+ "description": "The forge's repository id. Absent until the forge has confirmed the repository exists (a `pendingCreate` repository, or one adopted in bridge mode before the first inspection)."
396
+ },
397
+ "visibility": {
398
+ "$ref": "#/$defs/RepoVisibility"
399
+ },
400
+ "state": {
401
+ "type": "string",
402
+ "enum": [
403
+ "pendingCreate",
404
+ "active",
405
+ "archived",
406
+ "detached",
407
+ "orphaned",
408
+ "unmanaged"
409
+ ],
410
+ "description": "`pendingCreate` — the name is reserved and the repository is not yet confirmed on the forge. `active` — managed. `archived` — archived through git-ns/repo/archive; commit rights on it are revoked. `detached` — no longer governed: its namespace was unbound, or it moved outside the namespace. `orphaned` — its last owner left the community and ownership passed to the namespace admins, who have not yet named a new owner. `unmanaged` — it exists on the forge inside a bound namespace but was never created or adopted through the VTC."
411
+ },
412
+ "owners": {
413
+ "type": "array",
414
+ "uniqueItems": true,
415
+ "items": {
416
+ "$ref": "#/$defs/Did"
417
+ },
418
+ "description": "The DIDs holding `git.repo.own` on this repository by an explicit grant. Empty only for an `unmanaged` repository, and for an `orphaned` one whose ownership rests with the namespace admins by implication."
419
+ },
420
+ "bootstrap": {
421
+ "$ref": "#/$defs/Bootstrap"
422
+ },
423
+ "sync": {
424
+ "$ref": "#/$defs/Sync"
425
+ }
426
+ }
427
+ },
428
+ "Sync": {
429
+ "title": "Sync",
430
+ "description": "How the forge compares with the VTC's projection for one repository.",
431
+ "type": "object",
432
+ "additionalProperties": false,
433
+ "required": [
434
+ "state",
435
+ "drift"
436
+ ],
437
+ "properties": {
438
+ "state": {
439
+ "type": "string",
440
+ "enum": [
441
+ "inSync",
442
+ "drift",
443
+ "pending",
444
+ "unchecked"
445
+ ],
446
+ "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)."
447
+ },
448
+ "checkedAt": {
449
+ "type": "string",
450
+ "format": "date-time",
451
+ "description": "When the forge was last compared. Absent if never."
452
+ },
453
+ "drift": {
454
+ "type": "array",
455
+ "items": {
456
+ "$ref": "#/$defs/DriftItem"
457
+ },
458
+ "description": "Outstanding drift. Empty unless `state` is `drift`."
459
+ }
460
+ }
461
+ },
462
+ "DriftItem": {
463
+ "title": "DriftItem",
464
+ "description": "One difference between the forge's observed state and the VTC's projection of a repository.",
465
+ "type": "object",
466
+ "additionalProperties": false,
467
+ "required": [
468
+ "type",
469
+ "resource"
470
+ ],
471
+ "properties": {
472
+ "type": {
473
+ "type": "string",
474
+ "enum": [
475
+ "roleAdded",
476
+ "roleRemoved",
477
+ "roleChanged",
478
+ "requiredCheckMissing",
479
+ "protectionWeakened",
480
+ "bootstrapMissing"
481
+ ],
482
+ "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."
483
+ },
484
+ "resource": {
485
+ "$ref": "#/$defs/RepoResource"
486
+ },
487
+ "account": {
488
+ "$ref": "#/$defs/ForgeAccount",
489
+ "description": "Whose role differs, for the three role types."
490
+ },
491
+ "observed": {
492
+ "type": "string",
493
+ "maxLength": 256,
494
+ "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."
495
+ },
496
+ "expected": {
497
+ "type": "string",
498
+ "maxLength": 256,
499
+ "description": "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing."
500
+ }
501
+ }
502
+ },
503
+ "ForgeAccount": {
504
+ "title": "ForgeAccount",
505
+ "description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
506
+ "type": "object",
507
+ "additionalProperties": false,
508
+ "required": [
509
+ "forge",
510
+ "id",
511
+ "login"
512
+ ],
513
+ "properties": {
514
+ "forge": {
515
+ "$ref": "#/$defs/ForgeHost"
516
+ },
517
+ "id": {
518
+ "$ref": "#/$defs/ForgeId"
519
+ },
520
+ "login": {
521
+ "type": "string",
522
+ "minLength": 1,
523
+ "maxLength": 100,
524
+ "description": "The account's current login, as the forge reported it when last seen. Display only."
525
+ }
526
+ }
527
+ },
528
+ "ForgeId": {
529
+ "title": "ForgeId",
530
+ "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.",
531
+ "type": "string",
532
+ "minLength": 1,
533
+ "maxLength": 64
534
+ },
535
+ "ForgeHost": {
536
+ "title": "ForgeHost",
537
+ "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.",
538
+ "type": "string",
539
+ "minLength": 3,
540
+ "maxLength": 253,
541
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
542
+ },
543
+ "RepoResource": {
544
+ "title": "RepoResource",
545
+ "description": "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.",
546
+ "type": "string",
547
+ "maxLength": 455,
548
+ "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}$"
549
+ },
550
+ "Bootstrap": {
551
+ "title": "Bootstrap",
552
+ "description": "Whether each step that turns commit trust on for a repository is in place, as last reported. A step that this forge's plan does not need reads `true`.",
553
+ "type": "object",
554
+ "additionalProperties": false,
555
+ "required": [
556
+ "workflow",
557
+ "keyring",
558
+ "variables",
559
+ "requiredCheck"
560
+ ],
561
+ "properties": {
562
+ "workflow": {
563
+ "type": "boolean",
564
+ "description": "The verify-trust check runs on the repository's pull requests — from a workflow committed to it, or, where the forge supports it, required on it from the namespace's own bridge-managed workflow repository at a pinned commit."
565
+ },
566
+ "keyring": {
567
+ "type": "boolean",
568
+ "description": "The exempt platform keyring for forge-signed merge commits is committed, or the forge's plan does not need one."
569
+ },
570
+ "variables": {
571
+ "type": "boolean",
572
+ "description": "The repository names the Trust Registry and this VTC as its trust anchors."
573
+ },
574
+ "requiredCheck": {
575
+ "type": "boolean",
576
+ "description": "The forge refuses to merge into the default branch unless the verify-trust check passes, with no bypass, and a pull request cannot change what that check runs: an organisation-required workflow, code-owner review of workflow files, or protected workflow paths, as the forge allows."
577
+ }
578
+ }
579
+ },
580
+ "Did": {
581
+ "title": "Did",
582
+ "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.",
583
+ "type": "string",
584
+ "maxLength": 2048,
585
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
586
+ },
587
+ "RepoVisibility": {
588
+ "title": "RepoVisibility",
589
+ "type": "string",
590
+ "enum": [
591
+ "public",
592
+ "private"
593
+ ],
594
+ "description": "Repository visibility on the forge."
595
+ }
596
+ }
597
+ } as const;
598
+
599
+ /**
600
+ * SPEC.md §7.2 policy for the request variant, from this specification's
601
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
602
+ * per-specification and cannot be derived from the document alone, and
603
+ * item 2 needs the schema this carries.
604
+ */
605
+ export const SPEC = {
606
+ typeUri: TYPE_URI,
607
+ isBearer: false,
608
+ isProofRequired: true,
609
+ isRecipientRequired: true,
610
+ isIssuedAtRequired: true,
611
+ payloadSchema: PAYLOAD_SCHEMA,
612
+ } as const;
613
+
614
+ /**
615
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
616
+ * tracks the *issuer* party's requirement because a response swaps the
617
+ * parties (§7.3 item 5).
618
+ */
619
+ export const RESPONSE_SPEC = {
620
+ typeUri: RESPONSE_TYPE_URI,
621
+ isBearer: false,
622
+ isProofRequired: true,
623
+ isRecipientRequired: true,
624
+ isIssuedAtRequired: true,
625
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
626
+ } as const;
@@ -3,7 +3,7 @@
3
3
  * Source: specs/git-ns/repo/create/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Bootstrap, Did, DriftItem, Ext, ForgeAccount, ForgeHost, ForgeId, NamespaceId, RepoResource, RepoSummary, RepoVisibility, Segment, Sync } from "../../../../_shared/components.js";
6
+ import type { Bootstrap, Did_GitNsV0_1 as Did, DriftItem, Ext, ForgeAccount, ForgeHost, ForgeId, NamespaceId, RepoResource, RepoSummary_GitNsV0_1 as RepoSummary, RepoVisibility, Segment, Sync } from "../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**