@openvtc/trust-tasks 0.20.1 → 0.20.3

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 (110) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/dist/_shared/components.d.ts +175 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/git-ns/_shared/0.1/git-ns.d.ts +16 -0
  5. package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -0
  6. package/dist/git-ns/_shared/0.1/git-ns.js +6 -0
  7. package/dist/git-ns/_shared/0.1/git-ns.js.map +1 -0
  8. package/dist/git-ns/account/link/0.1/payload.d.ts +355 -0
  9. package/dist/git-ns/account/link/0.1/payload.d.ts.map +1 -0
  10. package/dist/git-ns/account/link/0.1/payload.js +192 -0
  11. package/dist/git-ns/account/link/0.1/payload.js.map +1 -0
  12. package/dist/git-ns/account/link-status/0.1/payload.d.ts +403 -0
  13. package/dist/git-ns/account/link-status/0.1/payload.d.ts.map +1 -0
  14. package/dist/git-ns/account/link-status/0.1/payload.js +234 -0
  15. package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -0
  16. package/dist/git-ns/bridge/event/0.1/payload.d.ts +1348 -0
  17. package/dist/git-ns/bridge/event/0.1/payload.d.ts.map +1 -0
  18. package/dist/git-ns/bridge/event/0.1/payload.js +785 -0
  19. package/dist/git-ns/bridge/event/0.1/payload.js.map +1 -0
  20. package/dist/git-ns/bridge/job/0.1/payload.d.ts +1044 -0
  21. package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -0
  22. package/dist/git-ns/bridge/job/0.1/payload.js +564 -0
  23. package/dist/git-ns/bridge/job/0.1/payload.js.map +1 -0
  24. package/dist/git-ns/bridge/result/0.1/payload.d.ts +462 -0
  25. package/dist/git-ns/bridge/result/0.1/payload.d.ts.map +1 -0
  26. package/dist/git-ns/bridge/result/0.1/payload.js +248 -0
  27. package/dist/git-ns/bridge/result/0.1/payload.js.map +1 -0
  28. package/dist/git-ns/namespace/bind/0.1/payload.d.ts +547 -0
  29. package/dist/git-ns/namespace/bind/0.1/payload.d.ts.map +1 -0
  30. package/dist/git-ns/namespace/bind/0.1/payload.js +322 -0
  31. package/dist/git-ns/namespace/bind/0.1/payload.js.map +1 -0
  32. package/dist/git-ns/namespace/unbind/0.1/payload.d.ts +300 -0
  33. package/dist/git-ns/namespace/unbind/0.1/payload.d.ts.map +1 -0
  34. package/dist/git-ns/namespace/unbind/0.1/payload.js +168 -0
  35. package/dist/git-ns/namespace/unbind/0.1/payload.js.map +1 -0
  36. package/dist/git-ns/repo/adopt/0.1/payload.d.ts +962 -0
  37. package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -0
  38. package/dist/git-ns/repo/adopt/0.1/payload.js +583 -0
  39. package/dist/git-ns/repo/adopt/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/repo/archive/0.1/payload.d.ts +959 -0
  41. package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -0
  42. package/dist/git-ns/repo/archive/0.1/payload.js +584 -0
  43. package/dist/git-ns/repo/archive/0.1/payload.js.map +1 -0
  44. package/dist/git-ns/repo/create/0.1/payload.d.ts +1074 -0
  45. package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -0
  46. package/dist/git-ns/repo/create/0.1/payload.js +636 -0
  47. package/dist/git-ns/repo/create/0.1/payload.js.map +1 -0
  48. package/dist/git-ns/repo/transfer/0.1/payload.d.ts +947 -0
  49. package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -0
  50. package/dist/git-ns/repo/transfer/0.1/payload.js +577 -0
  51. package/dist/git-ns/repo/transfer/0.1/payload.js.map +1 -0
  52. package/dist/git-ns/right/grant/0.1/payload.d.ts +506 -0
  53. package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -0
  54. package/dist/git-ns/right/grant/0.1/payload.js +289 -0
  55. package/dist/git-ns/right/grant/0.1/payload.js.map +1 -0
  56. package/dist/git-ns/right/revoke/0.1/payload.d.ts +492 -0
  57. package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -0
  58. package/dist/git-ns/right/revoke/0.1/payload.js +284 -0
  59. package/dist/git-ns/right/revoke/0.1/payload.js.map +1 -0
  60. package/dist/git-ns/view/0.1/payload.d.ts +1407 -0
  61. package/dist/git-ns/view/0.1/payload.d.ts.map +1 -0
  62. package/dist/git-ns/view/0.1/payload.js +860 -0
  63. package/dist/git-ns/view/0.1/payload.js.map +1 -0
  64. package/dist/index.d.ts +20 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +20 -0
  67. package/dist/index.js.map +1 -1
  68. package/dist/vetting/attestation/0.1/payload.d.ts +690 -0
  69. package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -0
  70. package/dist/vetting/attestation/0.1/payload.js +374 -0
  71. package/dist/vetting/attestation/0.1/payload.js.map +1 -0
  72. package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts +261 -0
  73. package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts.map +1 -0
  74. package/dist/vtc/vetting/pcs-challenge/0.1/payload.js +145 -0
  75. package/dist/vtc/vetting/pcs-challenge/0.1/payload.js.map +1 -0
  76. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts +546 -0
  77. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts.map +1 -0
  78. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js +290 -0
  79. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js.map +1 -0
  80. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts +336 -0
  81. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts.map +1 -0
  82. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js +178 -0
  83. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js.map +1 -0
  84. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts +402 -0
  85. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts.map +1 -0
  86. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js +205 -0
  87. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js.map +1 -0
  88. package/package.json +1 -1
  89. package/src/_shared/components.ts +181 -0
  90. package/src/git-ns/_shared/0.1/git-ns.ts +17 -0
  91. package/src/git-ns/account/link/0.1/payload.ts +242 -0
  92. package/src/git-ns/account/link-status/0.1/payload.ts +276 -0
  93. package/src/git-ns/bridge/event/0.1/payload.ts +902 -0
  94. package/src/git-ns/bridge/job/0.1/payload.ts +676 -0
  95. package/src/git-ns/bridge/result/0.1/payload.ts +321 -0
  96. package/src/git-ns/namespace/bind/0.1/payload.ts +374 -0
  97. package/src/git-ns/namespace/unbind/0.1/payload.ts +211 -0
  98. package/src/git-ns/repo/adopt/0.1/payload.ts +628 -0
  99. package/src/git-ns/repo/archive/0.1/payload.ts +626 -0
  100. package/src/git-ns/repo/create/0.1/payload.ts +689 -0
  101. package/src/git-ns/repo/transfer/0.1/payload.ts +619 -0
  102. package/src/git-ns/right/grant/0.1/payload.ts +340 -0
  103. package/src/git-ns/right/revoke/0.1/payload.ts +331 -0
  104. package/src/git-ns/view/0.1/payload.ts +906 -0
  105. package/src/index.ts +20 -0
  106. package/src/vetting/attestation/0.1/payload.ts +493 -0
  107. package/src/vtc/vetting/pcs-challenge/0.1/payload.ts +187 -0
  108. package/src/vtc/vetting/vetters/event-mode/0.1/payload.ts +375 -0
  109. package/src/vtc/vetting/vetters/pcs-root/0.1/payload.ts +241 -0
  110. package/src/vtc/vetting/vetters/pcs-tokens/0.1/payload.ts +286 -0
@@ -0,0 +1,547 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/namespace/bind/0.1/payload.schema.json
4
+ */
5
+ import type { Ext, ForgeHost, GitNamespace, NamespaceId, Segment } from "../../../../_shared/components.js";
6
+ /**
7
+ * A VTC administrator binds the VTC to one owner on one forge, so that the VTC governs who may create, own, maintain and commit to repositories under it. In bridge mode the response says where to send the forge owner to prove control; the namespace stays `pending` until that proof arrives.
8
+ */
9
+ export interface GitNamespacesBindNamespacePayload {
10
+ /**
11
+ * The forge's host, lowercased.
12
+ */
13
+ forge: ForgeHost;
14
+ /**
15
+ * The organisation or user on that forge, lowercased.
16
+ */
17
+ owner: Segment;
18
+ /**
19
+ * `bridge` — a bridge service serving this forge proves control and then acts on the forge. `manual` — no automation; the binding admin declares the namespace and people with forge access carry out the forge-side steps.
20
+ */
21
+ mode: "bridge" | "manual";
22
+ ext?: Ext;
23
+ }
24
+ /**
25
+ * The namespace as recorded, and where to go next if it is still pending.
26
+ */
27
+ export interface GitNamespacesBindNamespaceResponsePayload {
28
+ namespace: GitNamespace;
29
+ /**
30
+ * Present when the namespace is `pending`: where the administrator goes to prove control of the forge owner (install the community's forge app, or sign in to the forge and authorise the bridge).
31
+ */
32
+ next?: {
33
+ /**
34
+ * An https URL, single-use, carrying the bridge's binding nonce.
35
+ */
36
+ url: string;
37
+ };
38
+ ext?: Ext;
39
+ }
40
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
41
+ export type { Ext, ForgeHost, GitNamespace, NamespaceId, Segment };
42
+ /** Trust Task type URI. */
43
+ export declare const TYPE_URI: "https://trusttasks.org/spec/git-ns/namespace/bind/0.1";
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = GitNamespacesBindNamespacePayload;
46
+ /** Trust Task response type URI (request type URI + "#response"). */
47
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/git-ns/namespace/bind/0.1#response";
48
+ /** Stable alias for this specification's success-response payload shape. */
49
+ export type Response = GitNamespacesBindNamespaceResponsePayload;
50
+ /**
51
+ * This specification's payload schema, as a value.
52
+ *
53
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
54
+ * rather than only as a `.json` file because TypeScript types are erased
55
+ * at runtime: without a schema a consumer has nothing to validate, and
56
+ * every REQUIRED payload member is optional in practice. Cross-file
57
+ * `$ref`s are already inlined, so it needs no resolver.
58
+ */
59
+ export declare const PAYLOAD_SCHEMA: {
60
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
61
+ readonly $id: "https://trusttasks.org/spec/git-ns/namespace/bind/0.1";
62
+ readonly title: "Git Namespaces — Bind Namespace — payload";
63
+ readonly description: "A VTC administrator binds the VTC to one owner on one forge, so that the VTC governs who may create, own, maintain and commit to repositories under it. In bridge mode the response says where to send the forge owner to prove control; the namespace stays `pending` until that proof arrives.";
64
+ readonly type: "object";
65
+ readonly additionalProperties: false;
66
+ readonly required: readonly ["forge", "owner", "mode"];
67
+ readonly properties: {
68
+ readonly forge: {
69
+ readonly $ref: "#/$defs/ForgeHost";
70
+ readonly description: "The forge's host, lowercased.";
71
+ };
72
+ readonly owner: {
73
+ readonly $ref: "#/$defs/Segment";
74
+ readonly description: "The organisation or user on that forge, lowercased.";
75
+ };
76
+ readonly mode: {
77
+ readonly type: "string";
78
+ readonly enum: readonly ["bridge", "manual"];
79
+ readonly description: "`bridge` — a bridge service serving this forge proves control and then acts on the forge. `manual` — no automation; the binding admin declares the namespace and people with forge access carry out the forge-side steps.";
80
+ };
81
+ readonly ext: {
82
+ readonly $ref: "#/$defs/Ext";
83
+ };
84
+ };
85
+ readonly $defs: {
86
+ readonly Response: {
87
+ readonly $anchor: "response";
88
+ readonly title: "Git Namespaces — Bind Namespace — response payload";
89
+ readonly description: "The namespace as recorded, and where to go next if it is still pending.";
90
+ readonly type: "object";
91
+ readonly additionalProperties: false;
92
+ readonly required: readonly ["namespace"];
93
+ readonly properties: {
94
+ readonly namespace: {
95
+ readonly $ref: "#/$defs/GitNamespace";
96
+ };
97
+ readonly next: {
98
+ readonly type: "object";
99
+ readonly additionalProperties: false;
100
+ readonly required: readonly ["url"];
101
+ readonly description: "Present when the namespace is `pending`: where the administrator goes to prove control of the forge owner (install the community's forge app, or sign in to the forge and authorise the bridge).";
102
+ readonly properties: {
103
+ readonly url: {
104
+ readonly type: "string";
105
+ readonly format: "uri";
106
+ readonly maxLength: 2048;
107
+ readonly pattern: "^https://";
108
+ readonly description: "An https URL, single-use, carrying the bridge's binding nonce.";
109
+ };
110
+ };
111
+ };
112
+ readonly ext: {
113
+ readonly $ref: "#/$defs/Ext";
114
+ };
115
+ };
116
+ };
117
+ readonly Ext: {
118
+ readonly title: "Ext";
119
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
120
+ readonly type: "object";
121
+ readonly minProperties: 1;
122
+ readonly additionalProperties: true;
123
+ readonly propertyNames: {
124
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
125
+ };
126
+ };
127
+ readonly GitNamespace: {
128
+ readonly title: "GitNamespace";
129
+ readonly description: "The VTC's binding to one owner on one forge.";
130
+ readonly type: "object";
131
+ readonly additionalProperties: false;
132
+ readonly required: readonly ["id", "forge", "owner", "mode", "state"];
133
+ readonly properties: {
134
+ readonly id: {
135
+ readonly $ref: "#/$defs/NamespaceId";
136
+ };
137
+ readonly forge: {
138
+ readonly $ref: "#/$defs/ForgeHost";
139
+ };
140
+ readonly owner: {
141
+ readonly $ref: "#/$defs/Segment";
142
+ readonly description: "The organisation or user on the forge, lowercased.";
143
+ };
144
+ readonly kind: {
145
+ readonly type: "string";
146
+ readonly enum: readonly ["organization", "user"];
147
+ readonly description: "Whether the owner is an organisation or a personal account, as the forge reports it. Present once known: a bridge-mode namespace learns it when binding completes, and a manual-mode namespace MAY never learn it.";
148
+ };
149
+ readonly mode: {
150
+ readonly type: "string";
151
+ readonly enum: readonly ["bridge", "manual"];
152
+ readonly description: "`bridge` — a bridge service acts on the forge for this namespace (creates repositories, projects roles, reports drift). `manual` — no automation; people with forge access carry out the steps the VTC names, and the VTC governs the rights alone.";
153
+ };
154
+ readonly state: {
155
+ readonly type: "string";
156
+ readonly enum: readonly ["pending", "bound"];
157
+ readonly description: "`pending` — binding has started and the forge-side proof has not arrived yet. `bound` — the VTC governs rights under this namespace.";
158
+ };
159
+ };
160
+ };
161
+ readonly Segment: {
162
+ readonly title: "Segment";
163
+ readonly description: "One lowercased owner or repository name. Forges compare these case-insensitively, so the wire form is always lowercase and a producer lowercases before sending. A leading `.` is refused, which rules out `.` and `..`.";
164
+ readonly type: "string";
165
+ readonly minLength: 1;
166
+ readonly maxLength: 100;
167
+ readonly pattern: "^[a-z0-9_-][a-z0-9._-]*$";
168
+ };
169
+ readonly ForgeHost: {
170
+ readonly title: "ForgeHost";
171
+ readonly 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.";
172
+ readonly type: "string";
173
+ readonly minLength: 3;
174
+ readonly maxLength: 253;
175
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
176
+ };
177
+ readonly NamespaceId: {
178
+ readonly title: "NamespaceId";
179
+ readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
180
+ readonly type: "string";
181
+ readonly minLength: 1;
182
+ readonly maxLength: 128;
183
+ };
184
+ };
185
+ };
186
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
187
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
188
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
189
+ readonly $ref: "#/$defs/Response";
190
+ readonly $defs: {
191
+ readonly Response: {
192
+ readonly $anchor: "response";
193
+ readonly title: "Git Namespaces — Bind Namespace — response payload";
194
+ readonly description: "The namespace as recorded, and where to go next if it is still pending.";
195
+ readonly type: "object";
196
+ readonly additionalProperties: false;
197
+ readonly required: readonly ["namespace"];
198
+ readonly properties: {
199
+ readonly namespace: {
200
+ readonly $ref: "#/$defs/GitNamespace";
201
+ };
202
+ readonly next: {
203
+ readonly type: "object";
204
+ readonly additionalProperties: false;
205
+ readonly required: readonly ["url"];
206
+ readonly description: "Present when the namespace is `pending`: where the administrator goes to prove control of the forge owner (install the community's forge app, or sign in to the forge and authorise the bridge).";
207
+ readonly properties: {
208
+ readonly url: {
209
+ readonly type: "string";
210
+ readonly format: "uri";
211
+ readonly maxLength: 2048;
212
+ readonly pattern: "^https://";
213
+ readonly description: "An https URL, single-use, carrying the bridge's binding nonce.";
214
+ };
215
+ };
216
+ };
217
+ readonly ext: {
218
+ readonly $ref: "#/$defs/Ext";
219
+ };
220
+ };
221
+ };
222
+ readonly Ext: {
223
+ readonly title: "Ext";
224
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
225
+ readonly type: "object";
226
+ readonly minProperties: 1;
227
+ readonly additionalProperties: true;
228
+ readonly propertyNames: {
229
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
230
+ };
231
+ };
232
+ readonly GitNamespace: {
233
+ readonly title: "GitNamespace";
234
+ readonly description: "The VTC's binding to one owner on one forge.";
235
+ readonly type: "object";
236
+ readonly additionalProperties: false;
237
+ readonly required: readonly ["id", "forge", "owner", "mode", "state"];
238
+ readonly properties: {
239
+ readonly id: {
240
+ readonly $ref: "#/$defs/NamespaceId";
241
+ };
242
+ readonly forge: {
243
+ readonly $ref: "#/$defs/ForgeHost";
244
+ };
245
+ readonly owner: {
246
+ readonly $ref: "#/$defs/Segment";
247
+ readonly description: "The organisation or user on the forge, lowercased.";
248
+ };
249
+ readonly kind: {
250
+ readonly type: "string";
251
+ readonly enum: readonly ["organization", "user"];
252
+ readonly description: "Whether the owner is an organisation or a personal account, as the forge reports it. Present once known: a bridge-mode namespace learns it when binding completes, and a manual-mode namespace MAY never learn it.";
253
+ };
254
+ readonly mode: {
255
+ readonly type: "string";
256
+ readonly enum: readonly ["bridge", "manual"];
257
+ readonly description: "`bridge` — a bridge service acts on the forge for this namespace (creates repositories, projects roles, reports drift). `manual` — no automation; people with forge access carry out the steps the VTC names, and the VTC governs the rights alone.";
258
+ };
259
+ readonly state: {
260
+ readonly type: "string";
261
+ readonly enum: readonly ["pending", "bound"];
262
+ readonly description: "`pending` — binding has started and the forge-side proof has not arrived yet. `bound` — the VTC governs rights under this namespace.";
263
+ };
264
+ };
265
+ };
266
+ readonly Segment: {
267
+ readonly title: "Segment";
268
+ readonly description: "One lowercased owner or repository name. Forges compare these case-insensitively, so the wire form is always lowercase and a producer lowercases before sending. A leading `.` is refused, which rules out `.` and `..`.";
269
+ readonly type: "string";
270
+ readonly minLength: 1;
271
+ readonly maxLength: 100;
272
+ readonly pattern: "^[a-z0-9_-][a-z0-9._-]*$";
273
+ };
274
+ readonly ForgeHost: {
275
+ readonly title: "ForgeHost";
276
+ readonly 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.";
277
+ readonly type: "string";
278
+ readonly minLength: 3;
279
+ readonly maxLength: 253;
280
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
281
+ };
282
+ readonly NamespaceId: {
283
+ readonly title: "NamespaceId";
284
+ readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
285
+ readonly type: "string";
286
+ readonly minLength: 1;
287
+ readonly maxLength: 128;
288
+ };
289
+ };
290
+ };
291
+ /**
292
+ * SPEC.md §7.2 policy for the request variant, from this specification's
293
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
294
+ * per-specification and cannot be derived from the document alone, and
295
+ * item 2 needs the schema this carries.
296
+ */
297
+ export declare const SPEC: {
298
+ readonly typeUri: "https://trusttasks.org/spec/git-ns/namespace/bind/0.1";
299
+ readonly isBearer: false;
300
+ readonly isProofRequired: true;
301
+ readonly isRecipientRequired: true;
302
+ readonly isIssuedAtRequired: true;
303
+ readonly payloadSchema: {
304
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
305
+ readonly $id: "https://trusttasks.org/spec/git-ns/namespace/bind/0.1";
306
+ readonly title: "Git Namespaces — Bind Namespace — payload";
307
+ readonly description: "A VTC administrator binds the VTC to one owner on one forge, so that the VTC governs who may create, own, maintain and commit to repositories under it. In bridge mode the response says where to send the forge owner to prove control; the namespace stays `pending` until that proof arrives.";
308
+ readonly type: "object";
309
+ readonly additionalProperties: false;
310
+ readonly required: readonly ["forge", "owner", "mode"];
311
+ readonly properties: {
312
+ readonly forge: {
313
+ readonly $ref: "#/$defs/ForgeHost";
314
+ readonly description: "The forge's host, lowercased.";
315
+ };
316
+ readonly owner: {
317
+ readonly $ref: "#/$defs/Segment";
318
+ readonly description: "The organisation or user on that forge, lowercased.";
319
+ };
320
+ readonly mode: {
321
+ readonly type: "string";
322
+ readonly enum: readonly ["bridge", "manual"];
323
+ readonly description: "`bridge` — a bridge service serving this forge proves control and then acts on the forge. `manual` — no automation; the binding admin declares the namespace and people with forge access carry out the forge-side steps.";
324
+ };
325
+ readonly ext: {
326
+ readonly $ref: "#/$defs/Ext";
327
+ };
328
+ };
329
+ readonly $defs: {
330
+ readonly Response: {
331
+ readonly $anchor: "response";
332
+ readonly title: "Git Namespaces — Bind Namespace — response payload";
333
+ readonly description: "The namespace as recorded, and where to go next if it is still pending.";
334
+ readonly type: "object";
335
+ readonly additionalProperties: false;
336
+ readonly required: readonly ["namespace"];
337
+ readonly properties: {
338
+ readonly namespace: {
339
+ readonly $ref: "#/$defs/GitNamespace";
340
+ };
341
+ readonly next: {
342
+ readonly type: "object";
343
+ readonly additionalProperties: false;
344
+ readonly required: readonly ["url"];
345
+ readonly description: "Present when the namespace is `pending`: where the administrator goes to prove control of the forge owner (install the community's forge app, or sign in to the forge and authorise the bridge).";
346
+ readonly properties: {
347
+ readonly url: {
348
+ readonly type: "string";
349
+ readonly format: "uri";
350
+ readonly maxLength: 2048;
351
+ readonly pattern: "^https://";
352
+ readonly description: "An https URL, single-use, carrying the bridge's binding nonce.";
353
+ };
354
+ };
355
+ };
356
+ readonly ext: {
357
+ readonly $ref: "#/$defs/Ext";
358
+ };
359
+ };
360
+ };
361
+ readonly Ext: {
362
+ readonly title: "Ext";
363
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
364
+ readonly type: "object";
365
+ readonly minProperties: 1;
366
+ readonly additionalProperties: true;
367
+ readonly propertyNames: {
368
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
369
+ };
370
+ };
371
+ readonly GitNamespace: {
372
+ readonly title: "GitNamespace";
373
+ readonly description: "The VTC's binding to one owner on one forge.";
374
+ readonly type: "object";
375
+ readonly additionalProperties: false;
376
+ readonly required: readonly ["id", "forge", "owner", "mode", "state"];
377
+ readonly properties: {
378
+ readonly id: {
379
+ readonly $ref: "#/$defs/NamespaceId";
380
+ };
381
+ readonly forge: {
382
+ readonly $ref: "#/$defs/ForgeHost";
383
+ };
384
+ readonly owner: {
385
+ readonly $ref: "#/$defs/Segment";
386
+ readonly description: "The organisation or user on the forge, lowercased.";
387
+ };
388
+ readonly kind: {
389
+ readonly type: "string";
390
+ readonly enum: readonly ["organization", "user"];
391
+ readonly description: "Whether the owner is an organisation or a personal account, as the forge reports it. Present once known: a bridge-mode namespace learns it when binding completes, and a manual-mode namespace MAY never learn it.";
392
+ };
393
+ readonly mode: {
394
+ readonly type: "string";
395
+ readonly enum: readonly ["bridge", "manual"];
396
+ readonly description: "`bridge` — a bridge service acts on the forge for this namespace (creates repositories, projects roles, reports drift). `manual` — no automation; people with forge access carry out the steps the VTC names, and the VTC governs the rights alone.";
397
+ };
398
+ readonly state: {
399
+ readonly type: "string";
400
+ readonly enum: readonly ["pending", "bound"];
401
+ readonly description: "`pending` — binding has started and the forge-side proof has not arrived yet. `bound` — the VTC governs rights under this namespace.";
402
+ };
403
+ };
404
+ };
405
+ readonly Segment: {
406
+ readonly title: "Segment";
407
+ readonly description: "One lowercased owner or repository name. Forges compare these case-insensitively, so the wire form is always lowercase and a producer lowercases before sending. A leading `.` is refused, which rules out `.` and `..`.";
408
+ readonly type: "string";
409
+ readonly minLength: 1;
410
+ readonly maxLength: 100;
411
+ readonly pattern: "^[a-z0-9_-][a-z0-9._-]*$";
412
+ };
413
+ readonly ForgeHost: {
414
+ readonly title: "ForgeHost";
415
+ readonly 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.";
416
+ readonly type: "string";
417
+ readonly minLength: 3;
418
+ readonly maxLength: 253;
419
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
420
+ };
421
+ readonly NamespaceId: {
422
+ readonly title: "NamespaceId";
423
+ readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
424
+ readonly type: "string";
425
+ readonly minLength: 1;
426
+ readonly maxLength: 128;
427
+ };
428
+ };
429
+ };
430
+ };
431
+ /**
432
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
433
+ * tracks the *issuer* party's requirement because a response swaps the
434
+ * parties (§7.3 item 5).
435
+ */
436
+ export declare const RESPONSE_SPEC: {
437
+ readonly typeUri: "https://trusttasks.org/spec/git-ns/namespace/bind/0.1#response";
438
+ readonly isBearer: false;
439
+ readonly isProofRequired: true;
440
+ readonly isRecipientRequired: true;
441
+ readonly isIssuedAtRequired: true;
442
+ readonly payloadSchema: {
443
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
444
+ readonly $ref: "#/$defs/Response";
445
+ readonly $defs: {
446
+ readonly Response: {
447
+ readonly $anchor: "response";
448
+ readonly title: "Git Namespaces — Bind Namespace — response payload";
449
+ readonly description: "The namespace as recorded, and where to go next if it is still pending.";
450
+ readonly type: "object";
451
+ readonly additionalProperties: false;
452
+ readonly required: readonly ["namespace"];
453
+ readonly properties: {
454
+ readonly namespace: {
455
+ readonly $ref: "#/$defs/GitNamespace";
456
+ };
457
+ readonly next: {
458
+ readonly type: "object";
459
+ readonly additionalProperties: false;
460
+ readonly required: readonly ["url"];
461
+ readonly description: "Present when the namespace is `pending`: where the administrator goes to prove control of the forge owner (install the community's forge app, or sign in to the forge and authorise the bridge).";
462
+ readonly properties: {
463
+ readonly url: {
464
+ readonly type: "string";
465
+ readonly format: "uri";
466
+ readonly maxLength: 2048;
467
+ readonly pattern: "^https://";
468
+ readonly description: "An https URL, single-use, carrying the bridge's binding nonce.";
469
+ };
470
+ };
471
+ };
472
+ readonly ext: {
473
+ readonly $ref: "#/$defs/Ext";
474
+ };
475
+ };
476
+ };
477
+ readonly Ext: {
478
+ readonly title: "Ext";
479
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
480
+ readonly type: "object";
481
+ readonly minProperties: 1;
482
+ readonly additionalProperties: true;
483
+ readonly propertyNames: {
484
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
485
+ };
486
+ };
487
+ readonly GitNamespace: {
488
+ readonly title: "GitNamespace";
489
+ readonly description: "The VTC's binding to one owner on one forge.";
490
+ readonly type: "object";
491
+ readonly additionalProperties: false;
492
+ readonly required: readonly ["id", "forge", "owner", "mode", "state"];
493
+ readonly properties: {
494
+ readonly id: {
495
+ readonly $ref: "#/$defs/NamespaceId";
496
+ };
497
+ readonly forge: {
498
+ readonly $ref: "#/$defs/ForgeHost";
499
+ };
500
+ readonly owner: {
501
+ readonly $ref: "#/$defs/Segment";
502
+ readonly description: "The organisation or user on the forge, lowercased.";
503
+ };
504
+ readonly kind: {
505
+ readonly type: "string";
506
+ readonly enum: readonly ["organization", "user"];
507
+ readonly description: "Whether the owner is an organisation or a personal account, as the forge reports it. Present once known: a bridge-mode namespace learns it when binding completes, and a manual-mode namespace MAY never learn it.";
508
+ };
509
+ readonly mode: {
510
+ readonly type: "string";
511
+ readonly enum: readonly ["bridge", "manual"];
512
+ readonly description: "`bridge` — a bridge service acts on the forge for this namespace (creates repositories, projects roles, reports drift). `manual` — no automation; people with forge access carry out the steps the VTC names, and the VTC governs the rights alone.";
513
+ };
514
+ readonly state: {
515
+ readonly type: "string";
516
+ readonly enum: readonly ["pending", "bound"];
517
+ readonly description: "`pending` — binding has started and the forge-side proof has not arrived yet. `bound` — the VTC governs rights under this namespace.";
518
+ };
519
+ };
520
+ };
521
+ readonly Segment: {
522
+ readonly title: "Segment";
523
+ readonly description: "One lowercased owner or repository name. Forges compare these case-insensitively, so the wire form is always lowercase and a producer lowercases before sending. A leading `.` is refused, which rules out `.` and `..`.";
524
+ readonly type: "string";
525
+ readonly minLength: 1;
526
+ readonly maxLength: 100;
527
+ readonly pattern: "^[a-z0-9_-][a-z0-9._-]*$";
528
+ };
529
+ readonly ForgeHost: {
530
+ readonly title: "ForgeHost";
531
+ readonly 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.";
532
+ readonly type: "string";
533
+ readonly minLength: 3;
534
+ readonly maxLength: 253;
535
+ readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
536
+ };
537
+ readonly NamespaceId: {
538
+ readonly title: "NamespaceId";
539
+ readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
540
+ readonly type: "string";
541
+ readonly minLength: 1;
542
+ readonly maxLength: 128;
543
+ };
544
+ };
545
+ };
546
+ };
547
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/git-ns/namespace/bind/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAG5G;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,yCAAyC;IACxD,SAAS,EAAE,YAAY,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE;QACL;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAEnE,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,uDAAgE,CAAC;AAEzF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,iCAAiC,CAAC;AAExD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,gEAAyE,CAAC;AAE3G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,yCAAyC,CAAC;AAEjE;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0H1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}