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
@@ -9,16 +9,16 @@ Usage:
9
9
  run402 subdomains <subcommand> [args...]
10
10
 
11
11
  Subcommands:
12
- claim <name> [--project <id>] [--release <id> | --deployment <id>] Claim a subdomain
13
- delete <name> --confirm [--project <id>] Release a subdomain. Requires --confirm.
14
- list [--project <id>] List subdomains for a project
12
+ add <name> [--project <project_id>] [--release <release_id> | --deployment <deployment_id>] Add a subdomain
13
+ delete <name> --confirm [--project <project_id>] Release a subdomain. Requires --confirm.
14
+ list [--project <project_id>] List subdomains for a project
15
15
 
16
16
  Options default to the active project. With neither --release nor
17
- --deployment, claim binds the project's live release.
17
+ --deployment, add binds the project's live release.
18
18
 
19
19
  Examples:
20
- run402 subdomains claim myapp
21
- run402 subdomains claim myapp --release rel_abc123 --project prj_abc123
20
+ run402 subdomains add myapp
21
+ run402 subdomains add myapp --release rel_abc123 --project prj_abc123
22
22
  run402 subdomains delete myapp --confirm
23
23
  run402 subdomains list
24
24
 
@@ -29,20 +29,20 @@ Notes:
29
29
  `;
30
30
 
31
31
  const SUB_HELP = {
32
- claim: `run402 subdomains claim — Claim a custom subdomain for a release
32
+ add: `run402 subdomains add — Add a subdomain for a release
33
33
 
34
34
  Usage:
35
- run402 subdomains claim <name> [--project <id>] [--release <id> | --deployment <id>]
35
+ run402 subdomains add <name> [--project <project_id>] [--release <release_id> | --deployment <deployment_id>]
36
36
 
37
37
  Arguments:
38
38
  <name> Subdomain name (3-63 chars, lowercase alphanumeric +
39
39
  hyphens). Creates <name>.run402.com.
40
40
 
41
41
  Options:
42
- --project <id> Project ID (defaults to the active project)
43
- --release <id> Release ID (rel_...) to point at. With neither flag,
42
+ --project <project_id> Project ID (defaults to the active project)
43
+ --release <release_id> Release ID (rel_...) to point at. With neither flag,
44
44
  the project's live release is bound.
45
- --deployment <id> Legacy deployment ID (dpl_...); rel_.../op_... ids are
45
+ --deployment <deployment_id> Legacy deployment ID (dpl_...); rel_.../op_... ids are
46
46
  accepted too.
47
47
 
48
48
  Notes:
@@ -51,33 +51,33 @@ Notes:
51
51
  - A deploy manifest can declare the same thing: "subdomains": { "set": ["<name>"] }
52
52
 
53
53
  Examples:
54
- run402 subdomains claim myapp
55
- run402 subdomains claim myapp --release rel_abc123 --project prj_abc123
54
+ run402 subdomains add myapp
55
+ run402 subdomains add myapp --release rel_abc123 --project prj_abc123
56
56
  `,
57
- list: `run402 subdomains list — List subdomains claimed by a project
57
+ list: `run402 subdomains list — List a project's subdomains
58
58
 
59
59
  Usage:
60
- run402 subdomains list [--project <id>]
60
+ run402 subdomains list [--project <project_id>]
61
61
 
62
62
  Options:
63
- --project <id> Project ID (defaults to the active project)
63
+ --project <project_id> Project ID (defaults to the active project)
64
64
 
65
65
  Examples:
66
66
  run402 subdomains list
67
67
  run402 subdomains list --project prj_abc123
68
68
  `,
69
- delete: `run402 subdomains delete — Release a claimed subdomain
69
+ delete: `run402 subdomains delete — Release a subdomain
70
70
 
71
71
  Usage:
72
- run402 subdomains delete <name> --confirm [--project <id>]
72
+ run402 subdomains delete <name> --confirm [--project <project_id>]
73
73
 
74
74
  Arguments:
75
75
  <name> Subdomain name to release
76
76
 
77
77
  Options:
78
78
  --confirm Required: releasing a subdomain is irreversible and
79
- makes it available for any other project to claim
80
- --project <id> Project ID (defaults to the active project)
79
+ makes it available for any other project to add
80
+ --project <project_id> Project ID (defaults to the active project)
81
81
 
82
82
  Examples:
83
83
  run402 subdomains delete myapp --confirm
@@ -85,7 +85,7 @@ Examples:
85
85
  `,
86
86
  };
87
87
 
88
- async function claim(args) {
88
+ async function add(args) {
89
89
  const parsedArgs = normalizeArgv(args);
90
90
  const valueFlags = ["--project", "--deployment", "--release"];
91
91
  assertKnownFlags(parsedArgs, [...valueFlags, "--help", "-h"], valueFlags);
@@ -99,8 +99,8 @@ async function claim(args) {
99
99
  if (positionals.length > 1) {
100
100
  fail({
101
101
  code: "BAD_USAGE",
102
- message: `Unexpected argument for subdomains claim: ${positionals[1]}`,
103
- hint: "Use `run402 subdomains claim <name> [--release <rel_id>]`.",
102
+ message: `Unexpected argument for subdomains add: ${positionals[1]}`,
103
+ hint: "Use `run402 subdomains add <name> [--release <rel_id>]`.",
104
104
  });
105
105
  }
106
106
  if (positionals.length === 1) {
@@ -110,14 +110,14 @@ async function claim(args) {
110
110
  fail({
111
111
  code: "BAD_USAGE",
112
112
  message: "Missing <name>.",
113
- hint: "run402 subdomains claim <name> [--project <id>] [--release <id> | --deployment <id>]",
113
+ hint: "run402 subdomains add <name> [--project <project_id>] [--release <release_id> | --deployment <deployment_id>]",
114
114
  });
115
115
  }
116
116
  if (opts.deployment && opts.release) {
117
117
  fail({
118
118
  code: "BAD_USAGE",
119
119
  message: "Pass either --release or --deployment, not both.",
120
- hint: "run402 subdomains claim <name> [--release <id> | --deployment <id>]",
120
+ hint: "run402 subdomains add <name> [--release <release_id> | --deployment <deployment_id>]",
121
121
  });
122
122
  }
123
123
  const projectId = resolveProjectId(opts.project);
@@ -129,7 +129,7 @@ async function claim(args) {
129
129
  const deploymentId = opts.deployment || (opts.release ? undefined : p.last_deployment_id) || undefined;
130
130
  const releaseId = opts.release || undefined;
131
131
  try {
132
- const data = await getSdk().subdomains.claim({ name, deploymentId, releaseId, projectId });
132
+ const data = await getSdk().subdomains.add({ name, deploymentId, releaseId, projectId });
133
133
  console.log(JSON.stringify(data, null, 2));
134
134
  } catch (err) {
135
135
  reportSdkError(err);
@@ -147,7 +147,7 @@ async function deleteSubdomain(allArgs) {
147
147
  fail({
148
148
  code: "BAD_USAGE",
149
149
  message: "Missing <name>.",
150
- hint: "run402 subdomains delete <name> --confirm [--project <id>]",
150
+ hint: "run402 subdomains delete <name> --confirm [--project <project_id>]",
151
151
  });
152
152
  }
153
153
  if (positionals.length > 1) {
@@ -156,7 +156,7 @@ async function deleteSubdomain(allArgs) {
156
156
  if (!argList.includes("--confirm")) {
157
157
  fail({
158
158
  code: "CONFIRMATION_REQUIRED",
159
- message: `Destructive: releasing subdomain '${name}' makes it available for any other project to claim. This is irreversible. Re-run with --confirm to proceed.`,
159
+ message: `Destructive: releasing subdomain '${name}' makes it available for any other project to add. This is irreversible. Re-run with --confirm to proceed.`,
160
160
  details: { name },
161
161
  });
162
162
  }
@@ -186,7 +186,7 @@ async function list(args) {
186
186
  fail({
187
187
  code: "BAD_USAGE",
188
188
  message: `Unexpected argument for subdomains list: ${rest[0]}`,
189
- hint: "Use `run402 subdomains list --project <id>`.",
189
+ hint: "Use `run402 subdomains list --project <project_id>`.",
190
190
  });
191
191
  }
192
192
  const projectId = resolveProjectId(project);
@@ -202,7 +202,7 @@ export async function run(sub, args) {
202
202
  if (!sub || sub === '--help' || sub === '-h') { console.log(HELP); process.exit(0); }
203
203
  if (Array.isArray(args) && (args.includes("--help") || args.includes("-h"))) { console.log(SUB_HELP[sub] || HELP); process.exit(0); }
204
204
  switch (sub) {
205
- case "claim": await claim(args); break;
205
+ case "add": await add(args); break;
206
206
  case "delete": await deleteSubdomain(args); break;
207
207
  case "list": await list(args); break;
208
208
  default:
@@ -14,11 +14,11 @@
14
14
  * successor, and the report must stop firing because the pipeline carries
15
15
  * those events — never because the check was removed.
16
16
  *
17
- * HTTP paths unchanged (`/agent/v1/notifications/rules*`); the allowance auth
17
+ * HTTP paths unchanged (`/agent/v1/notifications/rules*`); the SIWX auth
18
18
  * headers are PATH-scoped and must keep naming the real route.
19
19
  */
20
- import { allowanceAuthHeaders } from "./config.mjs";
21
- import { operatorProofs } from "./operator-proofs.mjs";
20
+ import { walletAuthHeaders } from "./config.mjs";
21
+ import { sessionProofs } from "./session-proofs.mjs";
22
22
  import { getSdk } from "./sdk.mjs";
23
23
  import { reportSdkError, fail } from "./sdk-errors.mjs";
24
24
  import {
@@ -35,7 +35,7 @@ import {
35
35
  const HELP = `run402 subscriptions — which events go where
36
36
 
37
37
  Usage:
38
- run402 subscriptions add --binding <binding_id> [--project <id>] [--source app|platform] [--type a,b] [--class a,b]
38
+ run402 subscriptions add --binding <binding_id> [--project <project_id>] [--source app|platform] [--type a,b] [--class a,b]
39
39
  run402 subscriptions list
40
40
  run402 subscriptions rm <subscription_id>
41
41
 
@@ -68,7 +68,7 @@ function splitCsv(value) {
68
68
  * alias for anyone who learned it from that help text. */
69
69
  export const SUBSCRIPTIONS_ADD_VALUE_FLAGS = ["--binding", "--contact", "--project", "--source", "--type", "--class"];
70
70
  export const SUBSCRIPTIONS_ADD_USAGE =
71
- "run402 subscriptions add --binding <binding_id> [--project <id>] [--source app|platform] [--type a,b] [--class a,b]";
71
+ "run402 subscriptions add --binding <binding_id> [--project <project_id>] [--source app|platform] [--type a,b] [--class a,b]";
72
72
  export { HELP as SUBSCRIPTIONS_HELP };
73
73
 
74
74
  async function rulesAdd(args) {
@@ -96,16 +96,16 @@ async function rulesAdd(args) {
96
96
  if (typeRaw !== null) input.eventTypes = splitCsv(typeRaw);
97
97
  if (classRaw !== null) input.classes = splitCsv(classRaw);
98
98
 
99
- allowanceAuthHeaders("/agent/v1/notifications/rules");
99
+ walletAuthHeaders("/agent/v1/notifications/rules");
100
100
  try {
101
- console.log(JSON.stringify(await getSdk().admin.rules.create(input, operatorProofs("/agent/v1/notifications/rules")), null, 2));
101
+ console.log(JSON.stringify(await getSdk().admin.rules.create(input, sessionProofs("/agent/v1/notifications/rules")), null, 2));
102
102
  } catch (err) {
103
103
  reportSdkError(err);
104
104
  }
105
105
  }
106
106
 
107
107
  async function rulesList() {
108
- allowanceAuthHeaders("/agent/v1/notifications/rules");
108
+ walletAuthHeaders("/agent/v1/notifications/rules");
109
109
  try {
110
110
  console.log(JSON.stringify(await getSdk().admin.rules.list(), null, 2));
111
111
  } catch (err) {
@@ -122,9 +122,9 @@ async function rulesRm(args) {
122
122
  command: "run402 notifications rules rm <rule_id>",
123
123
  missing: "Missing <rule_id>.",
124
124
  });
125
- allowanceAuthHeaders("/agent/v1/notifications/rules");
125
+ walletAuthHeaders("/agent/v1/notifications/rules");
126
126
  try {
127
- console.log(JSON.stringify(await getSdk().admin.rules.delete(ruleId, operatorProofs("/agent/v1/notifications/rules")), null, 2));
127
+ console.log(JSON.stringify(await getSdk().admin.rules.delete(ruleId, sessionProofs("/agent/v1/notifications/rules")), null, 2));
128
128
  } catch (err) {
129
129
  reportSdkError(err);
130
130
  }
package/lib/tier.mjs CHANGED
@@ -3,30 +3,33 @@ import { reportSdkError, fail } from "./sdk-errors.mjs";
3
3
  import { assertKnownFlags, normalizeArgv, positionalArgs, flagValue, failUnknownSubcommand } from "./argparse.mjs";
4
4
  import { setTierAction } from "./next-actions.mjs";
5
5
 
6
- const HELP = `run402 tier — Manage your Run402 tier subscription
6
+ const HELP = `run402 tier — Manage your Run402 tier and its lease
7
7
 
8
8
  Usage:
9
9
  run402 tier <subcommand> [args...]
10
10
 
11
11
  Subcommands:
12
12
  status Show current tier, expiry, pool usage, and function caps when returned
13
- set <tier> Subscribe, renew, or upgrade (prepaid credit first, else x402/MPP)
13
+ set <tier> Start, renew, or upgrade the lease (the allowance first, else x402/MPP)
14
14
 
15
- Tiers: prototype ($0.10, perpetual, free with testnet faucet), hobby ($5/30d), team ($20/30d)
15
+ Tiers: prototype ($0.10 once, the free tier: no lease, never expires; covered by the testnet faucet), hobby ($5/30d), team ($20/30d)
16
16
 
17
- Prepaid credit pays first. A promo code (run402 redeem <code>) or a top-up
18
- sits on the organization's balance; 'tier set' settles from it with no payment
19
- challenge and no USDC in the wallet, and the receipt says paid_with: "credit".
20
- Only a balance that falls short goes to x402 / MPP, and that error names the
17
+ The organization's allowance pays first. A promo code (run402 redeem <code>)
18
+ or a top-up adds to the allowance; 'tier set' settles from it with no payment
19
+ challenge and no USDC in the wallet, and the receipt says paid_with: "allowance".
20
+ Only an allowance that falls short goes to x402 / MPP, and that error names the
21
21
  exact shortfall a voucher or top-up would cover.
22
22
 
23
- Tier is per organization. A single subscription covers every project on
24
- the account; api_calls and storage_bytes are pooled across all of them.
23
+ Tier is per organization. One tier covers every project on the account;
24
+ api_calls and storage_bytes are pooled across all of them. Hobby and team
25
+ are prepaid 30-day leases that end unless renewed; nothing charges again on
26
+ its own.
25
27
 
26
- The server auto-detects the action based on your allowance state:
27
- - No tier or expired → subscribe
28
+ The server auto-detects the action from the current tier state and reports
29
+ it as action: start | renew | upgrade:
30
+ - No tier or expired → start
28
31
  - Same tier, active → renew (extends from expiry)
29
- - Higher tier → upgrade (prorated refund to allowance)
32
+ - Higher tier → upgrade (prorated refund to the allowance)
30
33
  - Lower tier, active → rejected (wait for expiry)
31
34
 
32
35
  Examples:
@@ -36,7 +39,7 @@ Examples:
36
39
  `;
37
40
 
38
41
  const SUB_HELP = {
39
- status: `run402 tier status — Show current tier subscription state
42
+ status: `run402 tier status — Show current tier and lease state
40
43
 
41
44
  Usage:
42
45
  run402 tier status
@@ -49,12 +52,12 @@ Notes:
49
52
  - Newer gateways include function authoring caps such as max timeout,
50
53
  max memory, max scheduled functions, minimum cron interval, and current
51
54
  scheduled-function usage
52
- - Use 'run402 tier set <tier>' to subscribe, renew, or upgrade
55
+ - Use 'run402 tier set <tier>' to start, renew, or upgrade the lease
53
56
 
54
57
  Examples:
55
58
  run402 tier status
56
59
  `,
57
- set: `run402 tier set — Subscribe, renew, or upgrade your tier
60
+ set: `run402 tier set — Set your tier: start, renew, or upgrade the lease
58
61
 
59
62
  Usage:
60
63
  run402 tier set <tier> [--idempotency-key <key>]
@@ -63,23 +66,27 @@ Arguments:
63
66
  <tier> One of: prototype, hobby, team
64
67
 
65
68
  Options:
66
- --idempotency-key <key> Retry-safe key: re-running the same subscribe/renew
69
+ --idempotency-key <key> Retry-safe key: re-running the same start/renew
67
70
  intent with this key does not double-charge. Use a
68
71
  fresh key for a deliberate second renewal.
69
72
 
70
73
  Tiers:
71
- prototype $0.10, perpetual (free with testnet faucet)
74
+ prototype $0.10 once, the free tier: no lease, never expires
75
+ (covered by the testnet faucet)
72
76
  hobby $5/30d
73
77
  team $20/30d
74
78
 
75
79
  Notes:
76
- Tier is per organization, not per project. A successful subscribe,
80
+ Tier is per organization, not per project. A successful start,
77
81
  renew, or upgrade applies immediately to every project on the account.
82
+ Hobby and team are prepaid 30-day leases that end unless renewed;
83
+ nothing charges again on its own.
78
84
 
79
- Server auto-detects action based on current allowance state:
80
- - No tier or expired -> subscribe
85
+ Server auto-detects the action from the current tier state and reports
86
+ it as action: start | renew | upgrade:
87
+ - No tier or expired -> start
81
88
  - Same tier, active -> renew (extends from expiry)
82
- - Higher tier -> upgrade (prorated refund to allowance)
89
+ - Higher tier -> upgrade (prorated refund to the allowance)
83
90
  - Lower tier, active -> rejected (wait for expiry)
84
91
  Pays via x402 micropayments.
85
92
 
@@ -131,7 +138,7 @@ async function set(args = []) {
131
138
  next_actions: [setTierAction()],
132
139
  });
133
140
  }
134
- // Caller-supplied idempotency key makes a retried subscribe/renew safe from
141
+ // Caller-supplied idempotency key makes a retried start/renew safe from
135
142
  // double-charge. Not auto-derived: the SDK cannot tell a retry from a new
136
143
  // renewal intent (that boundary is the caller's).
137
144
  const idempotencyKey = flagValue(parsedArgs, "--idempotency-key") ?? undefined;
package/lib/transfer.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { allowanceAuthHeaders, resolveProjectId } from "./config.mjs";
1
+ import { walletAuthHeaders, resolveProjectId } from "./config.mjs";
2
2
  import { getSdk } from "./sdk.mjs";
3
3
  import { reportSdkError, fail } from "./sdk-errors.mjs";
4
4
  import {
@@ -14,21 +14,21 @@ import {
14
14
  const HELP = `run402 transfer — Project transfer, one noun for wallet, email, and owned-org recipients
15
15
 
16
16
  Usage:
17
- run402 transfer init (--to <wallet|email> | --to-org <org_id>) [--project <id>] [--billing-policy migrate] [--message <text>] [--kysigned <record_id>] [--retain-collaborator developer]
17
+ run402 transfer init (--to <wallet|email> | --to-org <org_id>) [--project <project_id>] [--billing-policy migrate] [--message <text>] [--kysigned <record_id>] [--retain-member developer]
18
18
  run402 transfer preview <transfer_id>
19
19
  run402 transfer list [--incoming | --outgoing] [--limit N] [--after <cursor>]
20
- run402 transfer accept <transfer_id>
21
- run402 transfer claim <transfer_id> [--into <org_id>] [--accept-retained-collaborator]
20
+ run402 transfer accept <transfer_id> [--org <org_id>] [--accept-retained-member]
22
21
  run402 transfer cancel <transfer_id> [--reason <text>]
23
22
 
24
23
  Subcommands:
25
- init Initiate ownership change. --to <wallet> = two-party wallet transfer
26
- (completed by 'accept'); --to <email> = email->org transfer (completed by 'claim');
24
+ init Initiate ownership change. --to <wallet> = two-party wallet transfer;
25
+ --to <email> = email-addressed transfer; both are completed by 'accept'.
27
26
  --to-org <org_id> = same-actor move to an owned org (completes immediately).
28
27
  preview Fetch the safe review document (pending transfer — kind-agnostic)
29
28
  list List pending transfers (incoming default, or --outgoing) — pending rows unioned
30
- accept Accept an incoming WALLET transfer (your wallet must be the to_wallet)
31
- claim Claim an incoming EMAIL transfer into an org (--into <id>; omit = new org)
29
+ accept Accept an incoming transfer, whatever its address (wallet: your wallet must be
30
+ the to_wallet; email: your verified email must match; --org <org_id> picks the
31
+ receiving org, omit = new org)
32
32
  cancel Cancel a pending transfer of any kind
33
33
 
34
34
  Notes:
@@ -44,24 +44,24 @@ const SUB_HELP = {
44
44
  init: `run402 transfer init — Initiate a project transfer
45
45
 
46
46
  Usage:
47
- run402 transfer init (--to <wallet|email> | --to-org <org_id>) [--project <id>] [--billing-policy migrate] [--message <text>] [--kysigned <record_id>] [--retain-collaborator developer]
47
+ run402 transfer init (--to <wallet|email> | --to-org <org_id>) [--project <project_id>] [--billing-policy migrate] [--message <text>] [--kysigned <record_id>] [--retain-member developer]
48
48
 
49
49
  Options:
50
- --project <id> Project id (defaults to the active project)
51
- --to <wallet|email> Recipient (required). A wallet uses the two-party rail (completed by
52
- 'accept'); an email uses the email->org rail (completed by 'claim').
50
+ --project <project_id> Project id (defaults to the active project)
51
+ --to <wallet|email> Recipient (required). A wallet is accepted by that wallet's signature;
52
+ an email is accepted by a principal whose verified email matches.
53
53
  --to-org <org_id> Destination org you already own. Same-actor only in the first gateway
54
54
  release; completes immediately and returns project keys.
55
55
  --billing-policy <p> Billing policy (wallet rail). Phase 1A only allows 'migrate' (default).
56
56
  --message <text> Optional note shown to the recipient in preview + emails.
57
57
  --kysigned <record_id> Optional KySigned record id (wallet rail; Phase 1A: informational only).
58
- --retain-collaborator <role> Email recipients only (v1.91): keep a 'developer' membership in
59
- the recipient's org after the transfer. The recipient must accept it at
60
- claim (--accept-retained-collaborator); omit for full severance.
58
+ --retain-member <role> Email recipients only: keep a 'developer' membership in the
59
+ recipient's org after the transfer. The recipient must accept it at
60
+ accept (--accept-retained-member); omit for full severance.
61
61
 
62
62
  Notes:
63
63
  - Caller's wallet/session must currently own or admin the project (gateway re-checks fresh DB).
64
- - Owner-side mutations on the project are frozen until accept/claim/cancel/expiry.
64
+ - Owner-side mutations on the project are frozen until accept/cancel/expiry.
65
65
  Owned-org moves complete immediately and do not create a pending window.
66
66
  - The project lease stays with your organization; it is NOT refunded.
67
67
  `,
@@ -88,16 +88,23 @@ Options:
88
88
  --limit N Page size (default 50).
89
89
  --after <cursor> Opaque keyset cursor (next_cursor from a prior page).
90
90
  `,
91
- accept: `run402 transfer accept — Accept an incoming WALLET transfer
91
+ accept: `run402 transfer accept — Accept an incoming transfer, whatever its address
92
92
 
93
93
  Usage:
94
- run402 transfer accept <transfer_id>
94
+ run402 transfer accept <transfer_id> [--org <org_id>] [--accept-retained-member]
95
95
 
96
- Your wallet must equal the transfer's to_wallet. The accept transaction
97
- atomically: flips ownership, revokes the previous owner's CI bindings on the
98
- project, enqueues notifications to both parties, and stamps a
99
- 'secrets_rotation_advised' advisory on the project. (Email transfers complete
100
- via 'claim', not 'accept'.)
96
+ The one completion. A wallet-addressed transfer is accepted by the to_wallet's
97
+ signature; an email-addressed transfer by a principal whose verified email
98
+ matches, into an org you own (--org) or, omitted, a brand-new org. Either way
99
+ the accept transaction atomically: flips ownership, revokes the previous
100
+ owner's CI bindings on the project, enqueues notifications to both parties,
101
+ stamps a 'secrets_rotation_advised' advisory on the project, and returns the
102
+ project keys (saved to your keystore).
103
+
104
+ Options:
105
+ --org <org_id> Email-addressed only: the org to receive the project (omit = new org).
106
+ --accept-retained-member Email-addressed only: accept the sender's retained-developer-membership
107
+ offer (see 'transfer preview' retain_member). Omit = full severance.
101
108
  `,
102
109
  cancel: `run402 transfer cancel — Cancel a pending transfer
103
110
 
@@ -108,19 +115,6 @@ Cancels a pending transfer of any kind. You must be authorized for the row's
108
115
  kind (a wallet signing party, or an owner/admin of the offering org / the
109
116
  addressed-email principal). Already-processed transfers return 409
110
117
  TRANSFER_ALREADY_PROCESSED.
111
- `,
112
- claim: `run402 transfer claim — Claim an incoming EMAIL transfer
113
-
114
- Usage:
115
- run402 transfer claim <transfer_id> [--into <org_id>] [--accept-retained-collaborator]
116
-
117
- Claims an email-addressed transfer into an org you own. Omit --into to claim into
118
- a brand-new org. This is the email analog of 'accept'.
119
-
120
- Options:
121
- --into <org_id> Org to claim into (omit = brand-new org).
122
- --accept-retained-collaborator Accept the sender's v1.91 retained-developer-membership offer
123
- (see 'transfer preview' retain_collaborator). Omit = full severance.
124
118
  `,
125
119
  };
126
120
 
@@ -129,7 +123,7 @@ const RETAIN_ROLES = new Set(["developer"]);
129
123
 
130
124
  async function init(args) {
131
125
  const parsedArgs = normalizeArgv(args);
132
- const valueFlags = ["--project", "--to", "--to-org", "--billing-policy", "--message", "--kysigned", "--retain-collaborator"];
126
+ const valueFlags = ["--project", "--to", "--to-org", "--billing-policy", "--message", "--kysigned", "--retain-member"];
133
127
  assertKnownFlags(parsedArgs, [...valueFlags, "--help", "-h"], valueFlags);
134
128
  const extra = positionalArgs(parsedArgs, valueFlags);
135
129
  if (extra.length > 0) {
@@ -146,7 +140,7 @@ async function init(args) {
146
140
  const projectFlag = flagValue(parsedArgs, "--project");
147
141
  const projectId = await resolveProjectId(projectFlag);
148
142
  if (!projectId) {
149
- fail({ code: "NO_PROJECT", message: "No project id. Pass --project <id> or set an active project with 'run402 projects use <id>'." });
143
+ fail({ code: "NO_PROJECT", message: "No project id. Pass --project <project_id> or set an active project with 'run402 projects use <project_id>'." });
150
144
  }
151
145
  const billingPolicy = flagValue(parsedArgs, "--billing-policy");
152
146
  if (billingPolicy !== null && !BILLING_POLICIES.has(billingPolicy)) {
@@ -158,27 +152,27 @@ async function init(args) {
158
152
  }
159
153
  const message = flagValue(parsedArgs, "--message");
160
154
  const kysigned = flagValue(parsedArgs, "--kysigned");
161
- const retainCollaborator = flagValue(parsedArgs, "--retain-collaborator");
155
+ const retainMember = flagValue(parsedArgs, "--retain-member");
162
156
 
163
157
  // One noun, three recipient shapes. --to keeps wallet/email auto-detection;
164
158
  // --to-org is explicit because org ids are not human-recipient addresses.
165
159
  const recipientKind = toOrg ? "org" : (to.includes("@") ? "email" : "wallet");
166
160
 
167
- // --retain-collaborator (v1.91) is an email-only opt-in: the sender keeps a
168
- // developer membership in the recipient's org (recipient must accept at claim).
169
- if (retainCollaborator !== null) {
161
+ // --retain-member is an email-only opt-in: the sender keeps a developer
162
+ // membership in the recipient's org (the recipient must accept it at accept).
163
+ if (retainMember !== null) {
170
164
  if (recipientKind !== "email") {
171
165
  fail({
172
166
  code: "BAD_FLAG",
173
- message: "--retain-collaborator applies only to email recipients.",
174
- details: { flag: "--retain-collaborator" },
167
+ message: "--retain-member applies only to email recipients.",
168
+ details: { flag: "--retain-member" },
175
169
  });
176
170
  }
177
- if (!RETAIN_ROLES.has(retainCollaborator)) {
171
+ if (!RETAIN_ROLES.has(retainMember)) {
178
172
  fail({
179
173
  code: "BAD_FLAG",
180
- message: `Unsupported --retain-collaborator role: ${retainCollaborator}. Allowed: ${[...RETAIN_ROLES].join(", ")}.`,
181
- details: { flag: "--retain-collaborator", value: retainCollaborator, allowed: [...RETAIN_ROLES] },
174
+ message: `Unsupported --retain-member role: ${retainMember}. Allowed: ${[...RETAIN_ROLES].join(", ")}.`,
175
+ details: { flag: "--retain-member", value: retainMember, allowed: [...RETAIN_ROLES] },
182
176
  });
183
177
  }
184
178
  }
@@ -198,7 +192,7 @@ async function init(args) {
198
192
  }
199
193
 
200
194
  // All recipient shapes initiate on the unified transfer endpoint — sign that path.
201
- allowanceAuthHeaders(`/projects/v1/${projectId}/transfers`);
195
+ walletAuthHeaders(`/projects/v1/${projectId}/transfers`);
202
196
 
203
197
  try {
204
198
  let res;
@@ -213,7 +207,7 @@ async function init(args) {
213
207
  projectId,
214
208
  toEmail: to,
215
209
  message: message ?? undefined,
216
- retainCollaborator: retainCollaborator ? { role: retainCollaborator } : undefined,
210
+ retainMember: retainMember ? { role: retainMember } : undefined,
217
211
  });
218
212
  } else {
219
213
  res = await getSdk().admin.transfers.initiate({
@@ -239,7 +233,7 @@ async function preview(args) {
239
233
  }
240
234
  const transferId = positionals[0];
241
235
  // Preview is kind-agnostic — one route serves wallet, email, and future org transfers.
242
- allowanceAuthHeaders(`/agent/v1/transfers/${transferId}`);
236
+ walletAuthHeaders(`/agent/v1/transfers/${transferId}`);
243
237
 
244
238
  try {
245
239
  const data = await getSdk().admin.transfers.preview(transferId);
@@ -274,7 +268,7 @@ async function list(args) {
274
268
 
275
269
  // Incoming/outgoing are kind-agnostic — each returns the union of pending
276
270
  // wallet/email/future-org rows, tagged with recipient_kind.
277
- allowanceAuthHeaders(`/agent/v1/transfers/${direction}`);
271
+ walletAuthHeaders(`/agent/v1/transfers/${direction}`);
278
272
 
279
273
  try {
280
274
  const result =
@@ -300,16 +294,24 @@ async function list(args) {
300
294
 
301
295
  async function accept(args) {
302
296
  const parsedArgs = normalizeArgv(args);
303
- assertKnownFlags(parsedArgs, ["--help", "-h"]);
304
- const positionals = positionalArgs(parsedArgs);
297
+ const valueFlags = ["--org"];
298
+ assertKnownFlags(parsedArgs, [...valueFlags, "--accept-retained-member", "--help", "-h"], valueFlags);
299
+ const positionals = positionalArgs(parsedArgs, valueFlags);
305
300
  if (positionals.length !== 1) {
306
- fail({ code: "BAD_USAGE", message: "Usage: run402 transfer accept <transfer_id>" });
301
+ fail({ code: "BAD_USAGE", message: "Usage: run402 transfer accept <transfer_id> [--org <org_id>] [--accept-retained-member]" });
307
302
  }
308
303
  const transferId = positionals[0];
309
- allowanceAuthHeaders(`/agent/v1/transfers/${transferId}/accept`);
304
+ const orgId = flagValue(parsedArgs, "--org");
305
+ // Email-addressed rows only: accept the sender's retained-developer-membership
306
+ // offer (see the preview's `retain_member` block). Absent = full severance.
307
+ const acceptRetain = parsedArgs.includes("--accept-retained-member");
308
+ walletAuthHeaders(`/agent/v1/transfers/${transferId}/accept`);
310
309
 
311
310
  try {
312
- const data = await getSdk().admin.transfers.accept(transferId);
311
+ const data = await getSdk().admin.transfers.accept(transferId, {
312
+ orgId: orgId ?? undefined,
313
+ acceptRetainedMember: acceptRetain || undefined,
314
+ });
313
315
  console.log(JSON.stringify(data, null, 2));
314
316
  } catch (err) {
315
317
  reportSdkError(err);
@@ -327,7 +329,7 @@ async function cancel(args) {
327
329
  const transferId = positionals[0];
328
330
  const reason = flagValue(parsedArgs, "--reason");
329
331
  // Cancel is kind-agnostic — one route serves wallet and email transfers.
330
- allowanceAuthHeaders(`/agent/v1/transfers/${transferId}/cancel`);
332
+ walletAuthHeaders(`/agent/v1/transfers/${transferId}/cancel`);
331
333
 
332
334
  try {
333
335
  const data = await getSdk().admin.transfers.cancel(transferId, { reason: reason ?? undefined });
@@ -337,32 +339,6 @@ async function cancel(args) {
337
339
  }
338
340
  }
339
341
 
340
- async function claim(args) {
341
- const parsedArgs = normalizeArgv(args);
342
- const valueFlags = ["--into"];
343
- assertKnownFlags(parsedArgs, [...valueFlags, "--accept-retained-collaborator", "--help", "-h"], valueFlags);
344
- const positionals = positionalArgs(parsedArgs, valueFlags);
345
- if (positionals.length !== 1) {
346
- fail({ code: "BAD_USAGE", message: "Usage: run402 transfer claim <transfer_id> [--into <org_id>] [--accept-retained-collaborator]" });
347
- }
348
- const transferId = positionals[0];
349
- const into = flagValue(parsedArgs, "--into");
350
- // v1.91: accept the sender's retained-developer-membership offer (see the
351
- // preview's `retain_collaborator` block). Absent = full severance (default).
352
- const acceptRetain = parsedArgs.includes("--accept-retained-collaborator");
353
- allowanceAuthHeaders(`/agent/v1/transfers/${transferId}/claim`);
354
-
355
- try {
356
- const data = await getSdk().admin.transfers.claim(transferId, {
357
- organizationId: into ?? undefined,
358
- acceptRetainedCollaborator: acceptRetain || undefined,
359
- });
360
- console.log(JSON.stringify(data, null, 2));
361
- } catch (err) {
362
- reportSdkError(err);
363
- }
364
- }
365
-
366
342
  export async function run(sub, args) {
367
343
  if (!sub || sub === "--help" || sub === "-h") {
368
344
  console.log(HELP);
@@ -385,9 +361,6 @@ export async function run(sub, args) {
385
361
  case "accept":
386
362
  await accept(args);
387
363
  return;
388
- case "claim":
389
- await claim(args);
390
- return;
391
364
  case "cancel":
392
365
  await cancel(args);
393
366
  return;