@openvtc/trust-tasks 0.20.7 → 0.21.0

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 (253) hide show
  1. package/CHANGELOG.md +320 -0
  2. package/dist/_shared/components.d.ts +299 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts +456 -0
  5. package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts.map +1 -0
  6. package/dist/auth/passkey/enroll/invite/0.2/payload.js +248 -0
  7. package/dist/auth/passkey/enroll/invite/0.2/payload.js.map +1 -0
  8. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts +728 -0
  9. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts.map +1 -0
  10. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js +430 -0
  11. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js.map +1 -0
  12. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts +1043 -0
  13. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts.map +1 -0
  14. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js +628 -0
  15. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js.map +1 -0
  16. package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts +533 -0
  17. package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts.map +1 -0
  18. package/dist/auth/passkey/revoke/finish/0.2/payload.js +315 -0
  19. package/dist/auth/passkey/revoke/finish/0.2/payload.js.map +1 -0
  20. package/dist/auth/passkey/revoke/start/0.2/payload.d.ts +511 -0
  21. package/dist/auth/passkey/revoke/start/0.2/payload.d.ts.map +1 -0
  22. package/dist/auth/passkey/revoke/start/0.2/payload.js +297 -0
  23. package/dist/auth/passkey/revoke/start/0.2/payload.js.map +1 -0
  24. package/dist/auth/step-up/approve-request/0.3/payload.d.ts +613 -0
  25. package/dist/auth/step-up/approve-request/0.3/payload.d.ts.map +1 -0
  26. package/dist/auth/step-up/approve-request/0.3/payload.js +345 -0
  27. package/dist/auth/step-up/approve-request/0.3/payload.js.map +1 -0
  28. package/dist/auth/step-up/approve-response/0.4/payload.d.ts +887 -0
  29. package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -0
  30. package/dist/auth/step-up/approve-response/0.4/payload.js +504 -0
  31. package/dist/auth/step-up/approve-response/0.4/payload.js.map +1 -0
  32. package/dist/auth/step-up/approve-response/0.5/payload.d.ts +887 -0
  33. package/dist/auth/step-up/approve-response/0.5/payload.d.ts.map +1 -0
  34. package/dist/auth/step-up/approve-response/0.5/payload.js +504 -0
  35. package/dist/auth/step-up/approve-response/0.5/payload.js.map +1 -0
  36. package/dist/backup/abort/0.1/payload.d.ts +262 -0
  37. package/dist/backup/abort/0.1/payload.d.ts.map +1 -0
  38. package/dist/backup/abort/0.1/payload.js +146 -0
  39. package/dist/backup/abort/0.1/payload.js.map +1 -0
  40. package/dist/backup/complete-export/0.1/payload.d.ts +262 -0
  41. package/dist/backup/complete-export/0.1/payload.d.ts.map +1 -0
  42. package/dist/backup/complete-export/0.1/payload.js +146 -0
  43. package/dist/backup/complete-export/0.1/payload.js.map +1 -0
  44. package/dist/backup/finalize-import/0.1/payload.d.ts +395 -0
  45. package/dist/backup/finalize-import/0.1/payload.d.ts.map +1 -0
  46. package/dist/backup/finalize-import/0.1/payload.js +209 -0
  47. package/dist/backup/finalize-import/0.1/payload.js.map +1 -0
  48. package/dist/backup/get-chunk/0.1/payload.d.ts +461 -0
  49. package/dist/backup/get-chunk/0.1/payload.d.ts.map +1 -0
  50. package/dist/backup/get-chunk/0.1/payload.js +250 -0
  51. package/dist/backup/get-chunk/0.1/payload.js.map +1 -0
  52. package/dist/backup/initiate-export/0.1/payload.d.ts +896 -0
  53. package/dist/backup/initiate-export/0.1/payload.d.ts.map +1 -0
  54. package/dist/backup/initiate-export/0.1/payload.js +507 -0
  55. package/dist/backup/initiate-export/0.1/payload.js.map +1 -0
  56. package/dist/backup/initiate-import/0.1/payload.d.ts +888 -0
  57. package/dist/backup/initiate-import/0.1/payload.d.ts.map +1 -0
  58. package/dist/backup/initiate-import/0.1/payload.js +504 -0
  59. package/dist/backup/initiate-import/0.1/payload.js.map +1 -0
  60. package/dist/backup/put-chunk/0.1/payload.d.ts +495 -0
  61. package/dist/backup/put-chunk/0.1/payload.d.ts.map +1 -0
  62. package/dist/backup/put-chunk/0.1/payload.js +265 -0
  63. package/dist/backup/put-chunk/0.1/payload.js.map +1 -0
  64. package/dist/device/list/0.1/payload.d.ts +4 -4
  65. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  66. package/dist/device/list/0.1/payload.js +4 -2
  67. package/dist/device/list/0.1/payload.js.map +1 -1
  68. package/dist/device/list/0.2/payload.d.ts +4 -4
  69. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  70. package/dist/device/list/0.2/payload.js +4 -2
  71. package/dist/device/list/0.2/payload.js.map +1 -1
  72. package/dist/device/register/0.1/payload.d.ts +4 -4
  73. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  74. package/dist/device/register/0.1/payload.js +4 -2
  75. package/dist/device/register/0.1/payload.js.map +1 -1
  76. package/dist/device/register/0.2/payload.d.ts +4 -4
  77. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  78. package/dist/device/register/0.2/payload.js +4 -2
  79. package/dist/device/register/0.2/payload.js.map +1 -1
  80. package/dist/git-ns/_shared/0.4/git-ns.d.ts +16 -0
  81. package/dist/git-ns/_shared/0.4/git-ns.d.ts.map +1 -0
  82. package/dist/git-ns/_shared/0.4/git-ns.js +6 -0
  83. package/dist/git-ns/_shared/0.4/git-ns.js.map +1 -0
  84. package/dist/git-ns/account/link-status/0.1/payload.d.ts +2 -2
  85. package/dist/git-ns/account/link-status/0.1/payload.js +2 -2
  86. package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -1
  87. package/dist/git-ns/account/unlink/0.1/payload.d.ts +411 -0
  88. package/dist/git-ns/account/unlink/0.1/payload.d.ts.map +1 -0
  89. package/dist/git-ns/account/unlink/0.1/payload.js +228 -0
  90. package/dist/git-ns/account/unlink/0.1/payload.js.map +1 -0
  91. package/dist/git-ns/bridge/event/0.3/payload.d.ts +1682 -0
  92. package/dist/git-ns/bridge/event/0.3/payload.d.ts.map +1 -0
  93. package/dist/git-ns/bridge/event/0.3/payload.js +971 -0
  94. package/dist/git-ns/bridge/event/0.3/payload.js.map +1 -0
  95. package/dist/git-ns/bridge/job/0.4/payload.d.ts +1068 -0
  96. package/dist/git-ns/bridge/job/0.4/payload.d.ts.map +1 -0
  97. package/dist/git-ns/bridge/job/0.4/payload.js +573 -0
  98. package/dist/git-ns/bridge/job/0.4/payload.js.map +1 -0
  99. package/dist/git-ns/drift/resolve/0.3/payload.d.ts +1072 -0
  100. package/dist/git-ns/drift/resolve/0.3/payload.d.ts.map +1 -0
  101. package/dist/git-ns/drift/resolve/0.3/payload.js +634 -0
  102. package/dist/git-ns/drift/resolve/0.3/payload.js.map +1 -0
  103. package/dist/git-ns/namespace/reseat/0.3/payload.d.ts +515 -0
  104. package/dist/git-ns/namespace/reseat/0.3/payload.d.ts.map +1 -0
  105. package/dist/git-ns/namespace/reseat/0.3/payload.js +296 -0
  106. package/dist/git-ns/namespace/reseat/0.3/payload.js.map +1 -0
  107. package/dist/git-ns/repo/create/0.3/payload.d.ts +1101 -0
  108. package/dist/git-ns/repo/create/0.3/payload.d.ts.map +1 -0
  109. package/dist/git-ns/repo/create/0.3/payload.js +646 -0
  110. package/dist/git-ns/repo/create/0.3/payload.js.map +1 -0
  111. package/dist/git-ns/right/break-glass/0.1/payload.d.ts +685 -0
  112. package/dist/git-ns/right/break-glass/0.1/payload.d.ts.map +1 -0
  113. package/dist/git-ns/right/break-glass/0.1/payload.js +397 -0
  114. package/dist/git-ns/right/break-glass/0.1/payload.js.map +1 -0
  115. package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts +384 -0
  116. package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts.map +1 -0
  117. package/dist/git-ns/right/break-glass-notice/0.1/payload.js +216 -0
  118. package/dist/git-ns/right/break-glass-notice/0.1/payload.js.map +1 -0
  119. package/dist/git-ns/right/grant/0.3/payload.d.ts +678 -0
  120. package/dist/git-ns/right/grant/0.3/payload.d.ts.map +1 -0
  121. package/dist/git-ns/right/grant/0.3/payload.js +383 -0
  122. package/dist/git-ns/right/grant/0.3/payload.js.map +1 -0
  123. package/dist/git-ns/right/ratify/0.1/payload.d.ts +702 -0
  124. package/dist/git-ns/right/ratify/0.1/payload.d.ts.map +1 -0
  125. package/dist/git-ns/right/ratify/0.1/payload.js +404 -0
  126. package/dist/git-ns/right/ratify/0.1/payload.js.map +1 -0
  127. package/dist/git-ns/right/revoke/0.3/payload.d.ts +664 -0
  128. package/dist/git-ns/right/revoke/0.3/payload.d.ts.map +1 -0
  129. package/dist/git-ns/right/revoke/0.3/payload.js +378 -0
  130. package/dist/git-ns/right/revoke/0.3/payload.js.map +1 -0
  131. package/dist/git-ns/roles/reproject/0.1/payload.d.ts +325 -0
  132. package/dist/git-ns/roles/reproject/0.1/payload.d.ts.map +1 -0
  133. package/dist/git-ns/roles/reproject/0.1/payload.js +176 -0
  134. package/dist/git-ns/roles/reproject/0.1/payload.js.map +1 -0
  135. package/dist/git-ns/view/0.1/payload.d.ts +2 -2
  136. package/dist/git-ns/view/0.1/payload.js +2 -2
  137. package/dist/git-ns/view/0.1/payload.js.map +1 -1
  138. package/dist/git-ns/view/0.2/payload.d.ts +2 -2
  139. package/dist/git-ns/view/0.2/payload.js +2 -2
  140. package/dist/git-ns/view/0.2/payload.js.map +1 -1
  141. package/dist/git-ns/view/0.3/payload.d.ts +2 -2
  142. package/dist/git-ns/view/0.3/payload.js +2 -2
  143. package/dist/git-ns/view/0.3/payload.js.map +1 -1
  144. package/dist/git-ns/view/0.4/payload.d.ts +1696 -0
  145. package/dist/git-ns/view/0.4/payload.d.ts.map +1 -0
  146. package/dist/git-ns/view/0.4/payload.js +1012 -0
  147. package/dist/git-ns/view/0.4/payload.js.map +1 -0
  148. package/dist/index.d.ts +39 -0
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +39 -0
  151. package/dist/index.js.map +1 -1
  152. package/dist/messaging/message/status/0.1/payload.d.ts +372 -0
  153. package/dist/messaging/message/status/0.1/payload.d.ts.map +1 -0
  154. package/dist/messaging/message/status/0.1/payload.js +214 -0
  155. package/dist/messaging/message/status/0.1/payload.js.map +1 -0
  156. package/dist/vta/_shared/0.3/did-key-roles.d.ts +16 -0
  157. package/dist/vta/_shared/0.3/did-key-roles.d.ts.map +1 -0
  158. package/dist/vta/_shared/0.3/did-key-roles.js +6 -0
  159. package/dist/vta/_shared/0.3/did-key-roles.js.map +1 -0
  160. package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts +326 -0
  161. package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts.map +1 -0
  162. package/dist/vta/attestation/mnemonic-export/1.0/payload.js +175 -0
  163. package/dist/vta/attestation/mnemonic-export/1.0/payload.js.map +1 -0
  164. package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts +1914 -0
  165. package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts.map +1 -0
  166. package/dist/vta/webvh/dids/keys/add/1.0/payload.js +1128 -0
  167. package/dist/vta/webvh/dids/keys/add/1.0/payload.js.map +1 -0
  168. package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts +1603 -0
  169. package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts.map +1 -0
  170. package/dist/vta/webvh/dids/keys/list/1.0/payload.js +942 -0
  171. package/dist/vta/webvh/dids/keys/list/1.0/payload.js.map +1 -0
  172. package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts +1914 -0
  173. package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts.map +1 -0
  174. package/dist/vta/webvh/dids/keys/retire/1.0/payload.js +1123 -0
  175. package/dist/vta/webvh/dids/keys/retire/1.0/payload.js.map +1 -0
  176. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts +2021 -0
  177. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts.map +1 -0
  178. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js +1168 -0
  179. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js.map +1 -0
  180. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts +1992 -0
  181. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts.map +1 -0
  182. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js +1151 -0
  183. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js.map +1 -0
  184. package/dist/vta/webvh/dids/update/2.0/payload.d.ts +1062 -0
  185. package/dist/vta/webvh/dids/update/2.0/payload.d.ts.map +1 -0
  186. package/dist/vta/webvh/dids/update/2.0/payload.js +616 -0
  187. package/dist/vta/webvh/dids/update/2.0/payload.js.map +1 -0
  188. package/dist/vtc/credentials/reissue/0.1/payload.d.ts +502 -0
  189. package/dist/vtc/credentials/reissue/0.1/payload.d.ts.map +1 -0
  190. package/dist/vtc/credentials/reissue/0.1/payload.js +282 -0
  191. package/dist/vtc/credentials/reissue/0.1/payload.js.map +1 -0
  192. package/dist/vtc/members/personhood/challenge/0.1/payload.d.ts +2 -2
  193. package/dist/vtc/members/personhood/challenge/0.1/payload.js +2 -2
  194. package/dist/vtc/members/personhood/challenge/0.1/payload.js.map +1 -1
  195. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +2 -2
  196. package/dist/vtc/vetting/vetters/profile/0.1/payload.js +2 -2
  197. package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -1
  198. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +2 -2
  199. package/dist/vtc/vetting/vetters/resend/0.1/payload.js +2 -2
  200. package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -1
  201. package/package.json +1 -1
  202. package/src/_shared/components.ts +313 -2
  203. package/src/auth/passkey/enroll/invite/0.2/payload.ts +325 -0
  204. package/src/auth/passkey/enroll/redeem/finish/0.1/payload.ts +499 -0
  205. package/src/auth/passkey/enroll/redeem/start/0.1/payload.ts +700 -0
  206. package/src/auth/passkey/revoke/finish/0.2/payload.ts +379 -0
  207. package/src/auth/passkey/revoke/start/0.2/payload.ts +349 -0
  208. package/src/auth/step-up/approve-request/0.3/payload.ts +421 -0
  209. package/src/auth/step-up/approve-response/0.4/payload.ts +593 -0
  210. package/src/auth/step-up/approve-response/0.5/payload.ts +593 -0
  211. package/src/backup/abort/0.1/payload.ts +191 -0
  212. package/src/backup/complete-export/0.1/payload.ts +191 -0
  213. package/src/backup/finalize-import/0.1/payload.ts +279 -0
  214. package/src/backup/get-chunk/0.1/payload.ts +308 -0
  215. package/src/backup/initiate-export/0.1/payload.ts +564 -0
  216. package/src/backup/initiate-import/0.1/payload.ts +561 -0
  217. package/src/backup/put-chunk/0.1/payload.ts +331 -0
  218. package/src/device/list/0.1/payload.ts +4 -2
  219. package/src/device/list/0.2/payload.ts +4 -2
  220. package/src/device/register/0.1/payload.ts +4 -2
  221. package/src/device/register/0.2/payload.ts +4 -2
  222. package/src/git-ns/_shared/0.4/git-ns.ts +17 -0
  223. package/src/git-ns/account/link-status/0.1/payload.ts +2 -2
  224. package/src/git-ns/account/unlink/0.1/payload.ts +274 -0
  225. package/src/git-ns/bridge/event/0.3/payload.ts +1132 -0
  226. package/src/git-ns/bridge/job/0.4/payload.ts +691 -0
  227. package/src/git-ns/drift/resolve/0.3/payload.ts +707 -0
  228. package/src/git-ns/namespace/reseat/0.3/payload.ts +342 -0
  229. package/src/git-ns/repo/create/0.3/payload.ts +706 -0
  230. package/src/git-ns/right/break-glass/0.1/payload.ts +443 -0
  231. package/src/git-ns/right/break-glass-notice/0.1/payload.ts +258 -0
  232. package/src/git-ns/right/grant/0.3/payload.ts +434 -0
  233. package/src/git-ns/right/ratify/0.1/payload.ts +455 -0
  234. package/src/git-ns/right/revoke/0.3/payload.ts +425 -0
  235. package/src/git-ns/roles/reproject/0.1/payload.ts +220 -0
  236. package/src/git-ns/view/0.1/payload.ts +2 -2
  237. package/src/git-ns/view/0.2/payload.ts +2 -2
  238. package/src/git-ns/view/0.3/payload.ts +2 -2
  239. package/src/git-ns/view/0.4/payload.ts +1075 -0
  240. package/src/index.ts +39 -0
  241. package/src/messaging/message/status/0.1/payload.ts +270 -0
  242. package/src/vta/_shared/0.3/did-key-roles.ts +17 -0
  243. package/src/vta/attestation/mnemonic-export/1.0/payload.ts +232 -0
  244. package/src/vta/webvh/dids/keys/add/1.0/payload.ts +1217 -0
  245. package/src/vta/webvh/dids/keys/list/1.0/payload.ts +1004 -0
  246. package/src/vta/webvh/dids/keys/retire/1.0/payload.ts +1212 -0
  247. package/src/vta/webvh/dids/keys/revoke/1.0/payload.ts +1276 -0
  248. package/src/vta/webvh/dids/rotate-keys/2.0/payload.ts +1262 -0
  249. package/src/vta/webvh/dids/update/2.0/payload.ts +713 -0
  250. package/src/vtc/credentials/reissue/0.1/payload.ts +357 -0
  251. package/src/vtc/members/personhood/challenge/0.1/payload.ts +2 -2
  252. package/src/vtc/vetting/vetters/profile/0.1/payload.ts +2 -2
  253. package/src/vtc/vetting/vetters/resend/0.1/payload.ts +2 -2
@@ -0,0 +1,443 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/git-ns/right/break-glass/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { BreakGlass, Did_GitNsV0_3 as Did, ElevatedRight, Ext, Resource, Right, RightRecord_GitNsV0_4 as RightRecord } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * The actor records an elevated git right for themselves — one they already have the authority to grant, but which separation of duties forbids them granting to themselves through git-ns/right/grant — with a mandatory justification. The right takes effect at once, never expires on its own, and is flagged as break-glass, and shown to every other administrator, until another administrator ratifies it with git-ns/right/ratify or anyone entitled revokes it.
11
+ */
12
+ export interface GitNamespacesBreakGlassPayload {
13
+ /**
14
+ * The elevated right the actor records for themselves. The other two rights need no break-glass: git-ns/right/grant lets anyone with authority over them grant them to themselves.
15
+ */
16
+ right: ElevatedRight;
17
+ /**
18
+ * Where the right applies: the namespace resource for `git.ns.admin` and `git.repo.create`, a repository resource for `git.repo.own`.
19
+ */
20
+ resource: Resource;
21
+ /**
22
+ * Why nobody else could grant this right now, in the actor's words. Required and never blank. Recorded with the right as `breakGlass.justification`, carried in the audit record and in every notice, and shown to every community administrator, every namespace admin of the namespace and every owner of the resource. Never published to the Trust Registry.
23
+ */
24
+ justification: string;
25
+ ext?: Ext;
26
+ }
27
+ /**
28
+ * The recorded right, carrying its `breakGlass` flag.
29
+ */
30
+ export interface GitNamespacesBreakGlassResponsePayload {
31
+ /**
32
+ * The recorded right — newly recorded with `breakGlass`, or the live record the actor already held, returned unchanged.
33
+ */
34
+ right: RightRecord;
35
+ ext?: Ext;
36
+ }
37
+
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { BreakGlass, Did, ElevatedRight, Ext, Resource, Right, RightRecord };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/git-ns/right/break-glass/0.1" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = GitNamespacesBreakGlassPayload;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/right/break-glass/0.1#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = GitNamespacesBreakGlassResponsePayload;
52
+
53
+ /**
54
+ * This specification's payload schema, as a value.
55
+ *
56
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
57
+ * rather than only as a `.json` file because TypeScript types are erased
58
+ * at runtime: without a schema a consumer has nothing to validate, and
59
+ * every REQUIRED payload member is optional in practice. Cross-file
60
+ * `$ref`s are already inlined, so it needs no resolver.
61
+ */
62
+ export const PAYLOAD_SCHEMA = {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "$id": "https://trusttasks.org/spec/git-ns/right/break-glass/0.1",
65
+ "title": "Git Namespaces — Break Glass — payload",
66
+ "description": "The actor records an elevated git right for themselves — one they already have the authority to grant, but which separation of duties forbids them granting to themselves through git-ns/right/grant — with a mandatory justification. The right takes effect at once, never expires on its own, and is flagged as break-glass, and shown to every other administrator, until another administrator ratifies it with git-ns/right/ratify or anyone entitled revokes it.",
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "right",
71
+ "resource",
72
+ "justification"
73
+ ],
74
+ "properties": {
75
+ "right": {
76
+ "$ref": "#/$defs/ElevatedRight",
77
+ "description": "The elevated right the actor records for themselves. The other two rights need no break-glass: git-ns/right/grant lets anyone with authority over them grant them to themselves."
78
+ },
79
+ "resource": {
80
+ "$ref": "#/$defs/Resource",
81
+ "description": "Where the right applies: the namespace resource for `git.ns.admin` and `git.repo.create`, a repository resource for `git.repo.own`."
82
+ },
83
+ "justification": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "maxLength": 2048,
87
+ "pattern": "\\S",
88
+ "description": "Why nobody else could grant this right now, in the actor's words. Required and never blank. Recorded with the right as `breakGlass.justification`, carried in the audit record and in every notice, and shown to every community administrator, every namespace admin of the namespace and every owner of the resource. Never published to the Trust Registry."
89
+ },
90
+ "ext": {
91
+ "$ref": "#/$defs/Ext"
92
+ }
93
+ },
94
+ "$defs": {
95
+ "Response": {
96
+ "$anchor": "response",
97
+ "title": "Git Namespaces — Break Glass — response payload",
98
+ "description": "The recorded right, carrying its `breakGlass` flag.",
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "right"
103
+ ],
104
+ "properties": {
105
+ "right": {
106
+ "$ref": "#/$defs/RightRecord",
107
+ "description": "The recorded right — newly recorded with `breakGlass`, or the live record the actor already held, returned unchanged."
108
+ },
109
+ "ext": {
110
+ "$ref": "#/$defs/Ext"
111
+ }
112
+ }
113
+ },
114
+ "Ext": {
115
+ "title": "Ext",
116
+ "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.",
117
+ "type": "object",
118
+ "minProperties": 1,
119
+ "additionalProperties": true,
120
+ "propertyNames": {
121
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
122
+ }
123
+ },
124
+ "RightRecord": {
125
+ "title": "RightRecord",
126
+ "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.",
127
+ "type": "object",
128
+ "additionalProperties": false,
129
+ "required": [
130
+ "subject",
131
+ "right",
132
+ "resource",
133
+ "grantedBy",
134
+ "grantedAt"
135
+ ],
136
+ "properties": {
137
+ "subject": {
138
+ "$ref": "#/$defs/Did",
139
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
140
+ },
141
+ "right": {
142
+ "$ref": "#/$defs/Right"
143
+ },
144
+ "resource": {
145
+ "$ref": "#/$defs/Resource"
146
+ },
147
+ "grantedBy": {
148
+ "$ref": "#/$defs/Did",
149
+ "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."
150
+ },
151
+ "grantedAt": {
152
+ "type": "string",
153
+ "format": "date-time"
154
+ },
155
+ "expiresAt": {
156
+ "type": "string",
157
+ "format": "date-time",
158
+ "description": "When the right lapses. Absent: no expiry."
159
+ },
160
+ "reason": {
161
+ "type": "string",
162
+ "maxLength": 1024,
163
+ "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."
164
+ },
165
+ "breakGlass": {
166
+ "$ref": "#/$defs/BreakGlass",
167
+ "description": "Present exactly when the subject gave themselves this right through git-ns/right/break-glass. Absent for every other record."
168
+ }
169
+ }
170
+ },
171
+ "BreakGlass": {
172
+ "title": "BreakGlass",
173
+ "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.",
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "required": [
177
+ "by",
178
+ "at",
179
+ "justification"
180
+ ],
181
+ "properties": {
182
+ "by": {
183
+ "$ref": "#/$defs/Did",
184
+ "description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
185
+ },
186
+ "at": {
187
+ "type": "string",
188
+ "format": "date-time",
189
+ "description": "When the VTC recorded the break-glass."
190
+ },
191
+ "justification": {
192
+ "type": "string",
193
+ "minLength": 1,
194
+ "maxLength": 2048,
195
+ "pattern": "\\S",
196
+ "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."
197
+ },
198
+ "effectiveAt": {
199
+ "type": "string",
200
+ "format": "date-time",
201
+ "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."
202
+ },
203
+ "ratifiedBy": {
204
+ "$ref": "#/$defs/Did",
205
+ "description": "The administrator who ratified the record — never its subject. Absent while unratified."
206
+ },
207
+ "ratifiedAt": {
208
+ "type": "string",
209
+ "format": "date-time",
210
+ "description": "When it was ratified. Present exactly when `ratifiedBy` is."
211
+ }
212
+ }
213
+ },
214
+ "Did": {
215
+ "title": "Did",
216
+ "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.",
217
+ "type": "string",
218
+ "maxLength": 2048,
219
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
220
+ },
221
+ "Resource": {
222
+ "title": "Resource",
223
+ "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`.",
224
+ "type": "string",
225
+ "maxLength": 455,
226
+ "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}$"
227
+ },
228
+ "Right": {
229
+ "title": "Right",
230
+ "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.",
231
+ "type": "string",
232
+ "enum": [
233
+ "git.ns.admin",
234
+ "git.repo.create",
235
+ "git.repo.own",
236
+ "git.repo.maintain",
237
+ "git.commit.sign"
238
+ ]
239
+ },
240
+ "ElevatedRight": {
241
+ "title": "ElevatedRight",
242
+ "description": "The three rights that carry authority over other people's rights: `git.ns.admin`, `git.repo.create` (which makes its holder the owner of every repository they create) and `git.repo.own`. Separation of duties applies to these: nobody grants one to themselves through git-ns/right/grant, or records one for themselves through any other task that grants on the actor's own authority. The explicit self-grant is git-ns/right/break-glass. `git.repo.maintain` and `git.commit.sign` are not elevated.",
243
+ "type": "string",
244
+ "enum": [
245
+ "git.ns.admin",
246
+ "git.repo.create",
247
+ "git.repo.own"
248
+ ]
249
+ }
250
+ }
251
+ } as const;
252
+
253
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
254
+ export const RESPONSE_PAYLOAD_SCHEMA = {
255
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
256
+ "$ref": "#/$defs/Response",
257
+ "$defs": {
258
+ "Response": {
259
+ "$anchor": "response",
260
+ "title": "Git Namespaces — Break Glass — response payload",
261
+ "description": "The recorded right, carrying its `breakGlass` flag.",
262
+ "type": "object",
263
+ "additionalProperties": false,
264
+ "required": [
265
+ "right"
266
+ ],
267
+ "properties": {
268
+ "right": {
269
+ "$ref": "#/$defs/RightRecord",
270
+ "description": "The recorded right — newly recorded with `breakGlass`, or the live record the actor already held, returned unchanged."
271
+ },
272
+ "ext": {
273
+ "$ref": "#/$defs/Ext"
274
+ }
275
+ }
276
+ },
277
+ "Ext": {
278
+ "title": "Ext",
279
+ "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.",
280
+ "type": "object",
281
+ "minProperties": 1,
282
+ "additionalProperties": true,
283
+ "propertyNames": {
284
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
285
+ }
286
+ },
287
+ "RightRecord": {
288
+ "title": "RightRecord",
289
+ "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.",
290
+ "type": "object",
291
+ "additionalProperties": false,
292
+ "required": [
293
+ "subject",
294
+ "right",
295
+ "resource",
296
+ "grantedBy",
297
+ "grantedAt"
298
+ ],
299
+ "properties": {
300
+ "subject": {
301
+ "$ref": "#/$defs/Did",
302
+ "description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
303
+ },
304
+ "right": {
305
+ "$ref": "#/$defs/Right"
306
+ },
307
+ "resource": {
308
+ "$ref": "#/$defs/Resource"
309
+ },
310
+ "grantedBy": {
311
+ "$ref": "#/$defs/Did",
312
+ "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."
313
+ },
314
+ "grantedAt": {
315
+ "type": "string",
316
+ "format": "date-time"
317
+ },
318
+ "expiresAt": {
319
+ "type": "string",
320
+ "format": "date-time",
321
+ "description": "When the right lapses. Absent: no expiry."
322
+ },
323
+ "reason": {
324
+ "type": "string",
325
+ "maxLength": 1024,
326
+ "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."
327
+ },
328
+ "breakGlass": {
329
+ "$ref": "#/$defs/BreakGlass",
330
+ "description": "Present exactly when the subject gave themselves this right through git-ns/right/break-glass. Absent for every other record."
331
+ }
332
+ }
333
+ },
334
+ "BreakGlass": {
335
+ "title": "BreakGlass",
336
+ "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.",
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "required": [
340
+ "by",
341
+ "at",
342
+ "justification"
343
+ ],
344
+ "properties": {
345
+ "by": {
346
+ "$ref": "#/$defs/Did",
347
+ "description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
348
+ },
349
+ "at": {
350
+ "type": "string",
351
+ "format": "date-time",
352
+ "description": "When the VTC recorded the break-glass."
353
+ },
354
+ "justification": {
355
+ "type": "string",
356
+ "minLength": 1,
357
+ "maxLength": 2048,
358
+ "pattern": "\\S",
359
+ "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."
360
+ },
361
+ "effectiveAt": {
362
+ "type": "string",
363
+ "format": "date-time",
364
+ "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."
365
+ },
366
+ "ratifiedBy": {
367
+ "$ref": "#/$defs/Did",
368
+ "description": "The administrator who ratified the record — never its subject. Absent while unratified."
369
+ },
370
+ "ratifiedAt": {
371
+ "type": "string",
372
+ "format": "date-time",
373
+ "description": "When it was ratified. Present exactly when `ratifiedBy` is."
374
+ }
375
+ }
376
+ },
377
+ "Did": {
378
+ "title": "Did",
379
+ "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.",
380
+ "type": "string",
381
+ "maxLength": 2048,
382
+ "pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
383
+ },
384
+ "Resource": {
385
+ "title": "Resource",
386
+ "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`.",
387
+ "type": "string",
388
+ "maxLength": 455,
389
+ "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}$"
390
+ },
391
+ "Right": {
392
+ "title": "Right",
393
+ "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.",
394
+ "type": "string",
395
+ "enum": [
396
+ "git.ns.admin",
397
+ "git.repo.create",
398
+ "git.repo.own",
399
+ "git.repo.maintain",
400
+ "git.commit.sign"
401
+ ]
402
+ },
403
+ "ElevatedRight": {
404
+ "title": "ElevatedRight",
405
+ "description": "The three rights that carry authority over other people's rights: `git.ns.admin`, `git.repo.create` (which makes its holder the owner of every repository they create) and `git.repo.own`. Separation of duties applies to these: nobody grants one to themselves through git-ns/right/grant, or records one for themselves through any other task that grants on the actor's own authority. The explicit self-grant is git-ns/right/break-glass. `git.repo.maintain` and `git.commit.sign` are not elevated.",
406
+ "type": "string",
407
+ "enum": [
408
+ "git.ns.admin",
409
+ "git.repo.create",
410
+ "git.repo.own"
411
+ ]
412
+ }
413
+ }
414
+ } as const;
415
+
416
+ /**
417
+ * SPEC.md §7.2 policy for the request variant, from this specification's
418
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
419
+ * per-specification and cannot be derived from the document alone, and
420
+ * item 2 needs the schema this carries.
421
+ */
422
+ export const SPEC = {
423
+ typeUri: TYPE_URI,
424
+ isBearer: false,
425
+ isProofRequired: true,
426
+ isRecipientRequired: true,
427
+ isIssuedAtRequired: true,
428
+ payloadSchema: PAYLOAD_SCHEMA,
429
+ } as const;
430
+
431
+ /**
432
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
433
+ * tracks the *issuer* party's requirement because a response swaps the
434
+ * parties (§7.3 item 5).
435
+ */
436
+ export const RESPONSE_SPEC = {
437
+ typeUri: RESPONSE_TYPE_URI,
438
+ isBearer: false,
439
+ isProofRequired: true,
440
+ isRecipientRequired: true,
441
+ isIssuedAtRequired: true,
442
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
443
+ } as const;