@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,191 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/backup/abort/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Cancels an in-flight export or import bundle and discards its staged bytes. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface BackupAbortPayload {
13
+ /**
14
+ * Handle from an initiate-export or initiate-import descriptor; either kind is accepted. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.
15
+ */
16
+ bundleId: string;
17
+ /**
18
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
19
+ */
20
+ ext?: Ext;
21
+ }
22
+ export interface BackupAbortResponsePayload {
23
+ /**
24
+ * Echoed so the response stands alone as a record.
25
+ */
26
+ bundleId: string;
27
+ /**
28
+ * Whether this request is what moved the bundle to a terminal state. False means it was already terminal — a success, not a failure, and the reason abort can be retried safely. Required rather than optional: an absent member on an idempotent no-op would be indistinguishable from a cancellation that happened.
29
+ */
30
+ aborted: boolean;
31
+ /**
32
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
33
+ */
34
+ ext?: Ext;
35
+ }
36
+
37
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
38
+ export type { Ext };
39
+
40
+ /** Trust Task type URI. */
41
+ export const TYPE_URI = "https://trusttasks.org/spec/backup/abort/0.1" as const;
42
+
43
+ /** Stable alias for this specification's request payload shape. */
44
+ export type Payload = BackupAbortPayload;
45
+
46
+ /** Trust Task response type URI (request type URI + "#response"). */
47
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/backup/abort/0.1#response" as const;
48
+
49
+ /** Stable alias for this specification's success-response payload shape. */
50
+ export type Response = BackupAbortResponsePayload;
51
+
52
+ /**
53
+ * This specification's payload schema, as a value.
54
+ *
55
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
56
+ * rather than only as a `.json` file because TypeScript types are erased
57
+ * at runtime: without a schema a consumer has nothing to validate, and
58
+ * every REQUIRED payload member is optional in practice. Cross-file
59
+ * `$ref`s are already inlined, so it needs no resolver.
60
+ */
61
+ export const PAYLOAD_SCHEMA = {
62
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
63
+ "$id": "https://trusttasks.org/spec/backup/abort/0.1",
64
+ "title": "Backup — Abort — payload",
65
+ "description": "Cancels an in-flight export or import bundle and discards its staged bytes. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "bundleId"
70
+ ],
71
+ "properties": {
72
+ "bundleId": {
73
+ "type": "string",
74
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
75
+ "description": "Handle from an initiate-export or initiate-import descriptor; either kind is accepted. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one."
76
+ },
77
+ "ext": {
78
+ "$ref": "#/$defs/Ext",
79
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
80
+ }
81
+ },
82
+ "$defs": {
83
+ "Response": {
84
+ "$anchor": "response",
85
+ "title": "Backup — Abort — response payload",
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "bundleId",
90
+ "aborted"
91
+ ],
92
+ "properties": {
93
+ "bundleId": {
94
+ "type": "string",
95
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
96
+ "description": "Echoed so the response stands alone as a record."
97
+ },
98
+ "aborted": {
99
+ "type": "boolean",
100
+ "description": "Whether this request is what moved the bundle to a terminal state. False means it was already terminal — a success, not a failure, and the reason abort can be retried safely. Required rather than optional: an absent member on an idempotent no-op would be indistinguishable from a cancellation that happened."
101
+ },
102
+ "ext": {
103
+ "$ref": "#/$defs/Ext",
104
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
105
+ }
106
+ }
107
+ },
108
+ "Ext": {
109
+ "title": "Ext",
110
+ "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.",
111
+ "type": "object",
112
+ "minProperties": 1,
113
+ "additionalProperties": true,
114
+ "propertyNames": {
115
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
116
+ }
117
+ }
118
+ }
119
+ } as const;
120
+
121
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
122
+ export const RESPONSE_PAYLOAD_SCHEMA = {
123
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
124
+ "$ref": "#/$defs/Response",
125
+ "$defs": {
126
+ "Response": {
127
+ "$anchor": "response",
128
+ "title": "Backup — Abort — response payload",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "bundleId",
133
+ "aborted"
134
+ ],
135
+ "properties": {
136
+ "bundleId": {
137
+ "type": "string",
138
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
139
+ "description": "Echoed so the response stands alone as a record."
140
+ },
141
+ "aborted": {
142
+ "type": "boolean",
143
+ "description": "Whether this request is what moved the bundle to a terminal state. False means it was already terminal — a success, not a failure, and the reason abort can be retried safely. Required rather than optional: an absent member on an idempotent no-op would be indistinguishable from a cancellation that happened."
144
+ },
145
+ "ext": {
146
+ "$ref": "#/$defs/Ext",
147
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
148
+ }
149
+ }
150
+ },
151
+ "Ext": {
152
+ "title": "Ext",
153
+ "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.",
154
+ "type": "object",
155
+ "minProperties": 1,
156
+ "additionalProperties": true,
157
+ "propertyNames": {
158
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
159
+ }
160
+ }
161
+ }
162
+ } as const;
163
+
164
+ /**
165
+ * SPEC.md §7.2 policy for the request variant, from this specification's
166
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
167
+ * per-specification and cannot be derived from the document alone, and
168
+ * item 2 needs the schema this carries.
169
+ */
170
+ export const SPEC = {
171
+ typeUri: TYPE_URI,
172
+ isBearer: false,
173
+ isProofRequired: true,
174
+ isRecipientRequired: true,
175
+ isIssuedAtRequired: true,
176
+ payloadSchema: PAYLOAD_SCHEMA,
177
+ } as const;
178
+
179
+ /**
180
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
181
+ * tracks the *issuer* party's requirement because a response swaps the
182
+ * parties (§7.3 item 5).
183
+ */
184
+ export const RESPONSE_SPEC = {
185
+ typeUri: RESPONSE_TYPE_URI,
186
+ isBearer: false,
187
+ isProofRequired: true,
188
+ isRecipientRequired: true,
189
+ isIssuedAtRequired: true,
190
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
191
+ } as const;
@@ -0,0 +1,191 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/backup/complete-export/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Acknowledges that an export bundle was downloaded, so the recipient can release the staged bytes and retire the transport token. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface BackupCompleteExportPayload {
13
+ /**
14
+ * Handle from the initiate-export descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.
15
+ */
16
+ bundleId: string;
17
+ /**
18
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
19
+ */
20
+ ext?: Ext;
21
+ }
22
+ export interface BackupCompleteExportResponsePayload {
23
+ /**
24
+ * Echoed so the response stands alone as a record.
25
+ */
26
+ bundleId: string;
27
+ /**
28
+ * Whether the byte stream was actually fetched before this acknowledgement. Required, not optional: false is the honest answer when the operator skipped the download or the slot expired first, and an absent member would let that be read as success.
29
+ */
30
+ downloaded: boolean;
31
+ /**
32
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
33
+ */
34
+ ext?: Ext;
35
+ }
36
+
37
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
38
+ export type { Ext };
39
+
40
+ /** Trust Task type URI. */
41
+ export const TYPE_URI = "https://trusttasks.org/spec/backup/complete-export/0.1" as const;
42
+
43
+ /** Stable alias for this specification's request payload shape. */
44
+ export type Payload = BackupCompleteExportPayload;
45
+
46
+ /** Trust Task response type URI (request type URI + "#response"). */
47
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/backup/complete-export/0.1#response" as const;
48
+
49
+ /** Stable alias for this specification's success-response payload shape. */
50
+ export type Response = BackupCompleteExportResponsePayload;
51
+
52
+ /**
53
+ * This specification's payload schema, as a value.
54
+ *
55
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
56
+ * rather than only as a `.json` file because TypeScript types are erased
57
+ * at runtime: without a schema a consumer has nothing to validate, and
58
+ * every REQUIRED payload member is optional in practice. Cross-file
59
+ * `$ref`s are already inlined, so it needs no resolver.
60
+ */
61
+ export const PAYLOAD_SCHEMA = {
62
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
63
+ "$id": "https://trusttasks.org/spec/backup/complete-export/0.1",
64
+ "title": "Backup — Complete Export — payload",
65
+ "description": "Acknowledges that an export bundle was downloaded, so the recipient can release the staged bytes and retire the transport token. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "bundleId"
70
+ ],
71
+ "properties": {
72
+ "bundleId": {
73
+ "type": "string",
74
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
75
+ "description": "Handle from the initiate-export descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one."
76
+ },
77
+ "ext": {
78
+ "$ref": "#/$defs/Ext",
79
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
80
+ }
81
+ },
82
+ "$defs": {
83
+ "Response": {
84
+ "$anchor": "response",
85
+ "title": "Backup — Complete Export — response payload",
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "bundleId",
90
+ "downloaded"
91
+ ],
92
+ "properties": {
93
+ "bundleId": {
94
+ "type": "string",
95
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
96
+ "description": "Echoed so the response stands alone as a record."
97
+ },
98
+ "downloaded": {
99
+ "type": "boolean",
100
+ "description": "Whether the byte stream was actually fetched before this acknowledgement. Required, not optional: false is the honest answer when the operator skipped the download or the slot expired first, and an absent member would let that be read as success."
101
+ },
102
+ "ext": {
103
+ "$ref": "#/$defs/Ext",
104
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
105
+ }
106
+ }
107
+ },
108
+ "Ext": {
109
+ "title": "Ext",
110
+ "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.",
111
+ "type": "object",
112
+ "minProperties": 1,
113
+ "additionalProperties": true,
114
+ "propertyNames": {
115
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
116
+ }
117
+ }
118
+ }
119
+ } as const;
120
+
121
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
122
+ export const RESPONSE_PAYLOAD_SCHEMA = {
123
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
124
+ "$ref": "#/$defs/Response",
125
+ "$defs": {
126
+ "Response": {
127
+ "$anchor": "response",
128
+ "title": "Backup — Complete Export — response payload",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "bundleId",
133
+ "downloaded"
134
+ ],
135
+ "properties": {
136
+ "bundleId": {
137
+ "type": "string",
138
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
139
+ "description": "Echoed so the response stands alone as a record."
140
+ },
141
+ "downloaded": {
142
+ "type": "boolean",
143
+ "description": "Whether the byte stream was actually fetched before this acknowledgement. Required, not optional: false is the honest answer when the operator skipped the download or the slot expired first, and an absent member would let that be read as success."
144
+ },
145
+ "ext": {
146
+ "$ref": "#/$defs/Ext",
147
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
148
+ }
149
+ }
150
+ },
151
+ "Ext": {
152
+ "title": "Ext",
153
+ "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.",
154
+ "type": "object",
155
+ "minProperties": 1,
156
+ "additionalProperties": true,
157
+ "propertyNames": {
158
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
159
+ }
160
+ }
161
+ }
162
+ } as const;
163
+
164
+ /**
165
+ * SPEC.md §7.2 policy for the request variant, from this specification's
166
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
167
+ * per-specification and cannot be derived from the document alone, and
168
+ * item 2 needs the schema this carries.
169
+ */
170
+ export const SPEC = {
171
+ typeUri: TYPE_URI,
172
+ isBearer: false,
173
+ isProofRequired: true,
174
+ isRecipientRequired: true,
175
+ isIssuedAtRequired: true,
176
+ payloadSchema: PAYLOAD_SCHEMA,
177
+ } as const;
178
+
179
+ /**
180
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
181
+ * tracks the *issuer* party's requirement because a response swaps the
182
+ * parties (§7.3 item 5).
183
+ */
184
+ export const RESPONSE_SPEC = {
185
+ typeUri: RESPONSE_TYPE_URI,
186
+ isBearer: false,
187
+ isProofRequired: true,
188
+ isRecipientRequired: true,
189
+ isIssuedAtRequired: true,
190
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
191
+ } as const;
@@ -0,0 +1,279 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/backup/finalize-import/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Supplies the password for an uploaded bundle and asks the recipient to decrypt it and adopt what is inside, or to rehearse that without committing. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface BackupFinalizeImportPayload {
13
+ /**
14
+ * Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.
15
+ */
16
+ bundleId: string;
17
+ /**
18
+ * Key-derivation input that unlocks the bundle. Supplied here rather than at initiate-import so the key never travels alongside the slot holding the ciphertext. `writeOnly` is the machine-readable form of the rule in Data carried: this member goes in and never comes back, so a generated client must not surface it in a response type, and a recipient must never log, echo or persist it.
19
+ */
20
+ password: string;
21
+ /**
22
+ * True commits and replaces the node's state; false rehearses and mutates nothing. Absent means true — stated in prose rather than as a schema `default` on purpose, because a materialised default makes an omitted member indistinguishable from a deliberate one, and this is the member separating a rehearsal from an irreversible replacement. See Defaulting.
23
+ */
24
+ confirm?: boolean;
25
+ /**
26
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
27
+ */
28
+ ext?: Ext;
29
+ }
30
+ /**
31
+ * Counts and a status, never contents. This document is the operator-held record of a replacement the node's own trail no longer describes.
32
+ */
33
+ export interface BackupFinalizeImportResponsePayload {
34
+ /**
35
+ * Echoed so the response stands alone as a record.
36
+ */
37
+ bundleId: string;
38
+ /**
39
+ * Which the recipient did. Reported rather than left to be inferred from the request, so that a response is complete evidence on its own: `committed` says the node was replaced, `preview` says it was not.
40
+ */
41
+ status: "preview" | "committed";
42
+ /**
43
+ * Identifier of the node the bundle was exported from. The one identifier a preview returns, because the common import error is a valid bundle from the wrong node and this is what shows it. Absent where the bundle does not record one.
44
+ */
45
+ sourceDid?: string;
46
+ /**
47
+ * How many of each kind of record the bundle holds, keyed by the node's own names for them — for an agent, `keys`, `acl`, `contexts`, `audit`, `importedSecrets`; for a community, one entry per backed-up keyspace. Counts, not an inventory: enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it. An audit count of zero is a bundle exported without its trail, not a truncated one.
48
+ */
49
+ counts: {
50
+ [k: string]: number | undefined;
51
+ };
52
+ /**
53
+ * Operator-facing text elaborating on the outcome. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put bundle contents or a secret in it.
54
+ */
55
+ message?: string;
56
+ /**
57
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
58
+ */
59
+ ext?: Ext;
60
+ }
61
+
62
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
63
+ export type { Ext };
64
+
65
+ /** Trust Task type URI. */
66
+ export const TYPE_URI = "https://trusttasks.org/spec/backup/finalize-import/0.1" as const;
67
+
68
+ /** Stable alias for this specification's request payload shape. */
69
+ export type Payload = BackupFinalizeImportPayload;
70
+
71
+ /** Trust Task response type URI (request type URI + "#response"). */
72
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/backup/finalize-import/0.1#response" as const;
73
+
74
+ /** Stable alias for this specification's success-response payload shape. */
75
+ export type Response = BackupFinalizeImportResponsePayload;
76
+
77
+ /**
78
+ * This specification's payload schema, as a value.
79
+ *
80
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
81
+ * rather than only as a `.json` file because TypeScript types are erased
82
+ * at runtime: without a schema a consumer has nothing to validate, and
83
+ * every REQUIRED payload member is optional in practice. Cross-file
84
+ * `$ref`s are already inlined, so it needs no resolver.
85
+ */
86
+ export const PAYLOAD_SCHEMA = {
87
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
88
+ "$id": "https://trusttasks.org/spec/backup/finalize-import/0.1",
89
+ "title": "Backup — Finalize Import — payload",
90
+ "description": "Supplies the password for an uploaded bundle and asks the recipient to decrypt it and adopt what is inside, or to rehearse that without committing. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "bundleId",
95
+ "password"
96
+ ],
97
+ "properties": {
98
+ "bundleId": {
99
+ "type": "string",
100
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
101
+ "description": "Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one."
102
+ },
103
+ "password": {
104
+ "type": "string",
105
+ "minLength": 15,
106
+ "maxLength": 1024,
107
+ "writeOnly": true,
108
+ "description": "Key-derivation input that unlocks the bundle. Supplied here rather than at initiate-import so the key never travels alongside the slot holding the ciphertext. `writeOnly` is the machine-readable form of the rule in Data carried: this member goes in and never comes back, so a generated client must not surface it in a response type, and a recipient must never log, echo or persist it.",
109
+ "$comment": "No example value anywhere in this directory: a specimen password is the one thing implementers copy. minLength mirrors the export floor so a bundle that could be created can be read back."
110
+ },
111
+ "confirm": {
112
+ "type": "boolean",
113
+ "description": "True commits and replaces the node's state; false rehearses and mutates nothing. Absent means true — stated in prose rather than as a schema `default` on purpose, because a materialised default makes an omitted member indistinguishable from a deliberate one, and this is the member separating a rehearsal from an irreversible replacement. See Defaulting."
114
+ },
115
+ "ext": {
116
+ "$ref": "#/$defs/Ext",
117
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
118
+ }
119
+ },
120
+ "$defs": {
121
+ "Response": {
122
+ "$anchor": "response",
123
+ "title": "Backup — Finalize Import — response payload",
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "description": "Counts and a status, never contents. This document is the operator-held record of a replacement the node's own trail no longer describes.",
127
+ "required": [
128
+ "bundleId",
129
+ "status",
130
+ "counts"
131
+ ],
132
+ "properties": {
133
+ "bundleId": {
134
+ "type": "string",
135
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
136
+ "description": "Echoed so the response stands alone as a record."
137
+ },
138
+ "status": {
139
+ "type": "string",
140
+ "enum": [
141
+ "preview",
142
+ "committed"
143
+ ],
144
+ "description": "Which the recipient did. Reported rather than left to be inferred from the request, so that a response is complete evidence on its own: `committed` says the node was replaced, `preview` says it was not."
145
+ },
146
+ "sourceDid": {
147
+ "type": "string",
148
+ "minLength": 1,
149
+ "maxLength": 2048,
150
+ "description": "Identifier of the node the bundle was exported from. The one identifier a preview returns, because the common import error is a valid bundle from the wrong node and this is what shows it. Absent where the bundle does not record one."
151
+ },
152
+ "counts": {
153
+ "type": "object",
154
+ "additionalProperties": {
155
+ "type": "integer",
156
+ "minimum": 0
157
+ },
158
+ "description": "How many of each kind of record the bundle holds, keyed by the node's own names for them — for an agent, `keys`, `acl`, `contexts`, `audit`, `importedSecrets`; for a community, one entry per backed-up keyspace. Counts, not an inventory: enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it. An audit count of zero is a bundle exported without its trail, not a truncated one."
159
+ },
160
+ "message": {
161
+ "type": "string",
162
+ "maxLength": 1024,
163
+ "description": "Operator-facing text elaborating on the outcome. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put bundle contents or a secret in it."
164
+ },
165
+ "ext": {
166
+ "$ref": "#/$defs/Ext",
167
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
168
+ }
169
+ }
170
+ },
171
+ "Ext": {
172
+ "title": "Ext",
173
+ "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.",
174
+ "type": "object",
175
+ "minProperties": 1,
176
+ "additionalProperties": true,
177
+ "propertyNames": {
178
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
179
+ }
180
+ }
181
+ }
182
+ } as const;
183
+
184
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
185
+ export const RESPONSE_PAYLOAD_SCHEMA = {
186
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
187
+ "$ref": "#/$defs/Response",
188
+ "$defs": {
189
+ "Response": {
190
+ "$anchor": "response",
191
+ "title": "Backup — Finalize Import — response payload",
192
+ "type": "object",
193
+ "additionalProperties": false,
194
+ "description": "Counts and a status, never contents. This document is the operator-held record of a replacement the node's own trail no longer describes.",
195
+ "required": [
196
+ "bundleId",
197
+ "status",
198
+ "counts"
199
+ ],
200
+ "properties": {
201
+ "bundleId": {
202
+ "type": "string",
203
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
204
+ "description": "Echoed so the response stands alone as a record."
205
+ },
206
+ "status": {
207
+ "type": "string",
208
+ "enum": [
209
+ "preview",
210
+ "committed"
211
+ ],
212
+ "description": "Which the recipient did. Reported rather than left to be inferred from the request, so that a response is complete evidence on its own: `committed` says the node was replaced, `preview` says it was not."
213
+ },
214
+ "sourceDid": {
215
+ "type": "string",
216
+ "minLength": 1,
217
+ "maxLength": 2048,
218
+ "description": "Identifier of the node the bundle was exported from. The one identifier a preview returns, because the common import error is a valid bundle from the wrong node and this is what shows it. Absent where the bundle does not record one."
219
+ },
220
+ "counts": {
221
+ "type": "object",
222
+ "additionalProperties": {
223
+ "type": "integer",
224
+ "minimum": 0
225
+ },
226
+ "description": "How many of each kind of record the bundle holds, keyed by the node's own names for them — for an agent, `keys`, `acl`, `contexts`, `audit`, `importedSecrets`; for a community, one entry per backed-up keyspace. Counts, not an inventory: enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it. An audit count of zero is a bundle exported without its trail, not a truncated one."
227
+ },
228
+ "message": {
229
+ "type": "string",
230
+ "maxLength": 1024,
231
+ "description": "Operator-facing text elaborating on the outcome. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put bundle contents or a secret in it."
232
+ },
233
+ "ext": {
234
+ "$ref": "#/$defs/Ext",
235
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
236
+ }
237
+ }
238
+ },
239
+ "Ext": {
240
+ "title": "Ext",
241
+ "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.",
242
+ "type": "object",
243
+ "minProperties": 1,
244
+ "additionalProperties": true,
245
+ "propertyNames": {
246
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
247
+ }
248
+ }
249
+ }
250
+ } as const;
251
+
252
+ /**
253
+ * SPEC.md §7.2 policy for the request variant, from this specification's
254
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
255
+ * per-specification and cannot be derived from the document alone, and
256
+ * item 2 needs the schema this carries.
257
+ */
258
+ export const SPEC = {
259
+ typeUri: TYPE_URI,
260
+ isBearer: false,
261
+ isProofRequired: true,
262
+ isRecipientRequired: true,
263
+ isIssuedAtRequired: true,
264
+ payloadSchema: PAYLOAD_SCHEMA,
265
+ } as const;
266
+
267
+ /**
268
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
269
+ * tracks the *issuer* party's requirement because a response swaps the
270
+ * parties (§7.3 item 5).
271
+ */
272
+ export const RESPONSE_SPEC = {
273
+ typeUri: RESPONSE_TYPE_URI,
274
+ isBearer: false,
275
+ isProofRequired: true,
276
+ isRecipientRequired: true,
277
+ isIssuedAtRequired: true,
278
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
279
+ } as const;