@openvtc/trust-tasks 0.21.3 → 0.21.5

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 (212) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/_shared/components.d.ts +210 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/_shared/0.1/passkey-invite.d.ts +16 -0
  5. package/dist/auth/_shared/0.1/passkey-invite.d.ts.map +1 -0
  6. package/dist/auth/_shared/0.1/passkey-invite.js +6 -0
  7. package/dist/auth/_shared/0.1/passkey-invite.js.map +1 -0
  8. package/dist/auth/passkey/admin-list/0.1/payload.d.ts +484 -0
  9. package/dist/auth/passkey/admin-list/0.1/payload.d.ts.map +1 -0
  10. package/dist/auth/passkey/admin-list/0.1/payload.js +257 -0
  11. package/dist/auth/passkey/admin-list/0.1/payload.js.map +1 -0
  12. package/dist/auth/passkey/enroll/invite/list/0.1/payload.d.ts +393 -0
  13. package/dist/auth/passkey/enroll/invite/list/0.1/payload.d.ts.map +1 -0
  14. package/dist/auth/passkey/enroll/invite/list/0.1/payload.js +234 -0
  15. package/dist/auth/passkey/enroll/invite/list/0.1/payload.js.map +1 -0
  16. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.d.ts +228 -0
  17. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.d.ts.map +1 -0
  18. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.js +138 -0
  19. package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.js.map +1 -0
  20. package/dist/auth/passkey/enroll/invite/update/0.1/payload.d.ts +459 -0
  21. package/dist/auth/passkey/enroll/invite/update/0.1/payload.d.ts.map +1 -0
  22. package/dist/auth/passkey/enroll/invite/update/0.1/payload.js +286 -0
  23. package/dist/auth/passkey/enroll/invite/update/0.1/payload.js.map +1 -0
  24. package/dist/auth/step-up/start/0.1/payload.d.ts +420 -0
  25. package/dist/auth/step-up/start/0.1/payload.d.ts.map +1 -0
  26. package/dist/auth/step-up/start/0.1/payload.js +232 -0
  27. package/dist/auth/step-up/start/0.1/payload.js.map +1 -0
  28. package/dist/did-management/_shared/0.1/service-instance.d.ts +1 -1
  29. package/dist/did-management/_shared/0.1/service-instance.d.ts.map +1 -1
  30. package/dist/did-management/_shared/0.2/metrics-snapshot.d.ts +16 -0
  31. package/dist/did-management/_shared/0.2/metrics-snapshot.d.ts.map +1 -0
  32. package/dist/did-management/_shared/0.2/metrics-snapshot.js +6 -0
  33. package/dist/did-management/_shared/0.2/metrics-snapshot.js.map +1 -0
  34. package/dist/did-management/_shared/0.2/service-instance.d.ts +16 -0
  35. package/dist/did-management/_shared/0.2/service-instance.d.ts.map +1 -0
  36. package/dist/did-management/_shared/0.2/service-instance.js +6 -0
  37. package/dist/did-management/_shared/0.2/service-instance.js.map +1 -0
  38. package/dist/did-management/agent-name/resolve/0.1/payload.d.ts +318 -0
  39. package/dist/did-management/agent-name/resolve/0.1/payload.d.ts.map +1 -0
  40. package/dist/did-management/agent-name/resolve/0.1/payload.js +179 -0
  41. package/dist/did-management/agent-name/resolve/0.1/payload.js.map +1 -0
  42. package/dist/did-management/did/log/0.1/payload.d.ts +436 -0
  43. package/dist/did-management/did/log/0.1/payload.d.ts.map +1 -0
  44. package/dist/did-management/did/log/0.1/payload.js +228 -0
  45. package/dist/did-management/did/log/0.1/payload.js.map +1 -0
  46. package/dist/did-management/domain/list/0.1/payload.d.ts +423 -0
  47. package/dist/did-management/domain/list/0.1/payload.d.ts.map +1 -0
  48. package/dist/did-management/domain/list/0.1/payload.js +244 -0
  49. package/dist/did-management/domain/list/0.1/payload.js.map +1 -0
  50. package/dist/did-management/identity/list/0.1/payload.d.ts +494 -0
  51. package/dist/did-management/identity/list/0.1/payload.d.ts.map +1 -0
  52. package/dist/did-management/identity/list/0.1/payload.js +274 -0
  53. package/dist/did-management/identity/list/0.1/payload.js.map +1 -0
  54. package/dist/did-management/identity/retire/0.1/payload.d.ts +242 -0
  55. package/dist/did-management/identity/retire/0.1/payload.d.ts.map +1 -0
  56. package/dist/did-management/identity/retire/0.1/payload.js +142 -0
  57. package/dist/did-management/identity/retire/0.1/payload.js.map +1 -0
  58. package/dist/did-management/registry/admin-register/0.1/payload.d.ts +1 -1
  59. package/dist/did-management/registry/admin-register/0.1/payload.d.ts.map +1 -1
  60. package/dist/did-management/registry/check/0.1/payload.d.ts +639 -0
  61. package/dist/did-management/registry/check/0.1/payload.d.ts.map +1 -0
  62. package/dist/did-management/registry/check/0.1/payload.js +383 -0
  63. package/dist/did-management/registry/check/0.1/payload.js.map +1 -0
  64. package/dist/did-management/registry/get/0.1/payload.d.ts +632 -0
  65. package/dist/did-management/registry/get/0.1/payload.d.ts.map +1 -0
  66. package/dist/did-management/registry/get/0.1/payload.js +381 -0
  67. package/dist/did-management/registry/get/0.1/payload.js.map +1 -0
  68. package/dist/did-management/registry/list/0.1/payload.d.ts +661 -0
  69. package/dist/did-management/registry/list/0.1/payload.d.ts.map +1 -0
  70. package/dist/did-management/registry/list/0.1/payload.js +398 -0
  71. package/dist/did-management/registry/list/0.1/payload.js.map +1 -0
  72. package/dist/did-management/registry/purge-domain/0.1/payload.d.ts +269 -0
  73. package/dist/did-management/registry/purge-domain/0.1/payload.d.ts.map +1 -0
  74. package/dist/did-management/registry/purge-domain/0.1/payload.js +160 -0
  75. package/dist/did-management/registry/purge-domain/0.1/payload.js.map +1 -0
  76. package/dist/did-management/replica/domain/assign/0.1/payload.d.ts +233 -0
  77. package/dist/did-management/replica/domain/assign/0.1/payload.d.ts.map +1 -0
  78. package/dist/did-management/replica/domain/assign/0.1/payload.js +143 -0
  79. package/dist/did-management/replica/domain/assign/0.1/payload.js.map +1 -0
  80. package/dist/did-management/replica/domain/purge/0.1/payload.d.ts +257 -0
  81. package/dist/did-management/replica/domain/purge/0.1/payload.d.ts.map +1 -0
  82. package/dist/did-management/replica/domain/purge/0.1/payload.js +155 -0
  83. package/dist/did-management/replica/domain/purge/0.1/payload.js.map +1 -0
  84. package/dist/did-management/replica/domain/unassign/0.1/payload.d.ts +257 -0
  85. package/dist/did-management/replica/domain/unassign/0.1/payload.d.ts.map +1 -0
  86. package/dist/did-management/replica/domain/unassign/0.1/payload.js +155 -0
  87. package/dist/did-management/replica/domain/unassign/0.1/payload.js.map +1 -0
  88. package/dist/did-management/replica/domain/upsert/0.1/payload.d.ts +401 -0
  89. package/dist/did-management/replica/domain/upsert/0.1/payload.d.ts.map +1 -0
  90. package/dist/did-management/replica/domain/upsert/0.1/payload.js +241 -0
  91. package/dist/did-management/replica/domain/upsert/0.1/payload.js.map +1 -0
  92. package/dist/did-management/server/config/0.1/payload.d.ts +838 -0
  93. package/dist/did-management/server/config/0.1/payload.d.ts.map +1 -0
  94. package/dist/did-management/server/config/0.1/payload.js +444 -0
  95. package/dist/did-management/server/config/0.1/payload.js.map +1 -0
  96. package/dist/did-management/server/info/0.1/payload.d.ts +285 -0
  97. package/dist/did-management/server/info/0.1/payload.d.ts.map +1 -0
  98. package/dist/did-management/server/info/0.1/payload.js +160 -0
  99. package/dist/did-management/server/info/0.1/payload.js.map +1 -0
  100. package/dist/did-management/server/metrics/0.1/payload.d.ts +674 -0
  101. package/dist/did-management/server/metrics/0.1/payload.d.ts.map +1 -0
  102. package/dist/did-management/server/metrics/0.1/payload.js +387 -0
  103. package/dist/did-management/server/metrics/0.1/payload.js.map +1 -0
  104. package/dist/did-management/stats/get/0.1/payload.d.ts +349 -0
  105. package/dist/did-management/stats/get/0.1/payload.d.ts.map +1 -0
  106. package/dist/did-management/stats/get/0.1/payload.js +187 -0
  107. package/dist/did-management/stats/get/0.1/payload.js.map +1 -0
  108. package/dist/did-management/stats/timeseries/0.1/payload.d.ts +381 -0
  109. package/dist/did-management/stats/timeseries/0.1/payload.d.ts.map +1 -0
  110. package/dist/did-management/stats/timeseries/0.1/payload.js +227 -0
  111. package/dist/did-management/stats/timeseries/0.1/payload.js.map +1 -0
  112. package/dist/git-ns/namespace/list/0.1/payload.d.ts +1343 -0
  113. package/dist/git-ns/namespace/list/0.1/payload.d.ts.map +1 -0
  114. package/dist/git-ns/namespace/list/0.1/payload.js +704 -0
  115. package/dist/git-ns/namespace/list/0.1/payload.js.map +1 -0
  116. package/dist/git-ns/repo/list/0.1/payload.d.ts +1377 -0
  117. package/dist/git-ns/repo/list/0.1/payload.d.ts.map +1 -0
  118. package/dist/git-ns/repo/list/0.1/payload.js +744 -0
  119. package/dist/git-ns/repo/list/0.1/payload.js.map +1 -0
  120. package/dist/git-ns/view/0.5/payload.d.ts +1722 -0
  121. package/dist/git-ns/view/0.5/payload.d.ts.map +1 -0
  122. package/dist/git-ns/view/0.5/payload.js +1024 -0
  123. package/dist/git-ns/view/0.5/payload.js.map +1 -0
  124. package/dist/index.d.ts +38 -0
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +38 -0
  127. package/dist/index.js.map +1 -1
  128. package/dist/vtc/_shared/0.1/invite.d.ts +1 -1
  129. package/dist/vtc/_shared/0.1/invite.d.ts.map +1 -1
  130. package/dist/vtc/admin/invites/list/0.1/payload.d.ts +1 -1
  131. package/dist/vtc/admin/invites/list/0.1/payload.d.ts.map +1 -1
  132. package/dist/webvh/_shared/0.1/sync-update.d.ts +16 -0
  133. package/dist/webvh/_shared/0.1/sync-update.d.ts.map +1 -0
  134. package/dist/webvh/_shared/0.1/sync-update.js +6 -0
  135. package/dist/webvh/_shared/0.1/sync-update.js.map +1 -0
  136. package/dist/webvh/_shared/0.1/witness-key.d.ts +16 -0
  137. package/dist/webvh/_shared/0.1/witness-key.d.ts.map +1 -0
  138. package/dist/webvh/_shared/0.1/witness-key.js +6 -0
  139. package/dist/webvh/_shared/0.1/witness-key.js.map +1 -0
  140. package/dist/webvh/sync/batch/0.1/payload.d.ts +503 -0
  141. package/dist/webvh/sync/batch/0.1/payload.d.ts.map +1 -0
  142. package/dist/webvh/sync/batch/0.1/payload.js +290 -0
  143. package/dist/webvh/sync/batch/0.1/payload.js.map +1 -0
  144. package/dist/webvh/sync/delete/0.2/payload.d.ts +242 -0
  145. package/dist/webvh/sync/delete/0.2/payload.d.ts.map +1 -0
  146. package/dist/webvh/sync/delete/0.2/payload.js +148 -0
  147. package/dist/webvh/sync/delete/0.2/payload.js.map +1 -0
  148. package/dist/webvh/sync/update/0.2/payload.d.ts +315 -0
  149. package/dist/webvh/sync/update/0.2/payload.d.ts.map +1 -0
  150. package/dist/webvh/sync/update/0.2/payload.js +177 -0
  151. package/dist/webvh/sync/update/0.2/payload.js.map +1 -0
  152. package/dist/webvh/witness/key/create/0.1/payload.d.ts +346 -0
  153. package/dist/webvh/witness/key/create/0.1/payload.d.ts.map +1 -0
  154. package/dist/webvh/witness/key/create/0.1/payload.js +202 -0
  155. package/dist/webvh/witness/key/create/0.1/payload.js.map +1 -0
  156. package/dist/webvh/witness/key/delete/0.1/payload.d.ts +237 -0
  157. package/dist/webvh/witness/key/delete/0.1/payload.d.ts.map +1 -0
  158. package/dist/webvh/witness/key/delete/0.1/payload.js +141 -0
  159. package/dist/webvh/witness/key/delete/0.1/payload.js.map +1 -0
  160. package/dist/webvh/witness/key/list/0.1/payload.d.ts +349 -0
  161. package/dist/webvh/witness/key/list/0.1/payload.d.ts.map +1 -0
  162. package/dist/webvh/witness/key/list/0.1/payload.js +204 -0
  163. package/dist/webvh/witness/key/list/0.1/payload.js.map +1 -0
  164. package/dist/webvh/witness/sign/0.1/payload.d.ts +401 -0
  165. package/dist/webvh/witness/sign/0.1/payload.d.ts.map +1 -0
  166. package/dist/webvh/witness/sign/0.1/payload.js +229 -0
  167. package/dist/webvh/witness/sign/0.1/payload.js.map +1 -0
  168. package/package.json +1 -1
  169. package/src/_shared/components.ts +210 -2
  170. package/src/auth/_shared/0.1/passkey-invite.ts +17 -0
  171. package/src/auth/passkey/admin-list/0.1/payload.ts +338 -0
  172. package/src/auth/passkey/enroll/invite/list/0.1/payload.ts +266 -0
  173. package/src/auth/passkey/enroll/invite/revoke/0.1/payload.ts +165 -0
  174. package/src/auth/passkey/enroll/invite/update/0.1/payload.ts +327 -0
  175. package/src/auth/step-up/start/0.1/payload.ts +287 -0
  176. package/src/did-management/_shared/0.1/service-instance.ts +1 -1
  177. package/src/did-management/_shared/0.2/metrics-snapshot.ts +17 -0
  178. package/src/did-management/_shared/0.2/service-instance.ts +17 -0
  179. package/src/did-management/agent-name/resolve/0.1/payload.ts +222 -0
  180. package/src/did-management/did/log/0.1/payload.ts +295 -0
  181. package/src/did-management/domain/list/0.1/payload.ts +280 -0
  182. package/src/did-management/identity/list/0.1/payload.ts +335 -0
  183. package/src/did-management/identity/retire/0.1/payload.ts +175 -0
  184. package/src/did-management/registry/admin-register/0.1/payload.ts +1 -1
  185. package/src/did-management/registry/check/0.1/payload.ts +415 -0
  186. package/src/did-management/registry/get/0.1/payload.ts +410 -0
  187. package/src/did-management/registry/list/0.1/payload.ts +434 -0
  188. package/src/did-management/registry/purge-domain/0.1/payload.ts +198 -0
  189. package/src/did-management/replica/domain/assign/0.1/payload.ts +173 -0
  190. package/src/did-management/replica/domain/purge/0.1/payload.ts +189 -0
  191. package/src/did-management/replica/domain/unassign/0.1/payload.ts +189 -0
  192. package/src/did-management/replica/domain/upsert/0.1/payload.ts +271 -0
  193. package/src/did-management/server/config/0.1/payload.ts +545 -0
  194. package/src/did-management/server/info/0.1/payload.ts +200 -0
  195. package/src/did-management/server/metrics/0.1/payload.ts +418 -0
  196. package/src/did-management/stats/get/0.1/payload.ts +237 -0
  197. package/src/did-management/stats/timeseries/0.1/payload.ts +279 -0
  198. package/src/git-ns/namespace/list/0.1/payload.ts +883 -0
  199. package/src/git-ns/repo/list/0.1/payload.ts +909 -0
  200. package/src/git-ns/view/0.5/payload.ts +1095 -0
  201. package/src/index.ts +38 -0
  202. package/src/vtc/_shared/0.1/invite.ts +1 -1
  203. package/src/vtc/admin/invites/list/0.1/payload.ts +1 -1
  204. package/src/webvh/_shared/0.1/sync-update.ts +17 -0
  205. package/src/webvh/_shared/0.1/witness-key.ts +17 -0
  206. package/src/webvh/sync/batch/0.1/payload.ts +336 -0
  207. package/src/webvh/sync/delete/0.2/payload.ts +181 -0
  208. package/src/webvh/sync/update/0.2/payload.ts +233 -0
  209. package/src/webvh/witness/key/create/0.1/payload.ts +231 -0
  210. package/src/webvh/witness/key/delete/0.1/payload.ts +171 -0
  211. package/src/webvh/witness/key/list/0.1/payload.ts +232 -0
  212. package/src/webvh/witness/sign/0.1/payload.ts +279 -0
@@ -0,0 +1,1024 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/view/0.5/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/git-ns/view/0.5";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/view/0.5#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/git-ns/view/0.5",
21
+ "title": "Git Namespaces — View — payload",
22
+ "description": "A member reads the namespaces, repositories and rights they are entitled to see, optionally narrowed to one resource, together with the forge accounts linked to their own DID. An administrator may instead ask for everything in the namespaces they administer, and either may narrow the rights to break-glass records.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [],
26
+ "properties": {
27
+ "resource": {
28
+ "$ref": "#/$defs/Resource",
29
+ "description": "Narrow the answer to this resource and everything inside it. Absent: everything the caller may see."
30
+ },
31
+ "scope": {
32
+ "type": "string",
33
+ "enum": [
34
+ "member",
35
+ "administrator"
36
+ ],
37
+ "description": "`member` (the default) — what the caller may see through their own git rights, exactly as in 0.4. `administrator` — everything in the namespaces the caller administers (every namespace, for a holder of the community-administrator capability; those they hold `git.ns.admin` on, for anyone else), reasons included. Refused with `git-ns/view:notAdministrator` when the caller administers no namespace within `resource`. Absent means `\"member\"`; this carries no schema-level default, so a producer that omits it is not normalised into sending it."
38
+ },
39
+ "breakGlass": {
40
+ "type": "boolean",
41
+ "description": "`true` narrows `rights` to the records carrying `breakGlass` — ratified ones included — and `namespaces` and `repos` to those that contain such a record. `false` or absent: no narrowing. Absent means `false`; this carries no schema-level default, so a producer that omits it is not normalised into sending it."
42
+ },
43
+ "ext": {
44
+ "$ref": "#/$defs/Ext"
45
+ }
46
+ },
47
+ "$defs": {
48
+ "LinkedAccount": {
49
+ "title": "LinkedAccount",
50
+ "description": "A forge account linked to the caller's DID with git-ns/account/link, and when the link completed.",
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "account",
55
+ "linkedAt"
56
+ ],
57
+ "properties": {
58
+ "account": {
59
+ "$ref": "#/$defs/ForgeAccount",
60
+ "description": "The linked account. `id` is authoritative; `login` is as the forge last reported it."
61
+ },
62
+ "linkedAt": {
63
+ "type": "string",
64
+ "format": "date-time",
65
+ "description": "When the link completed: when the VTC recorded the account against the caller's DID."
66
+ }
67
+ }
68
+ },
69
+ "Response": {
70
+ "$anchor": "response",
71
+ "title": "Git Namespaces — View — response payload",
72
+ "description": "What the caller may see — or, with `scope: administrator`, everything in the namespaces they administer — and the caller's own linked forge accounts.",
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "namespaces",
77
+ "repos",
78
+ "rights",
79
+ "accounts"
80
+ ],
81
+ "properties": {
82
+ "namespaces": {
83
+ "type": "array",
84
+ "items": {
85
+ "$ref": "#/$defs/GitNamespace"
86
+ },
87
+ "description": "Namespaces bound to this VTC that contain, or are contained by, `resource`. With `scope: administrator`, only those the caller administers. With `breakGlass: true`, only those containing a returned record."
88
+ },
89
+ "repos": {
90
+ "type": "array",
91
+ "items": {
92
+ "$ref": "#/$defs/RepoSummary"
93
+ },
94
+ "description": "Repositories within `resource`. `unmanaged` repositories are included only for callers holding `git.ns.admin` over them, or with `scope: administrator`. With `breakGlass: true`, only those carrying a returned record."
95
+ },
96
+ "rights": {
97
+ "type": "array",
98
+ "items": {
99
+ "$ref": "#/$defs/RightRecord"
100
+ },
101
+ "description": "Rights within `resource` the caller may see: always the caller's own; every right on a resource the caller owns or administers; every unratified break-glass record in a namespace they administer or on a resource they own. With `scope: administrator`, every recorded right in the namespaces the caller administers. `reason` is omitted except on resources the caller owns or administers. With `breakGlass: true`, only records carrying `breakGlass`."
102
+ },
103
+ "accounts": {
104
+ "type": "array",
105
+ "items": {
106
+ "$ref": "#/$defs/LinkedAccount"
107
+ },
108
+ "description": "The forge accounts linked to the caller's own DID — never another member's — at most one per forge. With `resource`, only the account on that resource's forge. Empty when the caller has linked none."
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext"
112
+ }
113
+ }
114
+ },
115
+ "Ext": {
116
+ "title": "Ext",
117
+ "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.",
118
+ "type": "object",
119
+ "minProperties": 1,
120
+ "additionalProperties": true,
121
+ "propertyNames": {
122
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
123
+ }
124
+ },
125
+ "RightRecord": {
126
+ "title": "RightRecord",
127
+ "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. A record carrying `breakGlass` was given by its subject to themselves through git-ns/right/break-glass; it is a real right, published like any other, and is shown with that flag on every surface that shows the record.",
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": [
131
+ "subject",
132
+ "right",
133
+ "resource",
134
+ "grantedBy",
135
+ "grantedAt"
136
+ ],
137
+ "properties": {
138
+ "subject": {
139
+ "$ref": "#/$defs/Did",
140
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
141
+ },
142
+ "right": {
143
+ "$ref": "#/$defs/Right"
144
+ },
145
+ "resource": {
146
+ "$ref": "#/$defs/Resource"
147
+ },
148
+ "grantedBy": {
149
+ "$ref": "#/$defs/Did",
150
+ "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."
151
+ },
152
+ "grantedAt": {
153
+ "type": "string",
154
+ "format": "date-time"
155
+ },
156
+ "expiresAt": {
157
+ "type": "string",
158
+ "format": "date-time",
159
+ "description": "When the right lapses. Absent: no expiry."
160
+ },
161
+ "reason": {
162
+ "type": "string",
163
+ "maxLength": 1024,
164
+ "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."
165
+ },
166
+ "breakGlass": {
167
+ "$ref": "#/$defs/BreakGlass",
168
+ "description": "Present exactly when the subject gave themselves this right through git-ns/right/break-glass. Absent for every other record."
169
+ }
170
+ }
171
+ },
172
+ "BreakGlass": {
173
+ "title": "BreakGlass",
174
+ "description": "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.",
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": [
178
+ "by",
179
+ "at",
180
+ "justification"
181
+ ],
182
+ "properties": {
183
+ "by": {
184
+ "$ref": "#/$defs/Did",
185
+ "description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
186
+ },
187
+ "at": {
188
+ "type": "string",
189
+ "format": "date-time",
190
+ "description": "When the VTC recorded the break-glass."
191
+ },
192
+ "justification": {
193
+ "type": "string",
194
+ "minLength": 1,
195
+ "maxLength": 2048,
196
+ "pattern": "\\S",
197
+ "description": "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published."
198
+ },
199
+ "effectiveAt": {
200
+ "type": "string",
201
+ "format": "date-time",
202
+ "description": "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so."
203
+ },
204
+ "ratifiedBy": {
205
+ "$ref": "#/$defs/Did",
206
+ "description": "The administrator who ratified the record — never its subject. Absent while unratified."
207
+ },
208
+ "ratifiedAt": {
209
+ "type": "string",
210
+ "format": "date-time",
211
+ "description": "When it was ratified. Present exactly when `ratifiedBy` is."
212
+ }
213
+ }
214
+ },
215
+ "Did": {
216
+ "title": "Did",
217
+ "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.",
218
+ "type": "string",
219
+ "maxLength": 2048,
220
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
221
+ },
222
+ "Resource": {
223
+ "title": "Resource",
224
+ "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`.",
225
+ "type": "string",
226
+ "maxLength": 455,
227
+ "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}$"
228
+ },
229
+ "Right": {
230
+ "title": "Right",
231
+ "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.",
232
+ "type": "string",
233
+ "enum": [
234
+ "git.ns.admin",
235
+ "git.repo.create",
236
+ "git.repo.own",
237
+ "git.repo.maintain",
238
+ "git.commit.sign"
239
+ ]
240
+ },
241
+ "RepoSummary": {
242
+ "title": "RepoSummary",
243
+ "description": "One repository as the VTC records it.",
244
+ "type": "object",
245
+ "additionalProperties": false,
246
+ "required": [
247
+ "resource",
248
+ "visibility",
249
+ "state",
250
+ "owners",
251
+ "bootstrap",
252
+ "sync"
253
+ ],
254
+ "properties": {
255
+ "resource": {
256
+ "$ref": "#/$defs/RepoResource"
257
+ },
258
+ "forgeId": {
259
+ "$ref": "#/$defs/ForgeId",
260
+ "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)."
261
+ },
262
+ "visibility": {
263
+ "$ref": "#/$defs/RepoVisibility"
264
+ },
265
+ "state": {
266
+ "type": "string",
267
+ "enum": [
268
+ "pendingCreate",
269
+ "active",
270
+ "archived",
271
+ "detached",
272
+ "orphaned",
273
+ "unmanaged"
274
+ ],
275
+ "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."
276
+ },
277
+ "owners": {
278
+ "type": "array",
279
+ "uniqueItems": true,
280
+ "items": {
281
+ "$ref": "#/$defs/Did"
282
+ },
283
+ "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."
284
+ },
285
+ "bootstrap": {
286
+ "$ref": "#/$defs/Bootstrap"
287
+ },
288
+ "sync": {
289
+ "$ref": "#/$defs/Sync"
290
+ }
291
+ }
292
+ },
293
+ "Sync": {
294
+ "title": "Sync",
295
+ "description": "How the forge compares with the VTC's projection for one repository.",
296
+ "type": "object",
297
+ "additionalProperties": false,
298
+ "required": [
299
+ "state",
300
+ "drift"
301
+ ],
302
+ "properties": {
303
+ "state": {
304
+ "type": "string",
305
+ "enum": [
306
+ "inSync",
307
+ "drift",
308
+ "pending",
309
+ "unchecked"
310
+ ],
311
+ "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)."
312
+ },
313
+ "checkedAt": {
314
+ "type": "string",
315
+ "format": "date-time",
316
+ "description": "When the forge was last compared. Absent if never."
317
+ },
318
+ "drift": {
319
+ "type": "array",
320
+ "items": {
321
+ "$ref": "#/$defs/DriftItem"
322
+ },
323
+ "description": "Outstanding drift. Empty unless `state` is `drift`."
324
+ }
325
+ }
326
+ },
327
+ "DriftItem": {
328
+ "title": "DriftItem",
329
+ "description": "One difference between the forge's observed state and the VTC's projection of a repository.",
330
+ "type": "object",
331
+ "additionalProperties": false,
332
+ "required": [
333
+ "type",
334
+ "resource"
335
+ ],
336
+ "properties": {
337
+ "type": {
338
+ "type": "string",
339
+ "enum": [
340
+ "roleAdded",
341
+ "roleRemoved",
342
+ "roleChanged",
343
+ "requiredCheckMissing",
344
+ "protectionWeakened",
345
+ "bootstrapMissing"
346
+ ],
347
+ "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."
348
+ },
349
+ "resource": {
350
+ "$ref": "#/$defs/RepoResource"
351
+ },
352
+ "account": {
353
+ "$ref": "#/$defs/ForgeAccount",
354
+ "description": "Whose role differs, for the three role types."
355
+ },
356
+ "observed": {
357
+ "type": "string",
358
+ "maxLength": 256,
359
+ "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."
360
+ },
361
+ "expected": {
362
+ "type": "string",
363
+ "maxLength": 256,
364
+ "description": "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing."
365
+ }
366
+ }
367
+ },
368
+ "ForgeAccount": {
369
+ "title": "ForgeAccount",
370
+ "description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
371
+ "type": "object",
372
+ "additionalProperties": false,
373
+ "required": [
374
+ "forge",
375
+ "id",
376
+ "login"
377
+ ],
378
+ "properties": {
379
+ "forge": {
380
+ "$ref": "#/$defs/ForgeHost"
381
+ },
382
+ "id": {
383
+ "$ref": "#/$defs/ForgeId"
384
+ },
385
+ "login": {
386
+ "type": "string",
387
+ "minLength": 1,
388
+ "maxLength": 100,
389
+ "description": "The account's current login, as the forge reported it when last seen. Display only."
390
+ }
391
+ }
392
+ },
393
+ "ForgeId": {
394
+ "title": "ForgeId",
395
+ "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.",
396
+ "type": "string",
397
+ "minLength": 1,
398
+ "maxLength": 64
399
+ },
400
+ "ForgeHost": {
401
+ "title": "ForgeHost",
402
+ "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.",
403
+ "type": "string",
404
+ "minLength": 3,
405
+ "maxLength": 253,
406
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
407
+ },
408
+ "RepoResource": {
409
+ "title": "RepoResource",
410
+ "description": "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.",
411
+ "type": "string",
412
+ "maxLength": 455,
413
+ "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}$"
414
+ },
415
+ "Bootstrap": {
416
+ "title": "Bootstrap",
417
+ "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`.",
418
+ "type": "object",
419
+ "additionalProperties": false,
420
+ "required": [
421
+ "workflow",
422
+ "keyring",
423
+ "variables",
424
+ "requiredCheck"
425
+ ],
426
+ "properties": {
427
+ "workflow": {
428
+ "type": "boolean",
429
+ "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."
430
+ },
431
+ "keyring": {
432
+ "type": "boolean",
433
+ "description": "The exempt platform keyring for forge-signed merge commits is committed, or the forge's plan does not need one."
434
+ },
435
+ "variables": {
436
+ "type": "boolean",
437
+ "description": "The repository names the Trust Registry and this VTC as its trust anchors."
438
+ },
439
+ "requiredCheck": {
440
+ "type": "boolean",
441
+ "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."
442
+ }
443
+ }
444
+ },
445
+ "RepoVisibility": {
446
+ "title": "RepoVisibility",
447
+ "type": "string",
448
+ "enum": [
449
+ "public",
450
+ "private"
451
+ ],
452
+ "description": "Repository visibility on the forge."
453
+ },
454
+ "GitNamespace": {
455
+ "title": "GitNamespace",
456
+ "description": "The VTC's binding to one owner on one forge.",
457
+ "type": "object",
458
+ "additionalProperties": false,
459
+ "required": [
460
+ "id",
461
+ "forge",
462
+ "owner",
463
+ "mode",
464
+ "state"
465
+ ],
466
+ "properties": {
467
+ "id": {
468
+ "$ref": "#/$defs/NamespaceId"
469
+ },
470
+ "forge": {
471
+ "$ref": "#/$defs/ForgeHost"
472
+ },
473
+ "owner": {
474
+ "$ref": "#/$defs/Segment",
475
+ "description": "The organisation or user on the forge, lowercased."
476
+ },
477
+ "kind": {
478
+ "type": "string",
479
+ "enum": [
480
+ "organization",
481
+ "user"
482
+ ],
483
+ "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."
484
+ },
485
+ "mode": {
486
+ "type": "string",
487
+ "enum": [
488
+ "bridge",
489
+ "manual"
490
+ ],
491
+ "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."
492
+ },
493
+ "state": {
494
+ "type": "string",
495
+ "enum": [
496
+ "pending",
497
+ "bound"
498
+ ],
499
+ "description": "`pending` — binding has started and the forge-side proof has not arrived yet. `bound` — the VTC governs rights under this namespace."
500
+ }
501
+ }
502
+ },
503
+ "Segment": {
504
+ "title": "Segment",
505
+ "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 `..`.",
506
+ "type": "string",
507
+ "minLength": 1,
508
+ "maxLength": 100,
509
+ "pattern": "^[a-z0-9_-][a-z0-9._-]*$"
510
+ },
511
+ "NamespaceId": {
512
+ "title": "NamespaceId",
513
+ "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.",
514
+ "type": "string",
515
+ "minLength": 1,
516
+ "maxLength": 128
517
+ }
518
+ }
519
+ };
520
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
521
+ export const RESPONSE_PAYLOAD_SCHEMA = {
522
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
523
+ "$ref": "#/$defs/Response",
524
+ "$defs": {
525
+ "LinkedAccount": {
526
+ "title": "LinkedAccount",
527
+ "description": "A forge account linked to the caller's DID with git-ns/account/link, and when the link completed.",
528
+ "type": "object",
529
+ "additionalProperties": false,
530
+ "required": [
531
+ "account",
532
+ "linkedAt"
533
+ ],
534
+ "properties": {
535
+ "account": {
536
+ "$ref": "#/$defs/ForgeAccount",
537
+ "description": "The linked account. `id` is authoritative; `login` is as the forge last reported it."
538
+ },
539
+ "linkedAt": {
540
+ "type": "string",
541
+ "format": "date-time",
542
+ "description": "When the link completed: when the VTC recorded the account against the caller's DID."
543
+ }
544
+ }
545
+ },
546
+ "Response": {
547
+ "$anchor": "response",
548
+ "title": "Git Namespaces — View — response payload",
549
+ "description": "What the caller may see — or, with `scope: administrator`, everything in the namespaces they administer — and the caller's own linked forge accounts.",
550
+ "type": "object",
551
+ "additionalProperties": false,
552
+ "required": [
553
+ "namespaces",
554
+ "repos",
555
+ "rights",
556
+ "accounts"
557
+ ],
558
+ "properties": {
559
+ "namespaces": {
560
+ "type": "array",
561
+ "items": {
562
+ "$ref": "#/$defs/GitNamespace"
563
+ },
564
+ "description": "Namespaces bound to this VTC that contain, or are contained by, `resource`. With `scope: administrator`, only those the caller administers. With `breakGlass: true`, only those containing a returned record."
565
+ },
566
+ "repos": {
567
+ "type": "array",
568
+ "items": {
569
+ "$ref": "#/$defs/RepoSummary"
570
+ },
571
+ "description": "Repositories within `resource`. `unmanaged` repositories are included only for callers holding `git.ns.admin` over them, or with `scope: administrator`. With `breakGlass: true`, only those carrying a returned record."
572
+ },
573
+ "rights": {
574
+ "type": "array",
575
+ "items": {
576
+ "$ref": "#/$defs/RightRecord"
577
+ },
578
+ "description": "Rights within `resource` the caller may see: always the caller's own; every right on a resource the caller owns or administers; every unratified break-glass record in a namespace they administer or on a resource they own. With `scope: administrator`, every recorded right in the namespaces the caller administers. `reason` is omitted except on resources the caller owns or administers. With `breakGlass: true`, only records carrying `breakGlass`."
579
+ },
580
+ "accounts": {
581
+ "type": "array",
582
+ "items": {
583
+ "$ref": "#/$defs/LinkedAccount"
584
+ },
585
+ "description": "The forge accounts linked to the caller's own DID — never another member's — at most one per forge. With `resource`, only the account on that resource's forge. Empty when the caller has linked none."
586
+ },
587
+ "ext": {
588
+ "$ref": "#/$defs/Ext"
589
+ }
590
+ }
591
+ },
592
+ "Ext": {
593
+ "title": "Ext",
594
+ "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.",
595
+ "type": "object",
596
+ "minProperties": 1,
597
+ "additionalProperties": true,
598
+ "propertyNames": {
599
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
600
+ }
601
+ },
602
+ "RightRecord": {
603
+ "title": "RightRecord",
604
+ "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. A record carrying `breakGlass` was given by its subject to themselves through git-ns/right/break-glass; it is a real right, published like any other, and is shown with that flag on every surface that shows the record.",
605
+ "type": "object",
606
+ "additionalProperties": false,
607
+ "required": [
608
+ "subject",
609
+ "right",
610
+ "resource",
611
+ "grantedBy",
612
+ "grantedAt"
613
+ ],
614
+ "properties": {
615
+ "subject": {
616
+ "$ref": "#/$defs/Did",
617
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
618
+ },
619
+ "right": {
620
+ "$ref": "#/$defs/Right"
621
+ },
622
+ "resource": {
623
+ "$ref": "#/$defs/Resource"
624
+ },
625
+ "grantedBy": {
626
+ "$ref": "#/$defs/Did",
627
+ "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."
628
+ },
629
+ "grantedAt": {
630
+ "type": "string",
631
+ "format": "date-time"
632
+ },
633
+ "expiresAt": {
634
+ "type": "string",
635
+ "format": "date-time",
636
+ "description": "When the right lapses. Absent: no expiry."
637
+ },
638
+ "reason": {
639
+ "type": "string",
640
+ "maxLength": 1024,
641
+ "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."
642
+ },
643
+ "breakGlass": {
644
+ "$ref": "#/$defs/BreakGlass",
645
+ "description": "Present exactly when the subject gave themselves this right through git-ns/right/break-glass. Absent for every other record."
646
+ }
647
+ }
648
+ },
649
+ "BreakGlass": {
650
+ "title": "BreakGlass",
651
+ "description": "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.",
652
+ "type": "object",
653
+ "additionalProperties": false,
654
+ "required": [
655
+ "by",
656
+ "at",
657
+ "justification"
658
+ ],
659
+ "properties": {
660
+ "by": {
661
+ "$ref": "#/$defs/Did",
662
+ "description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
663
+ },
664
+ "at": {
665
+ "type": "string",
666
+ "format": "date-time",
667
+ "description": "When the VTC recorded the break-glass."
668
+ },
669
+ "justification": {
670
+ "type": "string",
671
+ "minLength": 1,
672
+ "maxLength": 2048,
673
+ "pattern": "\\S",
674
+ "description": "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published."
675
+ },
676
+ "effectiveAt": {
677
+ "type": "string",
678
+ "format": "date-time",
679
+ "description": "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so."
680
+ },
681
+ "ratifiedBy": {
682
+ "$ref": "#/$defs/Did",
683
+ "description": "The administrator who ratified the record — never its subject. Absent while unratified."
684
+ },
685
+ "ratifiedAt": {
686
+ "type": "string",
687
+ "format": "date-time",
688
+ "description": "When it was ratified. Present exactly when `ratifiedBy` is."
689
+ }
690
+ }
691
+ },
692
+ "Did": {
693
+ "title": "Did",
694
+ "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.",
695
+ "type": "string",
696
+ "maxLength": 2048,
697
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
698
+ },
699
+ "Resource": {
700
+ "title": "Resource",
701
+ "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`.",
702
+ "type": "string",
703
+ "maxLength": 455,
704
+ "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}$"
705
+ },
706
+ "Right": {
707
+ "title": "Right",
708
+ "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.",
709
+ "type": "string",
710
+ "enum": [
711
+ "git.ns.admin",
712
+ "git.repo.create",
713
+ "git.repo.own",
714
+ "git.repo.maintain",
715
+ "git.commit.sign"
716
+ ]
717
+ },
718
+ "RepoSummary": {
719
+ "title": "RepoSummary",
720
+ "description": "One repository as the VTC records it.",
721
+ "type": "object",
722
+ "additionalProperties": false,
723
+ "required": [
724
+ "resource",
725
+ "visibility",
726
+ "state",
727
+ "owners",
728
+ "bootstrap",
729
+ "sync"
730
+ ],
731
+ "properties": {
732
+ "resource": {
733
+ "$ref": "#/$defs/RepoResource"
734
+ },
735
+ "forgeId": {
736
+ "$ref": "#/$defs/ForgeId",
737
+ "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)."
738
+ },
739
+ "visibility": {
740
+ "$ref": "#/$defs/RepoVisibility"
741
+ },
742
+ "state": {
743
+ "type": "string",
744
+ "enum": [
745
+ "pendingCreate",
746
+ "active",
747
+ "archived",
748
+ "detached",
749
+ "orphaned",
750
+ "unmanaged"
751
+ ],
752
+ "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."
753
+ },
754
+ "owners": {
755
+ "type": "array",
756
+ "uniqueItems": true,
757
+ "items": {
758
+ "$ref": "#/$defs/Did"
759
+ },
760
+ "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."
761
+ },
762
+ "bootstrap": {
763
+ "$ref": "#/$defs/Bootstrap"
764
+ },
765
+ "sync": {
766
+ "$ref": "#/$defs/Sync"
767
+ }
768
+ }
769
+ },
770
+ "Sync": {
771
+ "title": "Sync",
772
+ "description": "How the forge compares with the VTC's projection for one repository.",
773
+ "type": "object",
774
+ "additionalProperties": false,
775
+ "required": [
776
+ "state",
777
+ "drift"
778
+ ],
779
+ "properties": {
780
+ "state": {
781
+ "type": "string",
782
+ "enum": [
783
+ "inSync",
784
+ "drift",
785
+ "pending",
786
+ "unchecked"
787
+ ],
788
+ "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)."
789
+ },
790
+ "checkedAt": {
791
+ "type": "string",
792
+ "format": "date-time",
793
+ "description": "When the forge was last compared. Absent if never."
794
+ },
795
+ "drift": {
796
+ "type": "array",
797
+ "items": {
798
+ "$ref": "#/$defs/DriftItem"
799
+ },
800
+ "description": "Outstanding drift. Empty unless `state` is `drift`."
801
+ }
802
+ }
803
+ },
804
+ "DriftItem": {
805
+ "title": "DriftItem",
806
+ "description": "One difference between the forge's observed state and the VTC's projection of a repository.",
807
+ "type": "object",
808
+ "additionalProperties": false,
809
+ "required": [
810
+ "type",
811
+ "resource"
812
+ ],
813
+ "properties": {
814
+ "type": {
815
+ "type": "string",
816
+ "enum": [
817
+ "roleAdded",
818
+ "roleRemoved",
819
+ "roleChanged",
820
+ "requiredCheckMissing",
821
+ "protectionWeakened",
822
+ "bootstrapMissing"
823
+ ],
824
+ "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."
825
+ },
826
+ "resource": {
827
+ "$ref": "#/$defs/RepoResource"
828
+ },
829
+ "account": {
830
+ "$ref": "#/$defs/ForgeAccount",
831
+ "description": "Whose role differs, for the three role types."
832
+ },
833
+ "observed": {
834
+ "type": "string",
835
+ "maxLength": 256,
836
+ "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."
837
+ },
838
+ "expected": {
839
+ "type": "string",
840
+ "maxLength": 256,
841
+ "description": "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing."
842
+ }
843
+ }
844
+ },
845
+ "ForgeAccount": {
846
+ "title": "ForgeAccount",
847
+ "description": "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.",
848
+ "type": "object",
849
+ "additionalProperties": false,
850
+ "required": [
851
+ "forge",
852
+ "id",
853
+ "login"
854
+ ],
855
+ "properties": {
856
+ "forge": {
857
+ "$ref": "#/$defs/ForgeHost"
858
+ },
859
+ "id": {
860
+ "$ref": "#/$defs/ForgeId"
861
+ },
862
+ "login": {
863
+ "type": "string",
864
+ "minLength": 1,
865
+ "maxLength": 100,
866
+ "description": "The account's current login, as the forge reported it when last seen. Display only."
867
+ }
868
+ }
869
+ },
870
+ "ForgeId": {
871
+ "title": "ForgeId",
872
+ "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.",
873
+ "type": "string",
874
+ "minLength": 1,
875
+ "maxLength": 64
876
+ },
877
+ "ForgeHost": {
878
+ "title": "ForgeHost",
879
+ "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.",
880
+ "type": "string",
881
+ "minLength": 3,
882
+ "maxLength": 253,
883
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$"
884
+ },
885
+ "RepoResource": {
886
+ "title": "RepoResource",
887
+ "description": "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.",
888
+ "type": "string",
889
+ "maxLength": 455,
890
+ "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}$"
891
+ },
892
+ "Bootstrap": {
893
+ "title": "Bootstrap",
894
+ "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`.",
895
+ "type": "object",
896
+ "additionalProperties": false,
897
+ "required": [
898
+ "workflow",
899
+ "keyring",
900
+ "variables",
901
+ "requiredCheck"
902
+ ],
903
+ "properties": {
904
+ "workflow": {
905
+ "type": "boolean",
906
+ "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."
907
+ },
908
+ "keyring": {
909
+ "type": "boolean",
910
+ "description": "The exempt platform keyring for forge-signed merge commits is committed, or the forge's plan does not need one."
911
+ },
912
+ "variables": {
913
+ "type": "boolean",
914
+ "description": "The repository names the Trust Registry and this VTC as its trust anchors."
915
+ },
916
+ "requiredCheck": {
917
+ "type": "boolean",
918
+ "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."
919
+ }
920
+ }
921
+ },
922
+ "RepoVisibility": {
923
+ "title": "RepoVisibility",
924
+ "type": "string",
925
+ "enum": [
926
+ "public",
927
+ "private"
928
+ ],
929
+ "description": "Repository visibility on the forge."
930
+ },
931
+ "GitNamespace": {
932
+ "title": "GitNamespace",
933
+ "description": "The VTC's binding to one owner on one forge.",
934
+ "type": "object",
935
+ "additionalProperties": false,
936
+ "required": [
937
+ "id",
938
+ "forge",
939
+ "owner",
940
+ "mode",
941
+ "state"
942
+ ],
943
+ "properties": {
944
+ "id": {
945
+ "$ref": "#/$defs/NamespaceId"
946
+ },
947
+ "forge": {
948
+ "$ref": "#/$defs/ForgeHost"
949
+ },
950
+ "owner": {
951
+ "$ref": "#/$defs/Segment",
952
+ "description": "The organisation or user on the forge, lowercased."
953
+ },
954
+ "kind": {
955
+ "type": "string",
956
+ "enum": [
957
+ "organization",
958
+ "user"
959
+ ],
960
+ "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."
961
+ },
962
+ "mode": {
963
+ "type": "string",
964
+ "enum": [
965
+ "bridge",
966
+ "manual"
967
+ ],
968
+ "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."
969
+ },
970
+ "state": {
971
+ "type": "string",
972
+ "enum": [
973
+ "pending",
974
+ "bound"
975
+ ],
976
+ "description": "`pending` — binding has started and the forge-side proof has not arrived yet. `bound` — the VTC governs rights under this namespace."
977
+ }
978
+ }
979
+ },
980
+ "Segment": {
981
+ "title": "Segment",
982
+ "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 `..`.",
983
+ "type": "string",
984
+ "minLength": 1,
985
+ "maxLength": 100,
986
+ "pattern": "^[a-z0-9_-][a-z0-9._-]*$"
987
+ },
988
+ "NamespaceId": {
989
+ "title": "NamespaceId",
990
+ "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.",
991
+ "type": "string",
992
+ "minLength": 1,
993
+ "maxLength": 128
994
+ }
995
+ }
996
+ };
997
+ /**
998
+ * SPEC.md §7.2 policy for the request variant, from this specification's
999
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
1000
+ * per-specification and cannot be derived from the document alone, and
1001
+ * item 2 needs the schema this carries.
1002
+ */
1003
+ export const SPEC = {
1004
+ typeUri: TYPE_URI,
1005
+ isBearer: false,
1006
+ isProofRequired: true,
1007
+ isRecipientRequired: true,
1008
+ isIssuedAtRequired: false,
1009
+ payloadSchema: PAYLOAD_SCHEMA,
1010
+ };
1011
+ /**
1012
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
1013
+ * tracks the *issuer* party's requirement because a response swaps the
1014
+ * parties (§7.3 item 5).
1015
+ */
1016
+ export const RESPONSE_SPEC = {
1017
+ typeUri: RESPONSE_TYPE_URI,
1018
+ isBearer: false,
1019
+ isProofRequired: true,
1020
+ isRecipientRequired: true,
1021
+ isIssuedAtRequired: false,
1022
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
1023
+ };
1024
+ //# sourceMappingURL=payload.js.map