run402-mcp 4.93.1 → 4.94.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 (438) hide show
  1. package/README.md +75 -73
  2. package/core/dist/config.d.ts +16 -2
  3. package/core/dist/config.d.ts.map +1 -1
  4. package/core/dist/config.js +52 -18
  5. package/core/dist/config.js.map +1 -1
  6. package/core/dist/control-plane-session.d.ts +29 -14
  7. package/core/dist/control-plane-session.d.ts.map +1 -1
  8. package/core/dist/control-plane-session.js +31 -6
  9. package/core/dist/control-plane-session.js.map +1 -1
  10. package/core/dist/keystore.js +7 -7
  11. package/core/dist/keystore.js.map +1 -1
  12. package/core/dist/profiles.d.ts +3 -3
  13. package/core/dist/profiles.d.ts.map +1 -1
  14. package/core/dist/profiles.js +9 -7
  15. package/core/dist/profiles.js.map +1 -1
  16. package/core/dist/{allowance-auth.d.ts → wallet-auth.d.ts} +6 -6
  17. package/core/dist/wallet-auth.d.ts.map +1 -0
  18. package/{sdk/core-dist/allowance-auth.js → core/dist/wallet-auth.js} +15 -15
  19. package/core/dist/wallet-auth.js.map +1 -0
  20. package/core/dist/wallet.d.ts +22 -0
  21. package/core/dist/wallet.d.ts.map +1 -0
  22. package/core/dist/{allowance.js → wallet.js} +20 -20
  23. package/core/dist/wallet.js.map +1 -0
  24. package/core/dist/{write-auth-session.d.ts → write-approvals.d.ts} +28 -26
  25. package/core/dist/write-approvals.d.ts.map +1 -0
  26. package/{sdk/core-dist/write-auth-session.js → core/dist/write-approvals.js} +19 -19
  27. package/core/dist/write-approvals.js.map +1 -0
  28. package/dist/config.d.ts +1 -1
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/config.js +1 -1
  31. package/dist/config.js.map +1 -1
  32. package/dist/errors.d.ts.map +1 -1
  33. package/dist/errors.js +14 -9
  34. package/dist/errors.js.map +1 -1
  35. package/dist/format-bytes.d.ts +2 -0
  36. package/dist/format-bytes.d.ts.map +1 -0
  37. package/dist/format-bytes.js +24 -0
  38. package/dist/format-bytes.js.map +1 -0
  39. package/dist/index.js +66 -63
  40. package/dist/index.js.map +1 -1
  41. package/dist/sdk.js +2 -2
  42. package/dist/sdk.js.map +1 -1
  43. package/dist/tool-profiles.d.ts +6 -6
  44. package/dist/tool-profiles.d.ts.map +1 -1
  45. package/dist/tool-profiles.js +11 -11
  46. package/dist/tool-profiles.js.map +1 -1
  47. package/dist/tools/admin-reactivate-project.js +1 -1
  48. package/dist/tools/admin-reactivate-project.js.map +1 -1
  49. package/dist/tools/admin-set-lease-perpetual.js +1 -1
  50. package/dist/tools/admin-set-lease-perpetual.js.map +1 -1
  51. package/dist/tools/check-balance.js +4 -4
  52. package/dist/tools/check-balance.js.map +1 -1
  53. package/dist/tools/ci.js +1 -1
  54. package/dist/tools/ci.js.map +1 -1
  55. package/dist/tools/create-email-organization.js +1 -1
  56. package/dist/tools/create-email-organization.js.map +1 -1
  57. package/dist/tools/create-notification-rule.js +3 -3
  58. package/dist/tools/create-notification-rule.js.map +1 -1
  59. package/dist/tools/delete-notification-rule.js +2 -2
  60. package/dist/tools/delete-notification-rule.js.map +1 -1
  61. package/dist/tools/deploy-events.js +2 -2
  62. package/dist/tools/deploy-events.js.map +1 -1
  63. package/dist/tools/deploy-list.js +2 -2
  64. package/dist/tools/deploy-list.js.map +1 -1
  65. package/dist/tools/deploy-rehearse.js +2 -2
  66. package/dist/tools/deploy-rehearse.js.map +1 -1
  67. package/dist/tools/{deploy-release.d.ts → deploy-releases.d.ts} +9 -9
  68. package/dist/tools/deploy-releases.d.ts.map +1 -0
  69. package/dist/tools/{deploy-release.js → deploy-releases.js} +9 -9
  70. package/dist/tools/deploy-releases.js.map +1 -0
  71. package/dist/tools/{deploy-diagnose-url.d.ts → deploy-resolve.d.ts} +4 -4
  72. package/dist/tools/deploy-resolve.d.ts.map +1 -0
  73. package/dist/tools/{deploy-diagnose-url.js → deploy-resolve.js} +6 -6
  74. package/dist/tools/deploy-resolve.js.map +1 -0
  75. package/dist/tools/deploy-resume.js +2 -2
  76. package/dist/tools/deploy-resume.js.map +1 -1
  77. package/dist/tools/deploy-site-dir.js +2 -2
  78. package/dist/tools/deploy-site-dir.js.map +1 -1
  79. package/dist/tools/deploy-site.js +2 -2
  80. package/dist/tools/deploy-site.js.map +1 -1
  81. package/dist/tools/deploy-verify-edge.js +2 -2
  82. package/dist/tools/deploy-verify-edge.js.map +1 -1
  83. package/dist/tools/deploy.js +3 -3
  84. package/dist/tools/deploy.js.map +1 -1
  85. package/dist/tools/fork-app.js +2 -2
  86. package/dist/tools/fork-app.js.map +1 -1
  87. package/dist/tools/generate-image.js +5 -5
  88. package/dist/tools/generate-image.js.map +1 -1
  89. package/dist/tools/get-agent-contact-status.js +2 -2
  90. package/dist/tools/get-agent-contact-status.js.map +1 -1
  91. package/dist/tools/get-notification-preferences.js +2 -2
  92. package/dist/tools/get-notification-preferences.js.map +1 -1
  93. package/dist/tools/get-quote.js +3 -3
  94. package/dist/tools/get-quote.js.map +1 -1
  95. package/dist/tools/get-room.d.ts +20 -0
  96. package/dist/tools/get-room.d.ts.map +1 -0
  97. package/dist/tools/get-room.js +25 -0
  98. package/dist/tools/get-room.js.map +1 -0
  99. package/dist/tools/get-usage.d.ts.map +1 -1
  100. package/dist/tools/get-usage.js +4 -3
  101. package/dist/tools/get-usage.js.map +1 -1
  102. package/dist/tools/init.js +36 -36
  103. package/dist/tools/init.js.map +1 -1
  104. package/dist/tools/leave-room.d.ts +22 -0
  105. package/dist/tools/leave-room.d.ts.map +1 -0
  106. package/dist/tools/leave-room.js +40 -0
  107. package/dist/tools/leave-room.js.map +1 -0
  108. package/dist/tools/lightning-topup.js +1 -1
  109. package/dist/tools/lightning-topup.js.map +1 -1
  110. package/dist/tools/lightning-wallet.d.ts +2 -2
  111. package/dist/tools/lightning-wallet.js +9 -9
  112. package/dist/tools/lightning-wallet.js.map +1 -1
  113. package/dist/tools/link-wallet-to-organization.d.ts.map +1 -1
  114. package/dist/tools/link-wallet-to-organization.js +4 -3
  115. package/dist/tools/link-wallet-to-organization.js.map +1 -1
  116. package/dist/tools/list-notification-channels.js +2 -2
  117. package/dist/tools/list-notification-channels.js.map +1 -1
  118. package/dist/tools/list-notification-rules.js +2 -2
  119. package/dist/tools/list-notification-rules.js.map +1 -1
  120. package/dist/tools/list-notifications.js +2 -2
  121. package/dist/tools/list-notifications.js.map +1 -1
  122. package/dist/tools/list-projects.js +1 -1
  123. package/dist/tools/list-projects.js.map +1 -1
  124. package/dist/tools/list-rooms.d.ts +18 -0
  125. package/dist/tools/list-rooms.d.ts.map +1 -0
  126. package/dist/tools/list-rooms.js +28 -0
  127. package/dist/tools/list-rooms.js.map +1 -0
  128. package/dist/tools/list-subdomains.js +1 -1
  129. package/dist/tools/list-subdomains.js.map +1 -1
  130. package/dist/tools/orgs.d.ts +4 -4
  131. package/dist/tools/orgs.d.ts.map +1 -1
  132. package/dist/tools/orgs.js +28 -7
  133. package/dist/tools/orgs.js.map +1 -1
  134. package/dist/tools/provision-signer.js +1 -1
  135. package/dist/tools/provision-signer.js.map +1 -1
  136. package/dist/tools/provision.js +3 -3
  137. package/dist/tools/provision.js.map +1 -1
  138. package/dist/tools/redeem-voucher.js +5 -5
  139. package/dist/tools/redeem-voucher.js.map +1 -1
  140. package/dist/tools/request-faucet.js +9 -9
  141. package/dist/tools/request-faucet.js.map +1 -1
  142. package/dist/tools/rotate-webhook-secret.js +2 -2
  143. package/dist/tools/rotate-webhook-secret.js.map +1 -1
  144. package/dist/tools/send-feedback.js +3 -3
  145. package/dist/tools/send-feedback.js.map +1 -1
  146. package/dist/tools/set-agent-contact.js +2 -2
  147. package/dist/tools/set-agent-contact.js.map +1 -1
  148. package/dist/tools/set-notification-preferences.js +3 -3
  149. package/dist/tools/set-notification-preferences.js.map +1 -1
  150. package/dist/tools/start-contact-passkey-enrollment.d.ts +9 -0
  151. package/dist/tools/start-contact-passkey-enrollment.d.ts.map +1 -0
  152. package/dist/tools/start-contact-passkey-enrollment.js +18 -0
  153. package/dist/tools/start-contact-passkey-enrollment.js.map +1 -0
  154. package/dist/tools/status.d.ts.map +1 -1
  155. package/dist/tools/status.js +17 -16
  156. package/dist/tools/status.js.map +1 -1
  157. package/dist/tools/subdomain.d.ts +2 -2
  158. package/dist/tools/subdomain.d.ts.map +1 -1
  159. package/dist/tools/subdomain.js +4 -4
  160. package/dist/tools/subdomain.js.map +1 -1
  161. package/dist/tools/test-notification.js +2 -2
  162. package/dist/tools/test-notification.js.map +1 -1
  163. package/dist/tools/{set-tier.d.ts → tier-set.d.ts} +3 -3
  164. package/dist/tools/{set-tier.d.ts.map → tier-set.d.ts.map} +1 -1
  165. package/dist/tools/{set-tier.js → tier-set.js} +14 -8
  166. package/dist/tools/tier-set.js.map +1 -0
  167. package/dist/tools/tier-status.d.ts.map +1 -1
  168. package/dist/tools/tier-status.js +6 -4
  169. package/dist/tools/tier-status.js.map +1 -1
  170. package/dist/tools/transfers.d.ts +9 -15
  171. package/dist/tools/transfers.d.ts.map +1 -1
  172. package/dist/tools/transfers.js +39 -53
  173. package/dist/tools/transfers.js.map +1 -1
  174. package/dist/tools/{app-up.d.ts → up.d.ts} +3 -3
  175. package/dist/tools/up.d.ts.map +1 -0
  176. package/dist/tools/{app-up.js → up.js} +6 -6
  177. package/dist/tools/up.js.map +1 -0
  178. package/dist/tools/verify-agent-contact-email.js +2 -2
  179. package/dist/tools/verify-agent-contact-email.js.map +1 -1
  180. package/dist/tools/wallet-create.d.ts +9 -0
  181. package/dist/tools/wallet-create.d.ts.map +1 -0
  182. package/dist/tools/{allowance-create.js → wallet-create.js} +8 -8
  183. package/dist/tools/wallet-create.js.map +1 -0
  184. package/dist/tools/wallet-export.d.ts +9 -0
  185. package/dist/tools/wallet-export.d.ts.map +1 -0
  186. package/dist/tools/{allowance-export.js → wallet-export.js} +6 -6
  187. package/dist/tools/wallet-export.js.map +1 -0
  188. package/dist/tools/wallet-status.d.ts +9 -0
  189. package/dist/tools/wallet-status.d.ts.map +1 -0
  190. package/dist/tools/wallet-status.js +33 -0
  191. package/dist/tools/wallet-status.js.map +1 -0
  192. package/dist/wallet-auth.d.ts +21 -0
  193. package/dist/wallet-auth.d.ts.map +1 -0
  194. package/dist/wallet-auth.js +32 -0
  195. package/dist/wallet-auth.js.map +1 -0
  196. package/dist/wallet.d.ts +3 -0
  197. package/dist/wallet.d.ts.map +1 -0
  198. package/dist/wallet.js +2 -0
  199. package/dist/wallet.js.map +1 -0
  200. package/package.json +3 -3
  201. package/sdk/README.md +21 -19
  202. package/sdk/core-dist/config.d.ts +16 -2
  203. package/sdk/core-dist/config.js +52 -18
  204. package/sdk/core-dist/control-plane-session.d.ts +29 -14
  205. package/sdk/core-dist/control-plane-session.js +31 -6
  206. package/sdk/core-dist/keystore.js +7 -7
  207. package/sdk/core-dist/profiles.d.ts +3 -3
  208. package/sdk/core-dist/profiles.js +9 -7
  209. package/sdk/core-dist/{allowance-auth.d.ts → wallet-auth.d.ts} +6 -6
  210. package/{core/dist/allowance-auth.js → sdk/core-dist/wallet-auth.js} +15 -15
  211. package/sdk/core-dist/wallet.d.ts +22 -0
  212. package/sdk/core-dist/{allowance.js → wallet.js} +20 -20
  213. package/sdk/core-dist/{write-auth-session.d.ts → write-approvals.d.ts} +28 -26
  214. package/{core/dist/write-auth-session.js → sdk/core-dist/write-approvals.js} +19 -19
  215. package/sdk/dist/actions.d.ts +1 -1
  216. package/sdk/dist/actions.d.ts.map +1 -1
  217. package/sdk/dist/control-plane-credentials.d.ts +8 -8
  218. package/sdk/dist/control-plane-credentials.js +7 -7
  219. package/sdk/dist/credentials.d.ts +19 -19
  220. package/sdk/dist/credentials.d.ts.map +1 -1
  221. package/sdk/dist/credentials.js +1 -1
  222. package/sdk/dist/errors.d.ts +24 -26
  223. package/sdk/dist/errors.d.ts.map +1 -1
  224. package/sdk/dist/errors.js +34 -37
  225. package/sdk/dist/errors.js.map +1 -1
  226. package/sdk/dist/index.d.ts +29 -16
  227. package/sdk/dist/index.d.ts.map +1 -1
  228. package/sdk/dist/index.js +29 -16
  229. package/sdk/dist/index.js.map +1 -1
  230. package/sdk/dist/kernel.d.ts +1 -1
  231. package/sdk/dist/kernel.d.ts.map +1 -1
  232. package/sdk/dist/kernel.js +10 -9
  233. package/sdk/dist/kernel.js.map +1 -1
  234. package/sdk/dist/namespaces/admin.d.ts +51 -120
  235. package/sdk/dist/namespaces/admin.d.ts.map +1 -1
  236. package/sdk/dist/namespaces/admin.js +41 -45
  237. package/sdk/dist/namespaces/admin.js.map +1 -1
  238. package/sdk/dist/namespaces/agent.d.ts +2 -2
  239. package/sdk/dist/namespaces/agent.d.ts.map +1 -1
  240. package/sdk/dist/namespaces/agent.js +2 -2
  241. package/sdk/dist/namespaces/agent.js.map +1 -1
  242. package/sdk/dist/namespaces/ai.d.ts +1 -1
  243. package/sdk/dist/namespaces/ai.js +1 -1
  244. package/sdk/dist/namespaces/billing.d.ts +6 -3
  245. package/sdk/dist/namespaces/billing.d.ts.map +1 -1
  246. package/sdk/dist/namespaces/billing.js.map +1 -1
  247. package/sdk/dist/namespaces/buzz-notifications.types.d.ts +1 -1
  248. package/sdk/dist/namespaces/buzz.d.ts +2 -2
  249. package/sdk/dist/namespaces/buzz.d.ts.map +1 -1
  250. package/sdk/dist/namespaces/buzz.js +2 -2
  251. package/sdk/dist/namespaces/buzz.js.map +1 -1
  252. package/sdk/dist/namespaces/buzz.types.d.ts +2 -2
  253. package/sdk/dist/namespaces/buzz.types.d.ts.map +1 -1
  254. package/sdk/dist/namespaces/credentials.types.d.ts +1 -1
  255. package/sdk/dist/namespaces/deploy.d.ts +1 -1
  256. package/sdk/dist/namespaces/deploy.js +5 -5
  257. package/sdk/dist/namespaces/deploy.js.map +1 -1
  258. package/sdk/dist/namespaces/deploy.types.d.ts +4 -4
  259. package/sdk/dist/namespaces/escalations.d.ts +1 -1
  260. package/sdk/dist/namespaces/escalations.js +1 -1
  261. package/sdk/dist/namespaces/escalations.types.d.ts +2 -2
  262. package/sdk/dist/namespaces/escalations.types.d.ts.map +1 -1
  263. package/sdk/dist/namespaces/events.types.d.ts +1 -1
  264. package/sdk/dist/namespaces/functions.d.ts +1 -1
  265. package/sdk/dist/namespaces/functions.js +1 -1
  266. package/sdk/dist/namespaces/gitvault.crypto.d.ts +1 -1
  267. package/sdk/dist/namespaces/gitvault.d.ts +24 -24
  268. package/sdk/dist/namespaces/gitvault.d.ts.map +1 -1
  269. package/sdk/dist/namespaces/gitvault.js +109 -109
  270. package/sdk/dist/namespaces/gitvault.js.map +1 -1
  271. package/sdk/dist/namespaces/me.d.ts +120 -0
  272. package/sdk/dist/namespaces/me.d.ts.map +1 -0
  273. package/sdk/dist/namespaces/me.js +34 -0
  274. package/sdk/dist/namespaces/me.js.map +1 -0
  275. package/sdk/dist/namespaces/org.d.ts +108 -6
  276. package/sdk/dist/namespaces/org.d.ts.map +1 -1
  277. package/sdk/dist/namespaces/org.js +63 -7
  278. package/sdk/dist/namespaces/org.js.map +1 -1
  279. package/sdk/dist/namespaces/org.types.d.ts +29 -9
  280. package/sdk/dist/namespaces/org.types.d.ts.map +1 -1
  281. package/sdk/dist/namespaces/pay.js +3 -3
  282. package/sdk/dist/namespaces/pay.js.map +1 -1
  283. package/sdk/dist/namespaces/projects.d.ts +9 -9
  284. package/sdk/dist/namespaces/projects.js +15 -15
  285. package/sdk/dist/namespaces/projects.js.map +1 -1
  286. package/sdk/dist/namespaces/projects.types.d.ts +28 -12
  287. package/sdk/dist/namespaces/projects.types.d.ts.map +1 -1
  288. package/sdk/dist/namespaces/rooms.d.ts +7 -7
  289. package/sdk/dist/namespaces/rooms.js +17 -17
  290. package/sdk/dist/namespaces/rooms.js.map +1 -1
  291. package/sdk/dist/namespaces/rooms.types.d.ts +9 -9
  292. package/sdk/dist/namespaces/rooms.types.d.ts.map +1 -1
  293. package/sdk/dist/namespaces/service.d.ts +1 -1
  294. package/sdk/dist/namespaces/service.js +1 -1
  295. package/sdk/dist/namespaces/{operator-session.d.ts → session.d.ts} +135 -51
  296. package/sdk/dist/namespaces/session.d.ts.map +1 -0
  297. package/sdk/dist/namespaces/{operator-session.js → session.js} +118 -30
  298. package/sdk/dist/namespaces/session.js.map +1 -0
  299. package/sdk/dist/namespaces/subdomains.d.ts +5 -5
  300. package/sdk/dist/namespaces/subdomains.d.ts.map +1 -1
  301. package/sdk/dist/namespaces/subdomains.js +6 -6
  302. package/sdk/dist/namespaces/subdomains.js.map +1 -1
  303. package/sdk/dist/namespaces/tier.d.ts +43 -20
  304. package/sdk/dist/namespaces/tier.d.ts.map +1 -1
  305. package/sdk/dist/namespaces/tier.js +7 -7
  306. package/sdk/dist/namespaces/tier.js.map +1 -1
  307. package/sdk/dist/namespaces/transfers.d.ts +74 -71
  308. package/sdk/dist/namespaces/transfers.d.ts.map +1 -1
  309. package/sdk/dist/namespaces/transfers.js +31 -38
  310. package/sdk/dist/namespaces/transfers.js.map +1 -1
  311. package/sdk/dist/namespaces/vouchers.d.ts +9 -10
  312. package/sdk/dist/namespaces/vouchers.d.ts.map +1 -1
  313. package/sdk/dist/namespaces/vouchers.js +4 -5
  314. package/sdk/dist/namespaces/vouchers.js.map +1 -1
  315. package/sdk/dist/namespaces/wallets.d.ts +72 -3
  316. package/sdk/dist/namespaces/wallets.d.ts.map +1 -1
  317. package/sdk/dist/namespaces/wallets.js +141 -3
  318. package/sdk/dist/namespaces/wallets.js.map +1 -1
  319. package/sdk/dist/namespaces/write-approval.d.ts +101 -0
  320. package/sdk/dist/namespaces/write-approval.d.ts.map +1 -0
  321. package/sdk/dist/namespaces/write-approval.js +62 -0
  322. package/sdk/dist/namespaces/write-approval.js.map +1 -0
  323. package/sdk/dist/node/actions-node.d.ts +3 -3
  324. package/sdk/dist/node/actions-node.d.ts.map +1 -1
  325. package/sdk/dist/node/actions-node.js +36 -36
  326. package/sdk/dist/node/actions-node.js.map +1 -1
  327. package/sdk/dist/node/{bearer-claim-key.d.ts → bearer-redeem-key.d.ts} +12 -12
  328. package/sdk/dist/node/bearer-redeem-key.d.ts.map +1 -0
  329. package/sdk/dist/node/{bearer-claim-key.js → bearer-redeem-key.js} +21 -21
  330. package/sdk/dist/node/bearer-redeem-key.js.map +1 -0
  331. package/sdk/dist/node/ci.d.ts +1 -1
  332. package/sdk/dist/node/ci.d.ts.map +1 -1
  333. package/sdk/dist/node/ci.js +6 -6
  334. package/sdk/dist/node/ci.js.map +1 -1
  335. package/sdk/dist/node/credentials.d.ts +17 -16
  336. package/sdk/dist/node/credentials.d.ts.map +1 -1
  337. package/sdk/dist/node/credentials.js +28 -27
  338. package/sdk/dist/node/credentials.js.map +1 -1
  339. package/sdk/dist/node/funding-recovery.d.ts +1 -1
  340. package/sdk/dist/node/funding-recovery.d.ts.map +1 -1
  341. package/sdk/dist/node/funding-recovery.js +1 -1
  342. package/sdk/dist/node/funding-recovery.js.map +1 -1
  343. package/sdk/dist/node/gitvault-apply.d.ts +1 -1
  344. package/sdk/dist/node/gitvault-apply.d.ts.map +1 -1
  345. package/sdk/dist/node/gitvault-handoff.d.ts +22 -22
  346. package/sdk/dist/node/gitvault-handoff.d.ts.map +1 -1
  347. package/sdk/dist/node/gitvault-handoff.js +45 -45
  348. package/sdk/dist/node/gitvault-handoff.js.map +1 -1
  349. package/sdk/dist/node/gitvault-prewarm.js +7 -7
  350. package/sdk/dist/node/gitvault-prewarm.js.map +1 -1
  351. package/sdk/dist/node/gitvault-restore.d.ts +1 -1
  352. package/sdk/dist/node/gitvault-restore.js +1 -1
  353. package/sdk/dist/node/index.d.ts +16 -16
  354. package/sdk/dist/node/index.d.ts.map +1 -1
  355. package/sdk/dist/node/index.js +15 -15
  356. package/sdk/dist/node/index.js.map +1 -1
  357. package/sdk/dist/node/org-adopt.d.ts +49 -0
  358. package/sdk/dist/node/org-adopt.d.ts.map +1 -0
  359. package/sdk/dist/node/org-adopt.js +77 -0
  360. package/sdk/dist/node/org-adopt.js.map +1 -0
  361. package/sdk/dist/node/paid-fetch.d.ts +7 -7
  362. package/sdk/dist/node/paid-fetch.d.ts.map +1 -1
  363. package/sdk/dist/node/paid-fetch.js +54 -54
  364. package/sdk/dist/node/paid-fetch.js.map +1 -1
  365. package/sdk/dist/node/preflight.d.ts +1 -1
  366. package/sdk/dist/node/preflight.d.ts.map +1 -1
  367. package/sdk/dist/node/preflight.js +1 -1
  368. package/sdk/dist/node/preflight.js.map +1 -1
  369. package/sdk/dist/node/source-scan.d.ts +1 -1
  370. package/sdk/dist/node/source-scan.js +2 -2
  371. package/sdk/dist/node/source-scan.js.map +1 -1
  372. package/sdk/dist/scoped.d.ts +3 -3
  373. package/sdk/dist/scoped.d.ts.map +1 -1
  374. package/sdk/dist/scoped.js +2 -2
  375. package/sdk/dist/scoped.js.map +1 -1
  376. package/core/dist/allowance-auth.d.ts.map +0 -1
  377. package/core/dist/allowance-auth.js.map +0 -1
  378. package/core/dist/allowance.d.ts +0 -22
  379. package/core/dist/allowance.d.ts.map +0 -1
  380. package/core/dist/allowance.js.map +0 -1
  381. package/core/dist/operator-session.d.ts +0 -80
  382. package/core/dist/operator-session.d.ts.map +0 -1
  383. package/core/dist/operator-session.js +0 -154
  384. package/core/dist/operator-session.js.map +0 -1
  385. package/core/dist/write-auth-session.d.ts.map +0 -1
  386. package/core/dist/write-auth-session.js.map +0 -1
  387. package/dist/allowance-auth.d.ts +0 -21
  388. package/dist/allowance-auth.d.ts.map +0 -1
  389. package/dist/allowance-auth.js +0 -32
  390. package/dist/allowance-auth.js.map +0 -1
  391. package/dist/allowance.d.ts +0 -3
  392. package/dist/allowance.d.ts.map +0 -1
  393. package/dist/allowance.js +0 -2
  394. package/dist/allowance.js.map +0 -1
  395. package/dist/tools/allowance-create.d.ts +0 -9
  396. package/dist/tools/allowance-create.d.ts.map +0 -1
  397. package/dist/tools/allowance-create.js.map +0 -1
  398. package/dist/tools/allowance-export.d.ts +0 -9
  399. package/dist/tools/allowance-export.d.ts.map +0 -1
  400. package/dist/tools/allowance-export.js.map +0 -1
  401. package/dist/tools/allowance-status.d.ts +0 -9
  402. package/dist/tools/allowance-status.d.ts.map +0 -1
  403. package/dist/tools/allowance-status.js +0 -33
  404. package/dist/tools/allowance-status.js.map +0 -1
  405. package/dist/tools/app-up.d.ts.map +0 -1
  406. package/dist/tools/app-up.js.map +0 -1
  407. package/dist/tools/deploy-diagnose-url.d.ts.map +0 -1
  408. package/dist/tools/deploy-diagnose-url.js.map +0 -1
  409. package/dist/tools/deploy-release.d.ts.map +0 -1
  410. package/dist/tools/deploy-release.js.map +0 -1
  411. package/dist/tools/get-operator-status.d.ts +0 -9
  412. package/dist/tools/get-operator-status.d.ts.map +0 -1
  413. package/dist/tools/get-operator-status.js +0 -17
  414. package/dist/tools/get-operator-status.js.map +0 -1
  415. package/dist/tools/set-tier.js.map +0 -1
  416. package/dist/tools/start-operator-passkey-enrollment.d.ts +0 -9
  417. package/dist/tools/start-operator-passkey-enrollment.d.ts.map +0 -1
  418. package/dist/tools/start-operator-passkey-enrollment.js +0 -18
  419. package/dist/tools/start-operator-passkey-enrollment.js.map +0 -1
  420. package/sdk/core-dist/allowance.d.ts +0 -22
  421. package/sdk/core-dist/operator-session.d.ts +0 -80
  422. package/sdk/core-dist/operator-session.js +0 -154
  423. package/sdk/dist/namespaces/allowance.d.ts +0 -79
  424. package/sdk/dist/namespaces/allowance.d.ts.map +0 -1
  425. package/sdk/dist/namespaces/allowance.js +0 -149
  426. package/sdk/dist/namespaces/allowance.js.map +0 -1
  427. package/sdk/dist/namespaces/operator-session.d.ts.map +0 -1
  428. package/sdk/dist/namespaces/operator-session.js.map +0 -1
  429. package/sdk/dist/namespaces/operator.d.ts +0 -359
  430. package/sdk/dist/namespaces/operator.d.ts.map +0 -1
  431. package/sdk/dist/namespaces/operator.js +0 -272
  432. package/sdk/dist/namespaces/operator.js.map +0 -1
  433. package/sdk/dist/node/bearer-claim-key.d.ts.map +0 -1
  434. package/sdk/dist/node/bearer-claim-key.js.map +0 -1
  435. package/sdk/dist/node/operator-claim.d.ts +0 -49
  436. package/sdk/dist/node/operator-claim.d.ts.map +0 -1
  437. package/sdk/dist/node/operator-claim.js +0 -77
  438. package/sdk/dist/node/operator-claim.js.map +0 -1
package/README.md CHANGED
@@ -18,13 +18,13 @@
18
18
  [![npm: @run402/functions](https://img.shields.io/npm/v/@run402/functions?label=%40run402%2Ffunctions)](https://www.npmjs.com/package/@run402/functions)
19
19
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
20
20
 
21
- **Run402 is open-source backend infrastructure for AI agents and coding agents** — a backend-as-a-service addressed to a machine rather than to a person. An autonomous agent provisions a Postgres database, user auth, file storage, serverless functions and site hosting, ships them through one staged deployment workflow, and pays for the usage itself. Comparable in surface to Supabase, Firebase or Vercel; different in that there is no dashboard to sign into and no human-issued API key to copy.
21
+ **Run402 is open-source backend infrastructure for AI agents and coding agents** — a backend-as-a-service addressed to a machine rather than to a person. An autonomous agent provisions a Postgres database, user auth, file storage, serverless functions and site hosting, ships them through one staged deploy workflow, and pays for the usage itself. Comparable in surface to Supabase, Firebase or Vercel; different in that there is no dashboard you have to sign into to get started (the console exists for people; the agent never needs it) and no human-issued API key to copy.
22
22
 
23
- This is the backend Kychee's open products run on. We needed a layer an agent can drive end to end, with room for whatever each app turns out to need, and nothing off the shelf had all of it, so we built it and opened it the same way we open the apps: this repo holds the agent surfaces (MIT), [`run402-core`](https://github.com/kychee-com/run402-core) holds the full backend (Apache-2.0), and [kysigned](https://github.com/kychee-com/kysigned) is the first product running on it.
23
+ This is the backend Kychee's open products run on. We needed a layer an agent can drive end to end, with room for whatever each app turns out to need, and nothing off the shelf had all of it, so we built it and opened it the same way we open the apps: this repo holds the agent surfaces (MIT), [`run402-core`](https://github.com/kychee-com/run402-core) holds the open self-hostable runtime slice (Apache-2.0; the managed Cloud control plane remains proprietary, see [CLOUD_VS_CORE.md](https://github.com/kychee-com/run402-core/blob/main/CLOUD_VS_CORE.md)), and [kysigned](https://github.com/kychee-com/kysigned) is the first product running on it.
24
24
 
25
- One call to [run402](https://run402.com) gives an agent a full Postgres database, REST API, user auth, content-addressed file storage, static site hosting, serverless functions, and image generation, paid with x402 (USDC on Base) or MPP (pathUSD on Tempo, or sats over Bitcoin Lightning) — or Stripe credits. The prototype tier is free on testnet.
25
+ One call to [run402](https://run402.com) gives an agent a full Postgres database, REST API, user auth, content-addressed file storage, static site hosting, serverless functions, and image generation, paid with x402 (USDC on Base) or MPP (pathUSD on Tempo, or sats over Bitcoin Lightning) — or card-funded allowance. The prototype tier is free on testnet.
26
26
 
27
- **Run402 is agent-first because agents are first-class participants, not because people disappear.** A person or agent acts through its own Run402 principal and authenticator, and its actions remain attributable. Identity answers who acted; memberships, roles, grants, delegates, freshness, and spend policy determine what that principal may do.
27
+ **Run402 is agent-first because agents are first-class participants, not because people disappear.** A person or agent acts through its own Run402 principal and authenticator, and its actions remain attributable. Identity answers who acted; memberships, roles, grants, grant keys (the CLI still says `delegates`; renamed next), freshness, and spend policy determine what that principal may do.
28
28
 
29
29
  An autonomous agent may remain the legitimate owner of the org-of-one it creates. People may join through explicit co-ownership. Agents entering somebody else's organization receive bounded authority instead of borrowing a human account. Different keys. Equal standing. Explicit authority.
30
30
 
@@ -35,7 +35,7 @@ This monorepo ships these interfaces:
35
35
  | Surface | Use when… |
36
36
  |---------|-----------|
37
37
  | [`run402` CLI](./cli/) | Terminal, scripts, CI, agent-controlled shells: JSON in, JSON out, exit code on failure |
38
- | [`@run402/sdk`](./sdk/) | Calling run402 from TypeScript: typed kernel, isomorphic (Node 22 / Deno / Bun / V8 isolates) with a Node entry that auto-loads the local keystore + allowance + x402 / Lightning fetch |
38
+ | [`@run402/sdk`](./sdk/) | Calling run402 from TypeScript: typed kernel, isomorphic (Node 22 / Deno / Bun / V8 isolates) with a Node entry that auto-loads the local keystore + wallet + x402 / Lightning fetch |
39
39
  | [`run402-mcp`](./src/) | Claude Desktop, Cursor, Cline, Claude Code: core run402 operations as MCP tools |
40
40
  | [OpenClaw skill](./openclaw/) | OpenClaw agents (no MCP server required) |
41
41
  | [Run402 for Buzz](./buzz/) | Buzz people and agents: install from run402.com, preflight/link one agent's dedicated identities, deploy a contextual demo, then offer human co-ownership through a normal HTTPS/passkey handoff; Buzz remains unchanged |
@@ -44,7 +44,7 @@ This monorepo ships these interfaces:
44
44
 
45
45
  These interfaces share a single typed kernel where appropriate: `@run402/sdk`. MCP tools, CLI subcommands, and OpenClaw scripts are thin shims over SDK calls. `@run402/functions` is the in-function helper that runs inside deployed code; the npm package on the registry is the artifact Cloud bundles. `@run402/astro` layers the SDK and functions runtime into Astro's build and SSR flow. The HTTP API is the foundation; the SDK owns shared client workflows and orchestration; CLI and MCP expose them in machine-friendly forms. Native SDK/MCP references explain intentional alternatives.
46
46
 
47
- Deployment summaries share the SDK workflow view. CLI writes redacted detail under `.run402/diagnostics/`; MCP retains it through `expand_result`. Typed SDK callers keep the full result. Snapshot collection excludes platform runtime files automatically.
47
+ Deploy summaries share the SDK workflow view. CLI writes redacted detail under `.run402/diagnostics/`; MCP retains it through `expand_result`. Typed SDK callers keep the full result. Snapshot collection excludes platform runtime files automatically.
48
48
 
49
49
  ## 30-second start
50
50
 
@@ -52,14 +52,14 @@ First create the complete `run402.json` and `index.html` from [Your first deploy
52
52
 
53
53
  ```bash
54
54
  npm install -g run402@latest
55
- run402 up --name my-app -y # bootstrap allowance/tier/project/link, then deploy manifest
55
+ run402 up --name my-app -y # bootstrap wallet/tier/project/link, then deploy manifest
56
56
  run402 up verify # rerun app HTTP verification without deploying
57
57
  run402 up --verify # deploy, then wait for gateway/edge coherence
58
58
  ```
59
59
 
60
60
  That's a real Postgres database + a deployed static site, paid for autonomously with testnet USDC.
61
61
 
62
- Buy from any x402 seller with the same allowance and a default $0.10 ceiling:
62
+ Buy from any x402 seller with the same wallet and a default $0.10 ceiling:
63
63
 
64
64
  ```bash
65
65
  run402 pay https://seller.example/translate --method POST \
@@ -83,11 +83,11 @@ same payer and key. Never replace the key. The SDK and MCP can also re-present
83
83
  an ambiguous proof while their process remains alive; custom/arbitrary sellers
84
84
  remain ambiguous and require reconciliation.
85
85
 
86
- Prefer `run402 up` when a repo has `run402.deploy.json` or `app.json`. The CLI stays a thin shim over the Node SDK action runner (`r.actions.run(...)` / `r.up(...)`): it validates the manifest first, then recursively performs only the missing prerequisites. Project resolution is `--project`, `.run402/project.json`, manifest `project_id`, approved creation from `--name`; global active state never selects a deployment target. `--name` is project creation/link metadata only; it is not part of the deploy manifest and never renames an existing project. Use `--check` for local validation and `--plan` for gateway-reviewed intent before applying. Local validation covers every file the manifest references (migration `sql_path`/`sql_file`, function sources and `files`, site paths and `dir()` targets, `assets.put` sources): a missing one fails with `MANIFEST_FILE_MISSING` (`details.missing[]` of `{ field_path, path, kind }`, one `create_file` next action per file) before any gateway call, in every mode and in `deploy apply`. With no manifest in the working directory, `UP_MANIFEST_REQUIRED` looks one directory down and names what it found (`details.nearby_manifests[]`, a read-only `run_in_directory` action for a single candidate, or one unranked `select_application` action for multiple apps); `--manifest <path>` to a missing file is a typed `MANIFEST_NOT_FOUND`.
86
+ Prefer `run402 up` when a repo has `run402.deploy.json` or `app.json`. The CLI stays a thin shim over the Node SDK action runner (`r.actions.run(...)` / `r.up(...)`): it validates the manifest first, then recursively performs only the missing prerequisites. Project resolution is `--project`, `.run402/project.json`, manifest `project_id`, approved creation from `--name`; global active state never selects a deploy target. `--name` is project creation/link metadata only; it is not part of the deploy manifest and never renames an existing project. Use `--check` for local validation and `--plan` for gateway-reviewed intent before applying. Local validation covers every file the manifest references (migration `sql_path`/`sql_file`, function sources and `files`, site paths and `dir()` targets, `assets.put` sources): a missing one fails with `MANIFEST_FILE_MISSING` (`details.missing[]` of `{ field_path, path, kind }`, one `create_file` next action per file) before any gateway call, in every mode and in `run402 deploy`. With no manifest in the working directory, `UP_MANIFEST_REQUIRED` looks one directory down and names what it found (`details.nearby_manifests[]`, a read-only `run_in_directory` action for a single candidate, or one unranked `select_application` action for multiple apps); `--manifest <path>` to a missing file is a typed `MANIFEST_NOT_FOUND`.
87
87
 
88
88
  If an app manifest defines `verify.http[]`, `run402 up` verifies those URLs after deploy. Fresh run402 edge sentinel misses are reported as `propagation_pending` rather than permanent failures while the binding is still converging; tune that wait with `--propagation-budget-s` (default 120) or return immediately with `--no-propagation-wait`. `run402 up verify` reruns the same HTTP checks without uploading, deploying, creating projects, or mutating resources.
89
89
 
90
- The CLI checks for newer `run402` releases opportunistically and fail-open. Success stdout stays the command result; stale-version notices are advisory JSON on stderr, or `cli.update_available` NDJSON events in `--json-stream`. `run402 doctor --refresh` is the explicit live npm check and reports the install context plus the safest upgrade command for local, global, or ephemeral installs. `run402 doctor` answers `{ ok, blocking[], warnings[], checks[] }`: `ok` is true exactly when `blocking[]` is empty, every check carries `severity: "blocking" | "advisory" | "info"`, advisory findings (an unbound passkey, a stale CLI, gitvault gaps, a tier-less own org that can still reach another org's projects: `TIER_MISSING_ON_OWN_ORG`) land in `warnings[]` without changing `ok` or the exit code, and the `tier` check's `status` is a fixed vocabulary (`ok | inactive | frozen | past_due | dormant | purged | missing | unknown | error`, never a tier name; the name and raw lifecycle are in `value.tier` / `value.lifecycle`).
90
+ The CLI checks for newer `run402` releases opportunistically and fail-open. Success stdout stays the command result; stale-version notices are advisory JSON on stderr, or `cli.update_available` NDJSON events in `--json-stream`. `run402 doctor --refresh` is the explicit live npm check and reports the install context plus the safest upgrade command for local, global, or ephemeral installs. `run402 doctor` answers `{ ok, blocking[], warnings[], checks[] }`: `ok` is true exactly when `blocking[]` is empty, every check carries `severity: "blocking" | "advisory" | "info"`, advisory findings (an unbound passkey, a stale CLI, vault gaps, a tier-less own org that can still reach another org's projects: `TIER_MISSING_ON_OWN_ORG`) land in `warnings[]` without changing `ok` or the exit code, and the `tier` check's `status` is a fixed vocabulary (`ok | inactive | frozen | past_due | dormant | purged | missing | unknown | error`, never a tier name; the name and raw lifecycle are in `value.tier` / `value.lifecycle`).
91
91
 
92
92
  Typed deploy configs use the same commands. Executable configs are trusted local code, so v1 only runs them when passed explicitly:
93
93
 
@@ -97,7 +97,7 @@ run402 up --manifest run402.deploy.ts --plan
97
97
  run402 up --manifest run402.deploy.ts --require-plan plan_...
98
98
  ```
99
99
 
100
- `--check` and `--print-spec` are local-only (both verify that every referenced file exists). `--plan` asks the gateway for a reviewed plan with `plan_id`, `plan_fingerprint`, warnings, diff, and one next action. `--require-plan` reapplies only if the normalized spec and reviewed gateway facts still match.
100
+ `--check` and `--print-spec` are local-only (both verify that every referenced file exists). `--plan` asks the gateway for a reviewed plan with `plan_id`, `plan_fingerprint`, warnings, diff, and one next action. `--require-plan` reapplies only if the normalized spec and reviewed gateway events still match.
101
101
 
102
102
  ```ts
103
103
  import { defineConfig, dir, nodeFunction, sqlFile } from "@run402/sdk/config";
@@ -159,7 +159,7 @@ Use `run402 projects validate-expose` for a non-mutating feedback loop before a
159
159
 
160
160
  **Auth-as-SDLC:** put the same JSON under `database.expose` in your v2 `ReleaseSpec`. The gateway validates it against your migration SQL during deploy and rejects mismatches with a structured `errors` array listing every violation.
161
161
 
162
- ### Directory deployment (advanced primitive)
162
+ ### Directory deploy (advanced primitive)
163
163
 
164
164
  For a standalone static directory on an existing project:
165
165
 
@@ -171,7 +171,7 @@ Use `run402 up` for a complete application with a deploy manifest. The SDK owns
171
171
 
172
172
  ### Same-origin web routes: static site + function ingress
173
173
 
174
- Apply-v1 routes and static public paths are release resources: the release pointer activates after the required deployment stages in `deploy apply`. Applied migrations and external side effects are not rolled back by changing that pointer. Release static asset paths such as `events.html` are distinct from browser-visible public static paths such as `/events`. Use `site.public_paths` for ordinary clean static URLs; keep routes for function ingress and exact, method-aware static aliases.
174
+ Apply-v1 routes and static public paths are release resources: the release pointer activates after the required deploy stages in `run402 deploy`. Applied migrations and external side effects are not rolled back by changing that pointer. Release static asset paths such as `events.html` are distinct from browser-visible public static paths such as `/events`. Use `site.public_paths` for ordinary clean static URLs; keep routes for function ingress and exact, method-aware static aliases.
175
175
 
176
176
  ```json
177
177
  {
@@ -219,21 +219,21 @@ Function routes can charge a fixed tenant x402 price before the handler runs by
219
219
 
220
220
  Matching is exact or final-prefix-wildcard only. `/admin` and `/admin/` are exact trailing-slash equivalents; `/admin/*` matches children but not `/admin`, `/admin/`, `/admin.css`, or `/administrator`, so deploy both `/admin` and `/admin/*` for a routed section root. Query strings are ignored for matching and preserved in the handler's full public `req.url`. Exact routes beat prefix routes; longest prefix wins; method-compatible dynamic routes beat static assets. A `POST /login` route can coexist with static `GET /login` HTML. Unsafe method mismatch returns `405`, and matched dynamic route failures fail closed instead of falling back to static files.
221
221
 
222
- Routed functions use the Node 22 Fetch Request -> Response contract: `export default async function handler(req) { ... }`. `req.method` is the browser method, and `req.url` is the full public URL on managed subdomains, deployment hosts, and verified custom domains. Derive OAuth callbacks from it, for example `new URL("/admin/oauth/google/callback", new URL(req.url).origin)`. Append multiple cookies with `headers.append("Set-Cookie", value)`; redirects, cookies, and query strings are preserved. On priced routes, import `getRoutedPaymentContext` from `@run402/functions`, read `const paymentContext = getRoutedPaymentContext(req)`, and key app-side idempotency by `paymentContext.paymentId`. For a receipt-enabled route, return `payment.fulfilled(response)` only after the response represents completed delivery; the helper fails closed outside a settled, current, receipt-enabled routed invocation. The context helper reads gateway-confirmed `x-run402-payment-*` headers and returns `null` for unpriced or direct calls. The raw `run402.routed_http.v1` envelope is internal; do not write route handlers against it.
222
+ Routed functions use the Node 22 Fetch Request -> Response contract: `export default async function handler(req) { ... }`. `req.method` is the browser method, and `req.url` is the full public URL on managed subdomains, hosts, and verified custom domains. Derive OAuth callbacks from it, for example `new URL("/admin/oauth/google/callback", new URL(req.url).origin)`. Append multiple cookies with `headers.append("Set-Cookie", value)`; redirects, cookies, and query strings are preserved. On priced routes, import `getRoutedPaymentContext` from `@run402/functions`, read `const paymentContext = getRoutedPaymentContext(req)`, and key app-side idempotency by `paymentContext.paymentId`. For a receipt-enabled route, return `payment.fulfilled(response)` only after the response represents completed delivery; the helper fails closed outside a settled, current, receipt-enabled routed invocation. The context helper reads gateway-confirmed `x-run402-payment-*` headers and returns `null` for unpriced or direct calls. The raw `run402.routed_http.v1` envelope is internal; do not write route handlers against it.
223
223
 
224
- **Recipe: static home page + SPA shell.** A SPA site ships `index.html` as the shell serving every unmatched route (match `spa_fallback`), so by default `GET /` serves the shell too. To serve a real static home page at `/` while keeping the shell for app routes, ship `home.html` at the site root alongside `index.html` and add an exact root static route alias: `"routes": { "replace": [ { "pattern": "/", "target": { "type": "static", "file": "home.html" } } ] }`. Route matching runs before all static resolution (including the implicit `/` -> `index.html` root mapping), and SPA-fallback derivation is independent of the route table, so `GET /` serves `home.html` (`route_static_alias`), unmatched app routes such as `/dashboard` still serve the shell (`spa_fallback`), and named static pages keep serving unchanged (`static_exact`). Expect two non-blocking plan lints: `STATIC_ALIAS_SHADOWS_STATIC_PATH` (warn: the alias overrides what `/` would otherwise serve; accurate and expected here) and `STATIC_ALIAS_DUPLICATE_CANONICAL_URL` (info: `/home.html` stays directly reachable in implicit public-path mode; add `<link rel="canonical">` to `home.html` if duplicate-content SEO matters). Omitting `routes` on later deploys carries the alias forward; `routes.replace` is total, so a pipeline that sends it must include the alias every time. Verify with `run402 deploy resolve --url https://<your-site>/ --method GET` or `deploy_diagnose_url` and confirm `match: "route_static_alias"` with `target_file: "home.html"`.
224
+ **Recipe: static home page + SPA shell.** A SPA site ships `index.html` as the shell serving every unmatched route (match `spa_fallback`), so by default `GET /` serves the shell too. To serve a real static home page at `/` while keeping the shell for app routes, ship `home.html` at the site root alongside `index.html` and add an exact root static route alias: `"routes": { "replace": [ { "pattern": "/", "target": { "type": "static", "file": "home.html" } } ] }`. Route matching runs before all static resolution (including the implicit `/` -> `index.html` root mapping), and SPA-fallback derivation is independent of the route table, so `GET /` serves `home.html` (`route_static_alias`), unmatched app routes such as `/dashboard` still serve the shell (`spa_fallback`), and named static pages keep serving unchanged (`static_exact`). Expect two non-blocking plan lints: `STATIC_ALIAS_SHADOWS_STATIC_PATH` (warn: the alias overrides what `/` would otherwise serve; accurate and expected here) and `STATIC_ALIAS_DUPLICATE_CANONICAL_URL` (info: `/home.html` stays directly reachable in implicit public-path mode; add `<link rel="canonical">` to `home.html` if duplicate-content SEO matters). Omitting `routes` on later deploys carries the alias forward; `routes.replace` is total, so a pipeline that sends it must include the alias every time. Verify with `run402 deploy resolve --url https://<your-site>/ --method GET` or `deploy_resolve` and confirm `match: "route_static_alias"` with `target_file: "home.html"`.
225
225
 
226
226
  Avoid routing every static file, broad method lists by default, wildcard static route targets, leading-slash static files, directory shorthand, and one-static-route-target-per-page tables that exhaust route limits. Also watch wildcard function routes that shadow direct public static paths. Warning codes to handle include `STATIC_ALIAS_SHADOWS_STATIC_PATH`, `STATIC_ALIAS_RELATIVE_ASSET_RISK`, `STATIC_ALIAS_DUPLICATE_CANONICAL_URL`, `STATIC_ALIAS_EXTENSIONLESS_NON_HTML`, and `STATIC_ALIAS_TABLE_NEAR_LIMIT`; inspect active routes, `static_public_paths`, and resolve diagnostics to distinguish the route pattern from the backing `asset_path`.
227
227
 
228
- Diagnose public URLs with the URL-first CLI or MCP/SDK equivalents:
228
+ Resolve public URLs with the CLI or its MCP/SDK equivalents:
229
229
 
230
230
  ```bash
231
- run402 deploy diagnose --project prj_123 https://example.com/events --method GET
232
- run402 deploy resolve --project prj_123 --url https://example.com/events?utm=x#hero --method GET
233
- run402 deploy resolve --project prj_123 --host example.com --path /events --method GET
231
+ run402 deploy resolve https://example.com/events --project prj_123 --method GET
232
+ run402 deploy resolve --url https://example.com/events?utm=x#hero --project prj_123 --method GET
233
+ run402 deploy resolve --host example.com --path /events --project prj_123 --method GET
234
234
  ```
235
235
 
236
- `deploy_diagnose_url` and `r.project(id).apply.resolve({ url, method: "GET" })` return `would_serve`, `diagnostic_status`, `match`, normalized request data, warnings, full resolution JSON, `edge_propagation`, and next steps. When returned, `asset_path`, `reachability_authority`, and `direct` explain which release asset backs the public URL and whether reachability came from implicit file-path mode, explicit `site.public_paths`, or a route-only static alias. Stable-host diagnostics may also include `authorization_result`, `cas_object` (`sha256`, `exists`, `expected_size`, `actual_size`), hostname-specific `response_variant`, route/static fields such as `allow`, `route_pattern`, `target_type`, `target_name`, and `target_file`, and `edge_propagation` (`settled`, `propagating`, or `sync_pending`). Known `match` literals are `host_missing`, `manifest_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `none`, `static_exact`, `static_index`, `spa_fallback`, `spa_fallback_missing`, `route_function`, `route_static_alias`, and `route_method_miss`; preserve unknown future strings. Known `authorization_result` values include `authorized`, `not_public`, `not_applicable`, `manifest_missing`, `target_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `missing_cas_object`, `unfinalized_or_deleting_cas_object`, `size_mismatch`, and `unauthorized_cas_object`. Known `fallback_state` values include `active_release_missing`, `unsupported_manifest_version`, and `negative_cache_hit`; preserve unknown future strings. `result` is the diagnostic body status, not the HTTP status of the SDK call, so host misses can still be successful CLI/MCP/SDK calls with `would_serve: false`. Do not treat resolve/diagnose as a fetch, cache purge, or cache-policy oracle; route method misses should inspect `allow`, CAS authorization/health failures should inspect or redeploy the affected static asset, and fresh host misses should inspect `edge_propagation` or rerun `run402 up verify`. Branch on structured JSON fields such as `cache_class` and preserve unknown cache classes.
236
+ `deploy_resolve` and `r.project(id).apply.resolve({ url, method: "GET" })` return `would_serve`, `diagnostic_status`, `match`, normalized request data, warnings, full resolution JSON, `edge_propagation`, and next steps. When returned, `asset_path`, `reachability_authority`, and `direct` explain which release asset backs the public URL and whether reachability came from implicit file-path mode, explicit `site.public_paths`, or a route-only static alias. Stable-host diagnostics may also include `authorization_result`, `cas_object` (`sha256`, `exists`, `expected_size`, `actual_size`), hostname-specific `response_variant`, route/static fields such as `allow`, `route_pattern`, `target_type`, `target_name`, and `target_file`, and `edge_propagation` (`settled`, `propagating`, or `sync_pending`). Known `match` literals are `host_missing`, `manifest_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `none`, `static_exact`, `static_index`, `spa_fallback`, `spa_fallback_missing`, `route_function`, `route_static_alias`, and `route_method_miss`; preserve unknown future strings. Known `authorization_result` values include `authorized`, `not_public`, `not_applicable`, `manifest_missing`, `target_missing`, `active_release_missing`, `unsupported_manifest_version`, `path_error`, `missing_cas_object`, `unfinalized_or_deleting_cas_object`, `size_mismatch`, and `unauthorized_cas_object`. Known `fallback_state` values include `active_release_missing`, `unsupported_manifest_version`, and `negative_cache_hit`; preserve unknown future strings. `result` is the diagnostic body status, not the HTTP status of the SDK call, so host misses can still be successful CLI/MCP/SDK calls with `would_serve: false`. Do not treat resolve/diagnose as a fetch, cache purge, or cache-policy oracle; route method misses should inspect `allow`, CAS authorization/health failures should inspect or redeploy the affected static asset, and fresh host misses should inspect `edge_propagation` or rerun `run402 up verify`. Branch on structured JSON fields such as `cache_class` and preserve unknown cache classes.
237
237
 
238
238
  Release observability exposes stable asset identity and public reachability. Inventories include `release_generation`, `static_manifest_sha256`, nullable `static_manifest_metadata` (`file_count`, `total_bytes`, `cache_classes`, `cache_class_sources`, `spa_fallback`), and `static_public_paths[]` when returned. `site.paths` lists release static assets; `static_public_paths[]` lists browser-visible public paths with `public_path`, `asset_path`, `reachability_authority`, `direct`, cache class, and content type. Plan and release diffs expose `static_assets` counters: unchanged/changed/added/removed, `newly_uploaded_cas_bytes`, `reused_cas_bytes`, `deployment_copy_bytes_eliminated`, `legacy_immutable_warnings`, `previous_immutable_failures`, and `cas_authorization_failures`.
239
239
 
@@ -241,7 +241,7 @@ Runtime route failure codes to branch on: `ROUTE_MANIFEST_LOAD_FAILED` (manifest
241
241
 
242
242
  ### GitHub Actions OIDC deploys: link once, deploy with the same CLI
243
243
 
244
- For repo-driven deploys, run402 does not need service keys or allowance files in GitHub secrets. Run a local link command once:
244
+ For repo-driven deploys, run402 does not need service keys or wallet files in GitHub secrets. Run a local link command once:
245
245
 
246
246
  ```bash
247
247
  run402 ci link github --project prj_... --manifest run402.deploy.json
@@ -262,10 +262,10 @@ jobs:
262
262
  steps:
263
263
  - uses: actions/checkout@v4
264
264
  - name: Deploy to run402
265
- run: npx --yes run402@3.7.5 deploy apply --manifest 'run402.deploy.json' --project 'prj_...'
265
+ run: npx --yes run402@3.7.5 deploy --manifest 'run402.deploy.json' --project 'prj_...'
266
266
  ```
267
267
 
268
- CI deploys are intentionally narrow: `site`, `functions`, `database`, absent/current `base`, and route declarations only when the binding has covering `--route-scope` patterns. Without route scopes, CI cannot ship `routes`. Keep secrets, domains, subdomains, checks, non-current base, and broader trust changes in a local allowance-backed deploy. If the gateway returns `CI_ROUTE_SCOPE_DENIED`, re-link with exact scopes like `/admin` or final-wildcard scopes like `/api/*`, or deploy locally. Manage bindings with `run402 ci list` and `run402 ci revoke`.
268
+ CI deploys are intentionally narrow: `site`, `functions`, `database`, absent/current `base`, and route declarations only when the binding has covering `--route-scope` patterns. Without route scopes, CI cannot ship `routes`. Keep secrets, domains, subdomains, checks, non-current base, and broader trust changes in a local wallet-backed deploy. If the gateway returns `CI_ROUTE_SCOPE_DENIED`, re-link with exact scopes like `/admin` or final-wildcard scopes like `/api/*`, or deploy locally. Manage bindings with `run402 ci list` and `run402 ci revoke`.
269
269
 
270
270
  ### In-function helpers: caller-context vs BYPASSRLS
271
271
 
@@ -294,11 +294,11 @@ export default async (req: Request) => {
294
294
  };
295
295
  ```
296
296
 
297
- `adminDb().sql(query, params?)` runs raw parameterized SQL and always bypasses RLS. The current runtime returns the gateway envelope, including `rows` and `row_count`; read `result.rows`, not `result[0]`. Older helper typings incorrectly described a bare array. See the [owning runtime reference](https://github.com/kychee-com/run402-core/tree/main/packages/functions#admindbsqlquery-params--raw-sql-bypassrls) and match local helper types to the runtime version used by your deployment.
297
+ `adminDb().sql(query, params?)` runs raw parameterized SQL and always bypasses RLS. The current runtime returns the gateway envelope, including `rows` and `row_count`; read `result.rows`, not `result[0]`. Older helper typings incorrectly described a bare array. See the [owning runtime reference](https://github.com/kychee-com/run402-core/tree/main/packages/functions#admindbsqlquery-params--raw-sql-bypassrls) and match local helper types to the runtime version used by your deploy.
298
298
 
299
299
  `@run402/functions` is auto-bundled into deployed code; install it in your editor for full TypeScript autocomplete (also works at build time for static-site generation with `RUN402_SERVICE_KEY` + `RUN402_PROJECT_ID` set).
300
300
 
301
- `ai.generateImage({ prompt, aspect? })` is available inside deployed functions for live app flows such as generated avatars or OG images. It calls the project runtime image endpoint with `RUN402_SERVICE_KEY`, so deployed functions do not need allowance wallets or x402 signing code. Aspects are `square`, `landscape`, and `portrait`; the result is `{ image, content_type, aspect }` with base64 image bytes. Runtime image generation is billed, rate-limited, and spend-capped against the project organization; public routed functions should authenticate/rate-limit their users before calling it.
301
+ `ai.generateImage({ prompt, aspect? })` is available inside deployed functions for live app flows such as generated avatars or OG images. It calls the project runtime image endpoint with `RUN402_SERVICE_KEY`, so deployed functions do not need wallets or x402 signing code. Aspects are `square`, `landscape`, and `portrait`; the result is `{ image, content_type, aspect }` with base64 image bytes. Runtime image generation is billed, rate-limited, and spend-capped against the project organization; public routed functions should authenticate/rate-limit their users before calling it.
302
302
 
303
303
  `assets.put(key, source, opts?)` uploads bytes from inside a deployed function through the same CAS-backed apply substrate as deploy-time assets. It uses `RUN402_SERVICE_KEY`, accepts a string, `Uint8Array`, or `{ content | bytes }`, and returns an SDK-compatible `AssetRef` with mutable and immutable URLs.
304
304
 
@@ -328,7 +328,7 @@ git push -u origin main # publishes, encrypted before it l
328
328
 
329
329
  `origin` is claimed additively: when the directory has no `origin` yet, the scaffold names ours `origin` — `git push origin main` just works, no side-remote name to remember. An existing `origin` is never touched; the fallback is `run402` instead, and the response says which happened and why. An app that lives inside another repository (a monorepo workspace) is never scaffolded into that repository: the skip carries a `create_nested_repo` next action, and `run402 repos create --nested --project <id>` (or `run402 up --nested`) gives the app root its own nested repository and `run402` remote, appending exactly one line to the enclosing repository's local `.git/info/exclude` and touching nothing else there; `repos create` prints a `git push` next action only for a remote it actually added. The free path is the whole path — no slug, no fee, no ceremony. When you want pretty `run402::<org-slug>/<name>` addresses (clone-by-name, push-to-create), claim an org slug once — the optional named-address upgrade described below.
330
330
 
331
- **Named addressing.** `run402::<org-slug>/<name>` works alongside the id-form `run402::<org_id>/<project_id>` in the same slot — pick an org slug once (`run402 org slug <slug>`, owner-only, a small one-time claim fee), and every repo under it is `run402::<slug>/<name>`. Pushing a name that doesn't exist yet **push-to-creates** it: the project and vault are allocated atomically, and a losing concurrent pusher resolves cleanly to the winner's repo instead of erroring — its work is not lost, it just wasn't the creator. The first time a named remote resolves on a checkout, the resolved id is **pinned** into that checkout's local git config — every later push/fetch follows the pin directly, so a later rename of the org slug or repo name never breaks an existing clone. The id-form address needs no pin (a project id never changes) and stays the cold-restart path: an agent that lost its local state but still holds authority on the project can always fall back to `run402::<org_id>/<project_id>`.
331
+ **Named addressing.** `run402::<org-slug>/<name>` works alongside the id-form `run402::<org_id>/<project_id>` in the same slot — pick an org slug once (`run402 org slug <slug>`, owner-only, a small one-time fee), and every repo under it is `run402::<slug>/<name>`. Pushing a name that doesn't exist yet **push-to-creates** it: the project and vault are allocated atomically, and a losing concurrent pusher resolves cleanly to the winner's repo instead of erroring — its work is not lost, it just wasn't the creator. The first time a named remote resolves on a checkout, the resolved id is **pinned** into that checkout's local git config — every later push/fetch follows the pin directly, so a later rename of the org slug or repo name never breaks an existing clone. The id-form address needs no pin (a project id never changes) and stays the cold-restart path: an agent that lost its local state but still holds authority on the project can always fall back to `run402::<org_id>/<project_id>`.
332
332
 
333
333
  **One thing to know up front: a vault has a writer set, not a single key.** Every admitted member or handoff recipient opens the vault and pushes under its OWN keystore key (`run402 repos access` lists them). A vault whose only admitted principal is this keystore is exactly as safe as this keystore — see "If you lose the keystore" below, or admit a second principal.
334
334
 
@@ -362,21 +362,21 @@ run402 repos fsck --budget 500
362
362
  git clone run402::<org_id>/<project_id> restored
363
363
  ```
364
364
 
365
- Cloning needs a Run402 principal on this machine — a wallet with an allowance and a keystore holding an envelope for this vault — this is encrypted git, not a shareable link.
365
+ Cloning needs a Run402 principal on this machine — a wallet and a keystore holding an envelope for this vault — this is encrypted git, not a shareable link.
366
366
 
367
367
  A fresh clone installs local `refs/r402/retain/<oid>` refs for every retained deploy-capture tip no branch reaches, so a plain `git fsck` is silent — `git for-each-ref refs/r402/` lists what is retained. Clones made by a client older than this one (or a checkout whose ref write degraded) may still show dangling commits under `git fsck`; harmless, not corruption — one `run402 repos fsck` run installs the missing refs. A retained ref locally pins that history against `git gc` until the vault prunes the capture, at which point the next fetch retracts it.
368
368
 
369
369
  `repos snapshot` is the CAPTURE lane — the protocol deploy ref plus the HEAD target — because a dirty tree captures as a synthetic commit that sits on no branch. Your own branches and tags reach the vault through `git push origin <branch>`.
370
370
 
371
- **Allocating a vault does NOT gate the project's deploys.** `gitvault_policy` stays unset until you set it — a vault created by a first `git push` or `repos create` never silently changes how you deploy. A deploy against a vaulted, ungated project proceeds ungated and its result carries a typed `next_actions` entry offering `run402 repos policy required`; every later ungated deploy carries a `warnings[]` entry naming the drift, until the policy is set either way — never a block, never an interactive prompt. Once `gitvault_policy` is `required`, a deploy must present a vaulted capture at commit — `run402 deploy apply` produces one automatically on any machine holding the keystore; un-gate with `run402 repos policy grandfathered --reason "<why>"` (owner + step-up, audited, reversible with `run402 repos policy required`). Vaulting your source is never gated on a deploy, either way. `run402 doctor` reports the policy, whether this machine can satisfy it, and where the keystore lives.
371
+ **Allocating a vault does NOT gate the project's deploys.** `gitvault_policy` stays unset until you set it — a vault created by a first `git push` or `repos create` never silently changes how you deploy. A deploy against a vaulted, ungated project proceeds ungated and its result carries a typed `next_actions` entry offering `run402 repos policy required`; every later ungated deploy carries a `warnings[]` entry naming the drift, until the policy is set either way — never a block, never an interactive prompt. Once `gitvault_policy` is `required`, a deploy must present a vaulted capture at commit — `run402 deploy` produces one automatically on any machine holding the keystore; un-gate with `run402 repos policy grandfathered --reason "<why>"` (owner + step-up, audited, reversible with `run402 repos policy required`). Vaulting your source is never gated on a deploy, either way. `run402 doctor` reports the policy, whether this machine can satisfy it, and where the keystore lives.
372
372
 
373
373
  Before `snapshot` reports that anything landed, the client compares every finalization receipt against its local expected manifest and reads the admitted head back from storage — a 200 alone is never enough. Maintenance is one verb, `run402 repos gc` — `git gc`'s own two halves (checkpoint publication + prune planning), never described as "exactly `git gc`" since the deletion ceremony is stricter: it plans locally, and submits only when handed both verifier receipts — one from this CLI, one from the independent `r402s-verify` — with `--submit --intent-core <path> --verifier-receipt <path>`; only the control-plane-signed completion says what was deleted.
374
374
 
375
375
  From the SDK, with identical semantics — vault reads run anywhere, and the verbs that touch a git working tree or the on-disk keystore are Node-only:
376
376
 
377
- For typed repository automation, see the [native SDK gitvault reference](https://docs.run402.com/sdk/resources/).
377
+ For typed repository automation, see the [native SDK KyGit reference](https://docs.run402.com/sdk/resources/).
378
378
 
379
- **The encrypted second remote — the zero-migration pattern.** Keep GitHub/GitLab as the primary (collaboration, CI, reviews, unchanged) and add GitVault as the second remote: `git remote add gitvault run402::<org_id>/<project_id>` + `git push gitvault --all`, and a complete, continuously updated copy of your history exists that the storage provider itself cannot read. The reason this matters, said plainly and as capability rather than accusation: a host that can READ private repositories can — under a future policy, an acquisition, a training pipeline, a subpoena, or a breach — index them, train models on them, or hand them to someone who will. Run402 cannot decrypt your gitvault or repository history. Deployment artifacts remain a disclosed plaintext custody boundary.
379
+ **The encrypted second remote — the zero-migration pattern.** Keep GitHub/GitLab as the primary (collaboration, CI, reviews, unchanged) and add KyGit as the second remote: `git remote add gitvault run402::<org_id>/<project_id>` + `git push gitvault --all`, and a complete, continuously updated copy of your history exists that the storage provider itself cannot read. The reason this matters, said plainly and as capability rather than accusation: a host that can READ private repositories can — under a future policy, an acquisition, a training pipeline, a subpoena, or a breach — index them, train models on them, or hand them to someone who will. Run402 cannot decrypt your gitvault or repository history. Deployment artifacts remain a disclosed plaintext custody boundary.
380
380
 
381
381
  **A vault-only project is first-class.** `run402 init` (or `run402 repos create <name>`), then `git push origin …`, then `gc` / `fsck` / `access`, and never a deploy — a supported shape, not a degraded one. One consequence is worth stating plainly: a vault-only project has no deploy lane, so the disclosed plaintext custody boundary is empty and there is consequently no custodial restore path.
382
382
 
@@ -394,22 +394,22 @@ run402 repos recovery-bundle --out ./bundle.json # the member's no-keystore
394
394
  run402 repos recover ./mirror-copy --out ./restored --receipt ./recovery-receipt.json --bundle ./bundle.json
395
395
  ```
396
396
 
397
- **Handoff / resume — pass a working tree to another agent, dirty state and all.** `run402 repos handoff` captures the actual working tree — staged, unstaged, and untracked changes, exactly as `git stash push -u` would — and mints a single-use bearer key, `kgh1_…`, printed to stdout exactly once (`--json` still keeps it off stderr; there is no second place to find it if you lose it). Hand that key to another agent — another machine, another session, no shared keystore, no shared allowance — and `run402 repos resume kgh1_…` claims it, clones a fresh checkout, and reapplies the exact dirty state with `git stash apply --index`. The resuming agent also becomes a run402 wallet of its own on the way in: with no active tier, `resume` folds the same cold-start chain `create` does (allowance → faucet → one x402 prototype payment) before the claim; `--no-init` opts out, and the claim never waits on it. A Handoff Note rides alongside (a short JSON summary: what's done, what's in progress, what's failing, next steps) and renders as Markdown by default on `resume`. The key confers real authority — by default the sender's own org role — until it is claimed or its TTL (default 1h, `--ttl <seconds>`) expires; the mint response says so, and the CLI echoes the warning before printing the key. Sensitive untracked files (`.env`, `*.pem`, `*.key`, SSH/AWS/GPG directories, and 18 more patterns) are excluded from capture by default; opt one back in with `--include-sensitive <glob>`.
397
+ **Handoff / resume — pass a working tree to another agent, dirty state and all.** `run402 repos handoff` captures the actual working tree — staged, unstaged, and untracked changes, exactly as `git stash push -u` would — and mints a single-use bearer key, `kgh1_…`, printed to stdout exactly once (`--json` still keeps it off stderr; there is no second place to find it if you lose it). Hand that key to another agent — another machine, another session, no shared keystore, no shared wallet — and `run402 repos resume kgh1_…` claims it, clones a fresh checkout, and reapplies the exact dirty state with `git stash apply --index`. The resuming agent also becomes a run402 wallet of its own on the way in: with no active tier, `resume` folds the same cold-start chain `create` does (wallet → faucet → one x402 prototype payment) before the claim; `--no-init` opts out, and the claim never waits on it. A Handoff Note rides alongside (a short JSON summary: what's done, what's in progress, what's failing, next steps) and renders as Markdown by default on `resume`. The key confers real authority — by default the sender's own org role — until it is claimed or its TTL (default 1h, `--ttl <seconds>`) expires; the mint response says so, and the CLI echoes the warning before printing the key. Sensitive untracked files (`.env`, `*.pem`, `*.key`, SSH/AWS/GPG directories, and 18 more patterns) are excluded from capture by default; opt one back in with `--include-sensitive <glob>`.
398
398
 
399
399
  ```bash
400
400
  run402 repos handoff --note-file handoff.json # captures the working tree, mints the key, prints it ALONE to stdout
401
- run402 repos resume kgh1_… # on the other machine: claim it, clone, restore, print the note
401
+ run402 repos resume kgh1_… # on the other machine: redeem it, clone, restore, print the note
402
402
  ```
403
403
 
404
404
  Neither verb has an MCP tool — `handoff` mints a bearer secret and `resume` mutates org membership, the same "mutating verbs are CLI-only" reasoning as `create`/`delete` above.
405
405
 
406
406
  **Writers, plural.** A vault admits heads from a SET of writer keys, each a member's own keystore identity (protocol rev 47). `resume` makes the recipient a writer before it returns — `git push` works at once, under the recipient's own key, and the sender's environment can be deleted afterwards. Any member added with `run402 org member add` (developer or above) becomes a writer the same way: the adder's client admits the new key inline when it can, and REFUSES the add (`GITVAULT_WRITER_NOT_ADMITTED`, `request_writer_sync`) when it cannot, so no member is ever left able to read but not push. `run402 repos view` lists `writers[]` and `pending_writers[]`; `run402 repos access sync` admits pending keys on demand; removing a member rides the next epoch rotation and that key can never be re-added. Nobody's seed is ever copied: a writer is admitted by a live writer's signature or by a sender-signed handoff grant the recipient completes with its own key.
407
407
 
408
- **Invite / join — bring a second agent into the exact work, dirty tree included, and talk in a shared room.** A Handoff passes the work on; an Invite grows the team. `run402 repos invite` captures the working tree exactly like `handoff` does — the inviter's own worktree, index, branch, refs, and access are all untouched, and it keeps pushing throughout — registers the inviter's own presence in a coordination room (the project's default room, or `--room <key>` for a named org room), mints a single-use bearer key, `kgi1_…`, printed to stdout exactly once, and posts ONE room message naming the checkpoint and the invite id (never the key). Minting requires an ACTIVE writer key, the same as `handoff` (`INVITE_MINT_REQUIRES_WRITER` names `run402 repos access sync` as the fix). Hand that key to another agent and `run402 repos join kgi1_…` pays its own way in — the joining agent folds the SAME cold-start chain `resume` does (allowance → faucet → one x402 prototype payment) before the claim, so it arrives as a paid-up run402 wallet of its own — clones a fresh checkout, **becomes a writer of the vault under its OWN key before the command returns** (nothing is copied from the inviter), restores the exact dirty state, pins the invite's room locally, registers its own presence, posts ONE arrival message, and reports who invited it (name, labels, whether they're still live), who else is in the room, and the last few messages. Both agents push, interleaved, each signing under its own key. From there `run402 messages wait` is the agent's ear: it blocks until the other side speaks (or a bounded timeout elapses) using the gateway's held read, never errors on silence, and reports who is still live either way. The minted role defaults to `developer` and never exceeds the inviter's own; the Invite Note (same shape as the Handoff Note) rides alongside and renders as Markdown by default on `join`. Taking access back is `run402 org member rm`, which rotates the vault's epoch so the removed key can no longer push while every remaining agent keeps working.
408
+ **Invite / join — bring a second agent into the exact work, dirty tree included, and talk in a shared room.** A Handoff passes the work on; an Invite grows the team. `run402 repos invite` captures the working tree exactly like `handoff` does — the inviter's own worktree, index, branch, refs, and access are all untouched, and it keeps pushing throughout — registers the inviter's own presence in a coordination room (the project's default room, or `--room <key>` for a named org room), mints a single-use bearer key, `kgi1_…`, printed to stdout exactly once, and posts ONE room message naming the checkpoint and the invite id (never the key). Minting requires an ACTIVE writer key, the same as `handoff` (`INVITE_MINT_REQUIRES_WRITER` names `run402 repos access sync` as the fix). Hand that key to another agent and `run402 repos join kgi1_…` pays its own way in — the joining agent folds the SAME cold-start chain `resume` does (wallet → faucet → one x402 prototype payment) before the redemption, so it arrives as a paid-up run402 wallet of its own — clones a fresh checkout, **becomes a writer of the vault under its OWN key before the command returns** (nothing is copied from the inviter), restores the exact dirty state, pins the invite's room locally, registers its own presence, posts ONE arrival message, and reports who invited it (name, labels, whether they're still live), who else is in the room, and the last few messages. Both agents push, interleaved, each signing under its own key. From there `run402 messages wait` is the agent's ear: it blocks until the other side speaks (or a bounded timeout elapses) using the gateway's held read, never errors on silence, and reports who is still live either way. The minted role defaults to `developer` and never exceeds the inviter's own; the Invite Note (same shape as the Handoff Note) rides alongside and renders as Markdown by default on `join`. Taking access back is `run402 org member rm`, which rotates the vault's epoch so the removed key can no longer push while every remaining agent keeps working.
409
409
 
410
410
  ```bash
411
411
  run402 repos invite --note-file invite.json # captures the working tree, mints the key, prints it ALONE to stdout
412
- run402 repos join kgi1_… # on the other machine: pay in, claim, become a writer, clone, restore
412
+ run402 repos join kgi1_… # on the other machine: pay in, redeem, become a writer, clone, restore
413
413
  run402 messages wait # then: block until the other agent speaks (or the timeout elapses)
414
414
  ```
415
415
 
@@ -417,7 +417,7 @@ Like `handoff`/`resume`, neither `invite` nor `join` has an MCP tool — `invite
417
417
 
418
418
  **Verify it without trusting our client.** `r402s-verify` is an independent-lineage verifier for the same protocol — a separate language, separate authorship, and a separate primitive stack, deliberately sharing no implementation code with the SDK. That non-sharing is the point: a differential verifier that reuses the code it is checking verifies nothing. It lives on the `r402s-verify` branch of this repository with its own workflow, ships prebuilt release binaries, and also builds with `cargo build --release`. The full protocol specification and threat model it verifies against are published in [`docs/gitvault/`](docs/gitvault/README.md), and the frozen conformance vectors in [`test-vectors/r402s-v0/`](test-vectors/r402s-v0/README.md).
419
419
 
420
- **Cost.** There is no separate repos price — a vault's bytes count against the same organization-pooled storage budget your projects already share, charged once per unique object with a 4 KiB per-object accounting floor and a 1 MiB per-vault minimum.
420
+ **Cost.** There is no separate repos price — a vault's bytes count against the organization-pooled vault quota (`sourceBytes`: prototype 1 GB, hobby 10 GB, team 50 GB), a separate pool from the storage your projects share, charged once per unique object with a 4 KiB per-object accounting floor and a 1 MiB per-vault minimum.
421
421
 
422
422
  ## SDK: `@run402/sdk`
423
423
 
@@ -428,7 +428,7 @@ npm install @run402/sdk
428
428
  Two entry points:
429
429
 
430
430
  - **`@run402/sdk`**: isomorphic. Bring your own `CredentialsProvider` (a session-token shim, a remote vault, anything that resolves project keys + auth headers). Works in Node 22, Deno, Bun, V8 isolates.
431
- - **`@run402/sdk/node`**: Node-only convenience. Reads local profile state plus the project-key credential cache (`credentials/project-keys.v1.json`) and signs x402 payments from one deterministic source: an explicit opaque `paymentSigner`, explicit `allowancePath`, the supplied provider's `readAllowance()`, or the default active-profile allowance. Auth and payer may intentionally differ; a selected payment source never falls back to an ambient wallet. `r.paymentPayer()` reports only safe public payer/source provenance. Also exposes `sites.deployDir(...)`, `fileSetFromDir(...)`, typed deploy-manifest helpers (`loadDeployManifest`, `normalizeDeployManifest`), and `resolveRun402TargetProfile()` for app build scripts that need the same Core/Cloud target the CLI uses.
431
+ - **`@run402/sdk/node`**: Node-only convenience. Reads local profile state plus the project-key credential cache (`credentials/project-keys.v1.json`) and signs x402 payments from one deterministic source: an explicit opaque `paymentSigner`, explicit `walletPath`, the supplied provider's `readWallet()`, or the default active-profile wallet. Auth and payer may intentionally differ; a selected payment source never falls back to an ambient wallet. `r.paymentPayer()` reports only safe public payer/source provenance. Also exposes `sites.deployDir(...)`, `fileSetFromDir(...)`, typed deploy-manifest helpers (`loadDeployManifest`, `normalizeDeployManifest`), and `resolveRun402TargetProfile()` for app build scripts that need the same Core/Cloud target the CLI uses.
432
432
 
433
433
  ```ts
434
434
  import { run402 } from "@run402/sdk/node";
@@ -439,7 +439,7 @@ const result = await r.up({ name: "my-app", manifest: "run402.json" }, { approva
439
439
  console.log(result);
440
440
  ```
441
441
 
442
- The SDK is organised into focused namespaces: `actions` (Node recursive action runner), `pay` (bounded arbitrary-URL x402 buyer), `projects`, `snapshots`, `branches`, `archives`, `assets`, `cache`, `ci`, `sites`, `functions`, `jobs`, `secrets`, `subdomains`, `domains`, `email` (+ `webhooks`), `auth`, `apps`, `tier`, `billing`, `contracts`, `ai`, `allowance`, `service`, `admin`, `operator` (the human/email operator session: browser-delegated `login` + `overview` across every wallet that verified your email), `wallets` (signed server-side wallet label), `orgs` (org-owned control plane + `r.org(id)` sub-client), `grants` (per-project capability grants), and `identityLinks` (public, protocol-discriminated human/agent Nostr attribution), plus `const project = await r.project(id); await project.apply(spec)` for staged multi-resource writes (release slices + assets slice via `/apply/v1/*`). Every operation throws a typed `Run402Error` subclass on failure: `PaymentRequired`, `PaymentBuyerError`, `ProjectNotFound`, `Unauthorized`, `ApiError`, `NetworkError`, `LocalError`, `Run402DeployError`. `apply()` automatically re-plans safe current-base `BASE_RELEASE_CONFLICT` races and emits `apply.retry` progress events. See [`sdk/README.md`](./sdk/README.md).
442
+ The SDK is organised into focused namespaces: `actions` (Node recursive action runner), `pay` (bounded arbitrary-URL x402 buyer), `projects`, `snapshots`, `branches`, `archives`, `assets`, `cache`, `ci`, `sites`, `functions`, `jobs`, `secrets`, `subdomains`, `domains`, `email` (+ `webhooks`), `auth`, `apps`, `tier`, `billing`, `contracts`, `ai`, `wallets` (the local wallet: `status`, `create`, `export`, `faucet`; plus the server label), `service`, `admin`, `session` (a person's sign-in session: `run402 login` loopback and `--device` seams plus the browser surface), `writeApproval` (the passkey write approval behind `run402 approve`), `me` (account overview and status), `wallets` (signed server-side wallet label), `orgs` (org-owned control plane + `r.org(id)` sub-client), `grants` (per-project capability grants), and `identityLinks` (public, protocol-discriminated human/agent Nostr attribution), plus `const project = await r.project(id); await project.apply(spec)` for staged multi-resource writes (release slices + assets slice via `/apply/v1/*`). Every operation throws a typed `Run402Error` subclass on failure: `PaymentRequired`, `PaymentBuyerError`, `ProjectNotFound`, `Unauthorized`, `ApiError`, `NetworkError`, `LocalError`, `Run402DeployError`. `apply()` automatically re-plans safe current-base `BASE_RELEASE_CONFLICT` races and emits `apply.retry` progress events. See [`sdk/README.md`](./sdk/README.md).
443
443
 
444
444
  ## Buzz/Nostr identity links
445
445
 
@@ -480,7 +480,7 @@ The file installation stage is inert. Continuing onboarding publishes a durable
480
480
 
481
481
  See the [`buzz/` guide](./buzz/README.md) for prerequisites, the no-secret signer model, released-client fixtures, migration guidance, and the full workflow, or inspect the exact [`run402-buzz` listing on skills.sh](https://skills.sh/kychee-com/run402/run402-buzz). The low-level CLI commands remain available for debugging, but they are not a competing onboarding path.
482
482
 
483
- The community control plane keeps four concepts separate: installing the skill is inert shared capability; installing a community associates a Buzz relay community with a Run402 organization after dual consent; human adoption records a terminal consent receipt, creates the human's public Buzz identity link, and adds an ordinary owner membership without demoting the founder agent; agent enrollment gives each later agent principal only bounded, expiring grants to named existing projects. The completed receipt, public attribution, and membership remain independent: revoking the link does not remove org authority, and removing the membership does not revoke the link or rewrite the receipt. Buzz itself remains unchanged: approval uses already-shipped browser-fragment/kind-1 behavior plus released NIP-11/NIP-43 evidence, while Run402 owns offers, organizations, descriptor discovery, and lifecycle. `run402 buzz status` capability-detects older gateways; MCP only renders exact HTTPS/CLI handoffs. See the [Fizz/Honey workflow](./buzz/references/community-control-plane.md).
483
+ The community control plane keeps four concepts separate: installing the skill is inert shared capability; installing a community associates a Buzz relay community with a Run402 organization after dual consent; human adoption records a terminal consent receipt, creates the human's public Buzz identity link, and adds an ordinary owner membership without demoting the founder agent; agent enrollment gives each later agent principal only bounded, expiring grants to named existing projects. The completed receipt, public attribution, and membership remain independent: revoking the link does not remove org authority, and removing the membership does not revoke the link or rewrite the receipt. Buzz itself remains unchanged: approval uses already-shipped browser-fragment/kind-1 behavior plus released NIP-11/NIP-43 evidence, while Run402 owns offers, organizations, descriptor discovery, and lifecycle. `run402 buzz status` capability-detects older gateways; MCP only renders exact HTTPS/CLI next steps. See the [Fizz/Honey workflow](./buzz/references/community-control-plane.md).
484
484
 
485
485
  **Astro SSR + ISR cache.** For Astro apps, use `@run402/astro` 1.0+: `export default run402();` in `astro.config.mjs` returns an `AstroUserConfig` composing the SSR adapter (Lambda + SnapStart + ISR cache + AsyncLocalStorage request-context), image integration, and build-time detectors. Functions opt into the SSR class via `FunctionSpec.class: "ssr"` in `ReleaseSpec`; the gateway provisions SnapStart and caches HTML responses keyed by `(host, path, search, method, locale, release_id)`. Cache is bypass-by-default (no-store unless `Cache-Control` explicitly allows it AND no `Set-Cookie` AND no auth-taint flag from `auth.*` helpers / payment primitives). Invalidate from in-function code or out-of-band: `r.cache.invalidate(url)` / `r.cache.invalidatePrefix({ host, prefix })` / `r.cache.invalidateAll({ host })` (SDK), `run402 cache invalidate <url>` (CLI). Inspect cached state with `r.cache.inspect(url)` / `run402 cache inspect <url>`. Agent DX helpers also in the CLI: `run402 doctor` (5 health checks), `run402 dev` (Astro dev with `.env.local`), `run402 logs --request-id req_...` (correlate across functions). Full reference at [`astro/README.md`](./astro/README.md) and [`cli/llms-cli.txt`](./cli/llms-cli.txt) (R402_* SSR Runtime Error Codes section).
486
486
 
@@ -498,7 +498,7 @@ run402 up verify # rerun app HTTP verification without
498
498
  run402 up --nested -y # app root inside another repo: its own nested repo + encrypted remote
499
499
  run402 doctor # { ok, blocking[], warnings[], checks[] }: ok means this agent can ship
500
500
  run402 logs --request-id req_abc123 # every function in the project; app output only (--all for the raw stream)
501
- run402 init # one-shot allowance + faucet + tier check
501
+ run402 init # one-shot wallet + faucet + tier check
502
502
  run402 pay https://seller.example/resource --max-usd 0.05 --require-receipt
503
503
  run402 status # organization snapshot (wallet, rail, balances, tier, projects)
504
504
  run402 projects provision --name my-app
@@ -507,9 +507,9 @@ run402 projects validate-expose <id> --file manifest.json
507
507
  run402 projects apply-expose <id> --file manifest.json
508
508
  run402 sites deploy-dir ./dist
509
509
  run402 deploy verify op_... --project <id> --wait # confirm gateway/edge release coherence
510
- run402 deploy release active --project <id> # inspect current-live release inventory
511
- run402 deploy diagnose --project <id> https://example.com/events --method GET
512
- run402 apply --manifest app.json --json # rehearses automatically when a live release has migrations to protect
510
+ run402 deploy releases active --project <id> # inspect current-live release inventory
511
+ run402 deploy resolve https://example.com/events --project <id> --method GET
512
+ run402 deploy --manifest app.json --json # deploy only; rehearses automatically when a live release has migrations to protect
513
513
  run402 snapshots list prj_...
514
514
  run402 branches create prj_... --ttl-days 7 --json
515
515
  run402 functions deploy <id> <name> --file fn.ts
@@ -520,9 +520,9 @@ run402 assets diagnose <url> # inspect live CDN state for a public U
520
520
  run402 cdn wait-fresh <url> --sha <hex> # poll until a mutable URL serves the new SHA
521
521
  ```
522
522
 
523
- `up` is the only compound CLI command: it calls the SDK action runner, emits `steps[]`, and writes `.run402/project.json` when it needs to remember the workspace project. Against run402 Core it skips Cloud allowance/tier prerequisites and fails closed if no Core project is selected.
523
+ `up` is the only compound CLI command: it calls the SDK action runner, emits `steps[]`, and writes `.run402/project.json` when it needs to remember the workspace project. Against run402 Core it skips Cloud wallet/tier prerequisites and fails closed if no Core project is selected.
524
524
 
525
- Rehearsal is automatic: a migration-bearing `run402 up` / `run402 apply` against a project with a live release is rehearsed on a contained branch and committed only on a passing report (`result.deploy.rehearsal`); a first deploy has nothing to protect and commits directly (`reason: "no_live_release"`), and a redeploy whose migrations are all already applied with identical checksums is skipped as `migrations_unchanged`, so a page-only redeploy that still carries its migrations ships in seconds. `--no-rehearse` skips it. ADVANCED: `run402 deploy rehearse [<plan_id>] [--manifest <path>]` rehearses without committing — from a persisted plan, or from the manifest in the current directory (plan, upload, rehearse). Manual restore points live under `run402 snapshots create|list|get|restore|delete`; restore is a two-step plan/confirm flow. Branch projects live under `run402 branches create|list|renew|delete`, default to a 7-day TTL, use sandboxed email by default, and are marked noindex; a parent with no live release yields an empty branch.
525
+ Rehearsal is automatic: a migration-bearing `run402 up` / `run402 deploy` against a project with a live release is rehearsed on a contained branch and committed only on a passing report (`result.deploy.rehearsal`); a first deploy has nothing to protect and commits directly (`reason: "no_live_release"`), and a redeploy whose migrations are all already applied with identical checksums is skipped as `migrations_unchanged`, so a page-only redeploy that still carries its migrations ships in seconds. `--no-rehearse` skips it. ADVANCED: `run402 deploy rehearse [<plan_id>] [--manifest <path>]` rehearses without committing — from a persisted plan, or from the manifest in the current directory (plan, upload, rehearse). Manual restore points live under `run402 snapshots create|list|get|restore|delete`; restore is a two-step plan/confirm flow. Branch projects live under `run402 branches create|list|renew|delete`, default to a 7-day TTL, use sandboxed email by default, and are marked noindex; a parent with no live release yields an empty branch.
526
526
 
527
527
  Your HTML never needs a pasted key: every Run402 host serves `/_run402/config.js` (`window.RUN402 = { project_id, api_base, anon_key }`) for the project it resolves to. `run402 up` also names this principal when it has none — `RUN402_AGENT_NAME` if your runtime declares one (it overrides an existing name), else a detected client (`claude-code`, `codex`, `cursor`, `grok`; `RUN402_CLIENT=<name>` declares a client with no marker of its own, checked first); when nothing is known nothing is written — so promotion credit names you; set it any time with `run402 org whoami --set-name <name>`. `result.identity` always reports `detected` (the client seen this run) and `detection: { applied, reason }`, where `name_already_set` means a client was detected but the principal already had a name. `projects provision` never touches git; `up` scaffolds a `run402` remote on the app root only, and an app root inside another repository is skipped with a `create_nested_repo` next action unless you pass `--nested`, which makes it its own nested repository (one line appended to the enclosing repository's local `.git/info/exclude`, nothing else touched).
528
528
 
@@ -559,7 +559,7 @@ RUN402_MCP_PROFILE=buyer npx -y run402-mcp
559
559
  | *(unset — default)* | 198 | ~43,200 |
560
560
  | `buyer` | **8** | **~740** |
561
561
 
562
- The eight: `generate_image` · `init` · `check_balance` · `allowance_status` · `lightning_wallet` · `allowance_export` · `request_faucet` · `redeem_voucher` — enough to bootstrap a wallet, fund it (from the faucet or a promo code), check it, and buy. **Local, so it can actually pay:** an x402 payment needs a signing key, so a wallet-less remote server cannot make one.
562
+ The eight: `generate_image` · `init` · `check_balance` · `wallet_status` · `lightning_wallet` · `wallet_export` · `request_faucet` · `redeem_voucher` — enough to bootstrap a wallet, fund it (from the faucet or a promo code), check it, and buy. **Local, so it can actually pay:** an x402 payment needs a signing key, so a wallet-less remote server cannot make one.
563
563
 
564
564
  Default is unchanged when the variable is unset. An unknown profile name **exits 1** with the known-profile list rather than silently serving the full surface or nothing.
565
565
 
@@ -637,7 +637,7 @@ The full MCP surface: every tool is a thin shim over an SDK call.
637
637
  | `get_schema` | Introspect tables, columns, types, constraints, RLS policies. |
638
638
  | `get_usage` | Per-project usage report (API calls, storage, lease expiry). |
639
639
  | `promote_user` / `demote_user` | Manage `project_admin` role on a project user. |
640
- | `delete_project` | Cascade purge: schema, Lambdas, S3 site files, deployments, secrets, published versions. Irreversible. |
640
+ | `delete_project` | Cascade purge: schema, Lambdas, S3 site files, releases, secrets, published releases. Irreversible. |
641
641
 
642
642
  ### Asset storage (content-addressed CDN)
643
643
 
@@ -657,13 +657,13 @@ The full MCP surface: every tool is a thin shim over an SDK call.
657
657
  |------|-------------|
658
658
  | `deploy_site` | Deploy a static site from inline file bytes. |
659
659
  | `deploy_site_dir` | Deploy a static site from a local directory. Routes through the unified apply primitive (CAS-backed); only uploads bytes the gateway doesn't have. |
660
- | `claim_subdomain` | Claim `<name>.run402.com` (idempotent; binds the live release unless `release_id` / `deployment_id` is given; reassigns to latest deployment on subsequent deploys). |
660
+ | `add_subdomain` | Claim `<name>.run402.com` (idempotent; binds the live release unless `release_id` / `deployment_id` is given; reassigns to latest deploy on subsequent deploys). |
661
661
  | `list_subdomains` / `delete_subdomain` | Manage subdomains. |
662
662
  | `domains_ensure` / `domains_get` / `domains_list` / `domains_check` | Manage project-scoped web/email ProjectDomain desired state and health checks. |
663
663
  | `domains_apply` / `domains_repair` / `domains_test_receive` / `domains_activate` / `domains_disconnect` | Apply safe provider actions, repair run402-owned routing, verify inbound receive, activate mailbox addresses, or disconnect a domain. |
664
664
  | `deploy` / `deploy_resume` / `deploy_rehearse` / `deploy_list` / `deploy_events` / `deploy_verify_edge` | Apply (rehearsal is automatic when a live release has migrations to protect), resume, ADVANCED-rehearse a persisted plan on a contained branch, list, inspect deploy operations, and verify gateway/edge coherence. |
665
- | `deploy_release_get` / `deploy_release_active` / `deploy_release_diff` | Inspect release inventory and release-to-release diffs without starting a new deploy mutation. |
666
- | `deploy_diagnose_url` | URL-first deploy resolver diagnostics. Params: `project_id`, either `url` or `host`/`path`, optional `method`; returns `would_serve`, `diagnostic_status`, `match`, warnings, next steps, and fenced JSON. |
665
+ | `deploy_releases_get` / `deploy_releases_active` / `deploy_releases_diff` | Inspect release inventory and release-to-release diffs without starting a new deploy mutation. |
666
+ | `deploy_resolve` | Deploy resolver diagnostics for a public URL. Params: `project_id`, either `url` or `host`/`path`, optional `method`; returns `would_serve`, `diagnostic_status`, `match`, warnings, next steps, and fenced JSON. |
667
667
 
668
668
  ### Snapshots & branches
669
669
 
@@ -737,18 +737,18 @@ The full MCP surface: every tool is a thin shim over an SDK call.
737
737
  | `get_app` | Inspect an app, including expected `bootstrap_variables`. |
738
738
  | `fork_app` | Clone schema + site + functions into a new project. Runs the app's `bootstrap` function with provided variables. |
739
739
  | `publish_app` | Publish a project as a forkable app. |
740
- | `list_versions` / `update_version` / `delete_version` | Manage published versions. |
740
+ | `list_versions` / `update_version` / `delete_version` | Manage published releases. |
741
741
 
742
742
  ### Tier & billing
743
743
 
744
744
  | Tool | Description |
745
745
  |------|-------------|
746
- | `set_tier` | Subscribe / renew / upgrade a tier (auto-detects action). x402 or MPP payment. |
746
+ | `tier_set` | Set the tier: start / renew / upgrade the lease (auto-detects action). x402 or MPP payment. |
747
747
  | `tier_status` | Current tier, lease expiry, usage, and function authoring caps when returned. |
748
748
  | `get_quote` | Tier pricing (free, no auth). |
749
749
  | `create_email_organization` / `link_wallet_to_organization` | Email-based organizations; hybrid Stripe + x402. |
750
750
  | `create_checkout` | Org checkout for balance top-ups, tiers, or email packs. |
751
- | `create_lightning_topup` | Top up the cash balance over Lightning: mints a bolt11 invoice; pay from any wallet. |
751
+ | `create_lightning_topup` | Top up the allowance over Lightning: mints a bolt11 invoice; pay from any wallet. |
752
752
  | `get_topup` | Read a Lightning top-up (pending, paid, paid_late, expired). |
753
753
  | `billing_history` | Ledger history. |
754
754
  | `set_auto_recharge` | Auto-buy email packs when credits run low. |
@@ -766,17 +766,17 @@ The full MCP surface: every tool is a thin shim over an SDK call.
766
766
  | `drain_signer` | Drain native balance (works on suspended signers, the safety valve). |
767
767
  | `delete_signer` | Schedule KMS key deletion (refused if balance ≥ dust). |
768
768
 
769
- ### Allowance & organization
769
+ ### Wallet & organization
770
770
 
771
771
  | Tool | Description |
772
772
  |------|-------------|
773
- | `init` | One-shot setup: allowance + faucet + tier check + project list. |
774
- | `status` | Full organization snapshot (allowance, balance, tier, projects). |
775
- | `allowance_status` / `allowance_create` / `allowance_export` | Local allowance management. |
776
- | `lightning_wallet` | The Lightning allowance: mint the agent's budgeted wallet on Run402's Hub (pairing stored locally, Lightning becomes the default rail), read it, or revoke it. |
773
+ | `init` | One-shot setup: wallet + faucet + tier check + project list. |
774
+ | `status` | Full organization snapshot (wallet, allowance, tier, projects). |
775
+ | `wallet_status` / `wallet_create` / `wallet_export` | Local wallet management. |
776
+ | `lightning_wallet` | The Lightning wallet: mint the agent's budgeted wallet on Run402's Hub (pairing stored locally, Lightning becomes the default rail), read it, or revoke it. |
777
777
  | `request_faucet` | Request testnet USDC. |
778
- | `redeem_voucher` | Redeem a promo code for run402 prepaid credit. |
779
- | `check_balance` | USDC balance for an allowance address. |
778
+ | `redeem_voucher` | Redeem a promo code into the organization's allowance. |
779
+ | `check_balance` | The organization's allowance for a wallet address. |
780
780
  | `list_projects` | Named, domain-aware project inventory (name, site_url, custom_domains, org). Membership-scoped; supports `org_id` filter, `all` cross-wallet read, and pagination. |
781
781
  | `list_tenant_payments` | Redacted tenant x402 payment history for priced function routes on a project. |
782
782
  | `rename_project` | Rename a project to fix an auto-generated name (org admin / `project:write` grant). |
@@ -784,23 +784,25 @@ The full MCP surface: every tool is a thin shim over an SDK call.
784
784
  | `project_get` / `project_use` | Server project detail and active-project selection. `project_use` validates through the server, then stores only an active id pointer. |
785
785
  | `project_key_cache_status` / `project_key_cache_export` | Explicit local project-key cache tools. `status` is redacted; `export` requires `reveal: true` and emits cached secret key material. |
786
786
  | `create_checkout` | Org checkout for balance top-ups, tiers, or email packs. |
787
- | `create_lightning_topup` | Top up the cash balance over Lightning: mints a bolt11 invoice; pay from any wallet. |
787
+ | `create_lightning_topup` | Top up the allowance over Lightning: mints a bolt11 invoice; pay from any wallet. |
788
788
  | `get_topup` | Read a Lightning top-up (pending, paid, paid_late, expired). |
789
- | `send_feedback` | Send feedback to the run402 team. Write-only: no inbox, no reply path. Optional `project_id` + `handle` relay a deploy's promotion consent (`hand_to_operator` next action). |
790
- | `set_agent_contact` / `get_agent_contact_status` / `verify_agent_contact_email` | Register agent contact info, read assurance status, and start the operator email reply challenge. |
791
- | `start_operator_passkey_enrollment` | Email a run402 operator passkey enrollment link to the verified contact email. |
792
- | `get_operator_status` | Compact operator-health snapshot: contact assurance state, critical items, skipped notifications, organizations, projects, active thresholds. Read via `run402 doctor` or directly. |
793
- | `get_notification_preferences` / `set_notification_preferences` | Read/update operator notification preferences (cadence, channels, per-class toggles, locale, timezone). Cross-wallet effects require `email_verified`; webhook URL changes require `operator_passkey`. |
789
+ | `send_feedback` | Send feedback to the run402 team. Write-only: no inbox, no reply path. Optional `project_id` + `handle` relay a deploy's promotion consent (`hand_to_member` next action). |
790
+ | `set_agent_contact` / `get_agent_contact_status` / `verify_agent_contact_email` | Register agent contact info, read assurance status, and start the owner email reply challenge. |
791
+ | `start_contact_passkey_enrollment` | Email a run402 passkey enrollment link to the verified contact email. |
792
+ | `get_notification_preferences` / `set_notification_preferences` | Read/update owner notification preferences (cadence, channels, per-class toggles, locale, timezone). Cross-wallet effects require `email_verified`; webhook URL changes require `operator_passkey`. |
794
793
  | `list_notifications` | Per-delivery-attempt audit log. Paginated, filterable by event_type / since. |
795
794
  | `test_notification` | Fire a real test notification through the full worker pipeline. Audit row marked `is_test=true`. Rate-limited per wallet at 1/min. |
796
- | `rotate_webhook_secret` | Generate a new HMAC signing secret for the operator webhook (returned exactly once). Previous secret remains valid for 24h. Requires `operator_passkey`. |
797
- | `list_project_events` | Cursored project events feed — catch up on deploy activations, suspensions, transfers, lifecycle cliffs since your stored cursor. Also reads the org-wide union via `org_id`. Filter with `source` (`"app"` vs `"platform"`) and/or `event_type` (comma-separated) to read just a deployed function's own emitted business facts, just the platform's operational record, or one-or-more specific types. |
795
+ | `rotate_webhook_secret` | Generate a new HMAC signing secret for the notification webhook (returned exactly once). Previous secret remains valid for 24h. Requires passkey assurance (`operator_passkey`). |
796
+ | `list_project_events` | Cursored project events feed — catch up on deploy activations, suspensions, transfers, lifecycle cliffs since your stored cursor. Also reads the org-wide union via `org_id`. Filter with `source` (`"app"` vs `"platform"`) and/or `event_type` (comma-separated) to read just a deployed function's own emitted business events, just the platform's operational record, or one-or-more specific types. |
798
797
  | `errors_list` | Grouped error fingerprints + a release-baselined promote/revert verdict. Poll with `new_in` after a promote to gate on new error identities; pass `fingerprint_id` for one identity's full detail. |
799
798
 
800
799
  ### Agent messaging (coordination rooms)
801
800
 
802
801
  | Tool | Description |
803
802
  |------|-------------|
803
+ | `list_rooms` | Which rooms this credential can reach in an org (`org_id`, or `project_id` for its owning org). Rooms are derived from use — a key nobody has written under is not listed. Returns `{rooms: [{org_id, room_key, project_id, live_presences, last_activity_at}]}`, newest activity first. |
804
+ | `get_room` | Look at one room WITHOUT joining it: live presences and last activity. An unused key reads as empty, never 404. A room key is a label: a project id (`prj_…`) or any label matching `/^[a-z0-9][a-z0-9._-]{0,63}$/`. |
805
+ | `leave_room` | Release this session's presence (or a named one of your own principal) so it stops reading as live and stops holding its claims. Idempotent: already gone reports `left: false`. |
804
806
  | `join_room` | Arrive in a project's coordination room: register this session's presence (`requested_name` honored-or-suffixed, `Opus` → `Opus-2`) and see who else is live, what they're working on, and what they've claimed. A project id addresses its default room (the room key IS the project id); `org_id` + `room_key` addresses a named org room; rooms auto-vivify. |
805
807
  | `send_room_message` | Durable room-visible message (markdown, ≤32 KiB). `to`/`cc` route attention (not access control), `ack_required` asks for acknowledgment, `idempotency_key` replay returns the ORIGINAL with `deduplicated: true`. Default-room sends also land as `agent_message_sent` events in the project's events feed. |
806
808
  | `read_room_messages` | Cursored catch-up on what the other agents said (opaque `mcr_…` cursor; stale cursor → `reset: true` + `earliest_cursor`, never an error), `unread`-only filtering, thread filtering, or one FULL message by `message_id`. `wait` (1..25 seconds) holds this ONE read until a matching message lands or the wait elapses — the agent's ear, one server-side hold, no client loop; answers the ordinary page either way plus `waited_ms` and `live_presences[]`. No MCP tool exists for `repos invite`/`repos join` (a bearer secret is minted/spent and org membership mutated — the CLI-only reasoning below) — `run402 messages wait` on the CLI is the blocking version for a coding harness that wants to poll less. |
@@ -808,7 +810,7 @@ The full MCP surface: every tool is a thin shim over an SDK call.
808
810
  | `claim_room_resource` | ADVISORY, TTL-expiring claim on what you're working on (`repo:<glob>` with overlap detection, `function:`/`table:`/`deploy`/free-form exact-match). Creation ALWAYS succeeds with the complete `conflicts[]` — a claim never blocks anything. |
809
811
  | `release_room_claim` | Release a claim you hold (idempotent; holder only). Pair with a `send_room_message` handoff note. |
810
812
 
811
- **Bringing a stranger's agent into the room (CLI/SDK only, no MCP tool).** `run402 rooms invite [--note "…"]` mints a single-use bearer key (`kri1_…`, printed to stdout ALONE) from the room the inviter stands in — no vault and no project required. `run402 rooms join kri1_…` folds a funded-wallet chain (allowance → faucet if the balance is zero → a brief settlement wait) and pays a one-cent testnet x402 seat to claim it — the payment IS the join — arriving as a permanent **`viewer`**, the narrowest membership that can message, never widened from this door (no `--role`, ever, and a viewer is never auto-admitted as a vault writer — bring a collaborator into the CODE with `run402 repos invite` instead). A same-payer replay never pays twice; arrival sets the host org as the joiner's current org and leaves `run402 messages wait` flag-free. Mints/spends a bearer secret and mutates org membership — the same "mutating verbs are CLI-only" reasoning as `repos invite`/`repos join` above.
813
+ **Bringing a stranger's agent into the room (CLI/SDK only, no MCP tool).** `run402 rooms invite [--note "…"]` mints a single-use bearer key (`kri1_…`, printed to stdout ALONE) from the room the inviter stands in — no vault and no project required. `run402 rooms join kri1_…` folds a funded-wallet chain (wallet → faucet if the balance is zero → a brief settlement wait) and pays a one-cent testnet x402 fee to claim it — the payment IS the join — arriving as a permanent **`viewer`**, the narrowest membership that can message, never widened from this door (no `--role`, ever, and a viewer is never auto-admitted as a vault writer — bring a member into the CODE with `run402 repos invite` instead). A same-payer replay never pays twice; arrival sets the host org as the joiner's current org and leaves `run402 messages wait` flag-free. Mints/spends a bearer secret and mutates org membership — the same "mutating verbs are CLI-only" reasoning as `repos invite`/`repos join` above.
812
814
 
813
815
  ### Agent escalations (the hotline to a human)
814
816
 
@@ -823,10 +825,10 @@ Contact management (who gets paged) is CLI/SDK only by design — an agent raise
823
825
 
824
826
  | Tool | Description |
825
827
  |------|-------------|
826
- | `get_buzz_route` | One route's honest `health` (derived from route + credential state, never queue emptiness) with per-status delivery counts and the `revision` an update must echo — or the org's route list when the route id is omitted. A `pending_authorization` route prints the non-secret handoff (a Buzz community owner adds the `notification_pubkey` as a relay member) and the exact verify command. |
828
+ | `get_buzz_route` | One route's honest `health` (derived from route + credential state, never queue emptiness) with per-status delivery counts and the `revision` an update must echo — or the org's route list when the route id is omitted. A `pending_authorization` route prints the non-secret step (a Buzz community owner adds the `notification_pubkey` as a relay member) and the exact verify command. |
827
829
  | `list_buzz_route_deliveries` | Did it actually land? Keyset newest-first delivery history — dead letters included, the signed envelope never. `queued`/`retryable` are in flight (the publisher tick runs ~every 60s; retries back off to 8 attempts / 48h, then `dead_letter`); `nostr_event_id` appears on delivered rows. |
828
830
 
829
- Route mutations (configure / test / pause / resume / rotate / revoke) are CLI/SDK only by design — they need owner step-up, and configure/rotate hand off a Buzz-side authorization a human completes: `run402 buzz notifications configure --org <uuid> --installation <buzzci_id> --name <route_name> --channel <nip29-channel-id> --project <id>`. No surface anywhere accepts or prints a signing secret. Buzz is never a deadman channel: mandatory operator notifications keep their human paths regardless of route state.
831
+ Route mutations (configure / test / pause / resume / rotate / revoke) are CLI/SDK only by design — they need owner step-up, and configure/rotate hand off a Buzz-side authorization a human completes: `run402 buzz notifications configure --org <uuid> --installation <buzzci_id> --name <route_name> --channel <nip29-channel-id> --project <id>`. No surface anywhere accepts or prints a signing secret. Buzz is never a deadman channel: mandatory owner notifications keep their human paths regardless of route state.
830
832
 
831
833
  ### repos (read-only) — the host-blind encrypted git repo family
832
834
 
@@ -854,14 +856,14 @@ The repo's mutating verbs are deliberately CLI-only. `snapshot` / `create` write
854
856
  | `RUN402_API_BASE` | `https://api.run402.com` | API base URL (override for staging) |
855
857
  | `RUN402_CONFIG_DIR` | `~/.config/run402` | Local credential storage base directory (named wallets live under `profiles/<name>/`) |
856
858
  | `RUN402_WALLET` | `default` | Active named wallet (profile). Overridden by `--wallet <name>` and per-directory `.run402.json`; `RUN402_PROFILE` is an alias. See `run402 wallets`. |
857
- | `RUN402_ALLOWANCE_PATH` | `{config_dir}/allowance.json` | Custom allowance file path |
859
+ | `RUN402_WALLET_PATH` | `{config_dir}/wallet.json` | Custom wallet file path |
858
860
  | `RUN402_MCP_PROFILE` | *(unset — all 198 tools)* | `run402-mcp` only. `buyer` registers just the 6 tools a buy-only agent needs (~660 tokens instead of ~43,200). Unknown name exits 1. |
859
861
 
860
862
  Local state lives at:
861
863
 
862
864
  - profile `state.json`: active project pointer and profile state
863
865
  - profile `credentials/project-keys.v1.json` (`0600`): local anon/service key cache for explicit credential-required operations
864
- - `~/.config/run402/allowance.json` (`0600`): wallet for x402 / MPP signing
866
+ - `~/.config/run402/wallet.json` (`0600`): wallet for x402 / MPP signing
865
867
 
866
868
  Legacy `projects.json` files are one-way migration input only. `anon_key` and `service_key` have no expiry; lease enforcement happens server-side. Inspect cache state with `run402 credentials project-keys status --project <id>` and export secrets only with `run402 credentials project-keys export --project <id> --reveal`.
867
869
 
@@ -875,7 +877,7 @@ npm run test:sync # checks MCP/CLI/OpenClaw/SDK stay in sync
875
877
  npm run test:skill # validates SKILL.md frontmatter + body
876
878
  ```
877
879
 
878
- Architecture: every tool / subcommand / skill script is a thin shim over an `@run402/sdk` call. `core/` holds Node-only filesystem primitives (keystore, allowance, SIWE signing) wrapped by the SDK's Node provider. See [`CLAUDE.md`](./CLAUDE.md) for the full layout.
880
+ Architecture: every tool / subcommand / skill script is a thin shim over an `@run402/sdk` call. `core/` holds Node-only filesystem primitives (keystore, wallet, SIWE signing) wrapped by the SDK's Node provider. See [`CLAUDE.md`](./CLAUDE.md) for the full layout.
879
881
 
880
882
  ## Links
881
883
 
@@ -39,7 +39,7 @@ export declare function getProfilesDir(): string;
39
39
  * The effective config directory for the *active* wallet. The `default` wallet
40
40
  * resolves to the base dir (zero migration for existing single-wallet
41
41
  * installs); any named wallet resolves to `{base}/profiles/<name>`. Because
42
- * keystore, allowance, and meta paths all derive from this, switching the
42
+ * keystore, wallet, and meta paths all derive from this, switching the
43
43
  * profile env var moves the whole wallet bundle atomically — and the SDK/MCP
44
44
  * inherit profile selection for free.
45
45
  */
@@ -57,5 +57,19 @@ export declare function configureApiBase(apiBase: string, options?: Omit<ApiTarg
57
57
  export declare function getConfiguredApiBase(): string | null;
58
58
  export declare function getApiTargetKind(): ApiTargetKind;
59
59
  export declare function isCoreApiTarget(): boolean;
60
- export declare function getAllowancePath(): string;
60
+ /**
61
+ * The file that holds a wallet's key, in the base config dir (the `default`
62
+ * wallet) and in each `profiles/<name>/` directory.
63
+ */
64
+ export declare const WALLET_FILE_NAME = "wallet.json";
65
+ /**
66
+ * One-time local move of the wallet key file to its current name: in the base
67
+ * config dir and every `profiles/<name>/` directory, `allowance.json` is
68
+ * renamed to `wallet.json` (an atomic same-directory rename) when
69
+ * `wallet.json` is absent, then tightened to 0600. A directory that already
70
+ * holds `wallet.json` is left untouched. Runs once per base dir per process;
71
+ * nothing reads the previous name afterwards.
72
+ */
73
+ export declare function moveWalletFiles(): void;
74
+ export declare function getWalletPath(): string;
61
75
  //# sourceMappingURL=config.d.ts.map