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
@@ -39,16 +39,16 @@ export const PRESENCE_ENV = "RUN402_PRESENCE_ID";
39
39
  /**
40
40
  * `r402.room` from `cwd`'s LOCAL git config (kygit-handoff design D10) —
41
41
  * best-effort, `null` on any absence or failure. Checks a real vault
42
- * checkout's pin first (`readPinnedGitvaultRepo`, gated on `r402.repoId`
42
+ * checkout's pin first (`readPinnedVaultRepo`, gated on `r402.repoId`
43
43
  * being present), then falls back to the bare room/org pin `rooms join
44
44
  * <key>` writes in a directory with NO vault at all (add-room-invite design
45
- * D10) — `readPinnedGitvaultRepo` would otherwise see that pin as absent,
45
+ * D10) — `readPinnedVaultRepo` would otherwise see that pin as absent,
46
46
  * since it never sets `r402.repoId`.
47
47
  */
48
- async function readGitvaultPinnedRoom(cwd) {
48
+ async function readVaultPinnedRoom(cwd) {
49
49
  try {
50
- const { readPinnedGitvaultRepo, readPinnedRoomBinding } = await import("#sdk/node");
51
- const pinned = await readPinnedGitvaultRepo(cwd);
50
+ const { readPinnedVaultRepo, readPinnedRoomBinding } = await import("#sdk/node");
51
+ const pinned = await readPinnedVaultRepo(cwd);
52
52
  const room = typeof pinned?.room === "string" ? pinned.room.trim() : "";
53
53
  if (room.length > 0) return room;
54
54
  const bare = await readPinnedRoomBinding(cwd);
@@ -102,11 +102,11 @@ export async function resolveRoom({ org, room, project } = {}) {
102
102
  // (`--room` alone works whenever the org resolves, and fails with
103
103
  // ORG_REQUIRED — naming every way to supply one — when it does not.)
104
104
  // kygit-handoff design D10: `r402.room` in this checkout's LOCAL git
105
- // config — written by `resume` and every other gitvault pin site — is
105
+ // config — written by `resume` and every other vault pin site — is
106
106
  // the LAST room-key source before falling to the project default,
107
107
  // below the binding file's own `room` key.
108
108
  const bindingRoom = findBindingKey(process.cwd(), "room");
109
- const roomKey = room ?? bindingRoom?.value ?? (await readGitvaultPinnedRoom(process.cwd()));
109
+ const roomKey = room ?? bindingRoom?.value ?? (await readVaultPinnedRoom(process.cwd()));
110
110
  if (roomKey) {
111
111
  const resolved = await resolveOrg({ org, project }, { cmd: "rooms" });
112
112
  return {
package/lib/sites.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
2
2
  import { tmpdir } from "os";
3
3
  import { dirname, join, resolve } from "path";
4
- import { fileSetFromDir, delegateTokenFromEnv } from "#sdk/node";
4
+ import { fileSetFromDir, grantKeyFromEnv } from "#sdk/node";
5
5
  import { walletAuthHeaders, resolveProjectId, updateProject } from "./config.mjs";
6
6
  import { resolveFilePathsInManifest } from "./manifest.mjs";
7
7
  import { getSdk } from "./sdk.mjs";
@@ -220,9 +220,9 @@ async function deploy(args) {
220
220
  if (opts.manifest) resolveFilePathsInManifest(manifest, dirname(resolve(opts.manifest)));
221
221
 
222
222
  // Preserve the aggressive early exit when no local wallet is configured.
223
- // A delegate holds `deploy` and /apply/v1/plans accepts it; refusing locally
223
+ // A grant key holds `deploy` and /apply/v1/plans accepts it; refusing locally
224
224
  // would tell a wallet-less holder to run `run402 init` (see 4.11.2).
225
- if (!delegateTokenFromEnv()) walletAuthHeaders("/apply/v1/plans");
225
+ if (!grantKeyFromEnv()) walletAuthHeaders("/apply/v1/plans");
226
226
 
227
227
  const stage = stageFilesToTempDir(manifest.files || []);
228
228
  try {
@@ -289,9 +289,9 @@ async function deployDir(args) {
289
289
  if (opts.target !== undefined) failUnsupportedTarget();
290
290
 
291
291
  // Preserve the aggressive early exit when no local wallet is configured.
292
- // A delegate holds `deploy` and /apply/v1/plans accepts it; refusing locally
292
+ // A grant key holds `deploy` and /apply/v1/plans accepts it; refusing locally
293
293
  // would tell a wallet-less holder to run `run402 init` (see 4.11.2).
294
- if (!delegateTokenFromEnv()) walletAuthHeaders("/apply/v1/plans");
294
+ if (!grantKeyFromEnv()) walletAuthHeaders("/apply/v1/plans");
295
295
 
296
296
  let fileSet;
297
297
  try {
package/lib/up.mjs CHANGED
@@ -84,12 +84,12 @@ Options:
84
84
  Repo composition (D4): against a local directory (not a git URL source), up
85
85
  composes git init (only when the app root is not already a repository) +
86
86
  provision + a run402 remote scaffold (origin is never claimed) + a first
87
- gitvault push — one command, the fly-launch shape. The app root is the
87
+ vault push — one command, the fly-launch shape. The app root is the
88
88
  manifest's directory; an app root that lies INSIDE another repository is
89
89
  left untouched (result.repo.status "skipped", reason
90
90
  "inside_other_repository", toplevel named) and result.repo.next_actions
91
91
  carries create_nested_repo — re-run with --nested to give the app its own
92
- encrypted remote (result.repo.gitvault.nested true, enclosing_toplevel,
92
+ encrypted remote (result.repo.vault.nested true, enclosing_toplevel,
93
93
  excluded_in_enclosing). The scaffold and first push are best-effort: a git
94
94
  or vault hiccup never turns an otherwise-successful deploy into a failure,
95
95
  and is reported under result.repo (default apply) or result (--repo-only)
@@ -395,7 +395,7 @@ export async function run(args = []) {
395
395
  createdRepository = await gitInitIfNeeded(workDir);
396
396
  result.result.repo = await composeRepoPushStep({ sdk, workDir, projectId, createdRepository, nested });
397
397
  } catch (err) {
398
- result.result.repo = { status: "failed", first_push: null, first_push_error: { code: err?.code ?? "GITVAULT_SETUP_FAILED", message: err?.message ?? String(err) }, ...repoNextActionsOf(err) };
398
+ result.result.repo = { status: "failed", first_push: null, first_push_error: { code: err?.code ?? "VAULT_SETUP_FAILED", message: err?.message ?? String(err) }, ...repoNextActionsOf(err) };
399
399
  }
400
400
  }
401
401
  }
@@ -658,13 +658,13 @@ function looksLikeGitRemoteUrl(source) {
658
658
  *
659
659
  * `-b main`, not whatever `init.defaultBranch` (or the pre-2.28 hardcoded
660
660
  * `master`) happens to be — the docs teach `git push origin main`, and the
661
- * gitvault remote helper's own dangling-HEAD hazard note (a first push of
661
+ * vault remote helper's own dangling-HEAD hazard note (a first push of
662
662
  * any OTHER branch leaves HEAD naming a ref that does not exist yet) is
663
663
  * exactly what a mismatched default branch here would walk `up` straight
664
664
  * into. `-b` needs git 2.28+ (2020); an older git falls back to the same
665
665
  * result by a different route — `symbolic-ref` on a still-empty repository
666
666
  * has no existing ref to disturb, so it is exactly as safe as `-b main`
667
- * would have been. Mirrors `Gitvault.scaffoldRemote`'s identical fallback.
667
+ * would have been. Mirrors `Repos.scaffoldRemote`'s identical fallback.
668
668
  */
669
669
  async function gitInitIfNeeded(dir) {
670
670
  const { hardenedGit } = await import("#sdk/node");
@@ -685,20 +685,20 @@ async function gitInitIfNeeded(dir) {
685
685
  /**
686
686
  * Remote scaffold + first push, against an already-known project. Best-effort
687
687
  * in every branch — the same non-fatal discipline `projects provision`'s own
688
- * fold-in follows (`gitvault-scaffold.mjs`): a git or vault hiccup here must
688
+ * fold-in follows (`vault-scaffold.mjs`): a git or vault hiccup here must
689
689
  * never turn an otherwise-successful `up` into a failure.
690
690
  */
691
691
  async function composeRepoPushStep({ sdk, workDir, projectId, createdRepository, nested = false }) {
692
692
  const { resolveOwningOrgId } = await import("./org-context.mjs");
693
- const { scaffoldGitvaultRemote } = await import("./gitvault-scaffold.mjs");
693
+ const { scaffoldVaultRemote } = await import("./vault-scaffold.mjs");
694
694
  const orgId = await resolveOwningOrgId(projectId);
695
695
  // `--nested`: an app root INSIDE another repository (a monorepo workspace)
696
696
  // becomes its own repository with the encrypted remote — the enclosing
697
697
  // checkout only gains one local `.git/info/exclude` line. Without it the
698
698
  // scaffold is skipped there and the result's `next_actions` name
699
699
  // `run402 up --nested` (the caller's own spelling of the way out).
700
- const scaffold = await scaffoldGitvaultRemote({ repoDir: workDir, projectId, orgId: orgId ?? undefined, createRepoIfMissing: false, nested, nestedCommand: "run402 up --nested" });
701
- if (createdRepository && scaffold.gitvault) scaffold.gitvault.created_repository = true;
700
+ const scaffold = await scaffoldVaultRemote({ repoDir: workDir, projectId, orgId: orgId ?? undefined, createRepoIfMissing: false, nested, nestedCommand: "run402 up --nested" });
701
+ if (createdRepository && scaffold.vault) scaffold.vault.created_repository = true;
702
702
  const out = { ...scaffold, first_push: null, first_push_error: null };
703
703
  if (scaffold.status !== "scaffolded") {
704
704
  // Nothing was scaffolded (the app root is inside another repository, or
@@ -707,7 +707,7 @@ async function composeRepoPushStep({ sdk, workDir, projectId, createdRepository,
707
707
  return out;
708
708
  }
709
709
  if (!orgId) {
710
- out.first_push_error = { code: "GITVAULT_ORG_UNRESOLVED", message: `could not resolve the owning org for ${projectId} — the first push was skipped` };
710
+ out.first_push_error = { code: "VAULT_ORG_UNRESOLVED", message: `could not resolve the owning org for ${projectId} — the first push was skipped` };
711
711
  return out;
712
712
  }
713
713
  // Read BEFORE the push decision: an unborn HEAD is what decides the lane.
@@ -717,7 +717,7 @@ async function composeRepoPushStep({ sdk, workDir, projectId, createdRepository,
717
717
  // a repository the agent `git init`ed itself and never committed to (an
718
718
  // UNBORN HEAD): there is no clean tree to keep, only untracked files, and
719
719
  // the strict lane would refuse SNAPSHOT_DIRTY_TREE on every first push.
720
- const freshRepository = createdRepository || scaffold.gitvault?.created_repository === true || out.local_git.unborn === true;
720
+ const freshRepository = createdRepository || scaffold.vault?.created_repository === true || out.local_git.unborn === true;
721
721
  try {
722
722
  let vaultCreated = null;
723
723
  // A fresh repository has, by definition, nothing committed yet — every
@@ -726,7 +726,7 @@ async function composeRepoPushStep({ sdk, workDir, projectId, createdRepository,
726
726
  // first commit the dirty-tree lane produces (disclosed under
727
727
  // first_push.snapshot); a repository WITH commits keeps the clean-tree
728
728
  // rule and its refusal is reported, never overridden.
729
- const pushed = await sdk.gitvault.push({
729
+ const pushed = await sdk.repos.capture({
730
730
  project_id: projectId,
731
731
  org_id: orgId,
732
732
  repo_dir: workDir,
@@ -736,14 +736,14 @@ async function composeRepoPushStep({ sdk, workDir, projectId, createdRepository,
736
736
  out.first_push = {
737
737
  generation: pushed.generation,
738
738
  form: pushed.form,
739
- gitvault_commit: pushed.gitvault_commit,
739
+ vault_commit: pushed.vault_commit,
740
740
  vault_created: vaultCreated,
741
741
  snapshot: pushed.snapshot ? { id: pushed.snapshot.oid, kind: pushed.snapshot.kind, backup_status: "succeeded" } : null,
742
742
  note: "Vault backup does not create a local branch commit or stage files. Local HEAD and dirty state are independent.",
743
743
  ...(freshRepository ? { captured_dirty: true, modified_captured: pushed.snapshot?.modified_captured ?? null, untracked_captured: pushed.snapshot?.untracked_captured ?? null } : {}),
744
744
  };
745
745
  } catch (err) {
746
- out.first_push_error = { code: err?.body?.code ?? err?.code ?? "GITVAULT_PUSH_FAILED", message: err?.message ?? String(err) };
746
+ out.first_push_error = { code: err?.body?.code ?? err?.code ?? "VAULT_PUSH_FAILED", message: err?.message ?? String(err) };
747
747
  Object.assign(out, repoNextActionsOf(err));
748
748
  }
749
749
  return out;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * gitvault-capabilities.mjs — the capability ledger for the GitVault
3
- * marketing surface (openspec/changes/gitvault-page-truth-gate, design D1).
2
+ * vault-capabilities.mjs — the capability ledger for the KyGit
3
+ * marketing surface (openspec/changes/kygit-page-truth-gate, design D1).
4
4
  *
5
5
  * THIS FILE IS MARKETING-CLAIM GROUND TRUTH. run402-private's page-truth
6
- * gate (`scripts/check-gitvault-page-truth.mjs`) resolves the PUBLISHED
6
+ * gate (`scripts/check-kygit-page-truth.mjs`) resolves the PUBLISHED
7
7
  * `run402` package, reads these flags out of the generated
8
- * `cli/gitvault-surface.json`, and fails the GitVault product page's build
8
+ * `cli/vault-surface.json`, and fails the KyGit product page's build
9
9
  * when a claim marker contradicts what is asserted here. It lives NEXT TO
10
10
  * `command-manifest.mjs` so the change that flips a capability (ships a
11
11
  * feature, retires a spelling) is the SAME change that flips the fact this
@@ -13,12 +13,12 @@
13
13
  * behavior and this file in the same change, never one without the other.
14
14
  */
15
15
 
16
- export const GITVAULT_CAPABILITIES = {
16
+ export const VAULT_CAPABILITIES = {
17
17
  // `repos access repair` / `repos access revoke-key` /
18
18
  // `repos access declare-exposure` (rev 42, D193-D203) drive a real epoch
19
19
  // rotation against the gateway — revocation is a live, shipped feature.
20
20
  revocation_live: true,
21
- // `Gitvault#reconcileEnvelopeRecipients` (gitvault-human-envelopes task
21
+ // `Repos#reconcileEnvelopeRecipients` (vault-human-envelopes task
22
22
  // 4.1's ADD-path workaround) runs automatically after every successful
23
23
  // `push()`/`deploy()` and wraps the vault's current epoch key to every org
24
24
  // member who has published an encryption key but has no `key_envelope` on
@@ -34,7 +34,7 @@ export const GITVAULT_CAPABILITIES = {
34
34
  // fail-closed before allocation; chain-copy dual-write; attested finalize
35
35
  // with `storage_verification: "client_attested"`; degraded reads from the
36
36
  // destination; fsck absence check) — shipped end to end in the same
37
- // change that flips this flag (gitvault-byo-primary-bucket, Phase 3).
37
+ // change that flips this flag (vault-byo-primary-bucket, Phase 3).
38
38
  byo_live: true,
39
39
  // `repos recover` materializes a git repository from a mirror source,
40
40
  // offline, with no server call.
@@ -42,15 +42,15 @@ export const GITVAULT_CAPABILITIES = {
42
42
  // `repos create` allocates the vault IMMEDIATELY — the moment the repo
43
43
  // starts existing — not lazily deferred to first push.
44
44
  allocation: "create_immediate",
45
- // `repos snapshot` refuses to capture a dirty working tree
45
+ // `repos capture` refuses to capture a dirty working tree
46
46
  // (`SNAPSHOT_DIRTY_TREE`) by default; `--allow-dirty` opts in explicitly.
47
- snapshot_dirty_default: "refuse",
47
+ capture_dirty_default: "refuse",
48
48
  // kygit-handoff (design D10): `repos handoff` / `repos resume` mint and
49
49
  // claim a real single-use bearer key against a live gateway route —
50
50
  // shipped, not aspirational.
51
51
  handoff_live: true,
52
52
  // `repos handoff` captures dirty work by DEFAULT (the opposite default
53
- // from `snapshot_dirty_default` above) — two verbs, two defaults, one
53
+ // from `capture_dirty_default` above) — two verbs, two defaults, one
54
54
  // capture path (design D1).
55
55
  handoff_dirty_default: "capture",
56
56
  // kygit-invite (design D10): `repos invite` / `repos join` mint and claim
@@ -59,8 +59,4 @@ export const GITVAULT_CAPABILITIES = {
59
59
  // while the inviter keeps working.
60
60
  invite_live: true,
61
61
  join_live: true,
62
- // Both remote door spellings resolve identically (design D8):
63
- // `run402::` (canonical, plumbing) and `kygit::` (rendered by
64
- // `@kychee/kygit` once it sets `RUN402_REMOTE_SCHEME=kygit`).
65
- remote_schemes: ["run402", "kygit"],
66
62
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Daemon process entry (gitvault-persistent-helper) — spawned detached by
2
+ * Daemon process entry (vault-persistent-helper) — spawned detached by
3
3
  * the thin client's fallback path; never invoked by users directly. Enables
4
4
  * the compile cache (the daemon compiles the heavy graph exactly once, so
5
5
  * this mostly benefits the NEXT daemon after an upgrade), then runs the
@@ -14,7 +14,7 @@ try {
14
14
  /* silent by contract */
15
15
  }
16
16
 
17
- const { runDaemon } = await import("./gitvault-daemon.mjs");
17
+ const { runDaemon } = await import("./vault-daemon.mjs");
18
18
  try {
19
19
  await runDaemon();
20
20
  } catch {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The resident helper engine (gitvault-persistent-helper D2–D6).
2
+ * The resident helper engine (vault-persistent-helper D2–D6).
3
3
  *
4
4
  * Holds the WARM things — the loaded session module (whose top-level await
5
5
  * pulls the whole SDK graph), the owned dispatcher's live h2 connection,
@@ -53,16 +53,16 @@ export async function runDaemon() {
53
53
  // Load the heavy module ONCE — this is the entire point of residency.
54
54
  // Its top-level await pulls the SDK graph; the prewarm dials the API
55
55
  // origin so the first forwarded session rides a warm h2 connection.
56
- const { prewarmGitvaultConnection, kickGitvaultConnection, predialGitvaultObjectStore } = await import("../sdk/dist/node/gitvault-prewarm.js");
57
- prewarmGitvaultConnection();
56
+ const { prewarmVaultConnection, kickVaultConnection, predialVaultObjectStore } = await import("../sdk/dist/node/vault-prewarm.js");
57
+ prewarmVaultConnection();
58
58
  const { runHelperSession } = await import("./remote-helper-session.mjs");
59
- // gitvault-object-host-predial task 2.2 — narrow, session-scoped imports
59
+ // vault-object-host-predial task 2.2 — narrow, session-scoped imports
60
60
  // (not the whole `#sdk/node` barrel) for the OFFLINE repo resolution the
61
61
  // session-accept predial needs: a local git subprocess (`rev-parse
62
62
  // --absolute-git-dir`) plus a local git-config read, never a network
63
63
  // call (design D6).
64
- const { resolveGitInvocationRepo } = await import("../sdk/dist/node/gitvault-snapshot.js");
65
- const { readPinnedGitvaultRepo } = await import("../sdk/dist/node/gitvault-address.js");
64
+ const { resolveGitInvocationRepo } = await import("../sdk/dist/node/vault-snapshot.js");
65
+ const { readPinnedVaultRepo } = await import("../sdk/dist/node/vault-address.js");
66
66
 
67
67
  const socketPath = daemonSocketPath();
68
68
  if (process.platform !== "win32") {
@@ -107,7 +107,7 @@ export async function runDaemon() {
107
107
  };
108
108
 
109
109
  /**
110
- * gitvault-checkpoint-cadence design D2: `session.backgroundWork` — set
110
+ * vault-checkpoint-cadence design D2: `session.backgroundWork` — set
111
111
  * by `onBackgroundWork` below when a push's auto-gc cycle was handed
112
112
  * off — is a promise this daemon keeps itself alive for BEFORE
113
113
  * restoring env/cwd/`busy`, even though the CLIENT already got its
@@ -176,22 +176,22 @@ export async function runDaemon() {
176
176
  socket.end();
177
177
  return;
178
178
  }
179
- // gitvault-first-op-premium (design point: pre-connect on session
179
+ // vault-first-op-premium (design point: pre-connect on session
180
180
  // accept). Git's own helper handshake (capabilities/list stdin
181
181
  // exchange) buys ~100-200ms of free overlap before the SESSION's
182
182
  // first real transport op — kick the owned dispatcher's connection
183
183
  // right now, before env/cwd swap even, so a dead/never-dialed
184
184
  // socket redials NOW instead of on the verb's critical path. The
185
- // NARROW half only (`kickGitvaultConnection`), never the full
186
- // `prewarmGitvaultConnection` — that also (re)warms the signer +
185
+ // NARROW half only (`kickVaultConnection`), never the full
186
+ // `prewarmVaultConnection` — that also (re)warms the signer +
187
187
  // paid-fetch buyer stack, which this daemon already warmed ONCE at
188
188
  // boot; re-running it per session was measured to cost an EXTRA
189
- // ~150-300ms/session (two live Base RPC probes a gitvault session
189
+ // ~150-300ms/session (two live Base RPC probes a vault session
190
190
  // never needs) for zero benefit. Fire-and-forget by contract
191
191
  // (never throws, never awaited, never delays a session).
192
192
  const acceptedAt = Date.now();
193
- kickGitvaultConnection();
194
- // gitvault-object-host-predial task 2.2 — the addressed repo's
193
+ kickVaultConnection();
194
+ // vault-object-host-predial task 2.2 — the addressed repo's
195
195
  // persisted object-store origin(s), predialed on the SAME
196
196
  // pre-connect timing as the API-origin kick above: resolved from
197
197
  // THIS session's OWN `msg.cwd`/`msg.env` (not `process.cwd()`/
@@ -199,7 +199,7 @@ export async function runDaemon() {
199
199
  // until the swap below runs) via the same offline, no-network
200
200
  // mechanism the session module itself uses once it takes over —
201
201
  // `resolveGitInvocationRepo` (a local `git rev-parse
202
- // --absolute-git-dir`) then `readPinnedGitvaultRepo` (a local
202
+ // --absolute-git-dir`) then `readPinnedVaultRepo` (a local
203
203
  // `git config --local` read). Any resolution failure (no
204
204
  // `GIT_DIR`, not a repository, no pin yet) predials nothing —
205
205
  // never a network read to learn where to predial (design D6),
@@ -207,8 +207,8 @@ export async function runDaemon() {
207
207
  void (async () => {
208
208
  try {
209
209
  const { repo_dir } = await resolveGitInvocationRepo(msg.env ?? {}, msg.cwd);
210
- const pinned = await readPinnedGitvaultRepo(repo_dir);
211
- if (pinned) predialGitvaultObjectStore(pinned.repo_id);
210
+ const pinned = await readPinnedVaultRepo(repo_dir);
211
+ if (pinned) predialVaultObjectStore(pinned.repo_id);
212
212
  } catch {
213
213
  /* best-effort: must never surface from session accept */
214
214
  }
@@ -258,18 +258,18 @@ export async function runDaemon() {
258
258
  };
259
259
  session = { stdin, restoreEnv, restoreCwd, restoreWrites, backgroundWork: null };
260
260
  send({ t: "ready" });
261
- // gitvault-first-op-premium task 1.1: phase stamps for attribution
261
+ // vault-first-op-premium task 1.1: phase stamps for attribution
262
262
  // (session accept -> env ready -> first transport call, the last
263
- // covered by the existing RUN402_GITVAULT_TRACE per-op lines).
263
+ // covered by the existing RUN402_VAULT_TRACE per-op lines).
264
264
  // Emitted AFTER write-redirection so they ride the socket to the
265
265
  // client and land in the SAME trace stream the bench harness
266
266
  // already captures — gated on the session's own env, exactly like
267
- // every other gitvault-trace line.
268
- if (process.env.RUN402_GITVAULT_TRACE === "1") {
269
- process.stderr.write(`gitvault-trace: daemon session-accept ${sessionsServed} at ${acceptedAt}\n`);
270
- process.stderr.write(`gitvault-trace: daemon env-ready ${sessionsServed} +${envReadyAt - acceptedAt}ms\n`);
267
+ // every other vault-trace line.
268
+ if (process.env.RUN402_VAULT_TRACE === "1") {
269
+ process.stderr.write(`vault-trace: daemon session-accept ${sessionsServed} at ${acceptedAt}\n`);
270
+ process.stderr.write(`vault-trace: daemon env-ready ${sessionsServed} +${envReadyAt - acceptedAt}ms\n`);
271
271
  }
272
- // gitvault-checkpoint-cadence design D2: a push's auto-gc cycle
272
+ // vault-checkpoint-cadence design D2: a push's auto-gc cycle
273
273
  // (if triggered) hands its ALREADY-STARTED promise here instead
274
274
  // of being awaited inline — `runHelperSession` itself still
275
275
  // resolves at push speed, so `exit`/`socket.end()` below reach
@@ -4,7 +4,7 @@
4
4
  * `run402 init`'s 5b block pioneered this pattern; this module is the same
5
5
  * additive-only, non-fatal-in-every-branch scaffold factored out so
6
6
  * `run402 up` and `run402 repos create` report through the IDENTICAL
7
- * `gitvault` / `gitvault_skipped` / `gitvault_error` summary keys `init`
7
+ * `vault` / `vault_skipped` / `vault_error` summary keys `init`
8
8
  * already uses (plus `status` / `reason` / `toplevel`), instead of
9
9
  * near-copies drifting apart. `projects provision` never scaffolds: it is
10
10
  * the provisioning primitive and has no local side effects. `init.mjs` itself is left untouched — its own scaffold block is
@@ -32,12 +32,12 @@ import { resolveOwningOrgId } from "./org-context.mjs";
32
32
  * @param {string} options.projectId The project the remote should point at.
33
33
  * @param {string} [options.orgId] Explicit owning org. Resolved via `resolveOwningOrgId` when omitted.
34
34
  * @param {boolean} [options.createRepoIfMissing] Opt into `git init`-ing `repoDir` when it is not a repository yet.
35
- * @param {boolean} [options.nested] Scaffold `repoDir` as its OWN repository even when it lies inside another one (`Gitvault.scaffoldRemote`'s `nested`).
35
+ * @param {boolean} [options.nested] Scaffold `repoDir` as its OWN repository even when it lies inside another one (`Repos.scaffoldRemote`'s `nested`).
36
36
  * @param {string} [options.nestedCommand] The caller's own `--nested` spelling for the `create_nested_repo` next_action (default: the SDK's `run402 repos create --nested --project <project_id>`).
37
- * @returns {Promise<{status: "scaffolded"|"skipped"|"error", reason?: string, toplevel?: string|null, next_actions?: object[], gitvault: object|null, gitvault_skipped?: string, gitvault_error?: {code: string, message: string}}>}
37
+ * @returns {Promise<{status: "scaffolded"|"skipped"|"error", reason?: string, toplevel?: string|null, next_actions?: object[], vault: object|null, vault_skipped?: string, vault_error?: {code: string, message: string}}>}
38
38
  */
39
- export async function scaffoldGitvaultRemote({ repoDir = process.cwd(), projectId, orgId, createRepoIfMissing = false, nested = false, nestedCommand } = {}) {
40
- const out = { gitvault: null, status: "skipped" };
39
+ export async function scaffoldVaultRemote({ repoDir = process.cwd(), projectId, orgId, createRepoIfMissing = false, nested = false, nestedCommand } = {}) {
40
+ const out = { vault: null, status: "skipped" };
41
41
  try {
42
42
  const { hardenedGit } = await import("#sdk/node");
43
43
  let insideRepo = true;
@@ -48,16 +48,16 @@ export async function scaffoldGitvaultRemote({ repoDir = process.cwd(), projectI
48
48
  }
49
49
  if (!insideRepo && !createRepoIfMissing) {
50
50
  out.reason = "not_a_repository";
51
- out.gitvault_skipped = "not a git repository — re-run with --git-remote to create one and add the remote";
51
+ out.vault_skipped = "not a git repository — re-run with --git-remote to create one and add the remote";
52
52
  return out;
53
53
  }
54
54
  const resolvedOrgId = orgId ?? (await resolveOwningOrgId(projectId));
55
55
  if (!resolvedOrgId) {
56
56
  out.reason = "org_unresolved";
57
- out.gitvault_skipped = `could not resolve the owning org for ${projectId} — the run402 remote was not added`;
57
+ out.vault_skipped = `could not resolve the owning org for ${projectId} — the run402 remote was not added`;
58
58
  return out;
59
59
  }
60
- const remote = await getSdk().gitvault.scaffoldRemote({ repo_dir: repoDir, org_id: resolvedOrgId, project_id: projectId, ...(nested ? { nested: true } : {}) });
60
+ const remote = await getSdk().repos.scaffoldRemote({ repo_dir: repoDir, org_id: resolvedOrgId, project_id: projectId, ...(nested ? { nested: true } : {}) });
61
61
  if (remote.status === "skipped") {
62
62
  // The app root lies INSIDE some other repository (first-deploy-agent-dx
63
63
  // D3): that repository is never touched. Say which one, why, and the
@@ -66,7 +66,7 @@ export async function scaffoldGitvaultRemote({ repoDir = process.cwd(), projectI
66
66
  // --nested`), so the command printed is the one the agent just ran.
67
67
  out.reason = "inside_other_repository";
68
68
  out.toplevel = remote.toplevel ?? null;
69
- out.gitvault_skipped = remote.reason;
69
+ out.vault_skipped = remote.reason;
70
70
  out.next_actions = (remote.next_actions ?? []).map((action) =>
71
71
  action.type === "create_nested_repo" && nestedCommand ? { ...action, command: nestedCommand } : action,
72
72
  );
@@ -76,11 +76,11 @@ export async function scaffoldGitvaultRemote({ repoDir = process.cwd(), projectI
76
76
  // git only — no vault exists for the project yet (allocation happens
77
77
  // lazily on first push, or explicitly via `run402 repos create --project <project_id>`).
78
78
  out.status = "scaffolded";
79
- out.gitvault = { ...remote, allocated: false };
79
+ out.vault = { ...remote, allocated: false };
80
80
  } catch (err) {
81
- out.gitvault = null;
81
+ out.vault = null;
82
82
  out.status = "error";
83
- out.gitvault_error = { code: err?.body?.code ?? err?.code ?? "GITVAULT_SCAFFOLD_FAILED", message: err?.message ?? String(err) };
83
+ out.vault_error = { code: err?.body?.code ?? err?.code ?? "VAULT_SCAFFOLD_FAILED", message: err?.message ?? String(err) };
84
84
  }
85
85
  return out;
86
86
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Shared "which vault does this repo mean" resolution for `run402 gitvault`
3
- * and `run402 doctor`'s gitvault check. When a verb runs standing inside a
2
+ * Shared "which vault does this repo mean" resolution for `run402 repos`
3
+ * and `run402 doctor`'s vault check. When a verb runs standing inside a
4
4
  * repository that already names its own vault via a pinned repo id or a
5
5
  * run402/origin remote, targeting prefers that repo over the active-project
6
6
  * pointer — git muscle memory says a command run inside a repo acts on THAT
@@ -25,9 +25,9 @@
25
25
  * and 5 apply.
26
26
  *
27
27
  * ARCHITECTURAL NOTE: this is CLI-edge policy (which flag/env/file wins),
28
- * not gitvault protocol behavior — the same class of concern
28
+ * not vault protocol behavior — the same class of concern
29
29
  * `wallet-context.mjs` owns for wallet selection. The protocol reads it
30
- * composes (`readPinnedGitvaultRepo`, `resolveAddress`) already live once in
30
+ * composes (`readPinnedVaultRepo`, `resolveAddress`) already live once in
31
31
  * the SDK; this module adds no protocol logic of its own.
32
32
  */
33
33
  import { getActiveProjectId } from "./config.mjs";
@@ -35,12 +35,12 @@ import { getActiveProjectId } from "./config.mjs";
35
35
  /**
36
36
  * Tiers 4/5 (RUN402_PROJECT_ID env, then the active project) — deliberately
37
37
  * NON-throwing, unlike `config.mjs#resolveProjectId`. `run402 doctor`'s
38
- * gitvault check needs to report "skipped" gracefully when nothing resolves
38
+ * vault check needs to report "skipped" gracefully when nothing resolves
39
39
  * anywhere (its pre-existing, tested behavior); a `fail()`-triggered
40
40
  * `process.exit()` here would abort doctor's ENTIRE report, not just this
41
41
  * one check. Callers that DO want the historical PROJECT_REQUIRED failure
42
- * (gitvault.mjs's own verbs) get it by falling back to `resolveProjectId`
43
- * themselves when this returns `null` — see `vaultTarget` in gitvault.mjs.
42
+ * (vault.mjs's own verbs) get it by falling back to `resolveProjectId`
43
+ * themselves when this returns `null` — see `vaultTarget` in vault.mjs.
44
44
  */
45
45
  function envOrActiveProjectId() {
46
46
  return (process.env.RUN402_PROJECT_ID || "").trim() || getActiveProjectId() || null;
@@ -63,14 +63,14 @@ async function isInsideGitRepo(repoDir) {
63
63
  * repository at all, or (slug-form only) the remote fails to resolve over
64
64
  * the network — a miss here is always ordinary, never thrown.
65
65
  */
66
- export async function repoOwnGitvaultTarget(repoDir) {
66
+ export async function repoOwnVaultTarget(repoDir) {
67
67
  if (!(await isInsideGitRepo(repoDir))) return null;
68
68
 
69
- const { hardenedGit, readPinnedGitvaultRepo } = await import("#sdk/node");
70
- const pinned = await readPinnedGitvaultRepo(repoDir);
69
+ const { hardenedGit, readPinnedVaultRepo } = await import("#sdk/node");
70
+ const pinned = await readPinnedVaultRepo(repoDir);
71
71
  if (pinned) return { repo_id: pinned.repo_id, project_id: null, source: "pin" };
72
72
 
73
- const { parseGitvaultRemoteUrl, gitvaultRemoteAddressForm } = await import("#sdk");
73
+ const { parseVaultRemoteUrl, vaultRemoteAddressForm } = await import("#sdk");
74
74
  for (const name of ["run402", "origin"]) {
75
75
  let url;
76
76
  try {
@@ -79,16 +79,21 @@ export async function repoOwnGitvaultTarget(repoDir) {
79
79
  continue; // no such remote — try the other conventional name
80
80
  }
81
81
  if (!url) continue;
82
- const address = parseGitvaultRemoteUrl(url);
82
+ let address;
83
+ try {
84
+ address = parseVaultRemoteUrl(url);
85
+ } catch {
86
+ continue; // another scheme's remote — not a vault address
87
+ }
83
88
  if (!address) continue; // exists, but isn't a run402 address — try the other name
84
- if (gitvaultRemoteAddressForm(address) === "id") {
89
+ if (vaultRemoteAddressForm(address) === "id") {
85
90
  // id-form already carries both halves in the address string — no
86
91
  // network read needed at all.
87
92
  return { repo_id: null, project_id: address.project_id, source: "remote", remote_name: name };
88
93
  }
89
94
  try {
90
95
  const { getSdk } = await import("./sdk.mjs");
91
- const resolved = await getSdk().gitvault.resolveAddress(address);
96
+ const resolved = await getSdk().repos.resolveAddress(address);
92
97
  return { repo_id: resolved.repo_id, project_id: resolved.project_id, source: "remote", remote_name: name };
93
98
  } catch {
94
99
  // Offline, SLUG_RELEASED, not-found, ... — nothing to target from this
@@ -100,7 +105,7 @@ export async function repoOwnGitvaultTarget(repoDir) {
100
105
  }
101
106
 
102
107
  /**
103
- * Resolve `{ repo_id?, project_id? }` for a gitvault verb that addresses a
108
+ * Resolve `{ repo_id?, project_id? }` for a vault verb that addresses a
104
109
  * vault the same way `--repo`/`--project` already do — pin beats remote
105
110
  * beats env beats active project, an explicit flag beats all of them.
106
111
  * `explicitProjectId`/`explicitRepoId` are the already-parsed flag values
@@ -114,14 +119,14 @@ export async function repoOwnGitvaultTarget(repoDir) {
114
119
  * only `--project` is checked against it — matching the task's own wording
115
120
  * ("a mismatch between an explicit flag and the repo's remote").
116
121
  */
117
- export async function resolveGitvaultTarget({
122
+ export async function resolveVaultTarget({
118
123
  repoDir = process.cwd(),
119
124
  explicitProjectId,
120
125
  explicitRepoId,
121
126
  warn = (line) => console.error(line),
122
127
  } = {}) {
123
128
  const needsOwn = explicitRepoId == null || explicitProjectId == null;
124
- const own = needsOwn ? await repoOwnGitvaultTarget(repoDir) : null;
129
+ const own = needsOwn ? await repoOwnVaultTarget(repoDir) : null;
125
130
 
126
131
  if (explicitRepoId != null && own?.source === "pin" && own.repo_id !== explicitRepoId) {
127
132
  warn(`warning: --repo ${explicitRepoId} does not match this repo's pinned vault ${own.repo_id} — using --repo ${explicitRepoId}.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.95.0",
3
+ "version": "4.97.0",
4
4
  "description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "fixtures/",
22
22
  "core-dist/",
23
23
  "sdk/",
24
- "gitvault-surface.json"
24
+ "vault-surface.json"
25
25
  ],
26
26
  "dependencies": {
27
27
  "@hpke/chacha20poly1305": "^1.8.0",
@@ -190,7 +190,7 @@ export function removeProject(projectId, path) {
190
190
  * bucket, not "unknown") and PERMANENTLY shadows every later wallet-scoped
191
191
  * activation for every caller that reads through this module: `resolveProjectId`
192
192
  * / `resolveProject` (cli/lib/config.mjs), `projects current`, and every
193
- * gitvault-verb target resolution. The failure it causes: `repos create`
193
+ * vault-verb target resolution. The failure it causes: `repos create`
194
194
  * calls `projects.provision`, whose `creds.setActiveProject` correctly
195
195
  * persists the new project under the real wallet's scoped bucket AND the
196
196
  * flat fallback, yet every CLI read of "the active project" resolves the
@@ -120,7 +120,7 @@ export declare class ProjectNotFound extends Run402Error {
120
120
  * `NOT_AUTHORIZED`, `STEP_UP_REQUIRED`) — since 402 is reserved for
121
121
  * genuine payment challenges, this now also covers non-payment 403 denials
122
122
  * such as quota (`QUOTA_EXCEEDED`), lifecycle (`PROJECT_FROZEN` /
123
- * `PROJECT_DORMANT`), and delegate spend-cap denials. Check `body.code` (or
123
+ * `PROJECT_DORMANT`), and grant-key spend-cap denials. Check `body.code` (or
124
124
  * use `formatCanonicalErrorContext`-style parsing) to distinguish these
125
125
  * from a true auth failure.
126
126
  */
@@ -340,19 +340,19 @@ export declare class TransferFreezeError extends Run402Error {
340
340
  * name was not claimed). `push_repo`, `verify_refs`, `submit_gc`,
341
341
  * `use_moved_command`, and `access_repair_pending` are repo-surface-
342
342
  * consolidation's own additions — see `cli/lib/repos.mjs` for where each is
343
- * emitted. `configure_mirror` (gitvault-mirror-default) rides `repos create`'s
343
+ * emitted. `configure_mirror` (vault-mirror-default) rides `repos create`'s
344
344
  * result beside the recovery receipt — the customer-owned mirror taught at
345
- * vault birth. `sync_writers` / `request_writer_sync` (gitvault-multi-writer
345
+ * vault birth. `sync_writers` / `request_writer_sync` (vault-multi-writer
346
346
  * rev 47, D10) are the writer dimension's own pair — `sync_writers` rides
347
347
  * `POST /orgs/v1/:org_id/members`'s own gateway response (the caller's next
348
348
  * `orgs members add`/`repos access sync` admits a just-added member as a
349
349
  * writer on every vault it can reach); `request_writer_sync` is CLIENT-
350
- * constructed (`GitvaultVault#assertCallerIsWriter`, task 5.8) when a local
350
+ * constructed (`Vault#assertCallerIsWriter`, task 5.8) when a local
351
351
  * push pre-check refuses because this session's own key is not (or is no
352
352
  * longer) an admitted writer.
353
353
  * Tolerates unknown future gateway types via the `(string & {})` fallback.
354
354
  */
355
- export type NextActionType = "retry" | "poll" | "reconcile_payment" | "authenticate" | "submit_payment" | "renew_tier" | "check_usage" | "resume_deploy" | "edit_request" | "edit_migration" | "create_project" | "initialize_wallet" | "deploy" | "approve_write" | "hand_to_member" | "register_contact" | "contact_staff" | "contact_support" | "gitvault_policy_required" | "set_org_slug" | "set_repo_name" | "push_repo" | "create_nested_repo" | "verify_refs" | "submit_gc" | "use_moved_command" | "access_repair_pending" | "configure_mirror" | "resume_handoff" | "revoke_handoff" | "remove_member" | "sync_writers" | "request_writer_sync" | "join_invite" | "revoke_invite" | "wait_room" | "send_room_message" | "create_manifest" | "create_file" | "check_manifest" | "run_in_directory" | "commit_changes" | "add_subdomain";
355
+ export type NextActionType = "retry" | "poll" | "reconcile_payment" | "authenticate" | "submit_payment" | "renew_tier" | "check_usage" | "resume_deploy" | "edit_request" | "edit_migration" | "create_project" | "initialize_wallet" | "deploy" | "approve_write" | "hand_to_member" | "register_contact" | "contact_staff" | "contact_support" | "vault_policy_required" | "set_org_slug" | "set_repo_name" | "push_repo" | "create_nested_repo" | "verify_refs" | "submit_gc" | "use_moved_command" | "access_repair_pending" | "configure_mirror" | "resume_handoff" | "revoke_handoff" | "remove_member" | "sync_writers" | "request_writer_sync" | "join_invite" | "revoke_invite" | "wait_room" | "send_room_message" | "create_manifest" | "create_file" | "check_manifest" | "run_in_directory" | "commit_changes" | "add_subdomain";
356
356
  /**
357
357
  * A single advisory "what to do next" entry. Mirrors the gateway's
358
358
  * `next_actions[]` shape (`{ type, method?, path?, auth?, why? }`) extended with