@openvtc/trust-tasks 0.20.6 → 0.20.8

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 (152) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/dist/_shared/components.d.ts +55 -6
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/step-up/approve-request/0.3/payload.d.ts +613 -0
  5. package/dist/auth/step-up/approve-request/0.3/payload.d.ts.map +1 -0
  6. package/dist/auth/step-up/approve-request/0.3/payload.js +345 -0
  7. package/dist/auth/step-up/approve-request/0.3/payload.js.map +1 -0
  8. package/dist/auth/step-up/approve-response/0.4/payload.d.ts +887 -0
  9. package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -0
  10. package/dist/auth/step-up/approve-response/0.4/payload.js +504 -0
  11. package/dist/auth/step-up/approve-response/0.4/payload.js.map +1 -0
  12. package/dist/backup/abort/0.1/payload.d.ts +262 -0
  13. package/dist/backup/abort/0.1/payload.d.ts.map +1 -0
  14. package/dist/backup/abort/0.1/payload.js +146 -0
  15. package/dist/backup/abort/0.1/payload.js.map +1 -0
  16. package/dist/backup/complete-export/0.1/payload.d.ts +262 -0
  17. package/dist/backup/complete-export/0.1/payload.d.ts.map +1 -0
  18. package/dist/backup/complete-export/0.1/payload.js +146 -0
  19. package/dist/backup/complete-export/0.1/payload.js.map +1 -0
  20. package/dist/backup/finalize-import/0.1/payload.d.ts +395 -0
  21. package/dist/backup/finalize-import/0.1/payload.d.ts.map +1 -0
  22. package/dist/backup/finalize-import/0.1/payload.js +209 -0
  23. package/dist/backup/finalize-import/0.1/payload.js.map +1 -0
  24. package/dist/backup/get-chunk/0.1/payload.d.ts +461 -0
  25. package/dist/backup/get-chunk/0.1/payload.d.ts.map +1 -0
  26. package/dist/backup/get-chunk/0.1/payload.js +250 -0
  27. package/dist/backup/get-chunk/0.1/payload.js.map +1 -0
  28. package/dist/backup/initiate-export/0.1/payload.d.ts +896 -0
  29. package/dist/backup/initiate-export/0.1/payload.d.ts.map +1 -0
  30. package/dist/backup/initiate-export/0.1/payload.js +507 -0
  31. package/dist/backup/initiate-export/0.1/payload.js.map +1 -0
  32. package/dist/backup/initiate-import/0.1/payload.d.ts +888 -0
  33. package/dist/backup/initiate-import/0.1/payload.d.ts.map +1 -0
  34. package/dist/backup/initiate-import/0.1/payload.js +504 -0
  35. package/dist/backup/initiate-import/0.1/payload.js.map +1 -0
  36. package/dist/backup/put-chunk/0.1/payload.d.ts +495 -0
  37. package/dist/backup/put-chunk/0.1/payload.d.ts.map +1 -0
  38. package/dist/backup/put-chunk/0.1/payload.js +265 -0
  39. package/dist/backup/put-chunk/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/_shared/0.1/git-ns.d.ts +1 -1
  41. package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -1
  42. package/dist/git-ns/_shared/0.2/git-ns.d.ts +1 -1
  43. package/dist/git-ns/_shared/0.2/git-ns.d.ts.map +1 -1
  44. package/dist/git-ns/_shared/0.3/git-ns.d.ts +16 -0
  45. package/dist/git-ns/_shared/0.3/git-ns.d.ts.map +1 -0
  46. package/dist/git-ns/_shared/0.3/git-ns.js +6 -0
  47. package/dist/git-ns/_shared/0.3/git-ns.js.map +1 -0
  48. package/dist/git-ns/bridge/job/0.1/payload.d.ts +1 -1
  49. package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -1
  50. package/dist/git-ns/bridge/job/0.2/payload.d.ts +1 -1
  51. package/dist/git-ns/bridge/job/0.2/payload.d.ts.map +1 -1
  52. package/dist/git-ns/bridge/job/0.3/payload.d.ts +1068 -0
  53. package/dist/git-ns/bridge/job/0.3/payload.d.ts.map +1 -0
  54. package/dist/git-ns/bridge/job/0.3/payload.js +573 -0
  55. package/dist/git-ns/bridge/job/0.3/payload.js.map +1 -0
  56. package/dist/git-ns/drift/resolve/0.1/payload.d.ts +1 -1
  57. package/dist/git-ns/drift/resolve/0.1/payload.d.ts.map +1 -1
  58. package/dist/git-ns/drift/resolve/0.2/payload.d.ts +1060 -0
  59. package/dist/git-ns/drift/resolve/0.2/payload.d.ts.map +1 -0
  60. package/dist/git-ns/drift/resolve/0.2/payload.js +630 -0
  61. package/dist/git-ns/drift/resolve/0.2/payload.js.map +1 -0
  62. package/dist/git-ns/namespace/reseat/0.1/payload.d.ts +1 -1
  63. package/dist/git-ns/namespace/reseat/0.1/payload.d.ts.map +1 -1
  64. package/dist/git-ns/namespace/reseat/0.2/payload.d.ts +515 -0
  65. package/dist/git-ns/namespace/reseat/0.2/payload.d.ts.map +1 -0
  66. package/dist/git-ns/namespace/reseat/0.2/payload.js +296 -0
  67. package/dist/git-ns/namespace/reseat/0.2/payload.js.map +1 -0
  68. package/dist/git-ns/repo/adopt/0.1/payload.d.ts +1 -1
  69. package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -1
  70. package/dist/git-ns/repo/adopt/0.2/payload.d.ts +962 -0
  71. package/dist/git-ns/repo/adopt/0.2/payload.d.ts.map +1 -0
  72. package/dist/git-ns/repo/adopt/0.2/payload.js +583 -0
  73. package/dist/git-ns/repo/adopt/0.2/payload.js.map +1 -0
  74. package/dist/git-ns/repo/archive/0.1/payload.d.ts +1 -1
  75. package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -1
  76. package/dist/git-ns/repo/archive/0.2/payload.d.ts +959 -0
  77. package/dist/git-ns/repo/archive/0.2/payload.d.ts.map +1 -0
  78. package/dist/git-ns/repo/archive/0.2/payload.js +584 -0
  79. package/dist/git-ns/repo/archive/0.2/payload.js.map +1 -0
  80. package/dist/git-ns/repo/create/0.1/payload.d.ts +1 -1
  81. package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -1
  82. package/dist/git-ns/repo/create/0.2/payload.d.ts +1074 -0
  83. package/dist/git-ns/repo/create/0.2/payload.d.ts.map +1 -0
  84. package/dist/git-ns/repo/create/0.2/payload.js +636 -0
  85. package/dist/git-ns/repo/create/0.2/payload.js.map +1 -0
  86. package/dist/git-ns/repo/transfer/0.1/payload.d.ts +1 -1
  87. package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -1
  88. package/dist/git-ns/repo/transfer/0.2/payload.d.ts +947 -0
  89. package/dist/git-ns/repo/transfer/0.2/payload.d.ts.map +1 -0
  90. package/dist/git-ns/repo/transfer/0.2/payload.js +577 -0
  91. package/dist/git-ns/repo/transfer/0.2/payload.js.map +1 -0
  92. package/dist/git-ns/right/grant/0.1/payload.d.ts +1 -1
  93. package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -1
  94. package/dist/git-ns/right/grant/0.2/payload.d.ts +506 -0
  95. package/dist/git-ns/right/grant/0.2/payload.d.ts.map +1 -0
  96. package/dist/git-ns/right/grant/0.2/payload.js +289 -0
  97. package/dist/git-ns/right/grant/0.2/payload.js.map +1 -0
  98. package/dist/git-ns/right/revoke/0.1/payload.d.ts +1 -1
  99. package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -1
  100. package/dist/git-ns/right/revoke/0.2/payload.d.ts +492 -0
  101. package/dist/git-ns/right/revoke/0.2/payload.d.ts.map +1 -0
  102. package/dist/git-ns/right/revoke/0.2/payload.js +284 -0
  103. package/dist/git-ns/right/revoke/0.2/payload.js.map +1 -0
  104. package/dist/git-ns/view/0.1/payload.d.ts +1 -1
  105. package/dist/git-ns/view/0.1/payload.d.ts.map +1 -1
  106. package/dist/git-ns/view/0.2/payload.d.ts +1 -1
  107. package/dist/git-ns/view/0.2/payload.d.ts.map +1 -1
  108. package/dist/git-ns/view/0.3/payload.d.ts +1524 -0
  109. package/dist/git-ns/view/0.3/payload.d.ts.map +1 -0
  110. package/dist/git-ns/view/0.3/payload.js +918 -0
  111. package/dist/git-ns/view/0.3/payload.js.map +1 -0
  112. package/dist/index.d.ts +20 -0
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.js +20 -0
  115. package/dist/index.js.map +1 -1
  116. package/package.json +1 -1
  117. package/src/_shared/components.ts +55 -6
  118. package/src/auth/step-up/approve-request/0.3/payload.ts +421 -0
  119. package/src/auth/step-up/approve-response/0.4/payload.ts +593 -0
  120. package/src/backup/abort/0.1/payload.ts +191 -0
  121. package/src/backup/complete-export/0.1/payload.ts +191 -0
  122. package/src/backup/finalize-import/0.1/payload.ts +279 -0
  123. package/src/backup/get-chunk/0.1/payload.ts +308 -0
  124. package/src/backup/initiate-export/0.1/payload.ts +564 -0
  125. package/src/backup/initiate-import/0.1/payload.ts +561 -0
  126. package/src/backup/put-chunk/0.1/payload.ts +331 -0
  127. package/src/git-ns/_shared/0.1/git-ns.ts +1 -1
  128. package/src/git-ns/_shared/0.2/git-ns.ts +1 -1
  129. package/src/git-ns/_shared/0.3/git-ns.ts +17 -0
  130. package/src/git-ns/bridge/job/0.1/payload.ts +1 -1
  131. package/src/git-ns/bridge/job/0.2/payload.ts +1 -1
  132. package/src/git-ns/bridge/job/0.3/payload.ts +691 -0
  133. package/src/git-ns/drift/resolve/0.1/payload.ts +1 -1
  134. package/src/git-ns/drift/resolve/0.2/payload.ts +699 -0
  135. package/src/git-ns/namespace/reseat/0.1/payload.ts +1 -1
  136. package/src/git-ns/namespace/reseat/0.2/payload.ts +342 -0
  137. package/src/git-ns/repo/adopt/0.1/payload.ts +1 -1
  138. package/src/git-ns/repo/adopt/0.2/payload.ts +628 -0
  139. package/src/git-ns/repo/archive/0.1/payload.ts +1 -1
  140. package/src/git-ns/repo/archive/0.2/payload.ts +626 -0
  141. package/src/git-ns/repo/create/0.1/payload.ts +1 -1
  142. package/src/git-ns/repo/create/0.2/payload.ts +689 -0
  143. package/src/git-ns/repo/transfer/0.1/payload.ts +1 -1
  144. package/src/git-ns/repo/transfer/0.2/payload.ts +619 -0
  145. package/src/git-ns/right/grant/0.1/payload.ts +1 -1
  146. package/src/git-ns/right/grant/0.2/payload.ts +340 -0
  147. package/src/git-ns/right/revoke/0.1/payload.ts +1 -1
  148. package/src/git-ns/right/revoke/0.2/payload.ts +331 -0
  149. package/src/git-ns/view/0.1/payload.ts +1 -1
  150. package/src/git-ns/view/0.2/payload.ts +1 -1
  151. package/src/git-ns/view/0.3/payload.ts +981 -0
  152. package/src/index.ts +20 -0
@@ -0,0 +1,340 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/right/grant/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Did_GitNsV0_3 as Did, Ext, Resource, Right, RightRecord_GitNsV0_3 as RightRecord } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Grants one git right on one forge-qualified resource to a DID. The VTC checks the grant against the actor's own rights — scope containment, no escalation, members-only namespace rights — and against community policy, records it, and publishes it to the Trust Registry.
11
+ */
12
+ export interface GitNamespacesGrantRightPayload {
13
+ /**
14
+ * Who receives the right.
15
+ */
16
+ subject: Did;
17
+ right: Right;
18
+ /**
19
+ * Where the right applies: a namespace resource for `git.ns.admin` and `git.repo.create`, a repository resource for `git.repo.own` and `git.repo.maintain`, either for `git.commit.sign`.
20
+ */
21
+ resource: Resource;
22
+ /**
23
+ * When the right lapses. Absent: it lasts until revoked.
24
+ */
25
+ expiresAt?: string;
26
+ /**
27
+ * Why, in the granter's words. Recorded with the right and disclosed only to the resource's owners and namespace admins.
28
+ */
29
+ reason?: string;
30
+ ext?: Ext;
31
+ }
32
+ /**
33
+ * The recorded right.
34
+ */
35
+ export interface GitNamespacesGrantRightResponsePayload {
36
+ /**
37
+ * The recorded right — newly recorded, or the live record that already existed.
38
+ */
39
+ right: RightRecord;
40
+ ext?: Ext;
41
+ }
42
+
43
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
44
+ export type { Did, Ext, Resource, Right, RightRecord };
45
+
46
+ /** Trust Task type URI. */
47
+ export const TYPE_URI = "https://trusttasks.org/spec/git-ns/right/grant/0.2" as const;
48
+
49
+ /** Stable alias for this specification's request payload shape. */
50
+ export type Payload = GitNamespacesGrantRightPayload;
51
+
52
+ /** Trust Task response type URI (request type URI + "#response"). */
53
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/right/grant/0.2#response" as const;
54
+
55
+ /** Stable alias for this specification's success-response payload shape. */
56
+ export type Response = GitNamespacesGrantRightResponsePayload;
57
+
58
+ /**
59
+ * This specification's payload schema, as a value.
60
+ *
61
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
62
+ * rather than only as a `.json` file because TypeScript types are erased
63
+ * at runtime: without a schema a consumer has nothing to validate, and
64
+ * every REQUIRED payload member is optional in practice. Cross-file
65
+ * `$ref`s are already inlined, so it needs no resolver.
66
+ */
67
+ export const PAYLOAD_SCHEMA = {
68
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
69
+ "$id": "https://trusttasks.org/spec/git-ns/right/grant/0.2",
70
+ "title": "Git Namespaces — Grant Right — payload",
71
+ "description": "Grants one git right on one forge-qualified resource to a DID. The VTC checks the grant against the actor's own rights — scope containment, no escalation, members-only namespace rights — and against community policy, records it, and publishes it to the Trust Registry.",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "subject",
76
+ "right",
77
+ "resource"
78
+ ],
79
+ "properties": {
80
+ "subject": {
81
+ "$ref": "#/$defs/Did",
82
+ "description": "Who receives the right."
83
+ },
84
+ "right": {
85
+ "$ref": "#/$defs/Right"
86
+ },
87
+ "resource": {
88
+ "$ref": "#/$defs/Resource",
89
+ "description": "Where the right applies: a namespace resource for `git.ns.admin` and `git.repo.create`, a repository resource for `git.repo.own` and `git.repo.maintain`, either for `git.commit.sign`."
90
+ },
91
+ "expiresAt": {
92
+ "type": "string",
93
+ "format": "date-time",
94
+ "description": "When the right lapses. Absent: it lasts until revoked."
95
+ },
96
+ "reason": {
97
+ "type": "string",
98
+ "maxLength": 1024,
99
+ "description": "Why, in the granter's words. Recorded with the right and disclosed only to the resource's owners and namespace admins."
100
+ },
101
+ "ext": {
102
+ "$ref": "#/$defs/Ext"
103
+ }
104
+ },
105
+ "$defs": {
106
+ "Response": {
107
+ "$anchor": "response",
108
+ "title": "Git Namespaces — Grant Right — response payload",
109
+ "description": "The recorded right.",
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "right"
114
+ ],
115
+ "properties": {
116
+ "right": {
117
+ "$ref": "#/$defs/RightRecord",
118
+ "description": "The recorded right — newly recorded, or the live record that already existed."
119
+ },
120
+ "ext": {
121
+ "$ref": "#/$defs/Ext"
122
+ }
123
+ }
124
+ },
125
+ "Ext": {
126
+ "title": "Ext",
127
+ "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.",
128
+ "type": "object",
129
+ "minProperties": 1,
130
+ "additionalProperties": true,
131
+ "propertyNames": {
132
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
133
+ }
134
+ },
135
+ "RightRecord": {
136
+ "title": "RightRecord",
137
+ "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.",
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "subject",
142
+ "right",
143
+ "resource",
144
+ "grantedBy",
145
+ "grantedAt"
146
+ ],
147
+ "properties": {
148
+ "subject": {
149
+ "$ref": "#/$defs/Did",
150
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
151
+ },
152
+ "right": {
153
+ "$ref": "#/$defs/Right"
154
+ },
155
+ "resource": {
156
+ "$ref": "#/$defs/Resource"
157
+ },
158
+ "grantedBy": {
159
+ "$ref": "#/$defs/Did",
160
+ "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."
161
+ },
162
+ "grantedAt": {
163
+ "type": "string",
164
+ "format": "date-time"
165
+ },
166
+ "expiresAt": {
167
+ "type": "string",
168
+ "format": "date-time",
169
+ "description": "When the right lapses. Absent: no expiry."
170
+ },
171
+ "reason": {
172
+ "type": "string",
173
+ "maxLength": 1024,
174
+ "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."
175
+ }
176
+ }
177
+ },
178
+ "Did": {
179
+ "title": "Did",
180
+ "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.",
181
+ "type": "string",
182
+ "maxLength": 2048,
183
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
184
+ },
185
+ "Resource": {
186
+ "title": "Resource",
187
+ "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`.",
188
+ "type": "string",
189
+ "maxLength": 455,
190
+ "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}$"
191
+ },
192
+ "Right": {
193
+ "title": "Right",
194
+ "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.",
195
+ "type": "string",
196
+ "enum": [
197
+ "git.ns.admin",
198
+ "git.repo.create",
199
+ "git.repo.own",
200
+ "git.repo.maintain",
201
+ "git.commit.sign"
202
+ ]
203
+ }
204
+ }
205
+ } as const;
206
+
207
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
208
+ export const RESPONSE_PAYLOAD_SCHEMA = {
209
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
210
+ "$ref": "#/$defs/Response",
211
+ "$defs": {
212
+ "Response": {
213
+ "$anchor": "response",
214
+ "title": "Git Namespaces — Grant Right — response payload",
215
+ "description": "The recorded right.",
216
+ "type": "object",
217
+ "additionalProperties": false,
218
+ "required": [
219
+ "right"
220
+ ],
221
+ "properties": {
222
+ "right": {
223
+ "$ref": "#/$defs/RightRecord",
224
+ "description": "The recorded right — newly recorded, or the live record that already existed."
225
+ },
226
+ "ext": {
227
+ "$ref": "#/$defs/Ext"
228
+ }
229
+ }
230
+ },
231
+ "Ext": {
232
+ "title": "Ext",
233
+ "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.",
234
+ "type": "object",
235
+ "minProperties": 1,
236
+ "additionalProperties": true,
237
+ "propertyNames": {
238
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
239
+ }
240
+ },
241
+ "RightRecord": {
242
+ "title": "RightRecord",
243
+ "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.",
244
+ "type": "object",
245
+ "additionalProperties": false,
246
+ "required": [
247
+ "subject",
248
+ "right",
249
+ "resource",
250
+ "grantedBy",
251
+ "grantedAt"
252
+ ],
253
+ "properties": {
254
+ "subject": {
255
+ "$ref": "#/$defs/Did",
256
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
257
+ },
258
+ "right": {
259
+ "$ref": "#/$defs/Right"
260
+ },
261
+ "resource": {
262
+ "$ref": "#/$defs/Resource"
263
+ },
264
+ "grantedBy": {
265
+ "$ref": "#/$defs/Did",
266
+ "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."
267
+ },
268
+ "grantedAt": {
269
+ "type": "string",
270
+ "format": "date-time"
271
+ },
272
+ "expiresAt": {
273
+ "type": "string",
274
+ "format": "date-time",
275
+ "description": "When the right lapses. Absent: no expiry."
276
+ },
277
+ "reason": {
278
+ "type": "string",
279
+ "maxLength": 1024,
280
+ "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."
281
+ }
282
+ }
283
+ },
284
+ "Did": {
285
+ "title": "Did",
286
+ "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.",
287
+ "type": "string",
288
+ "maxLength": 2048,
289
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
290
+ },
291
+ "Resource": {
292
+ "title": "Resource",
293
+ "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`.",
294
+ "type": "string",
295
+ "maxLength": 455,
296
+ "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}$"
297
+ },
298
+ "Right": {
299
+ "title": "Right",
300
+ "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.",
301
+ "type": "string",
302
+ "enum": [
303
+ "git.ns.admin",
304
+ "git.repo.create",
305
+ "git.repo.own",
306
+ "git.repo.maintain",
307
+ "git.commit.sign"
308
+ ]
309
+ }
310
+ }
311
+ } as const;
312
+
313
+ /**
314
+ * SPEC.md §7.2 policy for the request variant, from this specification's
315
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
316
+ * per-specification and cannot be derived from the document alone, and
317
+ * item 2 needs the schema this carries.
318
+ */
319
+ export const SPEC = {
320
+ typeUri: TYPE_URI,
321
+ isBearer: false,
322
+ isProofRequired: true,
323
+ isRecipientRequired: true,
324
+ isIssuedAtRequired: true,
325
+ payloadSchema: PAYLOAD_SCHEMA,
326
+ } as const;
327
+
328
+ /**
329
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
330
+ * tracks the *issuer* party's requirement because a response swaps the
331
+ * parties (§7.3 item 5).
332
+ */
333
+ export const RESPONSE_SPEC = {
334
+ typeUri: RESPONSE_TYPE_URI,
335
+ isBearer: false,
336
+ isProofRequired: true,
337
+ isRecipientRequired: true,
338
+ isIssuedAtRequired: true,
339
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
340
+ } as const;
@@ -3,7 +3,7 @@
3
3
  * Source: specs/git-ns/right/revoke/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Did, Ext, Resource, Right, RightRecord } from "../../../../_shared/components.js";
6
+ import type { Did_GitNsV0_1 as Did, Ext, Resource, Right, RightRecord_GitNsV0_1 as RightRecord } from "../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**
@@ -0,0 +1,331 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/right/revoke/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Did_GitNsV0_3 as Did, Ext, Resource, Right, RightRecord_GitNsV0_3 as RightRecord } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Revokes one recorded git right and withdraws it from the Trust Registry.
11
+ */
12
+ export interface GitNamespacesRevokeRightPayload {
13
+ /**
14
+ * Who holds the right.
15
+ */
16
+ subject: Did;
17
+ right: Right;
18
+ /**
19
+ * The resource exactly as recorded. Revocation matches the record; it does not revoke a narrower right the subject holds inside this resource.
20
+ */
21
+ resource: Resource;
22
+ /**
23
+ * Why, in the revoker's words. Kept in the VTC's audit record.
24
+ */
25
+ reason?: string;
26
+ ext?: Ext;
27
+ }
28
+ /**
29
+ * The revoked record.
30
+ */
31
+ export interface GitNamespacesRevokeRightResponsePayload {
32
+ /**
33
+ * The record as it stood when it was revoked.
34
+ */
35
+ revoked: RightRecord;
36
+ ext?: Ext;
37
+ }
38
+
39
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
40
+ export type { Did, Ext, Resource, Right, RightRecord };
41
+
42
+ /** Trust Task type URI. */
43
+ export const TYPE_URI = "https://trusttasks.org/spec/git-ns/right/revoke/0.2" as const;
44
+
45
+ /** Stable alias for this specification's request payload shape. */
46
+ export type Payload = GitNamespacesRevokeRightPayload;
47
+
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/right/revoke/0.2#response" as const;
50
+
51
+ /** Stable alias for this specification's success-response payload shape. */
52
+ export type Response = GitNamespacesRevokeRightResponsePayload;
53
+
54
+ /**
55
+ * This specification's payload schema, as a value.
56
+ *
57
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
58
+ * rather than only as a `.json` file because TypeScript types are erased
59
+ * at runtime: without a schema a consumer has nothing to validate, and
60
+ * every REQUIRED payload member is optional in practice. Cross-file
61
+ * `$ref`s are already inlined, so it needs no resolver.
62
+ */
63
+ export const PAYLOAD_SCHEMA = {
64
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
65
+ "$id": "https://trusttasks.org/spec/git-ns/right/revoke/0.2",
66
+ "title": "Git Namespaces — Revoke Right — payload",
67
+ "description": "Revokes one recorded git right and withdraws it from the Trust Registry.",
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "subject",
72
+ "right",
73
+ "resource"
74
+ ],
75
+ "properties": {
76
+ "subject": {
77
+ "$ref": "#/$defs/Did",
78
+ "description": "Who holds the right."
79
+ },
80
+ "right": {
81
+ "$ref": "#/$defs/Right"
82
+ },
83
+ "resource": {
84
+ "$ref": "#/$defs/Resource",
85
+ "description": "The resource exactly as recorded. Revocation matches the record; it does not revoke a narrower right the subject holds inside this resource."
86
+ },
87
+ "reason": {
88
+ "type": "string",
89
+ "maxLength": 1024,
90
+ "description": "Why, in the revoker's words. Kept in the VTC's audit record."
91
+ },
92
+ "ext": {
93
+ "$ref": "#/$defs/Ext"
94
+ }
95
+ },
96
+ "$defs": {
97
+ "Response": {
98
+ "$anchor": "response",
99
+ "title": "Git Namespaces — Revoke Right — response payload",
100
+ "description": "The revoked record.",
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": [
104
+ "revoked"
105
+ ],
106
+ "properties": {
107
+ "revoked": {
108
+ "$ref": "#/$defs/RightRecord",
109
+ "description": "The record as it stood when it was revoked."
110
+ },
111
+ "ext": {
112
+ "$ref": "#/$defs/Ext"
113
+ }
114
+ }
115
+ },
116
+ "Ext": {
117
+ "title": "Ext",
118
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
119
+ "type": "object",
120
+ "minProperties": 1,
121
+ "additionalProperties": true,
122
+ "propertyNames": {
123
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
124
+ }
125
+ },
126
+ "RightRecord": {
127
+ "title": "RightRecord",
128
+ "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.",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "subject",
133
+ "right",
134
+ "resource",
135
+ "grantedBy",
136
+ "grantedAt"
137
+ ],
138
+ "properties": {
139
+ "subject": {
140
+ "$ref": "#/$defs/Did",
141
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
142
+ },
143
+ "right": {
144
+ "$ref": "#/$defs/Right"
145
+ },
146
+ "resource": {
147
+ "$ref": "#/$defs/Resource"
148
+ },
149
+ "grantedBy": {
150
+ "$ref": "#/$defs/Did",
151
+ "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."
152
+ },
153
+ "grantedAt": {
154
+ "type": "string",
155
+ "format": "date-time"
156
+ },
157
+ "expiresAt": {
158
+ "type": "string",
159
+ "format": "date-time",
160
+ "description": "When the right lapses. Absent: no expiry."
161
+ },
162
+ "reason": {
163
+ "type": "string",
164
+ "maxLength": 1024,
165
+ "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."
166
+ }
167
+ }
168
+ },
169
+ "Did": {
170
+ "title": "Did",
171
+ "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.",
172
+ "type": "string",
173
+ "maxLength": 2048,
174
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
175
+ },
176
+ "Resource": {
177
+ "title": "Resource",
178
+ "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`.",
179
+ "type": "string",
180
+ "maxLength": 455,
181
+ "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}$"
182
+ },
183
+ "Right": {
184
+ "title": "Right",
185
+ "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.",
186
+ "type": "string",
187
+ "enum": [
188
+ "git.ns.admin",
189
+ "git.repo.create",
190
+ "git.repo.own",
191
+ "git.repo.maintain",
192
+ "git.commit.sign"
193
+ ]
194
+ }
195
+ }
196
+ } as const;
197
+
198
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
199
+ export const RESPONSE_PAYLOAD_SCHEMA = {
200
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
201
+ "$ref": "#/$defs/Response",
202
+ "$defs": {
203
+ "Response": {
204
+ "$anchor": "response",
205
+ "title": "Git Namespaces — Revoke Right — response payload",
206
+ "description": "The revoked record.",
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "required": [
210
+ "revoked"
211
+ ],
212
+ "properties": {
213
+ "revoked": {
214
+ "$ref": "#/$defs/RightRecord",
215
+ "description": "The record as it stood when it was revoked."
216
+ },
217
+ "ext": {
218
+ "$ref": "#/$defs/Ext"
219
+ }
220
+ }
221
+ },
222
+ "Ext": {
223
+ "title": "Ext",
224
+ "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
+ "type": "object",
226
+ "minProperties": 1,
227
+ "additionalProperties": true,
228
+ "propertyNames": {
229
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
230
+ }
231
+ },
232
+ "RightRecord": {
233
+ "title": "RightRecord",
234
+ "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.",
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "required": [
238
+ "subject",
239
+ "right",
240
+ "resource",
241
+ "grantedBy",
242
+ "grantedAt"
243
+ ],
244
+ "properties": {
245
+ "subject": {
246
+ "$ref": "#/$defs/Did",
247
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
248
+ },
249
+ "right": {
250
+ "$ref": "#/$defs/Right"
251
+ },
252
+ "resource": {
253
+ "$ref": "#/$defs/Resource"
254
+ },
255
+ "grantedBy": {
256
+ "$ref": "#/$defs/Did",
257
+ "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."
258
+ },
259
+ "grantedAt": {
260
+ "type": "string",
261
+ "format": "date-time"
262
+ },
263
+ "expiresAt": {
264
+ "type": "string",
265
+ "format": "date-time",
266
+ "description": "When the right lapses. Absent: no expiry."
267
+ },
268
+ "reason": {
269
+ "type": "string",
270
+ "maxLength": 1024,
271
+ "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."
272
+ }
273
+ }
274
+ },
275
+ "Did": {
276
+ "title": "Did",
277
+ "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.",
278
+ "type": "string",
279
+ "maxLength": 2048,
280
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
281
+ },
282
+ "Resource": {
283
+ "title": "Resource",
284
+ "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`.",
285
+ "type": "string",
286
+ "maxLength": 455,
287
+ "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}$"
288
+ },
289
+ "Right": {
290
+ "title": "Right",
291
+ "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.",
292
+ "type": "string",
293
+ "enum": [
294
+ "git.ns.admin",
295
+ "git.repo.create",
296
+ "git.repo.own",
297
+ "git.repo.maintain",
298
+ "git.commit.sign"
299
+ ]
300
+ }
301
+ }
302
+ } as const;
303
+
304
+ /**
305
+ * SPEC.md §7.2 policy for the request variant, from this specification's
306
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
307
+ * per-specification and cannot be derived from the document alone, and
308
+ * item 2 needs the schema this carries.
309
+ */
310
+ export const SPEC = {
311
+ typeUri: TYPE_URI,
312
+ isBearer: false,
313
+ isProofRequired: true,
314
+ isRecipientRequired: true,
315
+ isIssuedAtRequired: true,
316
+ payloadSchema: PAYLOAD_SCHEMA,
317
+ } as const;
318
+
319
+ /**
320
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
321
+ * tracks the *issuer* party's requirement because a response swaps the
322
+ * parties (§7.3 item 5).
323
+ */
324
+ export const RESPONSE_SPEC = {
325
+ typeUri: RESPONSE_TYPE_URI,
326
+ isBearer: false,
327
+ isProofRequired: true,
328
+ isRecipientRequired: true,
329
+ isIssuedAtRequired: true,
330
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
331
+ } as const;