run402 4.95.0 → 4.97.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 (306) hide show
  1. package/README.md +5 -5
  2. package/cli.mjs +2 -28
  3. package/core-dist/keystore.js +1 -1
  4. package/git-remote-run402.mjs +6 -6
  5. package/lib/buzz.mjs +1 -1
  6. package/lib/cold-start.mjs +2 -2
  7. package/lib/command-manifest.mjs +6 -47
  8. package/lib/credentials.mjs +5 -5
  9. package/lib/daemon-path.mjs +3 -3
  10. package/lib/deploy-v2.mjs +44 -44
  11. package/lib/doctor.mjs +45 -54
  12. package/lib/errors.mjs +1 -1
  13. package/lib/events.mjs +1 -1
  14. package/lib/grants.mjs +148 -46
  15. package/lib/init.mjs +29 -29
  16. package/lib/logs.mjs +1 -1
  17. package/lib/next-actions.mjs +1 -1
  18. package/lib/org-context.mjs +9 -9
  19. package/lib/orgs.mjs +19 -19
  20. package/lib/path-lookup.mjs +7 -10
  21. package/lib/path-lookup.test.mjs +19 -21
  22. package/lib/projects.mjs +1 -1
  23. package/lib/remote-helper-session.mjs +93 -93
  24. package/lib/repos.mjs +174 -175
  25. package/lib/rooms-context.mjs +7 -7
  26. package/lib/sites.mjs +5 -5
  27. package/lib/up.mjs +14 -14
  28. package/lib/{gitvault-capabilities.mjs → vault-capabilities.mjs} +10 -14
  29. package/lib/{gitvault-daemon-run.mjs → vault-daemon-run.mjs} +2 -2
  30. package/lib/{gitvault-daemon.mjs → vault-daemon.mjs} +23 -23
  31. package/lib/{gitvault-scaffold.mjs → vault-scaffold.mjs} +12 -12
  32. package/lib/{gitvault-target.mjs → vault-target.mjs} +22 -17
  33. package/package.json +2 -2
  34. package/sdk/core-dist/keystore.js +1 -1
  35. package/sdk/dist/errors.d.ts +5 -5
  36. package/sdk/dist/errors.d.ts.map +1 -1
  37. package/sdk/dist/errors.js +2 -2
  38. package/sdk/dist/errors.js.map +1 -1
  39. package/sdk/dist/grant-key-credentials.d.ts +38 -0
  40. package/sdk/dist/grant-key-credentials.d.ts.map +1 -0
  41. package/sdk/dist/grant-key-credentials.js +42 -0
  42. package/sdk/dist/grant-key-credentials.js.map +1 -0
  43. package/sdk/dist/index.d.ts +16 -23
  44. package/sdk/dist/index.d.ts.map +1 -1
  45. package/sdk/dist/index.js +14 -21
  46. package/sdk/dist/index.js.map +1 -1
  47. package/sdk/dist/namespaces/billing.d.ts +1 -1
  48. package/sdk/dist/namespaces/billing.js +1 -1
  49. package/sdk/dist/namespaces/buzz.js +1 -1
  50. package/sdk/dist/namespaces/buzz.js.map +1 -1
  51. package/sdk/dist/namespaces/credentials.d.ts +4 -4
  52. package/sdk/dist/namespaces/credentials.js +4 -4
  53. package/sdk/dist/namespaces/deploy.d.ts +5 -5
  54. package/sdk/dist/namespaces/deploy.d.ts.map +1 -1
  55. package/sdk/dist/namespaces/deploy.js +25 -25
  56. package/sdk/dist/namespaces/deploy.js.map +1 -1
  57. package/sdk/dist/namespaces/deploy.types.d.ts +17 -17
  58. package/sdk/dist/namespaces/deploy.types.d.ts.map +1 -1
  59. package/sdk/dist/namespaces/domains.d.ts +1 -1
  60. package/sdk/dist/namespaces/domains.js +1 -1
  61. package/sdk/dist/namespaces/errors.d.ts +1 -1
  62. package/sdk/dist/namespaces/errors.js +2 -2
  63. package/sdk/dist/namespaces/escalations.d.ts +2 -2
  64. package/sdk/dist/namespaces/escalations.js +2 -2
  65. package/sdk/dist/namespaces/escalations.types.d.ts +3 -3
  66. package/sdk/dist/namespaces/escalations.types.d.ts.map +1 -1
  67. package/sdk/dist/namespaces/events.d.ts +1 -1
  68. package/sdk/dist/namespaces/events.js +1 -1
  69. package/sdk/dist/namespaces/functions.js +1 -1
  70. package/sdk/dist/namespaces/functions.js.map +1 -1
  71. package/sdk/dist/namespaces/grants.d.ts +43 -9
  72. package/sdk/dist/namespaces/grants.d.ts.map +1 -1
  73. package/sdk/dist/namespaces/grants.js +99 -10
  74. package/sdk/dist/namespaces/grants.js.map +1 -1
  75. package/sdk/dist/namespaces/grants.types.d.ts +120 -15
  76. package/sdk/dist/namespaces/grants.types.d.ts.map +1 -1
  77. package/sdk/dist/namespaces/grants.types.js +12 -3
  78. package/sdk/dist/namespaces/grants.types.js.map +1 -1
  79. package/sdk/dist/namespaces/identity-links.types.d.ts +2 -2
  80. package/sdk/dist/namespaces/identity-links.types.d.ts.map +1 -1
  81. package/sdk/dist/namespaces/org.d.ts +3 -3
  82. package/sdk/dist/namespaces/org.js +3 -3
  83. package/sdk/dist/namespaces/org.types.d.ts +3 -3
  84. package/sdk/dist/namespaces/pay.js +1 -1
  85. package/sdk/dist/namespaces/projects.d.ts +1 -1
  86. package/sdk/dist/namespaces/projects.js +1 -1
  87. package/sdk/dist/namespaces/{gitvault.d.ts → repos.d.ts} +436 -449
  88. package/sdk/dist/namespaces/repos.d.ts.map +1 -0
  89. package/sdk/dist/namespaces/{gitvault.js → repos.js} +452 -460
  90. package/sdk/dist/namespaces/repos.js.map +1 -0
  91. package/sdk/dist/namespaces/rooms.d.ts +3 -3
  92. package/sdk/dist/namespaces/rooms.js +5 -5
  93. package/sdk/dist/namespaces/rooms.js.map +1 -1
  94. package/sdk/dist/namespaces/session.d.ts +2 -2
  95. package/sdk/dist/namespaces/session.d.ts.map +1 -1
  96. package/sdk/dist/namespaces/session.js +2 -2
  97. package/sdk/dist/namespaces/session.js.map +1 -1
  98. package/sdk/dist/namespaces/tier.d.ts +3 -3
  99. package/sdk/dist/namespaces/tier.d.ts.map +1 -1
  100. package/sdk/dist/namespaces/{gitvault.crypto.d.ts → vault.crypto.d.ts} +141 -141
  101. package/sdk/dist/namespaces/vault.crypto.d.ts.map +1 -0
  102. package/sdk/dist/namespaces/{gitvault.crypto.js → vault.crypto.js} +173 -173
  103. package/sdk/dist/namespaces/vault.crypto.js.map +1 -0
  104. package/sdk/dist/namespaces/{gitvault.types.d.ts → vault.types.d.ts} +136 -136
  105. package/sdk/dist/namespaces/vault.types.d.ts.map +1 -0
  106. package/sdk/dist/namespaces/{gitvault.types.js → vault.types.js} +4 -4
  107. package/sdk/dist/namespaces/vault.types.js.map +1 -0
  108. package/sdk/dist/node/bearer-redeem-key.d.ts +1 -1
  109. package/sdk/dist/node/bearer-redeem-key.js +5 -5
  110. package/sdk/dist/node/bearer-redeem-key.js.map +1 -1
  111. package/sdk/dist/node/credentials.d.ts +9 -9
  112. package/sdk/dist/node/credentials.d.ts.map +1 -1
  113. package/sdk/dist/node/credentials.js +12 -12
  114. package/sdk/dist/node/credentials.js.map +1 -1
  115. package/sdk/dist/node/http-dispatcher.js +5 -5
  116. package/sdk/dist/node/http-dispatcher.js.map +1 -1
  117. package/sdk/dist/node/index.d.ts +34 -34
  118. package/sdk/dist/node/index.d.ts.map +1 -1
  119. package/sdk/dist/node/index.js +41 -41
  120. package/sdk/dist/node/index.js.map +1 -1
  121. package/sdk/dist/node/{gitvault-address.d.ts → vault-address.d.ts} +42 -42
  122. package/sdk/dist/node/vault-address.d.ts.map +1 -0
  123. package/sdk/dist/node/{gitvault-address.js → vault-address.js} +43 -43
  124. package/sdk/dist/node/vault-address.js.map +1 -0
  125. package/sdk/dist/node/{gitvault-apply.d.ts → vault-apply.d.ts} +27 -27
  126. package/sdk/dist/node/vault-apply.d.ts.map +1 -0
  127. package/sdk/dist/node/{gitvault-apply.js → vault-apply.js} +38 -38
  128. package/sdk/dist/node/vault-apply.js.map +1 -0
  129. package/sdk/dist/node/vault-byo-config.d.ts +29 -0
  130. package/sdk/dist/node/vault-byo-config.d.ts.map +1 -0
  131. package/sdk/dist/node/{gitvault-byo-config.js → vault-byo-config.js} +18 -18
  132. package/sdk/dist/node/vault-byo-config.js.map +1 -0
  133. package/sdk/dist/node/vault-byo-probe.d.ts +20 -0
  134. package/sdk/dist/node/vault-byo-probe.d.ts.map +1 -0
  135. package/sdk/dist/node/vault-byo-probe.js +57 -0
  136. package/sdk/dist/node/vault-byo-probe.js.map +1 -0
  137. package/sdk/dist/node/{gitvault-creation-journal.d.ts → vault-creation-journal.d.ts} +69 -69
  138. package/sdk/dist/node/vault-creation-journal.d.ts.map +1 -0
  139. package/sdk/dist/node/{gitvault-creation-journal.js → vault-creation-journal.js} +54 -54
  140. package/sdk/dist/node/vault-creation-journal.js.map +1 -0
  141. package/sdk/dist/node/{gitvault-degraded-read.d.ts → vault-degraded-read.d.ts} +34 -34
  142. package/sdk/dist/node/vault-degraded-read.d.ts.map +1 -0
  143. package/sdk/dist/node/{gitvault-degraded-read.js → vault-degraded-read.js} +24 -24
  144. package/sdk/dist/node/vault-degraded-read.js.map +1 -0
  145. package/sdk/dist/node/{gitvault-deploy.d.ts → vault-deploy.d.ts} +67 -67
  146. package/sdk/dist/node/vault-deploy.d.ts.map +1 -0
  147. package/sdk/dist/node/{gitvault-deploy.js → vault-deploy.js} +27 -27
  148. package/sdk/dist/node/vault-deploy.js.map +1 -0
  149. package/sdk/dist/node/{gitvault-edge-fetch.d.ts → vault-edge-fetch.d.ts} +9 -9
  150. package/sdk/dist/node/vault-edge-fetch.d.ts.map +1 -0
  151. package/sdk/dist/node/{gitvault-edge-fetch.js → vault-edge-fetch.js} +11 -11
  152. package/sdk/dist/node/vault-edge-fetch.js.map +1 -0
  153. package/sdk/dist/node/{gitvault-handoff.d.ts → vault-handoff.d.ts} +9 -9
  154. package/sdk/dist/node/vault-handoff.d.ts.map +1 -0
  155. package/sdk/dist/node/{gitvault-handoff.js → vault-handoff.js} +24 -24
  156. package/sdk/dist/node/vault-handoff.js.map +1 -0
  157. package/sdk/dist/node/{gitvault-keystore.d.ts → vault-keystore.d.ts} +87 -77
  158. package/sdk/dist/node/vault-keystore.d.ts.map +1 -0
  159. package/sdk/dist/node/{gitvault-keystore.js → vault-keystore.js} +105 -68
  160. package/sdk/dist/node/vault-keystore.js.map +1 -0
  161. package/sdk/dist/node/{gitvault-member-bundle.d.ts → vault-member-bundle.d.ts} +17 -17
  162. package/sdk/dist/node/vault-member-bundle.d.ts.map +1 -0
  163. package/sdk/dist/node/{gitvault-member-bundle.js → vault-member-bundle.js} +11 -11
  164. package/sdk/dist/node/vault-member-bundle.js.map +1 -0
  165. package/sdk/dist/node/{gitvault-mirror-backend.d.ts → vault-mirror-backend.d.ts} +26 -26
  166. package/sdk/dist/node/vault-mirror-backend.d.ts.map +1 -0
  167. package/sdk/dist/node/{gitvault-mirror-backend.js → vault-mirror-backend.js} +25 -25
  168. package/sdk/dist/node/vault-mirror-backend.js.map +1 -0
  169. package/sdk/dist/node/{gitvault-mirror-config.d.ts → vault-mirror-config.d.ts} +23 -23
  170. package/sdk/dist/node/vault-mirror-config.d.ts.map +1 -0
  171. package/sdk/dist/node/{gitvault-mirror-config.js → vault-mirror-config.js} +16 -16
  172. package/sdk/dist/node/vault-mirror-config.js.map +1 -0
  173. package/sdk/dist/node/{gitvault-mirror.d.ts → vault-mirror.d.ts} +36 -36
  174. package/sdk/dist/node/vault-mirror.d.ts.map +1 -0
  175. package/sdk/dist/node/{gitvault-mirror.js → vault-mirror.js} +75 -75
  176. package/sdk/dist/node/vault-mirror.js.map +1 -0
  177. package/sdk/dist/node/{gitvault-native-crypto.d.ts → vault-native-crypto.d.ts} +10 -10
  178. package/sdk/dist/node/vault-native-crypto.d.ts.map +1 -0
  179. package/sdk/dist/node/{gitvault-native-crypto.js → vault-native-crypto.js} +16 -16
  180. package/sdk/dist/node/vault-native-crypto.js.map +1 -0
  181. package/sdk/dist/node/{gitvault-open-or-create.d.ts → vault-open-or-create.d.ts} +16 -16
  182. package/sdk/dist/node/vault-open-or-create.d.ts.map +1 -0
  183. package/sdk/dist/node/{gitvault-open-or-create.js → vault-open-or-create.js} +10 -10
  184. package/sdk/dist/node/vault-open-or-create.js.map +1 -0
  185. package/sdk/dist/node/{gitvault-prewarm.d.ts → vault-prewarm.d.ts} +13 -13
  186. package/sdk/dist/node/vault-prewarm.d.ts.map +1 -0
  187. package/sdk/dist/node/{gitvault-prewarm.js → vault-prewarm.js} +25 -25
  188. package/sdk/dist/node/vault-prewarm.js.map +1 -0
  189. package/sdk/dist/node/{gitvault-profile-scan.d.ts → vault-profile-scan.d.ts} +3 -3
  190. package/sdk/dist/node/vault-profile-scan.d.ts.map +1 -0
  191. package/sdk/dist/node/{gitvault-profile-scan.js → vault-profile-scan.js} +12 -12
  192. package/sdk/dist/node/vault-profile-scan.js.map +1 -0
  193. package/sdk/dist/node/{gitvault-prune.d.ts → vault-prune.d.ts} +61 -61
  194. package/sdk/dist/node/vault-prune.d.ts.map +1 -0
  195. package/sdk/dist/node/{gitvault-prune.js → vault-prune.js} +34 -34
  196. package/sdk/dist/node/vault-prune.js.map +1 -0
  197. package/sdk/dist/node/{gitvault-publication.d.ts → vault-publication.d.ts} +399 -399
  198. package/sdk/dist/node/vault-publication.d.ts.map +1 -0
  199. package/sdk/dist/node/{gitvault-publication.js → vault-publication.js} +584 -584
  200. package/sdk/dist/node/vault-publication.js.map +1 -0
  201. package/sdk/dist/node/{gitvault-push-to-create.d.ts → vault-push-to-create.d.ts} +16 -16
  202. package/sdk/dist/node/vault-push-to-create.d.ts.map +1 -0
  203. package/sdk/dist/node/{gitvault-push-to-create.js → vault-push-to-create.js} +9 -9
  204. package/sdk/dist/node/vault-push-to-create.js.map +1 -0
  205. package/sdk/dist/node/{gitvault-recover.d.ts → vault-recover.d.ts} +50 -50
  206. package/sdk/dist/node/vault-recover.d.ts.map +1 -0
  207. package/sdk/dist/node/{gitvault-recover.js → vault-recover.js} +84 -84
  208. package/sdk/dist/node/vault-recover.js.map +1 -0
  209. package/sdk/dist/node/{gitvault-restore.d.ts → vault-restore.d.ts} +8 -8
  210. package/sdk/dist/node/vault-restore.d.ts.map +1 -0
  211. package/sdk/dist/node/{gitvault-restore.js → vault-restore.js} +11 -11
  212. package/sdk/dist/node/vault-restore.js.map +1 -0
  213. package/sdk/dist/node/{gitvault-snapshot.d.ts → vault-snapshot.d.ts} +48 -48
  214. package/sdk/dist/node/vault-snapshot.d.ts.map +1 -0
  215. package/sdk/dist/node/{gitvault-snapshot.js → vault-snapshot.js} +61 -61
  216. package/sdk/dist/node/vault-snapshot.js.map +1 -0
  217. package/sdk/dist/node/{gitvault-writer-state.d.ts → vault-writer-state.d.ts} +8 -8
  218. package/sdk/dist/node/vault-writer-state.d.ts.map +1 -0
  219. package/sdk/dist/node/{gitvault-writer-state.js → vault-writer-state.js} +15 -15
  220. package/sdk/dist/node/vault-writer-state.js.map +1 -0
  221. package/sdk/dist/node/workflow-output.js +4 -4
  222. package/sdk/dist/node/workflow-output.js.map +1 -1
  223. package/sdk/dist/project-auth-classification.d.ts +8 -8
  224. package/sdk/dist/project-auth-classification.d.ts.map +1 -1
  225. package/sdk/dist/project-auth-classification.js +7 -7
  226. package/sdk/dist/project-auth-classification.js.map +1 -1
  227. package/sdk/dist/scoped.d.ts +6 -14
  228. package/sdk/dist/scoped.d.ts.map +1 -1
  229. package/sdk/dist/scoped.js +10 -21
  230. package/sdk/dist/scoped.js.map +1 -1
  231. package/vault-surface.json +40 -0
  232. package/gitvault-surface.json +0 -89
  233. package/lib/delegates.mjs +0 -189
  234. package/lib/gitvault.mjs +0 -163
  235. package/lib/source-access.mjs +0 -70
  236. package/sdk/dist/delegate-credentials.d.ts +0 -37
  237. package/sdk/dist/delegate-credentials.d.ts.map +0 -1
  238. package/sdk/dist/delegate-credentials.js +0 -41
  239. package/sdk/dist/delegate-credentials.js.map +0 -1
  240. package/sdk/dist/namespaces/delegates.d.ts +0 -50
  241. package/sdk/dist/namespaces/delegates.d.ts.map +0 -1
  242. package/sdk/dist/namespaces/delegates.js +0 -99
  243. package/sdk/dist/namespaces/delegates.js.map +0 -1
  244. package/sdk/dist/namespaces/delegates.types.d.ts +0 -88
  245. package/sdk/dist/namespaces/delegates.types.d.ts.map +0 -1
  246. package/sdk/dist/namespaces/delegates.types.js +0 -10
  247. package/sdk/dist/namespaces/delegates.types.js.map +0 -1
  248. package/sdk/dist/namespaces/gitvault.crypto.d.ts.map +0 -1
  249. package/sdk/dist/namespaces/gitvault.crypto.js.map +0 -1
  250. package/sdk/dist/namespaces/gitvault.d.ts.map +0 -1
  251. package/sdk/dist/namespaces/gitvault.js.map +0 -1
  252. package/sdk/dist/namespaces/gitvault.types.d.ts.map +0 -1
  253. package/sdk/dist/namespaces/gitvault.types.js.map +0 -1
  254. package/sdk/dist/node/gitvault-address.d.ts.map +0 -1
  255. package/sdk/dist/node/gitvault-address.js.map +0 -1
  256. package/sdk/dist/node/gitvault-apply.d.ts.map +0 -1
  257. package/sdk/dist/node/gitvault-apply.js.map +0 -1
  258. package/sdk/dist/node/gitvault-byo-config.d.ts +0 -29
  259. package/sdk/dist/node/gitvault-byo-config.d.ts.map +0 -1
  260. package/sdk/dist/node/gitvault-byo-config.js.map +0 -1
  261. package/sdk/dist/node/gitvault-byo-probe.d.ts +0 -20
  262. package/sdk/dist/node/gitvault-byo-probe.d.ts.map +0 -1
  263. package/sdk/dist/node/gitvault-byo-probe.js +0 -57
  264. package/sdk/dist/node/gitvault-byo-probe.js.map +0 -1
  265. package/sdk/dist/node/gitvault-creation-journal.d.ts.map +0 -1
  266. package/sdk/dist/node/gitvault-creation-journal.js.map +0 -1
  267. package/sdk/dist/node/gitvault-degraded-read.d.ts.map +0 -1
  268. package/sdk/dist/node/gitvault-degraded-read.js.map +0 -1
  269. package/sdk/dist/node/gitvault-deploy.d.ts.map +0 -1
  270. package/sdk/dist/node/gitvault-deploy.js.map +0 -1
  271. package/sdk/dist/node/gitvault-edge-fetch.d.ts.map +0 -1
  272. package/sdk/dist/node/gitvault-edge-fetch.js.map +0 -1
  273. package/sdk/dist/node/gitvault-handoff.d.ts.map +0 -1
  274. package/sdk/dist/node/gitvault-handoff.js.map +0 -1
  275. package/sdk/dist/node/gitvault-keystore.d.ts.map +0 -1
  276. package/sdk/dist/node/gitvault-keystore.js.map +0 -1
  277. package/sdk/dist/node/gitvault-member-bundle.d.ts.map +0 -1
  278. package/sdk/dist/node/gitvault-member-bundle.js.map +0 -1
  279. package/sdk/dist/node/gitvault-mirror-backend.d.ts.map +0 -1
  280. package/sdk/dist/node/gitvault-mirror-backend.js.map +0 -1
  281. package/sdk/dist/node/gitvault-mirror-config.d.ts.map +0 -1
  282. package/sdk/dist/node/gitvault-mirror-config.js.map +0 -1
  283. package/sdk/dist/node/gitvault-mirror.d.ts.map +0 -1
  284. package/sdk/dist/node/gitvault-mirror.js.map +0 -1
  285. package/sdk/dist/node/gitvault-native-crypto.d.ts.map +0 -1
  286. package/sdk/dist/node/gitvault-native-crypto.js.map +0 -1
  287. package/sdk/dist/node/gitvault-open-or-create.d.ts.map +0 -1
  288. package/sdk/dist/node/gitvault-open-or-create.js.map +0 -1
  289. package/sdk/dist/node/gitvault-prewarm.d.ts.map +0 -1
  290. package/sdk/dist/node/gitvault-prewarm.js.map +0 -1
  291. package/sdk/dist/node/gitvault-profile-scan.d.ts.map +0 -1
  292. package/sdk/dist/node/gitvault-profile-scan.js.map +0 -1
  293. package/sdk/dist/node/gitvault-prune.d.ts.map +0 -1
  294. package/sdk/dist/node/gitvault-prune.js.map +0 -1
  295. package/sdk/dist/node/gitvault-publication.d.ts.map +0 -1
  296. package/sdk/dist/node/gitvault-publication.js.map +0 -1
  297. package/sdk/dist/node/gitvault-push-to-create.d.ts.map +0 -1
  298. package/sdk/dist/node/gitvault-push-to-create.js.map +0 -1
  299. package/sdk/dist/node/gitvault-recover.d.ts.map +0 -1
  300. package/sdk/dist/node/gitvault-recover.js.map +0 -1
  301. package/sdk/dist/node/gitvault-restore.d.ts.map +0 -1
  302. package/sdk/dist/node/gitvault-restore.js.map +0 -1
  303. package/sdk/dist/node/gitvault-snapshot.d.ts.map +0 -1
  304. package/sdk/dist/node/gitvault-snapshot.js.map +0 -1
  305. package/sdk/dist/node/gitvault-writer-state.d.ts.map +0 -1
  306. package/sdk/dist/node/gitvault-writer-state.js.map +0 -1
package/lib/deploy-v2.mjs CHANGED
@@ -28,7 +28,7 @@
28
28
  import { existsSync, fstatSync, readFileSync } from "node:fs";
29
29
  import { resolve, dirname, extname, isAbsolute } from "node:path";
30
30
  import {
31
- applyWithGitvault,
31
+ applyWithVault,
32
32
  assertLocalFileReferencesExist,
33
33
  buildDeployResolveSummary,
34
34
  githubActionsCredentials,
@@ -44,7 +44,7 @@ import {
44
44
  import { getSdk } from "./sdk.mjs";
45
45
  import { reportSdkError, fail } from "./sdk-errors.mjs";
46
46
  import { API, walletAuthHeaders, getActiveProjectId, resolveProjectId, isCoreApiTarget, updateProject } from "./config.mjs";
47
- import { delegateTokenFromEnv } from "#sdk/node";
47
+ import { grantKeyFromEnv } from "#sdk/node";
48
48
  import { flagValue, normalizeArgv } from "./argparse.mjs";
49
49
  import { loadLiveControlPlaneSession } from "../core-dist/control-plane-session.js";
50
50
  import { withAutoApprove } from "./sign-in.mjs";
@@ -139,7 +139,7 @@ Options:
139
139
  --final-only Alias for --quiet; final success/error envelope is still preserved
140
140
  --allow-warning <code> Continue past this reviewed warning code (repeatable)
141
141
  --allow-warnings Continue past plan warnings that require confirmation
142
- --allow-dirty gitvault-required projects only: capture a dirty
142
+ --allow-dirty vault-required projects only: capture a dirty
143
143
  work tree as-is instead of refusing
144
144
  SNAPSHOT_DIRTY_TREE. The result discloses exactly
145
145
  what was swept in, printed to stderr too — even
@@ -486,10 +486,10 @@ async function rehearseCmd(rawArgs) {
486
486
  fail({ code: "BAD_USAGE", message: "--teardown must be one of: on_pass, keep, always", details: { flag: "--teardown", value: teardown } });
487
487
  }
488
488
  const project = flagValue(args, "--project") ?? undefined;
489
- // A delegate is a complete deploy credential and the gateway explicitly
489
+ // A grant key is a complete deploy credential and the gateway explicitly
490
490
  // supports rehearsing with one (the route rejects only CI sessions).
491
491
  // Rehearsal is the SAFE path; never make it the harder one.
492
- if (!isCoreApiTarget() && !loadLiveControlPlaneSession() && !delegateTokenFromEnv()) {
492
+ if (!isCoreApiTarget() && !loadLiveControlPlaneSession() && !grantKeyFromEnv()) {
493
493
  walletAuthHeaders(`/apply/v1/plans/${givenPlanId ?? "_"}/rehearse`);
494
494
  }
495
495
  const sdk = getSdk();
@@ -723,9 +723,9 @@ async function promoteCmd(args) {
723
723
 
724
724
  // Preserve the aggressive early-exit when no local wallet is configured
725
725
  // — same as apply.
726
- // A delegate holds `deploy` and the gateway accepts it on this route; refusing
726
+ // A grant key holds `deploy` and the gateway accepts it on this route; refusing
727
727
  // locally would tell a wallet-less holder to run `run402 init` (see 4.11.2).
728
- if (!delegateTokenFromEnv()) walletAuthHeaders("/apply/v1/releases");
728
+ if (!grantKeyFromEnv()) walletAuthHeaders("/apply/v1/releases");
729
729
 
730
730
  try {
731
731
  // Call the engine directly (matches the pattern used by apply / resume
@@ -1295,20 +1295,20 @@ async function deployCmd(args) {
1295
1295
 
1296
1296
 
1297
1297
  let sdkOpts;
1298
- const delegateToken = delegateTokenFromEnv();
1298
+ const grantKey = grantKeyFromEnv();
1299
1299
  if (useGithubActionsOidc) {
1300
1300
  sdkOpts = {
1301
1301
  credentials: githubActionsCredentials({ projectId: releaseSpec.project_id, apiBase: API }),
1302
1302
  disablePaidFetch: true,
1303
1303
  };
1304
- } else if (delegateToken) {
1305
- // A delegate is a complete, self-contained deploy credential: the owner
1304
+ } else if (grantKey) {
1305
+ // A grant key is a complete, self-contained deploy credential: the owner
1306
1306
  // minted it with their wallet and handed it over, so this process needs no
1307
1307
  // wallet of its own. Skipping the guard is the point — an agent that
1308
1308
  // lost its local state (or never had a wallet) can still deploy. Paid fetch
1309
- // is disabled for the same reason it is under CI: a delegate authorizes
1309
+ // is disabled for the same reason it is under CI: a grant key authorizes
1310
1310
  // deploys, not spending.
1311
- sdkOpts = { delegateToken, disablePaidFetch: true };
1311
+ sdkOpts = { grantKey, disablePaidFetch: true };
1312
1312
  } else if (!isCoreApiTarget() && !loadLiveControlPlaneSession()) {
1313
1313
  // Aggressive early exit when no local wallet is configured — unless a
1314
1314
  // wallet-less person is deploying via their sign-in session
@@ -1328,14 +1328,14 @@ async function deployCmd(args) {
1328
1328
  const requiredPlan = opts.mode && opts.mode.kind === "applyReviewed"
1329
1329
  ? { planId: opts.mode.planId, ...(opts.mode.planFingerprint ? { planFingerprint: opts.mode.planFingerprint } : {}) }
1330
1330
  : undefined;
1331
- // A thin shim over the SDK lane (add-gitvault 5.0). `applyWithGitvault`
1332
- // takes the project's `gitvault_policy` into account: a project that is
1331
+ // A thin shim over the SDK lane (add-vault 5.0). `applyWithVault`
1332
+ // takes the project's `vault_policy` into account: a project that is
1333
1333
  // not `required` runs the same `apply()` this line always ran, with the
1334
1334
  // same options object; a `required` one captures, publishes, mints an
1335
1335
  // activation token, and commits with it.
1336
1336
  const sdk = getSdk(sdkOpts);
1337
1337
  const outcome = await withAutoApprove(() =>
1338
- applyWithGitvault({
1338
+ applyWithVault({
1339
1339
  sdk,
1340
1340
  spec: releaseSpec,
1341
1341
  apply: {
@@ -1348,7 +1348,7 @@ async function deployCmd(args) {
1348
1348
  },
1349
1349
  target: isCoreApiTarget() ? "core" : "cloud",
1350
1350
  ...(opts.allowDirty ? { allowDirty: true } : {}),
1351
- // The `gitvault_commit` line is printed ALWAYS, and to stderr, so
1351
+ // The `vault_commit` line is printed ALWAYS, and to stderr, so
1352
1352
  // `run402 deploy | jq` stays clean (the pipe contract).
1353
1353
  onCommitLine: (line) => { if (!opts.quiet) process.stderr.write(`${line}\n`); },
1354
1354
  }),
@@ -1357,29 +1357,29 @@ async function deployCmd(args) {
1357
1357
  // pass it as an optimization (the gateway defaults to the live release
1358
1358
  // without it). Best-effort: a keystore hiccup never fails the deploy.
1359
1359
  rememberLastDeployment(releaseSpec.project_id, outcome.deploy?.urls?.deployment_id);
1360
- if (!outcome.gitvault) {
1360
+ if (!outcome.vault) {
1361
1361
  console.log(JSON.stringify({ ...outcome.deploy, stats: sdkStats(sdk) }, null, 2));
1362
1362
  printVerboseStats(opts.verbose, sdk);
1363
1363
  return;
1364
1364
  }
1365
- const vaulted = outcome.gitvault;
1365
+ const vaulted = outcome.vault;
1366
1366
  // Both `DEPLOYED_*` outcomes activated a release; the override one just
1367
1367
  // did it without a vaulted capture and carries a draining advisory.
1368
1368
  const activated = vaulted.outcome === "DEPLOYED_AND_VAULTED" || vaulted.outcome === "DEPLOYED_UNVAULTED_OVERRIDE";
1369
1369
  console.log(JSON.stringify({
1370
1370
  ok: activated,
1371
1371
  outcome: vaulted.outcome,
1372
- gitvault_commit: vaulted.gitvault_commit,
1372
+ vault_commit: vaulted.vault_commit,
1373
1373
  capture_id: vaulted.capture_id,
1374
1374
  operation_id: vaulted.operation_id,
1375
1375
  ...("generation" in vaulted ? { generation: vaulted.generation } : {}),
1376
1376
  ...("push_error" in vaulted ? { push_error: vaulted.push_error } : {}),
1377
1377
  ...("deploy_error" in vaulted ? { deploy_error: vaulted.deploy_error } : {}),
1378
- // Design D5/D6 (gitvault-human-envelopes task 4.1 + gitvault-mirror):
1378
+ // Design D5/D6 (vault-human-envelopes task 4.1 + vault-mirror):
1379
1379
  // present only when this deploy landed a new generation — the SDK
1380
1380
  // omits both fields entirely on the other three outcomes rather than
1381
1381
  // faking a `skipped_*` value for something that never had a chance to
1382
- // run. See `Gitvault.deploy`'s doc comment (sdk/src/namespaces/gitvault.ts).
1382
+ // run. See `Repos.deploy`'s doc comment (sdk/src/namespaces/repos.ts).
1383
1383
  ...("mirror_push" in vaulted ? { mirror_push: vaulted.mirror_push } : {}),
1384
1384
  ...("reconcile_recipients" in vaulted ? { reconcile_recipients: vaulted.reconcile_recipients } : {}),
1385
1385
  next_actions: vaulted.next_actions,
@@ -1388,11 +1388,11 @@ async function deployCmd(args) {
1388
1388
  }, null, 2));
1389
1389
  // Design D6: the mirror result is reported BESIDE the vault outcome
1390
1390
  // above, on its own stderr line — a mirror failure never blocks the
1391
- // deploy (mirrors `run402 gitvault snapshot`'s reporting).
1391
+ // deploy (mirrors `run402 repos capture`'s reporting).
1392
1392
  if (vaulted.mirror_push?.outcome === "pushed") {
1393
1393
  console.error(`mirror: pushed generation ${vaulted.generation} (${vaulted.mirror_push.summary?.objects_copied ?? 0} object(s) copied)`);
1394
1394
  } else if (vaulted.mirror_push?.outcome === "failed") {
1395
- console.error(`mirror: dual-push FAILED (deploy is unaffected) — ${vaulted.mirror_push.error ?? "see mirror_push.summary.errors"}`);
1395
+ console.error(`mirror: mirroring this capture FAILED (deploy is unaffected) — ${vaulted.mirror_push.error ?? "see mirror_push.summary.errors"}`);
1396
1396
  }
1397
1397
  // Dirty-tree disclosure (Tal's decision, "help people not make
1398
1398
  // mistakes"): even an explicit --allow-dirty override never captures
@@ -1502,12 +1502,12 @@ const CI_DEPLOY_ERROR_GUIDANCE = {
1502
1502
  };
1503
1503
 
1504
1504
  /**
1505
- * The gateway's envelope for gitvault deploy errors — `upgrade_client` first,
1505
+ * The gateway's envelope for vault deploy errors — `upgrade_client` first,
1506
1506
  * then `grandfather_policy` — is relayed untouched: `deployCmd` deploys
1507
- * through `applyWithGitvault`, which declares `{capture_id,
1507
+ * through `applyWithVault`, which declares `{capture_id,
1508
1508
  * snapshot_oid_hmac}` at plan time and presents an activation token at
1509
- * commit, satisfying `gitvault_policy: required`, so no client-side rewrite
1510
- * of the envelope is needed. `cli-deploy-gitvault-lane.test.mjs` is the gate
1509
+ * commit, satisfying `vault_policy: required`, so no client-side rewrite
1510
+ * of the envelope is needed. `cli-deploy-vault-lane.test.mjs` is the gate
1511
1511
  * for this behavior.
1512
1512
  */
1513
1513
  function reportDeployApplyError(err, useGithubActionsOidc) {
@@ -1766,9 +1766,9 @@ async function resumeCmd(args) {
1766
1766
  emitDeployUpdateNotice("resume", args, { quiet: opts.quiet });
1767
1767
  const project = resolveProjectId(opts.project);
1768
1768
 
1769
- // A delegate holds `deploy` and the gateway accepts it on this route; refusing
1769
+ // A grant key holds `deploy` and the gateway accepts it on this route; refusing
1770
1770
  // locally would tell a wallet-less holder to run `run402 init` (see 4.11.2).
1771
- if (!delegateTokenFromEnv()) walletAuthHeaders("/apply/v1/operations");
1771
+ if (!grantKeyFromEnv()) walletAuthHeaders("/apply/v1/operations");
1772
1772
 
1773
1773
  try {
1774
1774
  const result = await getSdk({ disablePaidFetch: true })._applyEngine.resume(opts.operationId, {
@@ -1794,9 +1794,9 @@ async function statusCmd(args) {
1794
1794
  missing: "Missing <operation_id>.",
1795
1795
  });
1796
1796
  const project = resolveProjectId(parsed.flags["--project"] ?? null);
1797
- // A delegate holds `deploy` and the gateway accepts it on this route; refusing
1797
+ // A grant key holds `deploy` and the gateway accepts it on this route; refusing
1798
1798
  // locally would tell a wallet-less holder to run `run402 init` (see 4.11.2).
1799
- if (!delegateTokenFromEnv()) walletAuthHeaders("/apply/v1/operations");
1799
+ if (!grantKeyFromEnv()) walletAuthHeaders("/apply/v1/operations");
1800
1800
 
1801
1801
  try {
1802
1802
  const result = await getSdk()._applyEngine.status(operationId, { project });
@@ -1822,24 +1822,24 @@ async function listCmd(args) {
1822
1822
  };
1823
1823
 
1824
1824
  const project = resolveProjectId(opts.project);
1825
- // NOT ungated for delegates, deliberately: /apply/v1/operations (list) is
1825
+ // NOT ungated for grant keys, deliberately: /apply/v1/operations (list) is
1826
1826
  // `apikeyAuth` only — unlike get/events/resume/promote, which accept a
1827
- // delegate bearer. Listing every operation on a project is broader than
1827
+ // grant-key bearer. Listing every operation on a project is broader than
1828
1828
  // the per-operation reads a deploy credential is scoped to. If this is
1829
1829
  // ever widened, widen the ROUTE first, then this guard.
1830
1830
  //
1831
1831
  // The refusal is correct; the REMEDY must still be honest. Falling through
1832
- // to NO_WALLET would tell a delegate holder to run `run402 init`, which
1832
+ // to NO_WALLET would tell a grant-key holder to run `run402 init`, which
1833
1833
  // is wrong for a credential that is wallet-less by design — the same
1834
1834
  // misleading-remedy shape removed from the payment path in 4.11.2.
1835
- if (delegateTokenFromEnv()) {
1835
+ if (grantKeyFromEnv()) {
1836
1836
  fail({
1837
- code: "DELEGATE_SCOPE_INSUFFICIENT",
1838
- message: "Listing deploy operations is not available to a delegate.",
1839
- hint: "Use `run402 deploy status <operation_id>`, `deploy events <operation_id>` or `deploy verify <operation_id>` for a specific operation, which a delegate CAN read. A full listing needs the project apikey or the owner wallet.",
1840
- details: { command: "deploy list", credential: "delegate", route: "GET /apply/v1/operations" },
1837
+ code: "GRANT_KEY_SCOPE_INSUFFICIENT",
1838
+ message: "Listing deploy operations is not available to a grant key.",
1839
+ hint: "Use `run402 deploy status <operation_id>`, `deploy events <operation_id>` or `deploy verify <operation_id>` for a specific operation, which a grant key CAN read. A full listing needs the project apikey or the owner wallet.",
1840
+ details: { command: "deploy list", credential: "grant_key", route: "GET /apply/v1/operations" },
1841
1841
  next_actions: [
1842
- { type: "run_command", command: "run402 deploy status <operation_id>", why: "Per-operation reads are within a delegate's deploy scope." },
1842
+ { type: "run_command", command: "run402 deploy status <operation_id>", why: "Per-operation reads are within a grant key's deploy scope." },
1843
1843
  ],
1844
1844
  });
1845
1845
  }
@@ -1870,9 +1870,9 @@ async function eventsCmd(args) {
1870
1870
  const opts = { operationId, project: parsed.flags["--project"] ?? null };
1871
1871
 
1872
1872
  const project = resolveProjectId(opts.project);
1873
- // A delegate holds `deploy` and the gateway accepts it on this route; refusing
1873
+ // A grant key holds `deploy` and the gateway accepts it on this route; refusing
1874
1874
  // locally would tell a wallet-less holder to run `run402 init` (see 4.11.2).
1875
- if (!delegateTokenFromEnv()) walletAuthHeaders("/apply/v1/operations");
1875
+ if (!grantKeyFromEnv()) walletAuthHeaders("/apply/v1/operations");
1876
1876
 
1877
1877
  try {
1878
1878
  const result = await getSdk()._applyEngine.events(opts.operationId, { project });
@@ -1916,9 +1916,9 @@ async function verifyCmd(args) {
1916
1916
  ? 60
1917
1917
  : parsePositiveInt(parsed.flags["--timeout"], "--timeout");
1918
1918
 
1919
- // A delegate holds `deploy` and the gateway accepts it on this route; refusing
1919
+ // A grant key holds `deploy` and the gateway accepts it on this route; refusing
1920
1920
  // locally would tell a wallet-less holder to run `run402 init` (see 4.11.2).
1921
- if (!delegateTokenFromEnv()) walletAuthHeaders("/apply/v1/operations");
1921
+ if (!grantKeyFromEnv()) walletAuthHeaders("/apply/v1/operations");
1922
1922
 
1923
1923
  try {
1924
1924
  let result;
package/lib/doctor.mjs CHANGED
@@ -13,9 +13,9 @@ import { resolveApplicationScope, loadApplicationScanInput, scanDeploymentSource
13
13
  */
14
14
 
15
15
  import { existsSync, statSync } from "node:fs";
16
- import { GITVAULT_BYO_NO_PAYLOAD_COPY_STATEMENT } from "#sdk";
16
+ import { VAULT_BYO_NO_PAYLOAD_COPY_STATEMENT } from "#sdk";
17
17
  import { configDir, readWallet, loadKeyStore } from "./config.mjs";
18
- import { resolveGitvaultTarget } from "./gitvault-target.mjs";
18
+ import { resolveVaultTarget } from "./vault-target.mjs";
19
19
  import { getSdk } from "./sdk.mjs";
20
20
  import {
21
21
  resolveScanRoot,
@@ -54,7 +54,7 @@ const DOCTOR_CHECK_NAMES = [
54
54
  "account_health",
55
55
  "runtime_staleness",
56
56
  "recovery_posture",
57
- "gitvault",
57
+ "vault",
58
58
  "source_scan",
59
59
  ];
60
60
 
@@ -91,7 +91,7 @@ Output:
91
91
  api_reachable error, tier inactive / frozen / past_due /
92
92
  dormant / missing / error, error-severity source_scan findings
93
93
  advisory a warning that never stops a deploy: account_health,
94
- recovery_posture, gitvault, runtime_staleness, cli_update gaps
94
+ recovery_posture, vault, runtime_staleness, cli_update gaps
95
95
  info ok / skipped / unknown
96
96
  Agents: branch on \`ok\`; read \`warnings[]\` (one entry per gap) for the
97
97
  non-blocking gaps and \`blocking[]\` for what to fix when \`ok\` is false.
@@ -117,16 +117,16 @@ Options:
117
117
  --dir D Select the application directory for deployment diagnostics.
118
118
  --manifest P Explicitly select a manifest (executable configs are trusted code).
119
119
  --scan-dir D Advanced arbitrary scan; does not claim deployment readiness
120
- --project <project_id> Target THIS project's gitvault check instead of the repo-standing
120
+ --project <project_id> Target THIS project's vault check instead of the repo-standing
121
121
  default (the 4.38.0 pin / run402 remote / RUN402_PROJECT_ID / active
122
- project, in that order — see \`gitvault-target.mjs\`). Scoped to the
123
- gitvault check only; every other check is wallet/machine-wide, not
122
+ project, in that order — see \`vault-target.mjs\`). Scoped to the
123
+ vault check only; every other check is wallet/machine-wide, not
124
124
  per-project, and is unaffected by this flag. Composes with --only.
125
125
  --only <check> Run ONLY the named check (repeatable — pass it more than once
126
126
  to run several). Every other check, INCLUDING the monorepo
127
127
  source-tree scan, is suppressed rather than merely hidden: a
128
128
  skipped check's network/filesystem work never runs at all, so
129
- \`doctor --only gitvault\` costs one gitvault read, not a
129
+ \`doctor --only vault\` costs one vault read, not a
130
130
  config/tier/account/scan sweep. An unknown check name is
131
131
  BAD_USAGE listing the valid names below. Not used with --buzz
132
132
  (buzz mode is its own separate, always-complete check set).
@@ -164,7 +164,7 @@ Checks performed:
164
164
  the org's disaster backstops if the agent machine dies. Evidence
165
165
  levels: "configured" is what the platform verified, never proof an
166
166
  off-platform passkey or saved code still exists.
167
- - gitvault: the active project's vault — activation policy, whether THIS
167
+ - vault: the active project's vault — activation policy, whether THIS
168
168
  machine can produce the capture a 'required' policy demands, open
169
169
  unvaulted-override journals, and where the keystore lives (back it up:
170
170
  whole-keystore loss is terminal for vault history)
@@ -310,7 +310,7 @@ export async function run(sub, args = []) {
310
310
  const skipScan = all.includes("--no-scan");
311
311
  const scanDirArgIdx = all.indexOf("--scan-dir");
312
312
  const scanDirOverride = scanDirArgIdx >= 0 ? all[scanDirArgIdx + 1] : null;
313
- // Scoped to the gitvault check (see HELP): every other check is
313
+ // Scoped to the vault check (see HELP): every other check is
314
314
  // wallet/machine-wide, not per-project.
315
315
  const projectOverride = flagValue(all, "--project");
316
316
 
@@ -650,7 +650,7 @@ export async function run(sub, args = []) {
650
650
  }
651
651
  }
652
652
 
653
- // 6c. Org recovery posture (gitvault-recovery-custody). One entry per
653
+ // 6c. Org recovery posture (vault-recovery-custody). One entry per
654
654
  // vault-owning org the caller can see; rides the same account-status
655
655
  // read. Evidence levels, not guarantees: "configured" names what the
656
656
  // platform VERIFIED — it can never observe whether an off-platform
@@ -661,11 +661,11 @@ export async function run(sub, args = []) {
661
661
  if (wanted("recovery_posture")) {
662
662
  const posture = status.recovery_posture;
663
663
  if (!Array.isArray(posture)) {
664
- // Gateway older than gitvault-recovery-custody doesn't surface it.
664
+ // Gateway older than vault-recovery-custody doesn't surface it.
665
665
  checks.push({
666
666
  name: "recovery_posture",
667
667
  status: "skipped",
668
- ...(verbose && { hint: "account status has no 'recovery_posture' block; requires a gitvault-recovery-custody gateway." }),
668
+ ...(verbose && { hint: "account status has no 'recovery_posture' block; requires a vault-recovery-custody gateway." }),
669
669
  });
670
670
  } else if (posture.length === 0) {
671
671
  // No vault-owning org in the caller's view — nothing to lose, nothing to advise.
@@ -718,15 +718,15 @@ export async function run(sub, args = []) {
718
718
  });
719
719
  }
720
720
 
721
- // 6c. gitvault (add-gitvault). Doctor was completely silent about the vault
722
- // even when `gitvault_policy: required` was the single thing that would break
721
+ // 6c. vault (add-vault). Doctor was completely silent about the vault
722
+ // even when `vault_policy: required` was the single thing that would break
723
723
  // the project's next deploy (dogfood #1, finding D1) — and doctor is where a
724
724
  // user looks when something is wrong. It also prints WHERE the keystore is:
725
725
  // "whole-keystore loss is terminal" was stated three times across this
726
726
  // surface while the directory to back up was stated nowhere (finding D2).
727
727
  //
728
728
  // Read-only and best-effort in every branch: no project, no vault, or a
729
- // gateway that does not know gitvault are all ordinary and report `skipped`
729
+ // gateway that does not know vault are all ordinary and report `skipped`
730
730
  // or `ok`, never a doctor failure. A vault-only project that has never
731
731
  // deployed is a first-class shape (protocol D183), so its mere absence of a
732
732
  // deploy raises nothing.
@@ -734,12 +734,12 @@ export async function run(sub, args = []) {
734
734
  // TARGETING: when cwd is a repository
735
735
  // with its own pinned repo id or run402/origin remote, doctor checks THAT
736
736
  // vault, not the profile's active project — the same pin > remote >
737
- // RUN402_PROJECT_ID env > active-project order every other gitvault verb
738
- // follows (`gitvault-target.mjs`). An explicit `--project <project_id>` outranks
739
- // all of that (the resolver's own top tier), same as every other gitvault
737
+ // RUN402_PROJECT_ID env > active-project order every other vault verb
738
+ // follows (`vault-target.mjs`). An explicit `--project <project_id>` outranks
739
+ // all of that (the resolver's own top tier), same as every other vault
740
740
  // verb's `--project`.
741
- if (wanted("gitvault")) {
742
- // gitvault-persistent-helper: a bounded LOCAL probe of the resident
741
+ if (wanted("vault")) {
742
+ // vault-persistent-helper: a bounded LOCAL probe of the resident
743
743
  // helper engine — {running:false} is a fine answer, never a finding
744
744
  // (the daemon is an accelerator, not a dependency).
745
745
  const daemonInfo = await (async () => {
@@ -783,18 +783,18 @@ export async function run(sub, args = []) {
783
783
  return { running: false };
784
784
  }
785
785
  })();
786
- const target = await resolveGitvaultTarget({ repoDir: process.cwd(), explicitProjectId: projectOverride ?? undefined });
786
+ const target = await resolveVaultTarget({ repoDir: process.cwd(), explicitProjectId: projectOverride ?? undefined });
787
787
  const projectId = target.project_id ?? null;
788
788
  const repoId = target.repo_id ?? null;
789
789
  if (!projectId && !repoId) {
790
790
  checks.push({
791
- name: "gitvault",
791
+ name: "vault",
792
792
  status: "skipped",
793
793
  ...(verbose && { hint: "no active project — run 'run402 projects use <project_id>' to check its vault." }),
794
794
  });
795
795
  } else {
796
796
  try {
797
- const gv = await getSdk().gitvault.status({
797
+ const gv = await getSdk().repos.status({
798
798
  ...(repoId ? { repo_id: repoId } : { project_id: projectId }),
799
799
  repo_dir: process.cwd(),
800
800
  });
@@ -802,11 +802,11 @@ export async function run(sub, args = []) {
802
802
  project_id: gv.project_id ?? projectId,
803
803
  repo_id: gv.repo_id,
804
804
  vault: gv.vault === null ? null : "allocated",
805
- // gitvault-byo-primary-bucket task 3.5 — absent-or-"managed" is
805
+ // vault-byo-primary-bucket task 3.5 — absent-or-"managed" is
806
806
  // byte-identical to before this fold for every non-BYO vault.
807
807
  storage_profile: gv.vault?.storage_profile ?? null,
808
808
  byo_destination: gv.vault?.byo_destination ?? null,
809
- gitvault_policy: gv.gitvault_policy,
809
+ vault_policy: gv.vault_policy,
810
810
  keystore_root: gv.keystore.root,
811
811
  can_sign: gv.keystore.can_sign,
812
812
  holds_repo_key: gv.keystore.holds_repo_key,
@@ -819,7 +819,7 @@ export async function run(sub, args = []) {
819
819
  // to the durability sentence instead of the terminal-loss claim.
820
820
  covering_recipients: gv.covering_recipients ?? null,
821
821
  daemon: daemonInfo,
822
- // gitvault-multi-writer (rev 47) task 6.2 — this machine's own
822
+ // vault-multi-writer (rev 47) task 6.2 — this machine's own
823
823
  // standing on the vault's chain-verified writer set. `null` only
824
824
  // when there is no vault at all (nothing to be a writer OF).
825
825
  // `read_only_vault` takes priority over the caller's own standing
@@ -839,22 +839,22 @@ export async function run(sub, args = []) {
839
839
  if (value.writer === "read_only_vault") {
840
840
  gaps.push("this vault has lost its last writer (D228 read-only terminal) — it still serves reads, but no push can be admitted until a new writer is admitted through a recovery path");
841
841
  } else if (value.writer === "pending") {
842
- gaps.push("this machine's key is an eligible writer candidate but not yet admitted — run 'run402 repos access sync' if you already hold writer standing on this vault, or ask a current writer to run any gitvault operation");
842
+ gaps.push("this machine's key is an eligible writer candidate but not yet admitted — run 'run402 repos access sync' if you already hold writer standing on this vault, or ask a current writer to run any vault operation");
843
843
  } else if (value.writer === "not_admitted") {
844
- gaps.push("this machine's key is not an active writer on this vault — a push from here is refused GITVAULT_WRITER_NOT_ADMITTED; ask a current writer to admit you (org membership at role developer+ and a published signing key make you eligible)");
844
+ gaps.push("this machine's key is not an active writer on this vault — a push from here is refused VAULT_WRITER_NOT_ADMITTED; ask a current writer to admit you (org membership at role developer+ and a published signing key make you eligible)");
845
845
  }
846
846
  // The one that actually breaks the next deploy: the project demands a
847
847
  // vaulted capture and THIS machine cannot produce one.
848
- if (gv.gitvault_policy === "required" && !gv.keystore.holds_repo_key) {
848
+ if (gv.vault_policy === "required" && !gv.keystore.holds_repo_key) {
849
849
  gaps.push(
850
- "gitvault_policy is 'required' but this machine holds no key for the vault — a deploy from here is refused with GITVAULT_CLIENT_UPGRADE_REQUIRED. " +
850
+ "vault_policy is 'required' but this machine holds no key for the vault — a deploy from here is refused with VAULT_CLIENT_UPGRADE_REQUIRED. " +
851
851
  "Run 'run402 repos create --project <project_id>' (idempotent; resolves to the existing repo), or 'run402 repos policy grandfathered --reason <why>' to un-gate the project.",
852
852
  );
853
- } else if (gv.gitvault_policy === "required" && !gv.keystore.can_sign) {
854
- gaps.push("gitvault_policy is 'required' and this keystore is read-only (no signing key) — it can verify but cannot publish the capture a deploy needs");
853
+ } else if (gv.vault_policy === "required" && !gv.keystore.can_sign) {
854
+ gaps.push("vault_policy is 'required' and this keystore is read-only (no signing key) — it can verify but cannot publish the capture a deploy needs");
855
855
  }
856
856
  if (gv.pending_overrides > 0) {
857
- gaps.push(`${gv.pending_overrides} unvaulted-override journal(s) are still open — run 'run402 repos snapshot' to drain them`);
857
+ gaps.push(`${gv.pending_overrides} unvaulted-override journal(s) are still open — run 'run402 repos capture' to drain them`);
858
858
  }
859
859
  // `matches` is a TRI-STATE: `false` alone is
860
860
  // a real mismatch. `null` (a slug-form remote not yet resolved on
@@ -863,20 +863,11 @@ export async function run(sub, args = []) {
863
863
  if (gv.remote && gv.remote.matches === false) {
864
864
  gaps.push(`the '${gv.remote.name}' git remote points at a different project than ${value.project_id} (${gv.remote.url})`);
865
865
  }
866
- // A `kygit::` remote with no
867
- // `git-remote-kygit` helper on PATH means every push/clone/fetch
868
- // in this checkout fails inside git with an opaque error.
869
- if (gv.remote?.url?.startsWith("kygit::")) {
870
- const { isExecutableOnPath } = await import("./path-lookup.mjs");
871
- if (!isExecutableOnPath("git-remote-kygit")) {
872
- gaps.push("this checkout's remote is kygit:: but git-remote-kygit is not on PATH — run `npm i -g @kychee/kygit`");
873
- }
874
- }
875
866
  // Echoed exactly as the SDK reported them — including the
876
867
  // doctor-persistent `grandfathered` advisory it owns.
877
868
  for (const w of gv.warnings ?? []) gaps.push(`${w.kind}: ${w.message}`);
878
869
 
879
- // gitvault-mirror-and-recover task 4.3 + gitvault-mirror-default:
870
+ // vault-mirror-and-recover task 4.3 + vault-mirror-default:
880
871
  // mirror currency, reported ALONGSIDE (never in place of) the
881
872
  // deploy-related gaps above, and never blocking `run402 deploy`'s
882
873
  // own gate — the vault lane's outcome is unaffected regardless of
@@ -885,14 +876,14 @@ export async function run(sub, args = []) {
885
876
  // unreachable or vault unread). Only STALE is actionable enough to
886
877
  // become a warning gap; a vault with no successful mirror copy yet
887
878
  // carries the SDK-computed `vault_unmirrored` finding — named and
888
- // standing (gitvault-mirror-default supersedes the old anonymous
879
+ // standing (vault-mirror-default supersedes the old anonymous
889
880
  // `advisory` string), echoed verbatim, and deliberately NOT pushed
890
881
  // into `gaps`: informational, never blocking, computed client-side
891
882
  // only, cleared by the first successful mirror write or sync.
892
883
  if (gv.vault !== null && value.repo_id) {
893
884
  try {
894
- const mirrorStatus = await getSdk().gitvault.mirrorStatus({ repo_id: value.repo_id, is_byo: value.storage_profile === "byo" });
895
- value.gitvault_mirror = {
885
+ const mirrorStatus = await getSdk().repos.mirrorStatus({ repo_id: value.repo_id, is_byo: value.storage_profile === "byo" });
886
+ value.vault_mirror = {
896
887
  configured: mirrorStatus.configured,
897
888
  destination: mirrorStatus.destination,
898
889
  mirrored_generation: mirrorStatus.mirrored_generation,
@@ -912,12 +903,12 @@ export async function run(sub, args = []) {
912
903
  }
913
904
  }
914
905
 
915
- // gitvault-byo-primary-bucket task 3.5 — unconditional, independent
906
+ // vault-byo-primary-bucket task 3.5 — unconditional, independent
916
907
  // of mirror status (D7); imported from the canonical constants, never
917
908
  // paraphrased.
918
- const byoDisclosure = value.storage_profile === "byo" ? ` Storage: byo (${value.byo_destination ?? "(unknown)"}) — ${GITVAULT_BYO_NO_PAYLOAD_COPY_STATEMENT}` : "";
909
+ const byoDisclosure = value.storage_profile === "byo" ? ` Storage: byo (${value.byo_destination ?? "(unknown)"}) — ${VAULT_BYO_NO_PAYLOAD_COPY_STATEMENT}` : "";
919
910
  checks.push({
920
- name: "gitvault",
911
+ name: "vault",
921
912
  status: gaps.length > 0 ? "warning" : "ok",
922
913
  value: gaps.length > 0 ? { ...value, gaps } : value,
923
914
  hint: (gv.vault === null
@@ -927,12 +918,12 @@ export async function run(sub, args = []) {
927
918
  : `Back up ${gv.keystore.root} — whole-machine or whole-keystore loss is terminal for vault history.`) + byoDisclosure,
928
919
  });
929
920
  } catch (err) {
930
- // A gateway without gitvault, an unreachable API, or a project this
921
+ // A gateway without vault, an unreachable API, or a project this
931
922
  // wallet cannot see. None of those is a local health problem.
932
923
  checks.push({
933
- name: "gitvault",
924
+ name: "vault",
934
925
  status: "skipped",
935
- message: describeCheckFailure("gitvault status check", err),
926
+ message: describeCheckFailure("vault status check", err),
936
927
  });
937
928
  }
938
929
  }
@@ -944,7 +935,7 @@ export async function run(sub, args = []) {
944
935
  // `error` block deploy (`run402 deploy` wraps doctor and respects exit
945
936
  // code). Skipped via --no-scan when the user wants config-only checks, and
946
937
  // by any --only that omits it — on a monorepo this check's findings can
947
- // otherwise bury the gitvault diagnosis under thousands of hits.
938
+ // otherwise bury the vault diagnosis under thousands of hits.
948
939
  if (!skipScan && wanted("source_scan")) {
949
940
  try {
950
941
  const scope = await resolveApplicationScope({ dir: flagValue(all, "--dir") ?? undefined, manifest: flagValue(all, "--manifest") ?? undefined });
package/lib/errors.mjs CHANGED
@@ -110,7 +110,7 @@ Exit codes (the promote gate — only when --fail-on-new is set):
110
110
 
111
111
  Auth:
112
112
  The addressed project's own service_key when it is cached locally; otherwise
113
- your wallet / session / delegate, which the gateway authorizes with
113
+ your wallet / session / grant key, which the gateway authorizes with
114
114
  project.read — an org member or teammate agent needs no project key. A key
115
115
  for project A requesting project B's errors gets 403 (never a 404 that
116
116
  leaks existence). Read-only; never lifecycle-gated.
package/lib/events.mjs CHANGED
@@ -95,7 +95,7 @@ Event shape:
95
95
 
96
96
  Auth:
97
97
  --project: the project's own service_key, your SIWX wallet, a control-plane
98
- session, or a scoped delegate with project.read.
98
+ session, or a grant key with project.read.
99
99
  --org: wallet / control-plane session with an active org membership
100
100
  (a project service_key cannot read sibling projects' events).
101
101
  The feed is read-only and never lifecycle-gated: a frozen project's feed