run402 4.93.2 → 4.95.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 (316) hide show
  1. package/README.md +61 -59
  2. package/cli.mjs +40 -47
  3. package/core-dist/config.js +52 -18
  4. package/core-dist/control-plane-session.js +31 -6
  5. package/core-dist/keystore.js +7 -7
  6. package/core-dist/profiles.js +9 -7
  7. package/core-dist/{allowance-auth.js → wallet-auth.js} +15 -15
  8. package/{sdk/core-dist/allowance.js → core-dist/wallet.js} +20 -20
  9. package/{sdk/core-dist/write-auth-session.js → core-dist/write-approvals.js} +19 -19
  10. package/gitvault-surface.json +2 -2
  11. package/lib/admin.mjs +6 -6
  12. package/lib/agent.mjs +20 -18
  13. package/lib/ai.mjs +5 -5
  14. package/lib/approve.mjs +81 -0
  15. package/lib/apps.mjs +12 -12
  16. package/lib/archives.mjs +371 -8
  17. package/lib/argparse.mjs +5 -5
  18. package/lib/assets.mjs +14 -14
  19. package/lib/auth.mjs +34 -34
  20. package/lib/billing.mjs +6 -6
  21. package/lib/branches.mjs +7 -7
  22. package/lib/buzz-doctor.mjs +2 -2
  23. package/lib/buzz-notifications.mjs +5 -5
  24. package/lib/buzz.mjs +3 -3
  25. package/lib/buzz.test.mjs +1 -1
  26. package/lib/cache.mjs +1 -1
  27. package/lib/cdn.mjs +2 -2
  28. package/lib/ci.mjs +12 -12
  29. package/lib/claims.mjs +2 -2
  30. package/lib/cold-start.mjs +21 -21
  31. package/lib/command-manifest.mjs +55 -70
  32. package/lib/config.mjs +28 -28
  33. package/lib/contacts.mjs +16 -16
  34. package/lib/contracts.mjs +12 -12
  35. package/lib/credentials.mjs +33 -33
  36. package/lib/daemon-path.mjs +1 -1
  37. package/lib/delegates.mjs +14 -14
  38. package/lib/deliveries.mjs +6 -6
  39. package/lib/deploy-rehearse-discovery.test.mjs +7 -7
  40. package/lib/deploy-v2.mjs +241 -193
  41. package/lib/deploy.mjs +21 -53
  42. package/lib/dev.mjs +3 -3
  43. package/lib/doctor-source-scan.mjs +1 -1
  44. package/lib/doctor.mjs +63 -63
  45. package/lib/domains.mjs +27 -27
  46. package/lib/email.mjs +38 -38
  47. package/lib/errors.mjs +40 -24
  48. package/lib/escalations.mjs +5 -5
  49. package/lib/events.mjs +32 -25
  50. package/lib/feedback.mjs +12 -12
  51. package/lib/functions.mjs +34 -34
  52. package/lib/gitvault-daemon.mjs +1 -1
  53. package/lib/gitvault-scaffold.mjs +2 -2
  54. package/lib/gitvault.mjs +2 -2
  55. package/lib/grants.mjs +7 -7
  56. package/lib/image.mjs +10 -10
  57. package/lib/init.mjs +69 -69
  58. package/lib/jobs.mjs +15 -15
  59. package/lib/lightning-wallet.mjs +28 -28
  60. package/lib/live.mjs +1 -1
  61. package/lib/login.mjs +207 -0
  62. package/lib/logout.mjs +53 -0
  63. package/lib/logs.mjs +8 -8
  64. package/lib/messages.mjs +5 -5
  65. package/lib/next-actions.mjs +16 -16
  66. package/lib/org-context.mjs +13 -13
  67. package/lib/{org.mjs → orgs.mjs} +215 -167
  68. package/lib/pay.mjs +1 -1
  69. package/lib/projects.mjs +70 -84
  70. package/lib/redeem.mjs +7 -8
  71. package/lib/remote-helper-session.mjs +12 -12
  72. package/lib/repos.mjs +83 -83
  73. package/lib/rooms.mjs +105 -69
  74. package/lib/sdk-errors.mjs +10 -5
  75. package/lib/sdk.mjs +3 -3
  76. package/lib/secrets.mjs +13 -13
  77. package/lib/service.mjs +5 -5
  78. package/lib/session-proofs.mjs +21 -0
  79. package/lib/sign-in.mjs +296 -0
  80. package/lib/sites.mjs +22 -22
  81. package/lib/snapshots.mjs +10 -10
  82. package/lib/stats.mjs +2 -2
  83. package/lib/status.mjs +25 -25
  84. package/lib/subdomains.mjs +30 -30
  85. package/lib/subscriptions.mjs +10 -10
  86. package/lib/tier.mjs +29 -22
  87. package/lib/transfer.mjs +59 -86
  88. package/lib/up.mjs +14 -14
  89. package/lib/wallet-context.mjs +4 -4
  90. package/lib/wallet-context.test.mjs +3 -3
  91. package/lib/wallets.mjs +197 -32
  92. package/lib/webhook-secret.mjs +6 -6
  93. package/lib/webhooks.mjs +8 -8
  94. package/lib/whoami.mjs +102 -0
  95. package/package.json +1 -1
  96. package/sdk/core-dist/config.js +52 -18
  97. package/sdk/core-dist/control-plane-session.js +31 -6
  98. package/sdk/core-dist/keystore.js +7 -7
  99. package/sdk/core-dist/profiles.js +9 -7
  100. package/sdk/core-dist/{allowance-auth.js → wallet-auth.js} +15 -15
  101. package/{core-dist/allowance.js → sdk/core-dist/wallet.js} +20 -20
  102. package/{core-dist/write-auth-session.js → sdk/core-dist/write-approvals.js} +19 -19
  103. package/sdk/dist/actions.d.ts +4 -4
  104. package/sdk/dist/actions.d.ts.map +1 -1
  105. package/sdk/dist/app-up.d.ts +2 -2
  106. package/sdk/dist/app-up.d.ts.map +1 -1
  107. package/sdk/dist/config.d.ts +1 -2
  108. package/sdk/dist/config.d.ts.map +1 -1
  109. package/sdk/dist/config.js.map +1 -1
  110. package/sdk/dist/control-plane-credentials.d.ts +8 -8
  111. package/sdk/dist/control-plane-credentials.js +7 -7
  112. package/sdk/dist/credentials.d.ts +20 -20
  113. package/sdk/dist/credentials.d.ts.map +1 -1
  114. package/sdk/dist/credentials.js +1 -1
  115. package/sdk/dist/errors.d.ts +26 -28
  116. package/sdk/dist/errors.d.ts.map +1 -1
  117. package/sdk/dist/errors.js +35 -38
  118. package/sdk/dist/errors.js.map +1 -1
  119. package/sdk/dist/index.d.ts +29 -16
  120. package/sdk/dist/index.d.ts.map +1 -1
  121. package/sdk/dist/index.js +30 -17
  122. package/sdk/dist/index.js.map +1 -1
  123. package/sdk/dist/kernel.d.ts +1 -1
  124. package/sdk/dist/kernel.d.ts.map +1 -1
  125. package/sdk/dist/kernel.js +10 -9
  126. package/sdk/dist/kernel.js.map +1 -1
  127. package/sdk/dist/namespaces/admin.d.ts +52 -121
  128. package/sdk/dist/namespaces/admin.d.ts.map +1 -1
  129. package/sdk/dist/namespaces/admin.js +41 -45
  130. package/sdk/dist/namespaces/admin.js.map +1 -1
  131. package/sdk/dist/namespaces/agent.d.ts +2 -2
  132. package/sdk/dist/namespaces/agent.d.ts.map +1 -1
  133. package/sdk/dist/namespaces/agent.js +2 -2
  134. package/sdk/dist/namespaces/agent.js.map +1 -1
  135. package/sdk/dist/namespaces/ai.d.ts +2 -2
  136. package/sdk/dist/namespaces/ai.js +3 -3
  137. package/sdk/dist/namespaces/ai.js.map +1 -1
  138. package/sdk/dist/namespaces/assets.js +1 -1
  139. package/sdk/dist/namespaces/assets.js.map +1 -1
  140. package/sdk/dist/namespaces/billing.d.ts +6 -3
  141. package/sdk/dist/namespaces/billing.d.ts.map +1 -1
  142. package/sdk/dist/namespaces/billing.js.map +1 -1
  143. package/sdk/dist/namespaces/buzz-notifications.types.d.ts +1 -1
  144. package/sdk/dist/namespaces/buzz.d.ts +2 -2
  145. package/sdk/dist/namespaces/buzz.d.ts.map +1 -1
  146. package/sdk/dist/namespaces/buzz.js +2 -2
  147. package/sdk/dist/namespaces/buzz.js.map +1 -1
  148. package/sdk/dist/namespaces/buzz.types.d.ts +2 -2
  149. package/sdk/dist/namespaces/buzz.types.d.ts.map +1 -1
  150. package/sdk/dist/namespaces/ci.js +3 -3
  151. package/sdk/dist/namespaces/ci.js.map +1 -1
  152. package/sdk/dist/namespaces/credentials.types.d.ts +1 -1
  153. package/sdk/dist/namespaces/deploy.d.ts +1 -1
  154. package/sdk/dist/namespaces/deploy.d.ts.map +1 -1
  155. package/sdk/dist/namespaces/deploy.js +31 -32
  156. package/sdk/dist/namespaces/deploy.js.map +1 -1
  157. package/sdk/dist/namespaces/deploy.types.d.ts +6 -6
  158. package/sdk/dist/namespaces/deploy.types.d.ts.map +1 -1
  159. package/sdk/dist/namespaces/domains.d.ts +10 -2
  160. package/sdk/dist/namespaces/domains.d.ts.map +1 -1
  161. package/sdk/dist/namespaces/domains.js +10 -5
  162. package/sdk/dist/namespaces/domains.js.map +1 -1
  163. package/sdk/dist/namespaces/errors.js +1 -1
  164. package/sdk/dist/namespaces/escalations.d.ts +1 -1
  165. package/sdk/dist/namespaces/escalations.js +1 -1
  166. package/sdk/dist/namespaces/escalations.types.d.ts +2 -2
  167. package/sdk/dist/namespaces/escalations.types.d.ts.map +1 -1
  168. package/sdk/dist/namespaces/events.types.d.ts +1 -1
  169. package/sdk/dist/namespaces/functions.d.ts +1 -1
  170. package/sdk/dist/namespaces/functions.js +2 -2
  171. package/sdk/dist/namespaces/functions.js.map +1 -1
  172. package/sdk/dist/namespaces/gitvault.crypto.d.ts +1 -1
  173. package/sdk/dist/namespaces/gitvault.d.ts +26 -26
  174. package/sdk/dist/namespaces/gitvault.d.ts.map +1 -1
  175. package/sdk/dist/namespaces/gitvault.js +113 -113
  176. package/sdk/dist/namespaces/gitvault.js.map +1 -1
  177. package/sdk/dist/namespaces/me.d.ts +120 -0
  178. package/sdk/dist/namespaces/me.d.ts.map +1 -0
  179. package/sdk/dist/namespaces/me.js +34 -0
  180. package/sdk/dist/namespaces/me.js.map +1 -0
  181. package/sdk/dist/namespaces/org.d.ts +108 -6
  182. package/sdk/dist/namespaces/org.d.ts.map +1 -1
  183. package/sdk/dist/namespaces/org.js +63 -7
  184. package/sdk/dist/namespaces/org.js.map +1 -1
  185. package/sdk/dist/namespaces/org.types.d.ts +29 -9
  186. package/sdk/dist/namespaces/org.types.d.ts.map +1 -1
  187. package/sdk/dist/namespaces/pay.js +3 -3
  188. package/sdk/dist/namespaces/pay.js.map +1 -1
  189. package/sdk/dist/namespaces/projects.d.ts +9 -9
  190. package/sdk/dist/namespaces/projects.js +15 -15
  191. package/sdk/dist/namespaces/projects.js.map +1 -1
  192. package/sdk/dist/namespaces/projects.types.d.ts +28 -12
  193. package/sdk/dist/namespaces/projects.types.d.ts.map +1 -1
  194. package/sdk/dist/namespaces/rooms.d.ts +7 -7
  195. package/sdk/dist/namespaces/rooms.js +17 -17
  196. package/sdk/dist/namespaces/rooms.js.map +1 -1
  197. package/sdk/dist/namespaces/rooms.types.d.ts +9 -9
  198. package/sdk/dist/namespaces/rooms.types.d.ts.map +1 -1
  199. package/sdk/dist/namespaces/service.d.ts +1 -1
  200. package/sdk/dist/namespaces/service.js +1 -1
  201. package/sdk/dist/namespaces/{operator-session.d.ts → session.d.ts} +135 -51
  202. package/sdk/dist/namespaces/session.d.ts.map +1 -0
  203. package/sdk/dist/namespaces/{operator-session.js → session.js} +118 -30
  204. package/sdk/dist/namespaces/session.js.map +1 -0
  205. package/sdk/dist/namespaces/subdomains.d.ts +5 -5
  206. package/sdk/dist/namespaces/subdomains.d.ts.map +1 -1
  207. package/sdk/dist/namespaces/subdomains.js +6 -6
  208. package/sdk/dist/namespaces/subdomains.js.map +1 -1
  209. package/sdk/dist/namespaces/tier.d.ts +44 -21
  210. package/sdk/dist/namespaces/tier.d.ts.map +1 -1
  211. package/sdk/dist/namespaces/tier.js +7 -7
  212. package/sdk/dist/namespaces/tier.js.map +1 -1
  213. package/sdk/dist/namespaces/transfers.d.ts +119 -85
  214. package/sdk/dist/namespaces/transfers.d.ts.map +1 -1
  215. package/sdk/dist/namespaces/transfers.js +31 -38
  216. package/sdk/dist/namespaces/transfers.js.map +1 -1
  217. package/sdk/dist/namespaces/vouchers.d.ts +9 -10
  218. package/sdk/dist/namespaces/vouchers.d.ts.map +1 -1
  219. package/sdk/dist/namespaces/vouchers.js +4 -5
  220. package/sdk/dist/namespaces/vouchers.js.map +1 -1
  221. package/sdk/dist/namespaces/wallets.d.ts +72 -3
  222. package/sdk/dist/namespaces/wallets.d.ts.map +1 -1
  223. package/sdk/dist/namespaces/wallets.js +141 -3
  224. package/sdk/dist/namespaces/wallets.js.map +1 -1
  225. package/sdk/dist/namespaces/write-approval.d.ts +101 -0
  226. package/sdk/dist/namespaces/write-approval.d.ts.map +1 -0
  227. package/sdk/dist/namespaces/write-approval.js +62 -0
  228. package/sdk/dist/namespaces/write-approval.js.map +1 -0
  229. package/sdk/dist/node/actions-node.d.ts +3 -3
  230. package/sdk/dist/node/actions-node.d.ts.map +1 -1
  231. package/sdk/dist/node/actions-node.js +44 -44
  232. package/sdk/dist/node/actions-node.js.map +1 -1
  233. package/sdk/dist/node/assets-node.js +6 -6
  234. package/sdk/dist/node/assets-node.js.map +1 -1
  235. package/sdk/dist/node/{bearer-claim-key.d.ts → bearer-redeem-key.d.ts} +12 -12
  236. package/sdk/dist/node/bearer-redeem-key.d.ts.map +1 -0
  237. package/sdk/dist/node/{bearer-claim-key.js → bearer-redeem-key.js} +21 -21
  238. package/sdk/dist/node/bearer-redeem-key.js.map +1 -0
  239. package/sdk/dist/node/ci.d.ts +1 -1
  240. package/sdk/dist/node/ci.d.ts.map +1 -1
  241. package/sdk/dist/node/ci.js +6 -6
  242. package/sdk/dist/node/ci.js.map +1 -1
  243. package/sdk/dist/node/credentials.d.ts +18 -17
  244. package/sdk/dist/node/credentials.d.ts.map +1 -1
  245. package/sdk/dist/node/credentials.js +29 -28
  246. package/sdk/dist/node/credentials.js.map +1 -1
  247. package/sdk/dist/node/deploy-manifest.d.ts +3 -5
  248. package/sdk/dist/node/deploy-manifest.d.ts.map +1 -1
  249. package/sdk/dist/node/deploy-manifest.js +3 -12
  250. package/sdk/dist/node/deploy-manifest.js.map +1 -1
  251. package/sdk/dist/node/funding-recovery.d.ts +1 -1
  252. package/sdk/dist/node/funding-recovery.d.ts.map +1 -1
  253. package/sdk/dist/node/funding-recovery.js +1 -1
  254. package/sdk/dist/node/funding-recovery.js.map +1 -1
  255. package/sdk/dist/node/gitvault-apply.d.ts +1 -1
  256. package/sdk/dist/node/gitvault-apply.d.ts.map +1 -1
  257. package/sdk/dist/node/gitvault-apply.js +1 -1
  258. package/sdk/dist/node/gitvault-apply.js.map +1 -1
  259. package/sdk/dist/node/gitvault-handoff.d.ts +22 -22
  260. package/sdk/dist/node/gitvault-handoff.d.ts.map +1 -1
  261. package/sdk/dist/node/gitvault-handoff.js +45 -45
  262. package/sdk/dist/node/gitvault-handoff.js.map +1 -1
  263. package/sdk/dist/node/gitvault-prewarm.js +7 -7
  264. package/sdk/dist/node/gitvault-prewarm.js.map +1 -1
  265. package/sdk/dist/node/gitvault-restore.d.ts +1 -1
  266. package/sdk/dist/node/gitvault-restore.js +1 -1
  267. package/sdk/dist/node/index.d.ts +16 -16
  268. package/sdk/dist/node/index.d.ts.map +1 -1
  269. package/sdk/dist/node/index.js +15 -15
  270. package/sdk/dist/node/index.js.map +1 -1
  271. package/sdk/dist/node/manifest-export.js +2 -2
  272. package/sdk/dist/node/manifest-export.js.map +1 -1
  273. package/sdk/dist/node/org-adopt.d.ts +49 -0
  274. package/sdk/dist/node/org-adopt.d.ts.map +1 -0
  275. package/sdk/dist/node/org-adopt.js +77 -0
  276. package/sdk/dist/node/org-adopt.js.map +1 -0
  277. package/sdk/dist/node/paid-fetch.d.ts +7 -7
  278. package/sdk/dist/node/paid-fetch.d.ts.map +1 -1
  279. package/sdk/dist/node/paid-fetch.js +54 -54
  280. package/sdk/dist/node/paid-fetch.js.map +1 -1
  281. package/sdk/dist/node/preflight.d.ts +1 -1
  282. package/sdk/dist/node/preflight.d.ts.map +1 -1
  283. package/sdk/dist/node/preflight.js +1 -1
  284. package/sdk/dist/node/preflight.js.map +1 -1
  285. package/sdk/dist/node/sites-node.js +1 -1
  286. package/sdk/dist/node/sites-node.js.map +1 -1
  287. package/sdk/dist/node/source-scan.d.ts +1 -1
  288. package/sdk/dist/node/source-scan.js +2 -2
  289. package/sdk/dist/node/source-scan.js.map +1 -1
  290. package/sdk/dist/scoped.d.ts +11 -11
  291. package/sdk/dist/scoped.d.ts.map +1 -1
  292. package/sdk/dist/scoped.js +5 -5
  293. package/sdk/dist/scoped.js.map +1 -1
  294. package/core-dist/operator-session.js +0 -154
  295. package/lib/allowance.mjs +0 -355
  296. package/lib/cloud.mjs +0 -256
  297. package/lib/core.mjs +0 -123
  298. package/lib/operator-proofs.mjs +0 -22
  299. package/lib/operator.mjs +0 -771
  300. package/sdk/core-dist/operator-session.js +0 -154
  301. package/sdk/dist/namespaces/allowance.d.ts +0 -79
  302. package/sdk/dist/namespaces/allowance.d.ts.map +0 -1
  303. package/sdk/dist/namespaces/allowance.js +0 -149
  304. package/sdk/dist/namespaces/allowance.js.map +0 -1
  305. package/sdk/dist/namespaces/operator-session.d.ts.map +0 -1
  306. package/sdk/dist/namespaces/operator-session.js.map +0 -1
  307. package/sdk/dist/namespaces/operator.d.ts +0 -359
  308. package/sdk/dist/namespaces/operator.d.ts.map +0 -1
  309. package/sdk/dist/namespaces/operator.js +0 -272
  310. package/sdk/dist/namespaces/operator.js.map +0 -1
  311. package/sdk/dist/node/bearer-claim-key.d.ts.map +0 -1
  312. package/sdk/dist/node/bearer-claim-key.js.map +0 -1
  313. package/sdk/dist/node/operator-claim.d.ts +0 -49
  314. package/sdk/dist/node/operator-claim.d.ts.map +0 -1
  315. package/sdk/dist/node/operator-claim.js +0 -77
  316. package/sdk/dist/node/operator-claim.js.map +0 -1
package/lib/repos.mjs CHANGED
@@ -25,12 +25,12 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
25
25
  import { basename, join } from "node:path";
26
26
  import { getSdk } from "./sdk.mjs";
27
27
  import { reportSdkError, fail } from "./sdk-errors.mjs";
28
- import { withAutoApprove } from "./operator.mjs";
29
- import { allowanceAuthHeaders, isCoreApiTarget, readAllowance, resolveProjectId } from "./config.mjs";
28
+ import { withAutoApprove } from "./sign-in.mjs";
29
+ import { walletAuthHeaders, isCoreApiTarget, readWallet, resolveProjectId } from "./config.mjs";
30
30
  import { loadLiveControlPlaneSession } from "../core-dist/control-plane-session.js";
31
31
  import { resolveOrgId, resolveOwningOrgId } from "./org-context.mjs";
32
32
  import { resolveGitvaultTarget } from "./gitvault-target.mjs";
33
- import { nextAction, claimOrgSlugAction, claimRepoNameAction } from "./next-actions.mjs";
33
+ import { nextAction, setOrgSlugAction, setRepoNameAction } from "./next-actions.mjs";
34
34
  import { resolveHarnessLabels, resolveSessionKey, resolveTaskLabel, persistSessionKey } from "./harness-context.mjs";
35
35
  import { updateRoomState } from "./rooms-context.mjs";
36
36
  import { printKeystoreLocation } from "./gitvault.mjs";
@@ -63,9 +63,9 @@ Usage:
63
63
  run402 repos <verb> [options] — fifteen verbs, tiered by how often you reach for them:
64
64
 
65
65
  Common:
66
- run402 repos create [name] [--org <org_id>] [--dir <path>] [--nested] [--tier <tier>] [--project <id>]
66
+ run402 repos create [name] [--org <org_id>] [--dir <path>] [--nested] [--tier <tier>] [--project <project_id>]
67
67
  [--byo <s3://bucket/prefix>] [--profile <name> | --ambient] [--region <r>] [--endpoint <url>] [--no-init]
68
- run402 repos view [--project <id>] [--repo <repo_id>] [--human]
68
+ run402 repos view [--project <project_id>] [--repo <repo_id>] [--human]
69
69
  run402 repos list [--org <org_id>] [--human]
70
70
 
71
71
  Then plain git, forever:
@@ -73,38 +73,38 @@ Then plain git, forever:
73
73
  git clone run402::<org>/<repo>
74
74
 
75
75
  Handoff (pass a working tree to another agent):
76
- run402 repos handoff [--project <id>] [--repo <repo_id>] [--ttl <seconds>] [--role <role>]
76
+ run402 repos handoff [--project <project_id>] [--repo <repo_id>] [--ttl <seconds>] [--role <role>]
77
77
  [--include-sensitive <glob>]... [--note-file <path>] [--json] [--list] [--revoke <handoff_id>]
78
78
  (the Handoff Note is JSON piped on stdin when not using --note-file)
79
79
  run402 repos resume <kgh1_…|--key-stdin> [--to <dir>] [--no-init] [--json]
80
80
 
81
81
  Invite (bring a second agent into the SAME work, dirty tree included):
82
- run402 repos invite [--project <id>] [--repo <repo_id>] [--room <key>] [--ttl <seconds>] [--role <role>]
82
+ run402 repos invite [--project <project_id>] [--repo <repo_id>] [--room <key>] [--ttl <seconds>] [--role <role>]
83
83
  [--include-sensitive <glob>]... [--note-file <path>] [--json] [--list] [--revoke <invite_id>]
84
84
  (the Invite Note is JSON piped on stdin when not using --note-file)
85
85
  run402 repos join <kgi1_…|--key-stdin> [--to <dir>] [--no-init] [--json]
86
86
 
87
87
  Occasional:
88
- run402 repos snapshot [--project <id>] [--repo <repo_id>] [--message <text>] [--checkpoint] [--dry-run] [--allow-dirty] [--manifest-out <path>]
89
- run402 repos mirror [<destination>] [--off] [--backfill] [--profile <name> | --ambient] [--region <r>] [--endpoint <url>] [--project <id>] [--repo <repo_id>]
88
+ run402 repos snapshot [--project <project_id>] [--repo <repo_id>] [--message <text>] [--checkpoint] [--dry-run] [--allow-dirty] [--manifest-out <path>]
89
+ run402 repos mirror [<destination>] [--off] [--backfill] [--profile <name> | --ambient] [--region <r>] [--endpoint <url>] [--project <project_id>] [--repo <repo_id>]
90
90
  run402 repos recover <source> --out <dir> [--repo <repo_id>] [--profile <name> | --ambient] [--region <r>] [--endpoint <url>]
91
91
  [--bundle <file>] [--code <SRC1-…>] [--receipt <file>] [--rp-id <host>] [--human]
92
92
  run402 repos recovery-bundle [--out <file> | --out -]
93
93
 
94
94
  Lifecycle:
95
95
  run402 repos rename <new_name> [--repo <repo_id> | --project <project_id>]
96
- run402 repos delete [--project <id>] [--repo <repo_id>] [--force]
96
+ run402 repos delete [--project <project_id>] [--repo <repo_id>] [--force]
97
97
 
98
98
  Maintenance:
99
- run402 repos fsck [--project <id>] [--repo <repo_id>] [--mirror] [--budget <n>] [--no-write] [--human]
100
- run402 repos gc [--project <id>] [--repo <repo_id>] [--force-headroom] [--submit --intent-core <path> --verifier-receipt <path> [--wait]]
99
+ run402 repos fsck [--project <project_id>] [--repo <repo_id>] [--mirror] [--budget <n>] [--no-write] [--human]
100
+ run402 repos gc [--project <project_id>] [--repo <repo_id>] [--force-headroom] [--submit --intent-core <path> --verifier-receipt <path> [--wait]]
101
101
  run402 repos daemon <status|stop> The resident helper engine (gitvault-persistent-helper) — inspect or retire it; nothing requires either
102
- run402 repos access [--project <id>] [--repo <repo_id>] [--human]
103
- run402 repos access repair [--project <id>] [--repo <repo_id>] --recipient-state-version <n> --recipient-revocation-version <n>
104
- run402 repos access revoke-key <principal_id> [--project <id>] [--repo <repo_id>]
105
- run402 repos access declare-exposure [--project <id>] [--repo <repo_id>]
106
- run402 repos access repin [--project <id>] [--repo <repo_id>] --principal <principal_id> --fingerprint <ek_fingerprint>
107
- run402 repos policy <required|grandfathered> [--project <id>] [--repo <repo_id>] [--reason <why>]
102
+ run402 repos access [--project <project_id>] [--repo <repo_id>] [--human]
103
+ run402 repos access repair [--project <project_id>] [--repo <repo_id>] --recipient-state-version <n> --recipient-revocation-version <n>
104
+ run402 repos access revoke-key <principal_id> [--project <project_id>] [--repo <repo_id>]
105
+ run402 repos access declare-exposure [--project <project_id>] [--repo <repo_id>]
106
+ run402 repos access repin [--project <project_id>] [--repo <repo_id>] --principal <principal_id> --fingerprint <ek_fingerprint>
107
+ run402 repos policy <required|grandfathered> [--project <project_id>] [--repo <repo_id>] [--reason <why>]
108
108
  run402 repos policy auto-gc [<generations>|off] (local, per-checkout — no --project/--repo)
109
109
 
110
110
  Every verb above also accepts -v/--verbose (a stderr summary line of request
@@ -115,7 +115,7 @@ Subcommands:
115
115
  create Provision (or, with --project, ADOPT an existing project), ALLOCATE
116
116
  its vault (mints key material and, on first allocation, a one-shot
117
117
  recovery receipt), and scaffold the git remote — origin when free,
118
- run402 when taken. \`--project <id>\` allocates for a project that already exists,
118
+ run402 when taken. \`--project <project_id>\` allocates for a project that already exists,
119
119
  nothing is provisioned. \`[name]\` is inferred from an existing git
120
120
  remote's basename or the directory name when unambiguous — NEVER a
121
121
  prompt; if the directory and an existing remote disagree, or
@@ -132,7 +132,7 @@ Subcommands:
132
132
  no payload copy at all); \`run402 repos mirror <destination>\`
133
133
  still works unchanged as your second customer-held location.
134
134
  On a machine with no wallet, or a wallet with no active tier, this folds the cold-start
135
- chain (allowance -> faucet -> one x402 prototype payment,
135
+ chain (wallet -> faucet -> one x402 prototype payment,
136
136
  announced) before retrying once; \`--no-init\` opts out.
137
137
  view Side-effect-free: what this machine and the control plane each
138
138
  believe about the repo — allocation, policy, whether this keystore
@@ -162,11 +162,11 @@ Subcommands:
162
162
  <handoff_id>\` read/revoke instead of minting.
163
163
  resume Resume a Handoff Key on ANY machine: parses the key; on a wallet
164
164
  with no active tier first folds the same cold-start chain
165
- \`create\` does (allowance → faucet → one x402 prototype payment,
165
+ \`create\` does (wallet → faucet → one x402 prototype payment,
166
166
  each step announced) so the resumed agent arrives as a paid-up
167
167
  run402 wallet of its own — \`--no-init\` opts out, and because the
168
- claim itself needs no tier a chain failure is reported (never
169
- blocks the resume); then claims the key with THIS machine's own
168
+ redemption itself needs no tier a chain failure is reported (never
169
+ blocks the resume); then redeems the key with THIS machine's own
170
170
  wallet, clones the vault at the base HEAD
171
171
  into \`--to <dir>\` (default: the vault's name), applies the
172
172
  stash-shaped checkpoint (staged/unstaged/deleted/untracked
@@ -188,10 +188,10 @@ Subcommands:
188
188
  whose key is not admitted is refused
189
189
  \`INVITE_MINT_REQUIRES_WRITER\` — have a live writer run
190
190
  \`run402 repos access sync\` (any push does it too), then retry.
191
- join Claim an Invite Key on ANY machine: the SAME cold-start fold
192
- \`resume\` runs (allowance → faucet → one x402 prototype payment,
191
+ join Redeem an Invite Key on ANY machine: the SAME cold-start fold
192
+ \`resume\` runs (wallet → faucet → one x402 prototype payment,
193
193
  announced — \`--no-init\` opts out; a chain failure never blocks
194
- the claim), clones the vault at the base HEAD into \`--to <dir>\`
194
+ the redemption), clones the vault at the base HEAD into \`--to <dir>\`
195
195
  (default: the vault's name), restores the stash-shaped
196
196
  checkpoint exactly like \`resume\`, pins \`r402.room\` to the
197
197
  INVITE's own room, adds \`.run402/\` to \`.git/info/exclude\`,
@@ -275,8 +275,8 @@ Subcommands:
275
275
  cwd unless \`--out\` says otherwise (\`--out -\` prints only); the
276
276
  full JSON always goes to stdout. Principal-scoped, not
277
277
  repo-scoped (one bundle covers every vault you can read) — auth
278
- is your control-plane session (\`run402 operator login
279
- --loopback\` first; without one it answers for the active
278
+ is your sign-in session (\`run402 login\` first; without one
279
+ it answers for the active
280
280
  WALLET's agent principal, normally no wrappers, and says so).
281
281
  To make it travel WITH a mirror, copy it to
282
282
  member-recovery-bundles/<name>.json under the mirrored prefix —
@@ -376,7 +376,7 @@ Subcommands:
376
376
  \`off\` (or \`0\`) disables it. No value prints the current setting.
377
377
 
378
378
  Options:
379
- --project <id> Project whose repo to act on (defaults to the active project)
379
+ --project <project_id> Project whose repo to act on (defaults to the active project)
380
380
  --repo <repo_id> Address the repo directly by id, skipping project lookup
381
381
  --org <org_id> create/list: the owning organization (create resolves it
382
382
  the same way \`projects provision\` does when omitted)
@@ -655,7 +655,7 @@ async function formatRepoHuman(s, mirror) {
655
655
  lines.push(`Address: ${formatRepoAddress(s)}${remotePart}`);
656
656
 
657
657
  if (!s.vault) {
658
- lines.push("Repo: not allocated yet for this project — run 'run402 repos create --project <id>' to allocate one.");
658
+ lines.push("Repo: not allocated yet for this project — run 'run402 repos create --project <project_id>' to allocate one.");
659
659
  if (s.warnings.length > 0) lines.push(`Warnings: ${s.warnings.map((w) => w.message).join(" ")}`);
660
660
  return lines.join("\n");
661
661
  }
@@ -851,7 +851,7 @@ async function printCreateResult({ sdk, projectId, vault, adopted, name, verbose
851
851
  }
852
852
  }
853
853
  } catch (err) {
854
- if (name) console.error(`repo name not claimed (non-fatal): ${err?.message ?? String(err)}`);
854
+ if (name) console.error(`repo name not set (non-fatal): ${err?.message ?? String(err)}`);
855
855
  }
856
856
 
857
857
  // A `push_repo` action names a remote that EXISTS — only a scaffolded
@@ -863,7 +863,7 @@ async function printCreateResult({ sdk, projectId, vault, adopted, name, verbose
863
863
  ? nextAction("push_repo", { command: `git push -u ${vault.remote.name} HEAD`, why: "Publish the current branch to the encrypted Run402 remote." })
864
864
  : null;
865
865
  const remoteSkippedActions = vault.remote?.status === "skipped" ? (vault.remote.next_actions ?? []) : [];
866
- const claimAction = address ? null : orgSlug ? claimRepoNameAction(projectId) : claimOrgSlugAction();
866
+ const nameAction = address ? null : orgSlug ? setRepoNameAction(projectId) : setOrgSlugAction();
867
867
  // gitvault-byo-primary-bucket task 3.5: a BYO vault's "add a copy" remedy
868
868
  // names a SECOND customer-held location (D7) — the plain mirror hint
869
869
  // frames the mirror as the FIRST custody-held copy, which is false once
@@ -872,7 +872,7 @@ async function printCreateResult({ sdk, projectId, vault, adopted, name, verbose
872
872
  const mirrorAction = isByo
873
873
  ? nextAction("configure_mirror", { command: "run402 repos mirror <destination>", why: GITVAULT_BYO_UNMIRRORED_REMEDY_STATEMENT })
874
874
  : nextAction("configure_mirror", { command: "run402 repos mirror <destination>", why: GITVAULT_MIRROR_SETUP_HINT });
875
- const nextActions = [pushAction, ...remoteSkippedActions, mirrorAction, claimAction].filter(Boolean);
875
+ const nextActions = [pushAction, ...remoteSkippedActions, mirrorAction, nameAction].filter(Boolean);
876
876
 
877
877
  // Secret-bearing (recovery_receipt): built fresh every call, printed once,
878
878
  // and never spilled into any cache path — see spillIfLarge's own doc
@@ -897,8 +897,8 @@ async function printCreateResult({ sdk, projectId, vault, adopted, name, verbose
897
897
  (vault.deduplicated ? "already existed — nothing was re-allocated" : `allocated (genesis ${vault.genesis_sha256})`),
898
898
  );
899
899
  if (address) console.error(`address: ${address}`);
900
- else if (!orgSlug) console.error("no named address yet — claim an org slug (run402 org slug <slug>) to get run402::<slug>/<name> addresses");
901
- else console.error(`no address claimed — run 'run402 repos rename <name> --project ${projectId}' to claim one`);
900
+ else if (!orgSlug) console.error("no named address yet — set an org slug (run402 orgs slug <slug>) to get run402::<slug>/<name> addresses");
901
+ else console.error(`no address set — run 'run402 repos rename <name> --project ${projectId}' to set one`);
902
902
  if (remoteScaffolded) {
903
903
  console.error(`remote '${vault.remote.name}' -> ${vault.remote.url} (${vault.remote.reason})`);
904
904
  if (vault.remote.nested) console.error(`nested repository inside ${vault.remote.enclosing_toplevel}${vault.remote.excluded_in_enclosing ? " — excluded there via .git/info/exclude" : " — could not write its .git/info/exclude"}`);
@@ -918,7 +918,7 @@ async function printCreateResult({ sdk, projectId, vault, adopted, name, verbose
918
918
  console.error(vault.terminal_loss_statement);
919
919
  await printKeystoreLocation();
920
920
  console.error("");
921
- console.error("nothing was deployed — this is a vault-only repo. Deploy later with `run402 deploy apply`, or never.");
921
+ console.error("nothing was deployed — this is a vault-only repo. Deploy later with `run402 deploy`, or never.");
922
922
  printVerboseStats(verboseArgv, sdk);
923
923
  }
924
924
 
@@ -955,13 +955,13 @@ async function createProvision(name, dir, a) {
955
955
  // with the old project id.
956
956
  const idempotencyKey = flagValue(a, "--idempotency-key") ?? `repos-create:${orgId ?? "org-of-one"}:${name}`;
957
957
 
958
- // A genuinely bare machine has no allowance file at all, and the NO_ALLOWANCE
958
+ // A genuinely bare machine has no local wallet file at all, and the NO_WALLET
959
959
  // precheck below would refuse before the provision call could ever answer
960
960
  // NO_ACTIVE_TIER, so the cold-start fold would never reach the one case it
961
961
  // exists for. Fold first when there is no wallet; `--no-init` keeps the
962
962
  // bare refusal.
963
- if (!isCoreApiTarget() && !loadLiveControlPlaneSession() && !readAllowance() && !a.includes("--no-init")) {
964
- console.error("no wallet on this machine — folding the cold-start chain (allowance -> faucet -> prototype tier)");
963
+ if (!isCoreApiTarget() && !loadLiveControlPlaneSession() && !readWallet() && !a.includes("--no-init")) {
964
+ console.error("no wallet on this machine — folding the cold-start chain (wallet -> faucet -> prototype tier)");
965
965
  try {
966
966
  const { foldColdStartChain } = await import("./cold-start.mjs");
967
967
  await foldColdStartChain((line) => console.error(` ${line}`));
@@ -970,7 +970,7 @@ async function createProvision(name, dir, a) {
970
970
  return;
971
971
  }
972
972
  }
973
- if (!isCoreApiTarget() && !loadLiveControlPlaneSession()) allowanceAuthHeaders("/projects/v1");
973
+ if (!isCoreApiTarget() && !loadLiveControlPlaneSession()) walletAuthHeaders("/projects/v1");
974
974
 
975
975
  const provisionOnce = () =>
976
976
  withAutoApprove(() => sdk.projects.provision({ tier, name, ...(orgId ? { orgId } : {}), idempotencyKey }));
@@ -980,12 +980,12 @@ async function createProvision(name, dir, a) {
980
980
  provisioned = await provisionOnce();
981
981
  } catch (err) {
982
982
  // kygit-handoff design D5: `repos create` on a fresh wallet folds the
983
- // cold-start chain ONCE — allowance → faucet → one x402 prototype
983
+ // cold-start chain ONCE — wallet → faucet → one x402 prototype
984
984
  // payment, announced — then retries exactly once. `--no-init` opts
985
985
  // out (the caller wants the bare NO_ACTIVE_TIER refusal).
986
986
  const code = err?.body?.code ?? err?.code;
987
987
  if (code === "NO_ACTIVE_TIER" && !a.includes("--no-init")) {
988
- console.error("no active tier — folding the cold-start chain (allowance -> faucet -> prototype tier)");
988
+ console.error("no active tier — folding the cold-start chain (wallet -> faucet -> prototype tier)");
989
989
  try {
990
990
  const { foldColdStartChain } = await import("./cold-start.mjs");
991
991
  await foldColdStartChain((line) => console.error(` ${line}`));
@@ -1040,7 +1040,7 @@ async function create(args) {
1040
1040
  fail({
1041
1041
  code: "BAD_USAGE",
1042
1042
  message: "a name positional and --project are mutually exclusive — --project adopts an EXISTING project.",
1043
- hint: "run402 repos create --project <id> to adopt, or run402 repos create <name> to provision a new one. Name it afterward with `run402 repos rename`.",
1043
+ hint: "run402 repos create --project <project_id> to adopt, or run402 repos create <name> to provision a new one. Name it afterward with `run402 repos rename`.",
1044
1044
  });
1045
1045
  }
1046
1046
  if (flagValue(a, "--tier") != null || flagValue(a, "--idempotency-key") != null) {
@@ -1159,7 +1159,7 @@ async function list(args) {
1159
1159
  }
1160
1160
  printJson(sdk, { org_id: orgId, org_slug: orgSlug, repos });
1161
1161
  console.error(`${repos.length} vault-bearing project(s) in this organization${usedFallback ? " (per-project fallback read — the bulk vaults-by-org route is not live on this gateway yet)" : ""}`);
1162
- if (orgSlug) console.error(`org slug: ${orgSlug} — a repo with a claimed address-form name is reachable at run402::${orgSlug}/<name>`);
1162
+ if (orgSlug) console.error(`org slug: ${orgSlug} — a repo with an address-form name set is reachable at run402::${orgSlug}/<name>`);
1163
1163
  printVerboseStats(a, sdk);
1164
1164
  }
1165
1165
 
@@ -1288,16 +1288,16 @@ async function rename(args) {
1288
1288
  const orgSlug = owningOrg ? (await sdk.org(owningOrg).get()).slug : null;
1289
1289
  if (orgSlug) address = gitvaultRemoteUrlForRepo(orgSlug, result.repo_name);
1290
1290
  } catch {
1291
- // The claim itself already succeeded — a failed address-preview lookup is never fatal.
1291
+ // The name is already set — a failed address-preview lookup is never fatal.
1292
1292
  }
1293
1293
  printJson(sdk, { ...result, address });
1294
1294
  console.error(
1295
1295
  result.previous_repo_name && result.previous_repo_name !== result.repo_name
1296
1296
  ? `renamed from "${result.previous_repo_name}" to "${result.repo_name}"`
1297
- : `name "${result.repo_name}" claimed for ${projectId}`,
1297
+ : `name "${result.repo_name}" set for ${projectId}`,
1298
1298
  );
1299
1299
  if (address) console.error(`address: ${address}`);
1300
- else console.error("this org has no slug yet — claim one with `run402 org slug <slug>` to get a full run402::<slug>/<name> address");
1300
+ else console.error("this org has no slug yet — set one with `run402 orgs slug <slug>` to get a full run402::<slug>/<name> address");
1301
1301
  printVerboseStats(a, sdk);
1302
1302
  } catch (err) {
1303
1303
  reportSdkError(err);
@@ -1376,7 +1376,7 @@ async function del(args) {
1376
1376
  } else {
1377
1377
  ({ projectId, rest } = resolveProjectSelector(a, { rejectBareFirst: true }));
1378
1378
  }
1379
- requirePositionalCount(rest.filter((x) => x !== "--force"), [], { min: 0, max: 0, command: "run402 repos delete [--project <id>] [--repo <repo_id>] [--force]", missing: "" });
1379
+ requirePositionalCount(rest.filter((x) => x !== "--force"), [], { min: 0, max: 0, command: "run402 repos delete [--project <project_id>] [--repo <repo_id>] [--force]", missing: "" });
1380
1380
  const force = a.includes("--force");
1381
1381
 
1382
1382
  let status;
@@ -1726,7 +1726,7 @@ async function readInviteNoteInput(a) {
1726
1726
  return parseInviteNoteJson(text, "stdin");
1727
1727
  }
1728
1728
 
1729
- /** Shared body for `parseHandoffNoteJson`/`parseInviteNoteJson` — `schema`/`kindLabel` name the claim kind's own vocabulary. */
1729
+ /** Shared body for `parseHandoffNoteJson`/`parseInviteNoteJson` — `schema`/`kindLabel` name the redeem kind's own vocabulary. */
1730
1730
  function parseClaimNoteJson(text, source, schema, kindLabel, helpCommand) {
1731
1731
  let parsed;
1732
1732
  try {
@@ -1817,7 +1817,7 @@ async function handoff(args) {
1817
1817
  // gitvault-multi-writer (rev 47) task 6.4 — a handoff is now also a
1818
1818
  // WRITER admission, not just a checkout pass: the recipient signs its
1819
1819
  // own future pushes with a NEW key this vault's chain recognizes as a
1820
- // writer the moment `resume` claims it (design D4 — a grant minted here,
1820
+ // writer the moment `resume` redeems it (design D4 — a grant minted here,
1821
1821
  // a two-signature acceptance the recipient's own resume completes).
1822
1822
  console.error(`the recipient becomes a WRITER on this vault the moment they resume — their own key signs future pushes, not yours.`);
1823
1823
  console.error(`recipient runs: kygit resume <key printed below>`);
@@ -1837,13 +1837,13 @@ async function handoff(args) {
1837
1837
 
1838
1838
  /**
1839
1839
  * Whether this wallet needs the cold-start chain before a resume: no
1840
- * allowance file yet (a fresh machine — the viral case), or an allowance
1840
+ * wallet file yet (a fresh machine — the viral case), or a wallet
1841
1841
  * whose org holds no active tier. An unreachable tier status reads as
1842
- * "no" — the claim needs no tier, and a resume must never wait on a status
1842
+ * "no" — the redemption needs no tier, and a resume must never wait on a status
1843
1843
  * read.
1844
1844
  */
1845
1845
  async function resumeNeedsColdStart(sdk) {
1846
- if (!readAllowance()) return true;
1846
+ if (!readWallet()) return true;
1847
1847
  try {
1848
1848
  const status = await sdk.tier.status();
1849
1849
  return status?.active === false;
@@ -1856,11 +1856,11 @@ async function resumeNeedsColdStart(sdk) {
1856
1856
  * `resume`'s cold-start fold: the SAME chain `create` runs on
1857
1857
  * NO_ACTIVE_TIER (`cold-start.mjs`), announced step by step on stderr.
1858
1858
  * Never throws — a failure is returned as `{ error, next_action }` so the
1859
- * caller carries it in the result and proceeds with the claim.
1859
+ * caller carries it in the result and proceeds with the redemption.
1860
1860
  */
1861
1861
  async function foldColdStartForResume(sdk) {
1862
1862
  if (!(await resumeNeedsColdStart(sdk))) return { performed: false, skipped: "tier_active" };
1863
- console.error("no active tier — folding the cold-start chain (allowance -> faucet -> prototype tier) before the claim");
1863
+ console.error("no active tier — folding the cold-start chain (wallet -> faucet -> prototype tier) before the redemption");
1864
1864
  try {
1865
1865
  const { foldColdStartChain } = await import("./cold-start.mjs");
1866
1866
  const chain = await foldColdStartChain((line) => console.error(` ${line}`));
@@ -1868,16 +1868,16 @@ async function foldColdStartForResume(sdk) {
1868
1868
  } catch (err) {
1869
1869
  const code = err?.body?.code ?? err?.code ?? null;
1870
1870
  const message = err?.body?.message ?? err?.message ?? String(err);
1871
- console.error(`cold-start chain failed (${code ?? "error"}: ${message}) — continuing with the claim; run \`run402 tier set prototype\` afterwards`);
1871
+ console.error(`cold-start chain failed (${code ?? "error"}: ${message}) — continuing with the redemption; run \`run402 tier set prototype\` afterwards`);
1872
1872
  return {
1873
1873
  performed: false,
1874
1874
  error: { code, message },
1875
- next_action: { type: "renew_tier", command: "run402 tier set prototype", why: "The resume proceeded without a tier of your own; the perpetual prototype tier is what lets this wallet create and deploy projects." },
1875
+ next_action: { type: "renew_tier", command: "run402 tier set prototype", why: "The resume proceeded without a tier of your own; the free prototype tier is what lets this wallet create and deploy projects." },
1876
1876
  };
1877
1877
  }
1878
1878
  }
1879
1879
 
1880
- /** `kygit.handoff-note.v1` / `kygit.invite-note.v1` rendered as Markdown — shared body, `title` names the claim kind ("Handoff" or "Invite"). */
1880
+ /** `kygit.handoff-note.v1` / `kygit.invite-note.v1` rendered as Markdown — shared body, `title` names the redeem kind ("Handoff" or "Invite"). */
1881
1881
  function renderClaimNoteMarkdown(note, title) {
1882
1882
  if (!note) return null;
1883
1883
  const lines = [];
@@ -1939,12 +1939,12 @@ async function resume(args) {
1939
1939
  }
1940
1940
  // A resumed agent is a NEW run402 wallet, and the loop is the
1941
1941
  // point — so on a wallet with no active tier `resume` folds the same
1942
- // cold-start chain `create` does (allowance → faucet → one x402
1943
- // prototype payment, announced) BEFORE the claim. The claim itself needs
1942
+ // cold-start chain `create` does (wallet → faucet → one x402
1943
+ // prototype payment, announced) BEFORE the redemption. The redemption itself needs
1944
1944
  // no tier, so the chain is never allowed to block a resume: a faucet
1945
1945
  // throttle or payment failure is reported on stderr, carried in the
1946
1946
  // result as `cold_start.error` with a `renew_tier` next action, and the
1947
- // claim proceeds (the SDK still creates the bare wallet it needs).
1947
+ // redemption proceeds (the SDK still creates the bare wallet it needs).
1948
1948
  // `--no-init` opts out entirely.
1949
1949
  const coldStart = a.includes("--no-init") ? { performed: false, skipped: "no_init" } : await foldColdStartForResume(sdk);
1950
1950
  try {
@@ -1956,7 +1956,7 @@ async function resume(args) {
1956
1956
  const { remoteHelperNextAction } = await import("./path-lookup.mjs");
1957
1957
  const helperAction = result.restored?.dir ? remoteHelperNextAction(result.restored.dir) : null;
1958
1958
  if (helperAction) result.next_actions = [...(result.next_actions ?? []), helperAction];
1959
- } catch { /* never fails a completed claim */ }
1959
+ } catch { /* never fails a completed redemption */ }
1960
1960
  if (a.includes("--json")) {
1961
1961
  printJson(sdk, { ...result, cold_start: coldStart });
1962
1962
  } else {
@@ -1973,7 +1973,7 @@ async function resume(args) {
1973
1973
  if (result.writer_activation) {
1974
1974
  console.error(`writer: ${result.writer_activation.outcome} (generation ${result.writer_activation.generation})`);
1975
1975
  }
1976
- if (result.deduplicated) console.error("note: this key was already claimed by this same principal — the ORIGINAL envelope was reused (safe replay)");
1976
+ if (result.deduplicated) console.error("note: this key was already redeemed by this same principal — the ORIGINAL envelope was reused (safe replay)");
1977
1977
  for (const na of result.next_actions ?? []) {
1978
1978
  if (na.command) console.error(`next: ${na.command}${na.why ? ` — ${na.why}` : ""}`);
1979
1979
  }
@@ -2067,15 +2067,15 @@ async function invite(args) {
2067
2067
  console.error(`invite minted: role ${result.minted_role}, expires ${result.expires_at}, room ${result.room?.room_key ?? "(unknown)"}`);
2068
2068
  console.error(`recipient runs: kygit join <key printed below>`);
2069
2069
  if (result.inviter_presence && result.inviter_presence.registered === false) {
2070
- console.error(`note: your own presence was not registered (${result.inviter_presence.error}) — the invite still mints and is claimable`);
2070
+ console.error(`note: your own presence was not registered (${result.inviter_presence.error}) — the invite still mints and can be redeemed`);
2071
2071
  }
2072
- if (result.room_fact && result.room_fact.posted === false) {
2073
- console.error(`note: the room fact was not posted (${result.room_fact.reason}) — the invite still mints and remains claimable`);
2072
+ if (result.room_message && result.room_message.posted === false) {
2073
+ console.error(`note: the room message was not posted (${result.room_message.reason}) — the invite still mints and can still be redeemed`);
2074
2074
  }
2075
- // The inviter's own fact must not wake the inviter's next `messages wait`:
2075
+ // The inviter's own message must not wake the inviter's next `messages wait`:
2076
2076
  // advance this checkout's stored cursor past it (best-effort).
2077
- if (result.room?.room_key && result.room_fact?.posted && typeof result.room_fact.cursor === "string") {
2078
- try { updateRoomState(result.room.organization_id, result.room.room_key, { cursor: result.room_fact.cursor }); } catch { /* never fails a mint */ }
2077
+ if (result.room?.room_key && result.room_message?.posted && typeof result.room_message.cursor === "string") {
2078
+ try { updateRoomState(result.room.organization_id, result.room.room_key, { cursor: result.room_message.cursor }); } catch { /* never fails a mint */ }
2079
2079
  }
2080
2080
  if (asJson) {
2081
2081
  printJson(sdk, result);
@@ -2093,7 +2093,7 @@ async function invite(args) {
2093
2093
 
2094
2094
  /**
2095
2095
  * `run402 repos join` — the full cold-start chain (SAME fold `resume`
2096
- * uses), claim, restore exactly as `resume` does, pin `r402.room` to the
2096
+ * uses), redeem, restore exactly as `resume` does, pin `r402.room` to the
2097
2097
  * invite's OWN room, register this session's presence, post ONE arrival
2098
2098
  * fact, and report the inviter by name and labels, live presences, the
2099
2099
  * catch-up cursor, and the last few messages (kygit-invite design D5).
@@ -2111,9 +2111,9 @@ async function joinInvite(args) {
2111
2111
  if (!key) fail({ code: "BAD_USAGE", message: "Missing the Invite Key on stdin.", hint: "Pipe the kgi1_… key, or pass it as a positional argument." });
2112
2112
  }
2113
2113
  // kygit-invite design D5: a joined agent is a NEW run402 wallet, so `join`
2114
- // folds the SAME cold-start chain `resume` does (allowance → faucet → one
2115
- // x402 prototype payment, announced) BEFORE the claim; the claim itself
2116
- // needs no tier, so the chain never blocks the claim. `--no-init` opts
2114
+ // folds the SAME cold-start chain `resume` does (wallet → faucet → one
2115
+ // x402 prototype payment, announced) BEFORE the redemption; the redemption itself
2116
+ // needs no tier, so the chain never blocks the redemption. `--no-init` opts
2117
2117
  // out entirely.
2118
2118
  const coldStart = a.includes("--no-init") ? { performed: false, skipped: "no_init" } : await foldColdStartForResume(sdk);
2119
2119
  const { program, model } = resolveHarnessLabels();
@@ -2156,7 +2156,7 @@ async function joinInvite(args) {
2156
2156
  const { remoteHelperNextAction } = await import("./path-lookup.mjs");
2157
2157
  const helperAction = result.restored?.dir ? remoteHelperNextAction(result.restored.dir) : null;
2158
2158
  if (helperAction) result.next_actions = [...(result.next_actions ?? []), helperAction];
2159
- } catch { /* never fails a completed claim */ }
2159
+ } catch { /* never fails a completed redemption */ }
2160
2160
  if (a.includes("--json")) {
2161
2161
  printJson(sdk, { ...result, cold_start: coldStart });
2162
2162
  } else {
@@ -2166,7 +2166,7 @@ async function joinInvite(args) {
2166
2166
  }
2167
2167
  console.error("");
2168
2168
  console.error(`joined into ${result.restored.dir} (branch ${result.restored.branch})`);
2169
- if (result.deduplicated) console.error("note: this key was already claimed by this same principal — the ORIGINAL envelope was reused (safe replay)");
2169
+ if (result.deduplicated) console.error("note: this key was already redeemed by this same principal — the ORIGINAL envelope was reused (safe replay)");
2170
2170
  // gitvault-multi-writer (rev 47) / kygit-invite design D5 — this
2171
2171
  // checkout's own writer activation, printed in the SAME `writer: …`
2172
2172
  // shape `resume` uses. `pending` is D9's not-stranded path: the key is
@@ -2591,8 +2591,8 @@ async function fsck(args) {
2591
2591
  const GC_VALUE_FLAGS = [...COMMON_VALUE_FLAGS, "--intent-core", "--verifier-receipt"];
2592
2592
 
2593
2593
  /**
2594
- * One line of headroom disclosure. Printed whether or not things fit: an
2595
- * operator deciding when to compact wants the numbers in the passing case too
2594
+ * One line of headroom disclosure. Printed whether or not things fit: a
2595
+ * person deciding when to compact wants the numbers in the passing case too
2596
2596
  * (gitvault-compaction-headroom-preflight D4).
2597
2597
  */
2598
2598
  function printHeadroomNote(headroom) {
@@ -2767,7 +2767,7 @@ async function accessRead(args) {
2767
2767
  const cp = loadLiveControlPlaneSession();
2768
2768
  if (cp) {
2769
2769
  try {
2770
- const mine = await sdk.operator.session.sourceAccessWrappers({ token: cp.control_plane_session_token });
2770
+ const mine = await sdk.session.sourceAccessWrappers({ token: cp.control_plane_session_token });
2771
2771
  result.member_custody = mine.encryption_key
2772
2772
  ? {
2773
2773
  available: true,
@@ -2782,7 +2782,7 @@ async function accessRead(args) {
2782
2782
  result.member_custody = { available: false, reason: e?.code ?? "read_failed", hint: "your own wrapper custody could not be read (older gateway, or the session lacks it)." };
2783
2783
  }
2784
2784
  } else {
2785
- result.member_custody = { available: false, reason: "no_control_plane_session", hint: "run 'run402 operator login --loopback' to include your own wrapper custody here." };
2785
+ result.member_custody = { available: false, reason: "no_control_plane_session", hint: "run 'run402 login' to include your own wrapper custody here." };
2786
2786
  }
2787
2787
  if (human) {
2788
2788
  console.log(formatAccessHuman(result));
@@ -2935,7 +2935,7 @@ async function accessRevokeKey(args) {
2935
2935
  * eligible starting at the NEXT rotation.
2936
2936
  */
2937
2937
  /**
2938
- * `repos access repin --principal <id> --fingerprint <ek_…>` — a KEY-HOLDER
2938
+ * `repos access repin --principal <principal_id> --fingerprint <ek_…>` — a KEY-HOLDER
2939
2939
  * explicitly accepts a recipient's CHANGED key (gitvault-agent-envelopes D3).
2940
2940
  * The session-start reconcile refuses `pinned_key_mismatch` and never
2941
2941
  * bypasses it, not even after an owner's revoke — acceptance names the new
@@ -3172,7 +3172,7 @@ async function recover(args) {
3172
3172
  *
3173
3173
  * Principal-scoped, not repo-scoped (one bundle covers every vault you are
3174
3174
  * a recipient of) — which is why the auth is your control-plane (human)
3175
- * session (`run402 operator login --loopback`), not the wallet. Without a
3175
+ * session (`run402 login`), not the wallet. Without a
3176
3176
  * session the request falls back to the active WALLET's agent principal,
3177
3177
  * which normally holds no wrappers — truthful, with a stderr note saying so.
3178
3178
  * Enrollment/activation/revocation are browser ceremonies at
@@ -3182,7 +3182,7 @@ function sourceAccessTokenOpts(commandLabel) {
3182
3182
  const cp = loadLiveControlPlaneSession();
3183
3183
  if (!cp) {
3184
3184
  console.error(
3185
- `no control-plane (human) session — ${commandLabel} will answer for the active WALLET's agent principal, which normally holds no wrappers. Run 'run402 operator login --loopback' to act as yourself.`,
3185
+ `no control-plane (human) session — ${commandLabel} will answer for the active WALLET's agent principal, which normally holds no wrappers. Run 'run402 login' to act as yourself.`,
3186
3186
  );
3187
3187
  return {};
3188
3188
  }
@@ -3196,7 +3196,7 @@ async function recoveryBundle(args) {
3196
3196
  const out = flagValue(a, "--out");
3197
3197
  const sdk = getSdk();
3198
3198
  try {
3199
- const bundle = await sdk.operator.session.sourceAccessRecoveryBundle(sourceAccessTokenOpts("recovery-bundle"));
3199
+ const bundle = await sdk.session.sourceAccessRecoveryBundle(sourceAccessTokenOpts("recovery-bundle"));
3200
3200
  // Full JSON to stdout regardless — the pipe contract is sacred; the file
3201
3201
  // is the keep-a-copy convenience (0600 — the bundle is ciphertext the
3202
3202
  // platform cannot open, but it is still half of a recovery credential).