@run402/sdk 4.95.0 → 4.96.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 (210) hide show
  1. package/README.md +24 -24
  2. package/core-dist/keystore.d.ts +1 -1
  3. package/core-dist/keystore.js +1 -1
  4. package/dist/errors.d.ts +4 -4
  5. package/dist/errors.d.ts.map +1 -1
  6. package/dist/index.d.ts +9 -9
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +8 -8
  9. package/dist/index.js.map +1 -1
  10. package/dist/namespaces/deploy.d.ts +5 -5
  11. package/dist/namespaces/deploy.d.ts.map +1 -1
  12. package/dist/namespaces/deploy.js +20 -20
  13. package/dist/namespaces/deploy.js.map +1 -1
  14. package/dist/namespaces/deploy.types.d.ts +17 -17
  15. package/dist/namespaces/deploy.types.d.ts.map +1 -1
  16. package/dist/namespaces/org.d.ts +2 -2
  17. package/dist/namespaces/org.js +2 -2
  18. package/dist/namespaces/org.types.d.ts +3 -3
  19. package/dist/namespaces/pay.js +1 -1
  20. package/dist/namespaces/{gitvault.d.ts → repos.d.ts} +436 -449
  21. package/dist/namespaces/repos.d.ts.map +1 -0
  22. package/dist/namespaces/{gitvault.js → repos.js} +451 -459
  23. package/dist/namespaces/repos.js.map +1 -0
  24. package/dist/namespaces/rooms.js +2 -2
  25. package/dist/namespaces/rooms.js.map +1 -1
  26. package/dist/namespaces/session.d.ts +2 -2
  27. package/dist/namespaces/session.d.ts.map +1 -1
  28. package/dist/namespaces/session.js +2 -2
  29. package/dist/namespaces/session.js.map +1 -1
  30. package/dist/namespaces/tier.d.ts +3 -3
  31. package/dist/namespaces/tier.d.ts.map +1 -1
  32. package/dist/namespaces/{gitvault.crypto.d.ts → vault.crypto.d.ts} +141 -141
  33. package/dist/namespaces/vault.crypto.d.ts.map +1 -0
  34. package/dist/namespaces/{gitvault.crypto.js → vault.crypto.js} +173 -173
  35. package/dist/namespaces/vault.crypto.js.map +1 -0
  36. package/dist/namespaces/{gitvault.types.d.ts → vault.types.d.ts} +136 -136
  37. package/dist/namespaces/vault.types.d.ts.map +1 -0
  38. package/dist/namespaces/{gitvault.types.js → vault.types.js} +4 -4
  39. package/dist/namespaces/vault.types.js.map +1 -0
  40. package/dist/node/bearer-redeem-key.d.ts +1 -1
  41. package/dist/node/bearer-redeem-key.js +5 -5
  42. package/dist/node/bearer-redeem-key.js.map +1 -1
  43. package/dist/node/http-dispatcher.js +5 -5
  44. package/dist/node/http-dispatcher.js.map +1 -1
  45. package/dist/node/index.d.ts +29 -29
  46. package/dist/node/index.d.ts.map +1 -1
  47. package/dist/node/index.js +39 -39
  48. package/dist/node/index.js.map +1 -1
  49. package/dist/node/{gitvault-address.d.ts → vault-address.d.ts} +42 -42
  50. package/dist/node/vault-address.d.ts.map +1 -0
  51. package/dist/node/{gitvault-address.js → vault-address.js} +43 -43
  52. package/dist/node/vault-address.js.map +1 -0
  53. package/dist/node/{gitvault-apply.d.ts → vault-apply.d.ts} +27 -27
  54. package/dist/node/vault-apply.d.ts.map +1 -0
  55. package/dist/node/{gitvault-apply.js → vault-apply.js} +38 -38
  56. package/dist/node/vault-apply.js.map +1 -0
  57. package/dist/node/vault-byo-config.d.ts +29 -0
  58. package/dist/node/vault-byo-config.d.ts.map +1 -0
  59. package/dist/node/{gitvault-byo-config.js → vault-byo-config.js} +18 -18
  60. package/dist/node/vault-byo-config.js.map +1 -0
  61. package/dist/node/vault-byo-probe.d.ts +20 -0
  62. package/dist/node/vault-byo-probe.d.ts.map +1 -0
  63. package/dist/node/vault-byo-probe.js +57 -0
  64. package/dist/node/vault-byo-probe.js.map +1 -0
  65. package/dist/node/{gitvault-creation-journal.d.ts → vault-creation-journal.d.ts} +69 -69
  66. package/dist/node/vault-creation-journal.d.ts.map +1 -0
  67. package/dist/node/{gitvault-creation-journal.js → vault-creation-journal.js} +54 -54
  68. package/dist/node/vault-creation-journal.js.map +1 -0
  69. package/dist/node/{gitvault-degraded-read.d.ts → vault-degraded-read.d.ts} +34 -34
  70. package/dist/node/vault-degraded-read.d.ts.map +1 -0
  71. package/dist/node/{gitvault-degraded-read.js → vault-degraded-read.js} +24 -24
  72. package/dist/node/vault-degraded-read.js.map +1 -0
  73. package/dist/node/{gitvault-deploy.d.ts → vault-deploy.d.ts} +67 -67
  74. package/dist/node/vault-deploy.d.ts.map +1 -0
  75. package/dist/node/{gitvault-deploy.js → vault-deploy.js} +27 -27
  76. package/dist/node/vault-deploy.js.map +1 -0
  77. package/dist/node/{gitvault-edge-fetch.d.ts → vault-edge-fetch.d.ts} +9 -9
  78. package/dist/node/vault-edge-fetch.d.ts.map +1 -0
  79. package/dist/node/{gitvault-edge-fetch.js → vault-edge-fetch.js} +11 -11
  80. package/dist/node/vault-edge-fetch.js.map +1 -0
  81. package/dist/node/{gitvault-handoff.d.ts → vault-handoff.d.ts} +9 -9
  82. package/dist/node/vault-handoff.d.ts.map +1 -0
  83. package/dist/node/{gitvault-handoff.js → vault-handoff.js} +24 -24
  84. package/dist/node/vault-handoff.js.map +1 -0
  85. package/dist/node/{gitvault-keystore.d.ts → vault-keystore.d.ts} +87 -77
  86. package/dist/node/vault-keystore.d.ts.map +1 -0
  87. package/dist/node/{gitvault-keystore.js → vault-keystore.js} +105 -68
  88. package/dist/node/vault-keystore.js.map +1 -0
  89. package/dist/node/{gitvault-member-bundle.d.ts → vault-member-bundle.d.ts} +17 -17
  90. package/dist/node/vault-member-bundle.d.ts.map +1 -0
  91. package/dist/node/{gitvault-member-bundle.js → vault-member-bundle.js} +11 -11
  92. package/dist/node/vault-member-bundle.js.map +1 -0
  93. package/dist/node/{gitvault-mirror-backend.d.ts → vault-mirror-backend.d.ts} +26 -26
  94. package/dist/node/vault-mirror-backend.d.ts.map +1 -0
  95. package/dist/node/{gitvault-mirror-backend.js → vault-mirror-backend.js} +25 -25
  96. package/dist/node/vault-mirror-backend.js.map +1 -0
  97. package/dist/node/{gitvault-mirror-config.d.ts → vault-mirror-config.d.ts} +23 -23
  98. package/dist/node/vault-mirror-config.d.ts.map +1 -0
  99. package/dist/node/{gitvault-mirror-config.js → vault-mirror-config.js} +16 -16
  100. package/dist/node/vault-mirror-config.js.map +1 -0
  101. package/dist/node/{gitvault-mirror.d.ts → vault-mirror.d.ts} +36 -36
  102. package/dist/node/vault-mirror.d.ts.map +1 -0
  103. package/dist/node/{gitvault-mirror.js → vault-mirror.js} +75 -75
  104. package/dist/node/vault-mirror.js.map +1 -0
  105. package/dist/node/{gitvault-native-crypto.d.ts → vault-native-crypto.d.ts} +10 -10
  106. package/dist/node/vault-native-crypto.d.ts.map +1 -0
  107. package/dist/node/{gitvault-native-crypto.js → vault-native-crypto.js} +16 -16
  108. package/dist/node/vault-native-crypto.js.map +1 -0
  109. package/dist/node/{gitvault-open-or-create.d.ts → vault-open-or-create.d.ts} +16 -16
  110. package/dist/node/vault-open-or-create.d.ts.map +1 -0
  111. package/dist/node/{gitvault-open-or-create.js → vault-open-or-create.js} +10 -10
  112. package/dist/node/vault-open-or-create.js.map +1 -0
  113. package/dist/node/{gitvault-prewarm.d.ts → vault-prewarm.d.ts} +13 -13
  114. package/dist/node/vault-prewarm.d.ts.map +1 -0
  115. package/dist/node/{gitvault-prewarm.js → vault-prewarm.js} +25 -25
  116. package/dist/node/vault-prewarm.js.map +1 -0
  117. package/dist/node/{gitvault-profile-scan.d.ts → vault-profile-scan.d.ts} +3 -3
  118. package/dist/node/vault-profile-scan.d.ts.map +1 -0
  119. package/dist/node/{gitvault-profile-scan.js → vault-profile-scan.js} +12 -12
  120. package/dist/node/vault-profile-scan.js.map +1 -0
  121. package/dist/node/{gitvault-prune.d.ts → vault-prune.d.ts} +61 -61
  122. package/dist/node/vault-prune.d.ts.map +1 -0
  123. package/dist/node/{gitvault-prune.js → vault-prune.js} +34 -34
  124. package/dist/node/vault-prune.js.map +1 -0
  125. package/dist/node/{gitvault-publication.d.ts → vault-publication.d.ts} +399 -399
  126. package/dist/node/vault-publication.d.ts.map +1 -0
  127. package/dist/node/{gitvault-publication.js → vault-publication.js} +584 -584
  128. package/dist/node/vault-publication.js.map +1 -0
  129. package/dist/node/{gitvault-push-to-create.d.ts → vault-push-to-create.d.ts} +16 -16
  130. package/dist/node/vault-push-to-create.d.ts.map +1 -0
  131. package/dist/node/{gitvault-push-to-create.js → vault-push-to-create.js} +9 -9
  132. package/dist/node/vault-push-to-create.js.map +1 -0
  133. package/dist/node/{gitvault-recover.d.ts → vault-recover.d.ts} +50 -50
  134. package/dist/node/vault-recover.d.ts.map +1 -0
  135. package/dist/node/{gitvault-recover.js → vault-recover.js} +84 -84
  136. package/dist/node/vault-recover.js.map +1 -0
  137. package/dist/node/{gitvault-restore.d.ts → vault-restore.d.ts} +8 -8
  138. package/dist/node/vault-restore.d.ts.map +1 -0
  139. package/dist/node/{gitvault-restore.js → vault-restore.js} +11 -11
  140. package/dist/node/vault-restore.js.map +1 -0
  141. package/dist/node/{gitvault-snapshot.d.ts → vault-snapshot.d.ts} +48 -48
  142. package/dist/node/vault-snapshot.d.ts.map +1 -0
  143. package/dist/node/{gitvault-snapshot.js → vault-snapshot.js} +61 -61
  144. package/dist/node/vault-snapshot.js.map +1 -0
  145. package/dist/node/{gitvault-writer-state.d.ts → vault-writer-state.d.ts} +8 -8
  146. package/dist/node/vault-writer-state.d.ts.map +1 -0
  147. package/dist/node/{gitvault-writer-state.js → vault-writer-state.js} +15 -15
  148. package/dist/node/vault-writer-state.js.map +1 -0
  149. package/dist/node/workflow-output.js +4 -4
  150. package/dist/node/workflow-output.js.map +1 -1
  151. package/package.json +1 -1
  152. package/dist/namespaces/gitvault.crypto.d.ts.map +0 -1
  153. package/dist/namespaces/gitvault.crypto.js.map +0 -1
  154. package/dist/namespaces/gitvault.d.ts.map +0 -1
  155. package/dist/namespaces/gitvault.js.map +0 -1
  156. package/dist/namespaces/gitvault.types.d.ts.map +0 -1
  157. package/dist/namespaces/gitvault.types.js.map +0 -1
  158. package/dist/node/gitvault-address.d.ts.map +0 -1
  159. package/dist/node/gitvault-address.js.map +0 -1
  160. package/dist/node/gitvault-apply.d.ts.map +0 -1
  161. package/dist/node/gitvault-apply.js.map +0 -1
  162. package/dist/node/gitvault-byo-config.d.ts +0 -29
  163. package/dist/node/gitvault-byo-config.d.ts.map +0 -1
  164. package/dist/node/gitvault-byo-config.js.map +0 -1
  165. package/dist/node/gitvault-byo-probe.d.ts +0 -20
  166. package/dist/node/gitvault-byo-probe.d.ts.map +0 -1
  167. package/dist/node/gitvault-byo-probe.js +0 -57
  168. package/dist/node/gitvault-byo-probe.js.map +0 -1
  169. package/dist/node/gitvault-creation-journal.d.ts.map +0 -1
  170. package/dist/node/gitvault-creation-journal.js.map +0 -1
  171. package/dist/node/gitvault-degraded-read.d.ts.map +0 -1
  172. package/dist/node/gitvault-degraded-read.js.map +0 -1
  173. package/dist/node/gitvault-deploy.d.ts.map +0 -1
  174. package/dist/node/gitvault-deploy.js.map +0 -1
  175. package/dist/node/gitvault-edge-fetch.d.ts.map +0 -1
  176. package/dist/node/gitvault-edge-fetch.js.map +0 -1
  177. package/dist/node/gitvault-handoff.d.ts.map +0 -1
  178. package/dist/node/gitvault-handoff.js.map +0 -1
  179. package/dist/node/gitvault-keystore.d.ts.map +0 -1
  180. package/dist/node/gitvault-keystore.js.map +0 -1
  181. package/dist/node/gitvault-member-bundle.d.ts.map +0 -1
  182. package/dist/node/gitvault-member-bundle.js.map +0 -1
  183. package/dist/node/gitvault-mirror-backend.d.ts.map +0 -1
  184. package/dist/node/gitvault-mirror-backend.js.map +0 -1
  185. package/dist/node/gitvault-mirror-config.d.ts.map +0 -1
  186. package/dist/node/gitvault-mirror-config.js.map +0 -1
  187. package/dist/node/gitvault-mirror.d.ts.map +0 -1
  188. package/dist/node/gitvault-mirror.js.map +0 -1
  189. package/dist/node/gitvault-native-crypto.d.ts.map +0 -1
  190. package/dist/node/gitvault-native-crypto.js.map +0 -1
  191. package/dist/node/gitvault-open-or-create.d.ts.map +0 -1
  192. package/dist/node/gitvault-open-or-create.js.map +0 -1
  193. package/dist/node/gitvault-prewarm.d.ts.map +0 -1
  194. package/dist/node/gitvault-prewarm.js.map +0 -1
  195. package/dist/node/gitvault-profile-scan.d.ts.map +0 -1
  196. package/dist/node/gitvault-profile-scan.js.map +0 -1
  197. package/dist/node/gitvault-prune.d.ts.map +0 -1
  198. package/dist/node/gitvault-prune.js.map +0 -1
  199. package/dist/node/gitvault-publication.d.ts.map +0 -1
  200. package/dist/node/gitvault-publication.js.map +0 -1
  201. package/dist/node/gitvault-push-to-create.d.ts.map +0 -1
  202. package/dist/node/gitvault-push-to-create.js.map +0 -1
  203. package/dist/node/gitvault-recover.d.ts.map +0 -1
  204. package/dist/node/gitvault-recover.js.map +0 -1
  205. package/dist/node/gitvault-restore.d.ts.map +0 -1
  206. package/dist/node/gitvault-restore.js.map +0 -1
  207. package/dist/node/gitvault-snapshot.d.ts.map +0 -1
  208. package/dist/node/gitvault-snapshot.js.map +0 -1
  209. package/dist/node/gitvault-writer-state.d.ts.map +0 -1
  210. package/dist/node/gitvault-writer-state.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  /**
2
- * gitvault — `r402s/v0` crypto core (protocol rev 40, §1 + §2; task 5.1).
2
+ * vault — `r402s/v0` crypto core (protocol rev 40, §1 + §2; task 5.1).
3
3
  *
4
4
  * Pure, isomorphic (WebCrypto + noble + `@hpke/core`), no I/O. Everything
5
5
  * byte-level the protocol pins lives here ONCE and is replayed against the
6
- * frozen vector set (`gitvault.crypto.test.ts`):
6
+ * frozen vector set (`vault.crypto.test.ts`):
7
7
  *
8
8
  * - JCS (RFC 8785) for the no-JSON-numbers profile + the strict-parse profile
9
9
  * - the two hash rules: stored bytes (JCS INCLUDING `signature`) and the
@@ -27,64 +27,64 @@
27
27
  */
28
28
  import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js";
29
29
  import { CipherSuite } from "@hpke/core";
30
- import type { GitvaultAddWriterKeyPayload, GitvaultAllocation, GitvaultDigestLabel, GitvaultEncryptedObjectKind, GitvaultEncryptionKeypair, GitvaultEnvelopeAad, GitvaultFormat, GitvaultFrameAad, GitvaultKeyEnvelope, GitvaultKeyEnvelopeReceipt, GitvaultObjectKind, GitvaultRecoveryReceipt, GitvaultRotateEpochPayload, GitvaultSealedFrame, GitvaultSealedKeyEnvelope, GitvaultSignedObject, GitvaultSigningKeypair, GitvaultStrictParseReason, GitvaultSuite, GitvaultVaultGenesis } from "./gitvault.types.js";
30
+ import type { VaultAddWriterKeyPayload, VaultAllocation, VaultDigestLabel, VaultEncryptedObjectKind, VaultEncryptionKeypair, VaultEnvelopeAad, VaultFormat, VaultFrameAad, VaultKeyEnvelope, VaultKeyEnvelopeReceipt, VaultObjectKind, VaultRecoveryReceipt, VaultRotateEpochPayload, VaultSealedFrame, VaultSealedKeyEnvelope, VaultSignedObject, VaultSigningKeypair, VaultStrictParseReason, VaultSuite, VaultGenesis } from "./vault.types.js";
31
31
  /** Wire format tag (retained by decision D181 across the product rename). */
32
- export declare const GITVAULT_FORMAT: "r402s/v0";
32
+ export declare const VAULT_FORMAT: "r402s/v0";
33
33
  /** The one V0 cryptographic suite. */
34
- export declare const GITVAULT_SUITE: "r402s-1";
34
+ export declare const VAULT_SUITE: "r402s-1";
35
35
  /** Frame magic, bytes 0–5 of every encrypted object. */
36
- export declare const GITVAULT_FRAME_MAGIC: "R402S0";
36
+ export declare const VAULT_FRAME_MAGIC: "R402S0";
37
37
  /** Frame suite byte (byte 6) and its two-char AAD spelling. */
38
- export declare const GITVAULT_FRAME_SUITE_BYTE: 1;
39
- export declare const GITVAULT_FRAME_SUITE_ID: "01";
38
+ export declare const VAULT_FRAME_SUITE_BYTE: 1;
39
+ export declare const VAULT_FRAME_SUITE_ID: "01";
40
40
  /** Protocol §2: max plaintext per encrypted object (256 MiB). */
41
- export declare const GITVAULT_MAX_PLAINTEXT_BYTES: number;
41
+ export declare const VAULT_MAX_PLAINTEXT_BYTES: number;
42
42
  /** The genesis generation / epoch constants (schema consts). */
43
- export declare const GITVAULT_GENESIS_GENERATION: "0000000000000000";
44
- export declare const GITVAULT_GENESIS_EPOCH: "0000000000000001";
43
+ export declare const VAULT_GENESIS_GENERATION: "0000000000000000";
44
+ export declare const VAULT_GENESIS_EPOCH: "0000000000000001";
45
45
  /** HPKE `info` label for `key_envelope` (D188). */
46
- export declare const GITVAULT_ENVELOPE_INFO_LABEL: "r402s/v0/envelope";
46
+ export declare const VAULT_ENVELOPE_INFO_LABEL: "r402s/v0/envelope";
47
47
  /**
48
48
  * The V0-A terminal-loss sentence — protocol §0 / client-surface spec. Doctor
49
49
  * and status surfaces MUST state it verbatim while V0-A is current. Do not
50
50
  * paraphrase; the wording is a reviewed product commitment.
51
51
  */
52
- export declare const GITVAULT_TERMINAL_LOSS_STATEMENT: "whole-machine or whole-keystore loss is terminal for vault history until human envelopes ship";
52
+ export declare const VAULT_TERMINAL_LOSS_STATEMENT: "whole-machine or whole-keystore loss is terminal for vault history until human envelopes ship";
53
53
  /**
54
54
  * The protocol's durability sentence — the keystore-qualified half of the
55
55
  * terminal-loss statement, reusable on its own. It is TRUE regardless of how
56
- * many principals cover a vault (unlike {@link GITVAULT_TERMINAL_LOSS_STATEMENT},
56
+ * many principals cover a vault (unlike {@link VAULT_TERMINAL_LOSS_STATEMENT},
57
57
  * which is specifically the single-principal V0-A claim), so a caller that has
58
58
  * locally proven a vault carries >= 2 covering recipients prints this sentence
59
- * instead of the terminal-loss one — see `Gitvault.status()`'s `covering_recipients`
59
+ * instead of the terminal-loss one — see `Repos.status()`'s `covering_recipients`
60
60
  * field. Never paraphrase; the wording is a reviewed product commitment.
61
61
  */
62
- export declare const GITVAULT_DURABILITY_STATEMENT: "The vault protects source history from host-side loss while a principal keystore survives.";
62
+ export declare const VAULT_DURABILITY_STATEMENT: "The vault protects source history from host-side loss while a principal keystore survives.";
63
63
  /** Protocol §0 sentence in full, as `doctor`/`status` print it. */
64
- export declare const GITVAULT_TERMINAL_LOSS_DOCTOR_TEXT: string;
64
+ export declare const VAULT_TERMINAL_LOSS_DOCTOR_TEXT: string;
65
65
  /**
66
- * gitvault-mirror-and-recover (design D8) — the two honesty statements. Both
66
+ * vault-mirror-and-recover (design D8) — the two honesty statements. Both
67
67
  * appear VERBATIM wherever mirror status or recovery success is shown (mirror
68
68
  * `status`/`sync`, `recover`, keyless `mirror verify`), same voice and
69
- * mechanism as {@link GITVAULT_TERMINAL_LOSS_STATEMENT} above. Never
69
+ * mechanism as {@link VAULT_TERMINAL_LOSS_STATEMENT} above. Never
70
70
  * paraphrased — the §6.4 honesty posture is a reviewed product commitment.
71
71
  */
72
- export declare const GITVAULT_MIRROR_VALIDITY_NOT_FRESHNESS_STATEMENT: "this recovery proves validity, never freshness \u2014 a mirror (or the vault itself) can only tell you the newest generation it happens to hold, never that a newer one does not exist elsewhere";
72
+ export declare const VAULT_MIRROR_VALIDITY_NOT_FRESHNESS_STATEMENT: "this recovery proves validity, never freshness \u2014 a mirror (or the vault itself) can only tell you the newest generation it happens to hold, never that a newer one does not exist elsewhere";
73
73
  /** The mirror does not change the V0 terminal-loss sentence: it is durability, not a second key. */
74
- export declare const GITVAULT_MIRROR_KEYSTORE_STILL_REQUIRED_STATEMENT: "a mirror without the principal keystore (or an equivalent key) recovers nothing \u2014 mirroring ciphertext does not create a second key, and the V0 terminal-loss sentence is unchanged";
74
+ export declare const VAULT_MIRROR_KEYSTORE_STILL_REQUIRED_STATEMENT: "a mirror without the principal keystore (or an equivalent key) recovers nothing \u2014 mirroring ciphertext does not create a second key, and the V0 terminal-loss sentence is unchanged";
75
75
  /**
76
- * gitvault-mirror-default — the recommended-default framing, stated the same
76
+ * vault-mirror-default — the recommended-default framing, stated the same
77
77
  * way everywhere (the copy gate pins the doc surfaces to it). "Replicated"
78
78
  * describes the platform's storage substrate (S3 multi-AZ redundancy), never
79
79
  * a second run402 service; the customer-owned mirror is the only copy outside
80
80
  * run402's custody, and — per the two honesty statements above — it proves
81
81
  * validity, never freshness, and recovers nothing without the keystore.
82
82
  */
83
- export declare const GITVAULT_MIRROR_THREE_COPIES_STATEMENT: "the recommended shape is three copies: your working clone, the platform's replicated vault, and a mirror in storage you own";
83
+ export declare const VAULT_MIRROR_THREE_COPIES_STATEMENT: "the recommended shape is three copies: your working clone, the platform's replicated vault, and a mirror in storage you own";
84
84
  /**
85
- * gitvault-byo-primary-bucket (design D4) — the degraded-read mechanism
85
+ * vault-byo-primary-bucket (design D4) — the degraded-read mechanism
86
86
  * sentence: the invariant part of the ONE stderr line a degraded chain/
87
- * payload read prints (`formatGitvaultDegradedReadNote`, `gitvault-node-
87
+ * payload read prints (`formatVaultDegradedReadNote`, `vault-node-
88
88
  * degraded-read.ts`). Mechanism-only, per the copy rules — never a
89
89
  * confidentiality claim: it names WHY (run402 is unreachable), restates
90
90
  * validity-not-freshness in brief, and states that a write still needs the
@@ -94,95 +94,95 @@ export declare const GITVAULT_MIRROR_THREE_COPIES_STATEMENT: "the recommended sh
94
94
  * the constant. Never paraphrase — same reviewed-product-commitment voice
95
95
  * as the other statements in this file.
96
96
  */
97
- export declare const GITVAULT_DEGRADED_READ_STATEMENT: "run402 is unreachable \u2014 this read is served from your mirror; it proves validity, not freshness; a later push still requires the gateway";
97
+ export declare const VAULT_DEGRADED_READ_STATEMENT: "run402 is unreachable \u2014 this read is served from your mirror; it proves validity, not freshness; a later push still requires the gateway";
98
98
  /**
99
- * gitvault-mirror-default — the `vault_unmirrored` standing finding, worded to
99
+ * vault-mirror-default — the `vault_unmirrored` standing finding, worded to
100
100
  * stay true in BOTH pre-clear states (no mirror configured at all, and a
101
101
  * configured mirror with no successful write/sync yet — the finding clears on
102
102
  * the first successful mirror write or sync, never on configuration alone).
103
103
  * Informational, never blocking; computed client-side only, so the gateway
104
104
  * never learns whether a mirror exists.
105
105
  */
106
- export declare const GITVAULT_UNMIRRORED_FINDING_STATEMENT: "this vault has no customer-held mirror copy yet — the recommended shape is three copies: your working clone, the platform's replicated vault, and a mirror in storage you own; until a first mirror write or sync succeeds, the third copy does not exist";
106
+ export declare const VAULT_UNMIRRORED_FINDING_STATEMENT: "this vault has no customer-held mirror copy yet — the recommended shape is three copies: your working clone, the platform's replicated vault, and a mirror in storage you own; until a first mirror write or sync succeeds, the third copy does not exist";
107
107
  /**
108
- * gitvault-mirror-default — the one-liner `repos create` prints beside the
108
+ * vault-mirror-default — the one-liner `repos create` prints beside the
109
109
  * recovery receipt: the two things worth doing in the first minute, stated in
110
110
  * the first minute. Deliberately custody-scoped ("stays in your custody"),
111
111
  * never a recoverability claim — the terminal-loss statement printed beside it
112
112
  * carries the key half.
113
113
  */
114
- export declare const GITVAULT_MIRROR_SETUP_HINT: "recommended: 'run402 repos mirror <destination>' (an s3:// bucket or a local directory) starts the customer-owned mirror \u2014 every later snapshot dual-pushes to it automatically, and it is the copy that stays in your custody";
114
+ export declare const VAULT_MIRROR_SETUP_HINT: "recommended: 'run402 repos mirror <destination>' (an s3:// bucket or a local directory) starts the customer-owned mirror \u2014 every later capture is mirrored to it automatically, and it is the copy that stays in your custody";
115
115
  /**
116
- * gitvault-byo-primary-bucket (proposal, the ratified D + chain-copy rung-3
116
+ * vault-byo-primary-bucket (proposal, the ratified D + chain-copy rung-3
117
117
  * headline; design D10 — verified from network topology once the client's
118
118
  * BYO write path ships, not by this sentence alone). Structurally scoped to
119
119
  * `storage_profile:"byo"` ONLY — the sentence is FALSE for a managed vault
120
120
  * (payload ciphertext IS client-written to run402's own bucket there), so
121
121
  * every caller MUST gate it behind a BYO-profile check before printing it
122
- * and MUST NEVER use it as a blanket claim describing gitvault in general.
122
+ * and MUST NEVER use it as a blanket claim describing vault in general.
123
123
  * INERT as of this fold (Phase 1, protocol coordination only) — nothing
124
124
  * emits it yet; Phase 2/3 wire the allocation/doctor/`repos view` surfaces
125
125
  * that print it once `storage_profile:"byo"` is a real, allocatable vault
126
126
  * state. Never paraphrase — the wording is a reviewed product commitment.
127
127
  */
128
- export declare const GITVAULT_BYO_HEADLINE_STATEMENT: "your source ciphertext never touches our infrastructure \u2014 not even encrypted";
128
+ export declare const VAULT_BYO_HEADLINE_STATEMENT: "your source ciphertext never touches our infrastructure \u2014 not even encrypted";
129
129
  /**
130
- * gitvault-byo-primary-bucket (design D7) — the allocation-time no-payload-copy
130
+ * vault-byo-primary-bucket (design D7) — the allocation-time no-payload-copy
131
131
  * disclosure a BYO `repos create` prints, unconditionally and independent of
132
132
  * mirror status: unlike a managed vault (where the platform's own bucket is
133
133
  * an extra copy beside the customer's clone), a BYO vault's primary bucket is
134
134
  * the ONLY payload copy from the moment it is allocated — run402 holds the
135
135
  * small signed chain only, never the payload. Distinct from
136
- * {@link GITVAULT_BYO_UNMIRRORED_REMEDY_STATEMENT} below, which is about a
136
+ * {@link VAULT_BYO_UNMIRRORED_REMEDY_STATEMENT} below, which is about a
137
137
  * missing SECOND customer-held copy on top of this primary one. INERT as of
138
138
  * this fold — Phase 2/3 wire the surfaces that print it. Never paraphrase.
139
139
  */
140
- export declare const GITVAULT_BYO_NO_PAYLOAD_COPY_STATEMENT: "run402 holds no payload copy of a BYO vault \u2014 only the small signed chain; your primary bucket is the sole copy of your source until you add a second customer-held location";
140
+ export declare const VAULT_BYO_NO_PAYLOAD_COPY_STATEMENT: "run402 holds no payload copy of a BYO vault \u2014 only the small signed chain; your primary bucket is the sole copy of your source until you add a second customer-held location";
141
141
  /**
142
- * gitvault-byo-primary-bucket (design D7) — the BYO variant of the
143
- * `vault_unmirrored` finding's remedy (gitvault-mirror-default): for a
142
+ * vault-byo-primary-bucket (design D7) — the BYO variant of the
143
+ * `vault_unmirrored` finding's remedy (vault-mirror-default): for a
144
144
  * managed vault the remedy is an ADDITIONAL mirror beside the platform's own
145
- * replicated copy ({@link GITVAULT_MIRROR_SETUP_HINT}); for a BYO vault the
145
+ * replicated copy ({@link VAULT_MIRROR_SETUP_HINT}); for a BYO vault the
146
146
  * platform holds no payload copy to fall back on
147
- * ({@link GITVAULT_BYO_NO_PAYLOAD_COPY_STATEMENT}), so the remedy names a
147
+ * ({@link VAULT_BYO_NO_PAYLOAD_COPY_STATEMENT}), so the remedy names a
148
148
  * SECOND customer-held location as the only additional copy available — the
149
149
  * ordinary `repos mirror` machinery works unchanged against a different
150
150
  * destination (design D7). The `vault_unmirrored` finding itself still
151
151
  * applies to BYO vaults; only this remedy half is BYO-specific. INERT as of
152
152
  * this fold — Phase 2/3 wire the surfaces that print it. Never paraphrase.
153
153
  */
154
- export declare const GITVAULT_BYO_UNMIRRORED_REMEDY_STATEMENT: "add a second customer-held location: 'run402 repos mirror <destination>' works unchanged against a different destination \u2014 for a BYO vault this is your only additional copy, since run402 holds no payload copy of its own";
155
- export declare const GITVAULT_HEX16_RE: RegExp;
156
- export declare const GITVAULT_HEX32_RE: RegExp;
157
- export declare const GITVAULT_SHA256_RE: RegExp;
158
- export declare const GITVAULT_OID40_RE: RegExp;
159
- export declare const GITVAULT_VK_RE: RegExp;
160
- export declare const GITVAULT_EK_RE: RegExp;
161
- export declare const GITVAULT_SRC_RE: RegExp;
162
- export declare const GITVAULT_SERVICE_KEY_ID_RE: RegExp;
163
- export declare const GITVAULT_SIZE_BYTES_RE: RegExp;
154
+ export declare const VAULT_BYO_UNMIRRORED_REMEDY_STATEMENT: "add a second customer-held location: 'run402 repos mirror <destination>' works unchanged against a different destination \u2014 for a BYO vault this is your only additional copy, since run402 holds no payload copy of its own";
155
+ export declare const VAULT_HEX16_RE: RegExp;
156
+ export declare const VAULT_HEX32_RE: RegExp;
157
+ export declare const VAULT_SHA256_RE: RegExp;
158
+ export declare const VAULT_OID40_RE: RegExp;
159
+ export declare const VAULT_VK_RE: RegExp;
160
+ export declare const VAULT_EK_RE: RegExp;
161
+ export declare const VAULT_SRC_RE: RegExp;
162
+ export declare const VAULT_SERVICE_KEY_ID_RE: RegExp;
163
+ export declare const VAULT_SIZE_BYTES_RE: RegExp;
164
164
  /** 32 bytes base64url: 43 chars, final char in the 16-value padding class. */
165
- export declare const GITVAULT_B64U_32_RE: RegExp;
165
+ export declare const VAULT_B64U_32_RE: RegExp;
166
166
  /** 64 bytes base64url: 86 chars, final char ∈ {A,Q,g,w}. */
167
- export declare const GITVAULT_B64U_64_RE: RegExp;
167
+ export declare const VAULT_B64U_64_RE: RegExp;
168
168
  /** The HPKE-sealed K_repo: 48 bytes = exactly 64 base64url chars. */
169
- export declare const GITVAULT_HPKE_CT_RE: RegExp;
170
- export declare const GITVAULT_TIMESTAMP_RE: RegExp;
169
+ export declare const VAULT_HPKE_CT_RE: RegExp;
170
+ export declare const VAULT_TIMESTAMP_RE: RegExp;
171
171
  /** Canonical base64url (no padding, length mod 4 ≠ 1, zero trailing bits): decode→encode round-trips. */
172
172
  export declare function isCanonicalBase64url(value: string): boolean;
173
- /** Decode canonical base64url or throw (`GITVAULT_NONCANONICAL_BASE64URL`). */
173
+ /** Decode canonical base64url or throw (`VAULT_NONCANONICAL_BASE64URL`). */
174
174
  export declare function fromBase64url(value: string, field?: string): Uint8Array;
175
175
  export declare function toBase64url(bytes: Uint8Array): string;
176
176
  /** RFC 3339 UTC ms `Z` with semantic calendar validation (D187: `2026-02-31` and a non-leap Feb 29 are rejects). */
177
- export declare function isValidGitvaultTimestamp(value: string): boolean;
177
+ export declare function isValidVaultTimestamp(value: string): boolean;
178
178
  /** Format a Date as the protocol timestamp grammar (RFC 3339 UTC, milliseconds, `Z`). */
179
- export declare function formatGitvaultTimestamp(date?: Date): string;
179
+ export declare function formatVaultTimestamp(date?: Date): string;
180
180
  /** `lp(x)` = 4-byte big-endian UTF-8 byte length ‖ UTF-8 bytes (protocol §1). */
181
181
  export declare function lp(value: string): Uint8Array;
182
182
  /** `lp_opt(null)` = `0x00`; `lp_opt(x)` = `0x01` ‖ `lp(x)`. */
183
183
  export declare function lpOpt(value: string | null): Uint8Array;
184
184
  /**
185
- * The protocol-hash seam (gitvault-native-hash) — the second narrow slot
185
+ * The protocol-hash seam (vault-native-hash) — the second narrow slot
186
186
  * beside the bulk-AEAD one below, same doctrine: the core owns a slot and the
187
187
  * Node entry fills it (capability is INJECTED at the entry point, never
188
188
  * sniffed in the core), and with nothing registered the `@noble/hashes` path
@@ -192,7 +192,7 @@ export declare function lpOpt(value: string | null): Uint8Array;
192
192
  * converts them all. `hkdf`/`hmac` deliberately stay on `@noble`: they
193
193
  * consume the hash CONSTRUCTOR, not the digest, and are small-input.
194
194
  */
195
- export interface GitvaultHashBackend {
195
+ export interface VaultHashBackend {
196
196
  /** SHA-256 digest — 32 bytes, byte-identical to `@noble/hashes`'. */
197
197
  sha256(bytes: Uint8Array): Uint8Array;
198
198
  }
@@ -200,14 +200,14 @@ export interface GitvaultHashBackend {
200
200
  * SDK-INTERNAL (underscore-exported so the byte-equality suite can swap
201
201
  * backends). Installing `null` restores the `@noble` default.
202
202
  */
203
- export declare function _setGitvaultHashBackend(backend: GitvaultHashBackend | null): void;
203
+ export declare function _setVaultHashBackend(backend: VaultHashBackend | null): void;
204
204
  /** SDK-INTERNAL: which hash backend is live. The isomorphic-entry test asserts `null`. */
205
- export declare function _gitvaultHashBackend(): GitvaultHashBackend | null;
205
+ export declare function _vaultHashBackend(): VaultHashBackend | null;
206
206
  export declare function sha256Hex(bytes: Uint8Array): string;
207
207
  /** CSPRNG bytes from the platform WebCrypto (protocol §2: all keys/nonces/ephemerals from the OS CSPRNG). */
208
208
  export declare function randomBytes(length: number): Uint8Array;
209
209
  /** A fresh `<prefix>_<32 lowercase hex>` id (protocol §1: ids are CSPRNG). */
210
- export declare function newGitvaultId(prefix: string): string;
210
+ export declare function newVaultId(prefix: string): string;
211
211
  /** A fresh 32-lowercase-hex scalar (client_creation_id, capture_id, …). */
212
212
  export declare function newHex32(): string;
213
213
  /** RFC 8785 canonical JSON (no-numbers profile) as UTF-8 bytes. */
@@ -220,35 +220,35 @@ export declare function jcsString(value: unknown): string;
220
220
  * (member order, whitespace, escapes). Schema-awareness (unknown members,
221
221
  * hex case, scalar lengths) is the caller's job.
222
222
  */
223
- export declare function parseGitvaultStrict(text: string): unknown;
223
+ export declare function parseVaultStrict(text: string): unknown;
224
224
  /** Classify a strict-parse failure (for vector replay + diagnostics). */
225
- export declare function gitvaultStrictParseReason(error: unknown): GitvaultStrictParseReason | null;
225
+ export declare function vaultStrictParseReason(error: unknown): VaultStrictParseReason | null;
226
226
  /** Stored bytes of a signed object = JCS of the COMPLETE object including `signature`. */
227
- export declare function storedBytes(object: GitvaultSignedObject): Uint8Array;
227
+ export declare function storedBytes(object: VaultSignedObject): Uint8Array;
228
228
  /** SHA-256 over stored bytes — what every `*_sha256` naming a signed object means. */
229
- export declare function storedBytesSha256(object: GitvaultSignedObject): string;
229
+ export declare function storedBytesSha256(object: VaultSignedObject): string;
230
230
  /**
231
231
  * Exported so the rotation producer (D195) can build the SAME
232
232
  * signature-stripped shape `rotation_id`'s own derivation needs
233
233
  * (`sha256(JCS(descriptor minus signature))`) without reaching into this
234
234
  * module's private helper twice under two different names.
235
235
  */
236
- export declare function gitvaultWithoutSignature<T extends {
236
+ export declare function vaultWithoutSignature<T extends {
237
237
  signature?: unknown;
238
238
  }>(object: T): Omit<T, "signature">;
239
239
  /**
240
240
  * Signature preimage = `"r402s/v0/" + domain + "\n" + JCS(object without its
241
- * single top-level signature)`. `domain` is USUALLY a `GitvaultObjectKind`
241
+ * single top-level signature)`. `domain` is USUALLY a `VaultObjectKind`
242
242
  * (an actual `object_kind`-carrying signed object), but the type accepts any
243
- * string: gitvault-multi-writer rev 47's `writer_acceptance.statement` reuses
243
+ * string: vault-multi-writer rev 47's `writer_acceptance.statement` reuses
244
244
  * this exact byte-construction under the ad-hoc domain
245
245
  * `"handoff-writer-accept/v1"` for a sub-object that is NOT itself a
246
- * `GitvaultSignedObject` (no `object_kind`/`signature` fields of its own —
246
+ * `VaultSignedObject` (no `object_kind`/`signature` fields of its own —
247
247
  * both signatures over it live on the PARENT `writer_acceptance`). Matches
248
248
  * the gateway's own `signaturePreimage(objectKind: string, ...)`, which was
249
249
  * never narrower than `string` to begin with.
250
250
  */
251
- export declare function signaturePreimage(domain: GitvaultObjectKind | string, objectWithoutSignature: Record<string, unknown>): Uint8Array;
251
+ export declare function signaturePreimage(domain: VaultObjectKind | string, objectWithoutSignature: Record<string, unknown>): Uint8Array;
252
252
  export declare function ed25519PublicKey(seed: Uint8Array): Uint8Array;
253
253
  export declare function ed25519Sign(message: Uint8Array, seed: Uint8Array): Uint8Array;
254
254
  /**
@@ -258,8 +258,8 @@ export declare function ed25519Sign(message: Uint8Array, seed: Uint8Array): Uint
258
258
  */
259
259
  export declare function ed25519VerifyStrict(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array): boolean;
260
260
  /** Sign an object under its `object_kind` domain; returns the complete signed object. */
261
- export declare function signGitvaultObject<T extends {
262
- object_kind: GitvaultObjectKind;
261
+ export declare function signVaultObject<T extends {
262
+ object_kind: VaultObjectKind;
263
263
  }>(objectWithoutSignature: T & {
264
264
  signature?: never;
265
265
  }, seed: Uint8Array): T & {
@@ -270,24 +270,24 @@ export declare function signGitvaultObject<T extends {
270
270
  * checked FIRST (an 85-char signature or a 42-char key is a schema reject,
271
271
  * never a decode-time surprise), then strict Ed25519 under the object's domain.
272
272
  */
273
- export declare function verifyGitvaultObject(object: GitvaultSignedObject, publicKey: Uint8Array | string): boolean;
274
- /** Verify or throw `GITVAULT_SIGNATURE_INVALID`. */
275
- export declare function assertGitvaultSignature(object: GitvaultSignedObject, publicKey: Uint8Array | string, context?: string): void;
273
+ export declare function verifyVaultObject(object: VaultSignedObject, publicKey: Uint8Array | string): boolean;
274
+ /** Verify or throw `VAULT_SIGNATURE_INVALID`. */
275
+ export declare function assertVaultSignature(object: VaultSignedObject, publicKey: Uint8Array | string, context?: string): void;
276
276
  /** First 16 bytes of SHA-256(raw pubkey), lowercase hex (32 chars). */
277
277
  export declare function keyFingerprintHex(rawPublicKey: Uint8Array): string;
278
278
  /** `vk_` fingerprint of a raw Ed25519 public key. */
279
279
  export declare function vkFingerprint(rawPublicKey: Uint8Array): string;
280
280
  /** `ek_` fingerprint of a raw X25519 public key. */
281
281
  export declare function ekFingerprint(rawPublicKey: Uint8Array): string;
282
- export declare function generateSigningKeypair(seed?: Uint8Array): GitvaultSigningKeypair;
283
- export declare function generateEncryptionKeypair(privateKey?: Uint8Array): GitvaultEncryptionKeypair;
282
+ export declare function generateSigningKeypair(seed?: Uint8Array): VaultSigningKeypair;
283
+ export declare function generateEncryptionKeypair(privateKey?: Uint8Array): VaultEncryptionKeypair;
284
284
  /** `k_obj` info = lp("r402s/v0") ‖ lp(suite) ‖ lp(repo_id) ‖ lp(epoch) ‖ lp(object_kind) ‖ lp(object_id) ‖ lp("L=32"). */
285
- export declare function objectKeyInfo(repoId: string, epoch: string, objectKind: GitvaultEncryptedObjectKind, objectId: string): Uint8Array;
285
+ export declare function objectKeyInfo(repoId: string, epoch: string, objectKind: VaultEncryptedObjectKind, objectId: string): Uint8Array;
286
286
  /** `k_obj = HKDF-SHA-256(ikm=K_repo, salt=∅, info, L=32)`. */
287
- export declare function deriveObjectKey(kRepo: Uint8Array, repoId: string, epoch: string, objectKind: GitvaultEncryptedObjectKind, objectId: string): Uint8Array;
287
+ export declare function deriveObjectKey(kRepo: Uint8Array, repoId: string, epoch: string, objectKind: VaultEncryptedObjectKind, objectId: string): Uint8Array;
288
288
  /** `K_digest` info = lp("r402s/v0") ‖ lp("r402s-1") ‖ lp(repo_id) ‖ lp(epoch) ‖ lp("digest") ‖ lp(label) ‖ lp("L=32"). */
289
- export declare function digestKeyInfo(repoId: string, epoch: string, label: GitvaultDigestLabel): Uint8Array;
290
- export declare function deriveDigestKey(kRepo: Uint8Array, repoId: string, epoch: string, label: GitvaultDigestLabel): Uint8Array;
289
+ export declare function digestKeyInfo(repoId: string, epoch: string, label: VaultDigestLabel): Uint8Array;
290
+ export declare function deriveDigestKey(kRepo: Uint8Array, repoId: string, epoch: string, label: VaultDigestLabel): Uint8Array;
291
291
  /**
292
292
  * The general form `deriveDigestKey` is a fixed-`ikm=K_repo` specialization
293
293
  * of (D195/D198/D200, rev 42): every rev-42 rotation label is keyed by the
@@ -295,7 +295,7 @@ export declare function deriveDigestKey(kRepo: Uint8Array, repoId: string, epoch
295
295
  * `K_repo` — "the value being committed IS the key being distributed"
296
296
  * (protocol-v0.md S1). Same HKDF info construction either way.
297
297
  */
298
- export declare function deriveDigestKeyFrom(ikm: Uint8Array, repoId: string, epoch: string, label: GitvaultDigestLabel): Uint8Array;
298
+ export declare function deriveDigestKeyFrom(ikm: Uint8Array, repoId: string, epoch: string, label: VaultDigestLabel): Uint8Array;
299
299
  /** Commitment = HMAC-SHA-256(K_digest(label), JCS(content)), lowercase hex. */
300
300
  export declare function keyedCommitment(kDigest: Uint8Array, content: unknown): string;
301
301
  /** The `"objectset"` content shape: `{oids:[sorted unique lowercase 40-hex]}`. */
@@ -316,9 +316,9 @@ export declare function openIdPreimage(orgId: string, repoId: string, clientOpen
316
316
  /** `"r402s/v0/open-binding" ‖ lp(client_open_id) ‖ lp(base_head_sha256) ‖ lp_opt(prior) ‖ lp(requested_r2_cap_size_bytes)`. */
317
317
  export declare function openBindingPreimage(clientOpenId: string, baseHeadSha256: string, priorCheckpointClaimSetSha256: string | null, requestedR2CapSizeBytes: string): Uint8Array;
318
318
  /** The seven-member frame AAD, as the object JCS serializes. */
319
- export declare function frameAad(repoId: string, objectKind: GitvaultEncryptedObjectKind, objectId: string, epoch: string): GitvaultFrameAad;
319
+ export declare function frameAad(repoId: string, objectKind: VaultEncryptedObjectKind, objectId: string, epoch: string): VaultFrameAad;
320
320
  /**
321
- * The bulk-AEAD seam (gitvault-native-bulk-crypto, design D1/D3).
321
+ * The bulk-AEAD seam (vault-native-bulk-crypto, design D1/D3).
322
322
  *
323
323
  * `sealFrame`/`openFrame`/`openFrameWithAad` are the BULK path — every WAL
324
324
  * pack, checkpoint pack, `ref_state` and `retention_roots` frame runs through
@@ -337,7 +337,7 @@ export declare function frameAad(repoId: string, objectKind: GitvaultEncryptedOb
337
337
  * it stays a SECOND implementation of the wire format) the `@noble/ciphers`
338
338
  * path below runs byte-for-byte as before.
339
339
  */
340
- export interface GitvaultAeadBackend {
340
+ export interface VaultAeadBackend {
341
341
  /** XChaCha20-Poly1305 seal → `ct‖tag`, byte-identical to `@noble`'s. */
342
342
  seal(key32: Uint8Array, nonce24: Uint8Array, aad: Uint8Array, plaintext: Uint8Array): Uint8Array;
343
343
  /** Open `ct‖tag`; `null` on authentication failure — never a throw of its own shape (D4). */
@@ -348,14 +348,14 @@ export interface GitvaultAeadBackend {
348
348
  * backends). Installing `null` restores the `@noble` default — which is what
349
349
  * every runtime without a registration already has.
350
350
  */
351
- export declare function _setGitvaultAeadBackend(backend: GitvaultAeadBackend | null): void;
351
+ export declare function _setVaultAeadBackend(backend: VaultAeadBackend | null): void;
352
352
  /** SDK-INTERNAL: which backend is live. The verifier-lineage test asserts `null`. */
353
- export declare function _gitvaultAeadBackend(): GitvaultAeadBackend | null;
354
- export interface GitvaultSealFrameInput {
353
+ export declare function _vaultAeadBackend(): VaultAeadBackend | null;
354
+ export interface VaultSealFrameInput {
355
355
  /** The per-object key — derive with {@link deriveObjectKey}. */
356
356
  k_obj: Uint8Array;
357
357
  repo_id: string;
358
- object_kind: GitvaultEncryptedObjectKind;
358
+ object_kind: VaultEncryptedObjectKind;
359
359
  object_id: string;
360
360
  epoch: string;
361
361
  plaintext: Uint8Array;
@@ -367,11 +367,11 @@ export interface GitvaultSealFrameInput {
367
367
  * `ciphertext_sha256` covers the COMPLETE frame. Callers own the single-use
368
368
  * rule: one object id, one seal — never re-encrypt under an id.
369
369
  */
370
- export declare function sealFrame(input: GitvaultSealFrameInput): GitvaultSealedFrame;
371
- export interface GitvaultOpenFrameInput {
370
+ export declare function sealFrame(input: VaultSealFrameInput): VaultSealedFrame;
371
+ export interface VaultOpenFrameInput {
372
372
  k_obj: Uint8Array;
373
373
  repo_id: string;
374
- object_kind: GitvaultEncryptedObjectKind;
374
+ object_kind: VaultEncryptedObjectKind;
375
375
  object_id: string;
376
376
  epoch: string;
377
377
  frame: Uint8Array;
@@ -383,7 +383,7 @@ export interface GitvaultOpenFrameInput {
383
383
  * compared when supplied, then the AEAD opened under the seven-member AAD.
384
384
  * No unverified streaming release — the whole plaintext or nothing.
385
385
  */
386
- export declare function openFrame(input: GitvaultOpenFrameInput): Uint8Array;
386
+ export declare function openFrame(input: VaultOpenFrameInput): Uint8Array;
387
387
  /**
388
388
  * The AEAD half of {@link openFrame} with the AAD supplied verbatim — the
389
389
  * vector replay uses it to prove every one of the seven AAD members is
@@ -392,7 +392,7 @@ export declare function openFrame(input: GitvaultOpenFrameInput): Uint8Array;
392
392
  */
393
393
  export declare function openFrameWithAad(kObj: Uint8Array, frame: Uint8Array, aad: Uint8Array, objectId?: string): Uint8Array;
394
394
  /** The one `r402s-1` HPKE suite: Base mode, DHKEM(X25519,HKDF-SHA256) 0x0020 / HKDF-SHA256 0x0001 / ChaCha20-Poly1305 0x0003. */
395
- export declare function gitvaultHpkeSuite(): CipherSuite;
395
+ export declare function vaultHpkeSuite(): CipherSuite;
396
396
  /** HPKE `info` (D188): lp("r402s/v0/envelope") ‖ lp("r402s-1") ‖ lp(lowerhex(SHA-256(recipient raw X25519 pubkey))) ‖ lp(created_by). */
397
397
  export declare function envelopeInfo(recipientPublicKeyRaw: Uint8Array, createdBy: string): Uint8Array;
398
398
  /**
@@ -405,8 +405,8 @@ export declare function envelopeInfo(recipientPublicKeyRaw: Uint8Array, createdB
405
405
  * `null` — the two shapes are genuinely different objects, not one object
406
406
  * with an optional-null member (protocol-v0.md S2).
407
407
  */
408
- export declare function envelopeAad(repoId: string, epoch: string, recipientFingerprint: string, rotationId?: string | null): GitvaultEnvelopeAad;
409
- export interface GitvaultHpkeSealInput {
408
+ export declare function envelopeAad(repoId: string, epoch: string, recipientFingerprint: string, rotationId?: string | null): VaultEnvelopeAad;
409
+ export interface VaultHpkeSealInput {
410
410
  recipient_public_key: Uint8Array;
411
411
  info: Uint8Array;
412
412
  aad: Uint8Array;
@@ -415,20 +415,20 @@ export interface GitvaultHpkeSealInput {
415
415
  ikm_e?: Uint8Array;
416
416
  }
417
417
  /** Single-shot HPKE seal (Base mode) returning `{enc, ct}`. */
418
- export declare function hpkeSeal(input: GitvaultHpkeSealInput): Promise<{
418
+ export declare function hpkeSeal(input: VaultHpkeSealInput): Promise<{
419
419
  enc: Uint8Array;
420
420
  ct: Uint8Array;
421
421
  }>;
422
- export interface GitvaultHpkeOpenInput {
422
+ export interface VaultHpkeOpenInput {
423
423
  recipient_private_key: Uint8Array;
424
424
  enc: Uint8Array;
425
425
  info: Uint8Array;
426
426
  aad: Uint8Array;
427
427
  ct: Uint8Array;
428
428
  }
429
- /** Single-shot HPKE open; any failure is `GITVAULT_HPKE_OPEN_FAILED` (never garbage plaintext). */
430
- export declare function hpkeOpen(input: GitvaultHpkeOpenInput): Promise<Uint8Array>;
431
- export interface GitvaultSealKeyEnvelopeInput {
429
+ /** Single-shot HPKE open; any failure is `VAULT_HPKE_OPEN_FAILED` (never garbage plaintext). */
430
+ export declare function hpkeOpen(input: VaultHpkeOpenInput): Promise<Uint8Array>;
431
+ export interface VaultSealKeyEnvelopeInput {
432
432
  /** The raw 32-byte secret being distributed — `K_repo`/`K_1` at genesis, `K_e` for a rotation. */
433
433
  k_repo: Uint8Array;
434
434
  repo_id: string;
@@ -436,7 +436,7 @@ export interface GitvaultSealKeyEnvelopeInput {
436
436
  /** The recipient's raw X25519 public key. */
437
437
  recipient_public_key: Uint8Array;
438
438
  /** The creator's signing keypair; its `vk_` fingerprint becomes `created_by`. */
439
- signer: GitvaultSigningKeypair;
439
+ signer: VaultSigningKeypair;
440
440
  created_at: string;
441
441
  /**
442
442
  * PRESENT for a rotation-attempt envelope (D195/D196, rev 42): widens the
@@ -449,11 +449,11 @@ export interface GitvaultSealKeyEnvelopeInput {
449
449
  ikm_e?: Uint8Array;
450
450
  }
451
451
  /** Seal + sign a `key_envelope` for one principal; returns the object with its stored-bytes identity + genesis receipt. */
452
- export declare function sealKeyEnvelope(input: GitvaultSealKeyEnvelopeInput): Promise<GitvaultSealedKeyEnvelope>;
453
- export interface GitvaultOpenKeyEnvelopeInput {
454
- envelope: GitvaultKeyEnvelope;
452
+ export declare function sealKeyEnvelope(input: VaultSealKeyEnvelopeInput): Promise<VaultSealedKeyEnvelope>;
453
+ export interface VaultOpenKeyEnvelopeInput {
454
+ envelope: VaultKeyEnvelope;
455
455
  /** The recipient's raw X25519 keypair (the public half feeds `info`; the fingerprint must match the path identity). */
456
- recipient: GitvaultEncryptionKeypair;
456
+ recipient: VaultEncryptionKeypair;
457
457
  /** The creator's raw Ed25519 public key — the envelope signature is verified BEFORE any open. */
458
458
  signer_public_key: Uint8Array | string;
459
459
  }
@@ -464,7 +464,7 @@ export interface GitvaultOpenKeyEnvelopeInput {
464
464
  * itself carries `rotation_id` — D195/D203). Returns the raw 32-byte secret
465
465
  * (`K_repo`/`K_1` at genesis, `K_e` for a rotation).
466
466
  */
467
- export declare function openKeyEnvelope(input: GitvaultOpenKeyEnvelopeInput): Promise<Uint8Array>;
467
+ export declare function openKeyEnvelope(input: VaultOpenKeyEnvelopeInput): Promise<Uint8Array>;
468
468
  /**
469
469
  * Decode + validate one head's `transition.payload` as a `rotate_epoch_payload`
470
470
  * (D193-D203, rev 42): base64url-jcs decode, `payload_sha256` self-check,
@@ -484,17 +484,17 @@ export declare function parseRotateEpochPayload(head: {
484
484
  payload: string;
485
485
  payload_sha256: string;
486
486
  } | null;
487
- }): GitvaultRotateEpochPayload;
487
+ }): VaultRotateEpochPayload;
488
488
  /**
489
489
  * Decode + validate one head's `transition.payload` as an
490
- * `add_writer_key_payload` (gitvault-multi-writer rev 47, protocol §4.16):
490
+ * `add_writer_key_payload` (vault-multi-writer rev 47, protocol §4.16):
491
491
  * base64url-jcs decode, `payload_sha256` self-check, strict JSON parse, and
492
492
  * the payload's OWN `repo_id` agreeing with the carrying head's — mirrors
493
493
  * {@link parseRotateEpochPayload} exactly, `repo_id` in place of `epoch`
494
494
  * (this transition never changes the epoch). Pure and keyless: the FULL
495
495
  * cryptographic + structural validation (signatures, base/next writer-set
496
496
  * commitments, handoff-grant binding) is `validateAddWriterKeyPayload`'s job
497
- * (`../node/gitvault-writer-state.js`) — this function only gets the bytes
497
+ * (`../node/vault-writer-state.js`) — this function only gets the bytes
498
498
  * off the wire safely, so every reader can call it before any key material
499
499
  * is needed.
500
500
  */
@@ -507,46 +507,46 @@ export declare function parseAddWriterKeyPayload(head: {
507
507
  payload: string;
508
508
  payload_sha256: string;
509
509
  } | null;
510
- }): GitvaultAddWriterKeyPayload;
510
+ }): VaultAddWriterKeyPayload;
511
511
  /**
512
512
  * Open ONE `rotate_epoch` transition's own `key_envelope` for
513
513
  * `own_fingerprint` and return the derived `K_e`, after verifying it
514
514
  * reproduces the payload's `epoch_key_commitment` (D200's per-recipient
515
515
  * self-check — never a global set-coherence proof, §14ao/§2). Fails CLOSED
516
- * with `GITVAULT_EPOCH_NOT_OPENABLE` — never a bare `GITVAULT_AEAD_AUTH_FAILURE`
516
+ * with `VAULT_EPOCH_NOT_OPENABLE` — never a bare `VAULT_AEAD_AUTH_FAILURE`
517
517
  * — either when this recipient is not among the rotation's `envelopes[]` at
518
518
  * all, or when the addressed envelope's stored bytes are absent or altered.
519
519
  *
520
520
  * Transport-agnostic by design (`get_envelope_bytes` + `envelope_path`
521
521
  * callbacks): this is the ONE place a reader opens a rotation envelope, and
522
- * both the live publication read path (`GitvaultVault.verifyToNewest`, over
522
+ * both the live publication read path (`Vault.verifyToNewest`, over
523
523
  * the gateway transport) and the offline mirror recovery path
524
- * (`recoverGitvaultMirror`, over a `GitvaultMirrorBackend`) call it —
524
+ * (`recoverVaultMirror`, over a `VaultMirrorBackend`) call it —
525
525
  * differing only in HOW they fetch bytes, never in the open/verify logic.
526
526
  */
527
527
  export declare function openEpochRotationForRecipient(input: {
528
528
  repo_id: string;
529
- payload: GitvaultRotateEpochPayload;
529
+ payload: VaultRotateEpochPayload;
530
530
  own_fingerprint: string;
531
- own_encryption_keypair: GitvaultEncryptionKeypair;
531
+ own_encryption_keypair: VaultEncryptionKeypair;
532
532
  writer_signing_public_key: Uint8Array | string;
533
533
  get_envelope_bytes: (path: string) => Promise<Uint8Array | null | undefined>;
534
534
  envelope_path: (epoch: string, recipient_fingerprint: string, rotation_id: string) => string;
535
535
  }): Promise<Uint8Array>;
536
- export interface GitvaultBuildGenesisInput {
536
+ export interface VaultBuildGenesisInput {
537
537
  repo_id: string;
538
538
  org_id: string;
539
539
  project_id: string;
540
540
  allocation_nonce: string;
541
- creator_signing: GitvaultSigningKeypair;
541
+ creator_signing: VaultSigningKeypair;
542
542
  creator_encryption_public_key: Uint8Array;
543
- envelope_receipt: GitvaultKeyEnvelopeReceipt;
543
+ envelope_receipt: VaultKeyEnvelopeReceipt;
544
544
  created_at: string;
545
545
  }
546
546
  /** Build + sign a `vault_genesis` (generation 0, epoch 1, the creator's single envelope). */
547
- export declare function buildVaultGenesis(input: GitvaultBuildGenesisInput): GitvaultVaultGenesis;
547
+ export declare function buildVaultGenesis(input: VaultBuildGenesisInput): VaultGenesis;
548
548
  /** A named genesis key-binding failure (semantic constraints `genesis-key-bindings` / `envelope-receipt-binding`). */
549
- export type GitvaultGenesisBindingProblem = "envelope_count" | "envelope_epoch" | "envelope_recipient_fingerprint" | "writer_key_id" | "stored_envelope_hash" | "stored_envelope_size" | "stored_envelope_repo_id" | "stored_envelope_epoch" | "stored_envelope_recipient_fingerprint" | "stored_envelope_created_by";
549
+ export type VaultGenesisBindingProblem = "envelope_count" | "envelope_epoch" | "envelope_recipient_fingerprint" | "writer_key_id" | "stored_envelope_hash" | "stored_envelope_size" | "stored_envelope_repo_id" | "stored_envelope_epoch" | "stored_envelope_recipient_fingerprint" | "stored_envelope_created_by";
550
550
  /**
551
551
  * The genesis key bindings (round-10 A6): exactly one envelope at epoch 1 whose
552
552
  * `recipient_fingerprint` is the creator's `ek_`; `writer_key_id` is the
@@ -554,25 +554,25 @@ export type GitvaultGenesisBindingProblem = "envelope_count" | "envelope_epoch"
554
554
  * hash/size name its stored bytes and its path identity + `created_by` equal
555
555
  * the genesis values. Schema-valid-but-protocol-invalid objects surface here.
556
556
  */
557
- export declare function checkGenesisKeyBindings(genesis: GitvaultVaultGenesis, storedEnvelope?: GitvaultKeyEnvelope): GitvaultGenesisBindingProblem[];
558
- export interface GitvaultBuildRecoveryReceiptInput {
557
+ export declare function checkGenesisKeyBindings(genesis: VaultGenesis, storedEnvelope?: VaultKeyEnvelope): VaultGenesisBindingProblem[];
558
+ export interface VaultBuildRecoveryReceiptInput {
559
559
  repo_id: string;
560
560
  org_id: string;
561
561
  project_id: string;
562
562
  genesis_sha256: string;
563
- creator_signing: GitvaultSigningKeypair;
563
+ creator_signing: VaultSigningKeypair;
564
564
  creator_encryption_public_key: Uint8Array;
565
565
  }
566
566
  /** Build + sign the creator's `recovery_receipt` (emitted at ACTIVE; integrity data, not a secret). */
567
- export declare function buildRecoveryReceipt(input: GitvaultBuildRecoveryReceiptInput): GitvaultRecoveryReceipt;
568
- export type GitvaultRecoveryReceiptProblem = "signature" | "genesis_sha256" | "repo_id" | "org_id" | "project_id" | "creator_signing_fingerprint" | "creator_encryption_fingerprint";
567
+ export declare function buildRecoveryReceipt(input: VaultBuildRecoveryReceiptInput): VaultRecoveryReceipt;
568
+ export type VaultRecoveryReceiptProblem = "signature" | "genesis_sha256" | "repo_id" | "org_id" | "project_id" | "creator_signing_fingerprint" | "creator_encryption_fingerprint";
569
569
  /**
570
570
  * Check a recovery receipt against a genesis it claims to pin: the receipt's
571
571
  * signature (under the genesis's creator key), the genesis stored-bytes hash,
572
572
  * and every identity field. A substituted, internally consistent vault fails
573
573
  * on `genesis_sha256` — exactly the fabricated-vault scenario.
574
574
  */
575
- export declare function checkRecoveryReceipt(receipt: GitvaultRecoveryReceipt, genesis: GitvaultVaultGenesis): GitvaultRecoveryReceiptProblem[];
575
+ export declare function checkRecoveryReceipt(receipt: VaultRecoveryReceipt, genesis: VaultGenesis): VaultRecoveryReceiptProblem[];
576
576
  /**
577
577
  * Field-level checks on an `allocation` for THIS creation attempt (the
578
578
  * control-plane signature itself is verified through the service-key registry,
@@ -587,7 +587,7 @@ export declare function checkRecoveryReceipt(receipt: GitvaultRecoveryReceipt, g
587
587
  * then compares against that pin on every later call for the SAME journal.
588
588
  * Every other field is checked unconditionally, same as before.
589
589
  */
590
- export declare function checkAllocation(allocation: GitvaultAllocation, expected: {
590
+ export declare function checkAllocation(allocation: VaultAllocation, expected: {
591
591
  client_creation_id: string;
592
592
  creator_signing_fingerprint: string;
593
593
  creator_encryption_fingerprint: string;
@@ -597,7 +597,7 @@ export declare function checkAllocation(allocation: GitvaultAllocation, expected
597
597
  /** 16-hex epochs compare/increment as unsigned integers (chain.ts's `nextGeneration`, mirrored). */
598
598
  export declare function epochValue(hex16: string): bigint;
599
599
  export declare function nextEpoch(hex16: string): string;
600
- export interface GitvaultIncludedPair {
600
+ export interface VaultIncludedPair {
601
601
  principal_id: string;
602
602
  ek_fingerprint: string;
603
603
  }
@@ -616,7 +616,7 @@ export declare function computeTargetPartitionDigest(input: {
616
616
  recipient_revocation_version: string;
617
617
  pin_manifest_version: string;
618
618
  pin_manifest_sha256: string;
619
- included: readonly GitvaultIncludedPair[];
619
+ included: readonly VaultIncludedPair[];
620
620
  excluded_keyless_principal_ids: readonly string[];
621
621
  excluded_unconfirmed_principal_ids: readonly string[];
622
622
  }): string;
@@ -640,9 +640,9 @@ export declare function computeRotationId(descriptor: Record<string, unknown> &
640
640
  * can be computed FROM the complete descriptor.
641
641
  */
642
642
  export declare function attemptKeyCommitmentPreimage(descriptorFields: {
643
- format: GitvaultFormat;
643
+ format: VaultFormat;
644
644
  object_kind: "rotation_attempt_descriptor";
645
- suite: GitvaultSuite;
645
+ suite: VaultSuite;
646
646
  repo_id: string;
647
647
  base_head_sha256: string;
648
648
  new_epoch: string;
@@ -702,7 +702,7 @@ export declare function genesisEpochKeyCommitment(k1: Uint8Array, repoId: string
702
702
  * merely the same K_e in isolation).
703
703
  */
704
704
  export declare function checkFreshEpochKeyAgainstPriorKeys(kE: Uint8Array, priorKeys: Iterable<Uint8Array>): void;
705
- export type GitvaultHPartitionVerdict = {
705
+ export type VaultHPartitionVerdict = {
706
706
  ok: true;
707
707
  } | {
708
708
  ok: false;
@@ -719,7 +719,7 @@ export declare function checkHPartition(input: {
719
719
  desiredPrincipalIds: ReadonlySet<string>;
720
720
  keyedPrincipalIds: ReadonlySet<string>;
721
721
  pinnedFingerprintOf: ReadonlyMap<string, string>;
722
- included: readonly GitvaultIncludedPair[];
722
+ included: readonly VaultIncludedPair[];
723
723
  excludedKeylessPrincipalIds: readonly string[];
724
724
  excludedUnconfirmedPrincipalIds: readonly string[];
725
725
  /**
@@ -733,13 +733,13 @@ export declare function checkHPartition(input: {
733
733
  */
734
734
  survivingWriterPrincipalIds?: ReadonlySet<string>;
735
735
  directoryFingerprintOf?: ReadonlyMap<string, string>;
736
- }): GitvaultHPartitionVerdict;
736
+ }): VaultHPartitionVerdict;
737
737
  /** D197's full-map conservation rule: `next_map = prior_map + receipt-authorized additions/replacements`, deletion-by-omission forbidden. */
738
738
  export declare function checkPinManifestConservation(prior: readonly {
739
739
  principal_id: string;
740
740
  }[], next: readonly {
741
741
  principal_id: string;
742
- }[]): GitvaultHPartitionVerdict;
742
+ }[]): VaultHPartitionVerdict;
743
743
  /** The synthetic ledger id a path-addressed `key_envelope` gets — mirrors the gateway's `keyEnvelopeLedgerId` exactly (drift here breaks receipt pairing at upload finalize). */
744
744
  export declare function keyEnvelopeLedgerId(epoch: string, fingerprint: string, rotationId: string | null): string;
745
745
  export declare function pinManifestLedgerId(pinManifestVersion: string): string;
@@ -797,7 +797,7 @@ export { bytesToHex, hexToBytes };
797
797
  * the prefix + JCS message are pinned here so the two lineages cannot drift.
798
798
  * Client convention, not r402s/v0 wire protocol.
799
799
  */
800
- export declare const GITVAULT_KEYSTORE_POSSESSION_PREFIX = "r402s/v0/keystore-key-possession/v1\n";
800
+ export declare const VAULT_KEYSTORE_POSSESSION_PREFIX = "r402s/v0/keystore-key-possession/v1\n";
801
801
  export declare function computeKeystorePossessionProof(input: {
802
802
  private_key: Uint8Array;
803
803
  epk_b64u: string;
@@ -806,7 +806,7 @@ export declare function computeKeystorePossessionProof(input: {
806
806
  public_key_b64u: string;
807
807
  }): string;
808
808
  /**
809
- * gitvault-multi-writer rev 47 (design D9) — the writer-signing-key
809
+ * vault-multi-writer rev 47 (design D9) — the writer-signing-key
810
810
  * possession message. Byte-identical to the gateway's own
811
811
  * `signingKeyPossessionMessage` (services/principal-encryption-keys.ts) —
812
812
  * `JSON.stringify({domain, principal_id, signing_pubkey, encryption_pubkey})`
@@ -821,7 +821,7 @@ export declare function computeKeystorePossessionProof(input: {
821
821
  * principal_id, signing_pubkey`) and silently produce a signature that
822
822
  * never verifies.
823
823
  */
824
- export declare const GITVAULT_SIGNING_KEY_POSSESSION_DOMAIN = "r402s/v0/signing-key-possession/v1";
824
+ export declare const VAULT_SIGNING_KEY_POSSESSION_DOMAIN = "r402s/v0/signing-key-possession/v1";
825
825
  export declare function signingKeyPossessionMessage(fields: {
826
826
  principal_id: string;
827
827
  signing_pubkey: string;
@@ -834,4 +834,4 @@ export declare function computeSigningKeyPossessionSignature(input: {
834
834
  signing_pubkey: string;
835
835
  encryption_pubkey: string;
836
836
  }): string;
837
- //# sourceMappingURL=gitvault.crypto.d.ts.map
837
+ //# sourceMappingURL=vault.crypto.d.ts.map