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/contacts.mjs CHANGED
@@ -12,17 +12,17 @@
12
12
  * "how can this human be reached" — not the mechanisms, which really are
13
13
  * different and are not pretended otherwise.
14
14
  *
15
- * `rm <id>` takes a bare id and works out which backend owns it, because both
15
+ * `rm <contact_id>` takes a bare id and works out which backend owns it, because both
16
16
  * are UUIDs and a caller holding one from `contacts list` should not have to
17
17
  * know which subsystem minted it. That costs one extra read and removes a
18
18
  * `--kind` flag nobody could answer without looking it up.
19
19
  *
20
20
  * HTTP paths are unchanged (`/agent/v1/notifications/channels*`,
21
- * `/orgs/v1/:org_id/escalation-contacts*`); the allowance auth headers below
21
+ * `/orgs/v1/:org_id/escalation-contacts*`); the SIWX auth headers below
22
22
  * are PATH-scoped and must keep naming the real routes.
23
23
  */
24
- import { allowanceAuthHeaders } from "./config.mjs";
25
- import { operatorProofs } from "./operator-proofs.mjs";
24
+ import { walletAuthHeaders } from "./config.mjs";
25
+ import { sessionProofs } from "./session-proofs.mjs";
26
26
  import { getSdk } from "./sdk.mjs";
27
27
  import { reportSdkError, fail } from "./sdk-errors.mjs";
28
28
  import {
@@ -44,7 +44,7 @@ Usage:
44
44
  run402 contacts list
45
45
  run402 contacts add <email> [--level <1-10>] [--name <display>]
46
46
  run402 contacts connect telegram [--label <name>]
47
- run402 contacts rm <id>
47
+ run402 contacts rm <contact_id>
48
48
  run402 contacts preferences
49
49
  run402 contacts preferences set <key>=<value> [<key>=<value> ...]
50
50
  run402 contacts test [--source app|platform] [--type <event_type>]
@@ -59,7 +59,7 @@ Two kinds, one question:
59
59
  Every row carries \`kind\`. \`rm\` takes either kind's id and works out which.
60
60
 
61
61
  Notes:
62
- - Adding an address with no verified operator email is ACCEPTED with a
62
+ - Adding an address with no verified contact email is ACCEPTED with a
63
63
  reachability warning — you must be able to configure the chain before the
64
64
  humans are bound.
65
65
  - What actually landed is \`run402 deliveries\`.
@@ -69,7 +69,7 @@ async function preferences(args) {
69
69
  const parsedArgs = normalizeArgv(args);
70
70
  assertKnownFlags(parsedArgs, ["--help", "-h"]);
71
71
  const positionals = positionalArgs(parsedArgs);
72
- allowanceAuthHeaders("/agent/v1/notifications/preferences");
72
+ walletAuthHeaders("/agent/v1/notifications/preferences");
73
73
 
74
74
  if (positionals.length === 0) {
75
75
  // GET preferences
@@ -104,7 +104,7 @@ async function preferences(args) {
104
104
  }
105
105
  }
106
106
  try {
107
- const data = await getSdk().admin.setNotificationPreferences(patch, operatorProofs("/agent/v1/notifications/preferences"));
107
+ const data = await getSdk().admin.setNotificationPreferences(patch, sessionProofs("/agent/v1/notifications/preferences"));
108
108
  console.log(JSON.stringify(data, null, 2));
109
109
  } catch (err) {
110
110
  reportSdkError(err);
@@ -185,7 +185,7 @@ async function channelsConnect(args) {
185
185
  fail({ code: "BAD_USAGE", message: `Unexpected argument for notifications channels connect: ${positionals[1]}` });
186
186
  }
187
187
 
188
- const proofs = operatorProofs("/agent/v1/notifications/channels/telegram");
188
+ const proofs = sessionProofs("/agent/v1/notifications/channels/telegram");
189
189
  let pending;
190
190
  try {
191
191
  pending = await getSdk().admin.channels.connectTelegram(label ? { label } : {}, proofs);
@@ -215,7 +215,7 @@ async function channelsConnect(args) {
215
215
  }
216
216
 
217
217
  async function channelsList() {
218
- allowanceAuthHeaders("/agent/v1/notifications/channels");
218
+ walletAuthHeaders("/agent/v1/notifications/channels");
219
219
  try {
220
220
  console.log(JSON.stringify(await getSdk().admin.channels.list(), null, 2));
221
221
  } catch (err) {
@@ -232,9 +232,9 @@ async function channelsRevoke(args) {
232
232
  command: "run402 notifications channels revoke <binding_id>",
233
233
  missing: "Missing <binding_id>.",
234
234
  });
235
- allowanceAuthHeaders("/agent/v1/notifications/channels/telegram");
235
+ walletAuthHeaders("/agent/v1/notifications/channels/telegram");
236
236
  try {
237
- console.log(JSON.stringify(await getSdk().admin.channels.revokeTelegram(bindingId, operatorProofs("/agent/v1/notifications/channels/telegram")), null, 2));
237
+ console.log(JSON.stringify(await getSdk().admin.channels.revokeTelegram(bindingId, sessionProofs("/agent/v1/notifications/channels/telegram")), null, 2));
238
238
  } catch (err) {
239
239
  reportSdkError(err);
240
240
  }
@@ -280,7 +280,7 @@ async function test(args) {
280
280
  const source = flagValue(parsedArgs, "--source");
281
281
  if (source !== null) assertAllowedValue(source, ["app", "platform"], "--source");
282
282
  const eventType = flagValue(parsedArgs, "--type");
283
- allowanceAuthHeaders("/agent/v1/notifications/test");
283
+ walletAuthHeaders("/agent/v1/notifications/test");
284
284
  const opts = {};
285
285
  if (source) opts.source = source;
286
286
  if (eventType) opts.eventType = eventType;
@@ -319,7 +319,7 @@ async function listContacts(args) {
319
319
  }
320
320
 
321
321
  try {
322
- allowanceAuthHeaders("/agent/v1/notifications/channels");
322
+ walletAuthHeaders("/agent/v1/notifications/channels");
323
323
  const res = await sdk.admin.channels.list();
324
324
  for (const ch of res.telegram ?? []) {
325
325
  rows.push({ kind: "telegram", id: ch.binding_id ?? ch.id, ...ch });
@@ -339,7 +339,7 @@ async function removeContact(args) {
339
339
  assertKnownFlags(a, ["--org", "--help", "-h"], ["--org"]);
340
340
  const positionals = positionalArgs(a, ["--org"]);
341
341
  requirePositionalCount(positionals, ["--org"], {
342
- min: 1, max: 1, command: "run402 contacts rm", missing: "<id>",
342
+ min: 1, max: 1, command: "run402 contacts rm", missing: "<contact_id>",
343
343
  });
344
344
  const id = positionals[0];
345
345
  const sdk = getSdk();
@@ -354,7 +354,7 @@ async function removeContact(args) {
354
354
  return;
355
355
  }
356
356
  }
357
- allowanceAuthHeaders("/agent/v1/notifications/channels");
357
+ walletAuthHeaders("/agent/v1/notifications/channels");
358
358
  const chans = await sdk.admin.channels.list();
359
359
  const chan = (chans.telegram ?? []).find((c) => (c.binding_id ?? c.id) === id);
360
360
  if (chan) {
package/lib/contracts.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  const HELP = `run402 contracts — KMS-backed Ethereum signers for smart-contract calls
15
15
 
16
16
  Pricing: $0.04/day per signer ($1.20/month) plus $0.000005 per contract call.
17
- Signer creation requires $1.20 in cash credit (30 days of rent).
17
+ Signer creation requires $1.20 of allowance (30 days of rent).
18
18
  Non-custodial: see https://run402.com/humans/terms.html#non-custodial-kms-wallets
19
19
 
20
20
  Usage:
@@ -53,7 +53,7 @@ const SUB_HELP = {
53
53
  "provision-signer": `run402 contracts provision-signer — Provision a KMS-backed signer
54
54
 
55
55
  Usage:
56
- run402 contracts provision-signer --chain <chain> [--project <id>] [options]
56
+ run402 contracts provision-signer --chain <chain> [--project <project_id>] [options]
57
57
 
58
58
  Legacy (still supported):
59
59
  run402 contracts provision-signer <project_id> --chain <chain> [options]
@@ -69,7 +69,7 @@ Options:
69
69
  "set-recovery": `run402 contracts set-recovery — Set or clear the signer recovery address
70
70
 
71
71
  Usage:
72
- run402 contracts set-recovery <signer_id> [--project <id>] [options]
72
+ run402 contracts set-recovery <signer_id> [--project <project_id>] [options]
73
73
 
74
74
  Legacy (still supported):
75
75
  run402 contracts set-recovery <project_id> <signer_id> [options]
@@ -77,7 +77,7 @@ Legacy (still supported):
77
77
  "set-alert": `run402 contracts set-alert — Set the low-balance alert threshold
78
78
 
79
79
  Usage:
80
- run402 contracts set-alert <signer_id> --threshold-wei <n> [--project <id>]
80
+ run402 contracts set-alert <signer_id> --threshold-wei <n> [--project <project_id>]
81
81
 
82
82
  Legacy (still supported):
83
83
  run402 contracts set-alert <project_id> <signer_id> --threshold-wei <n>
@@ -85,7 +85,7 @@ Legacy (still supported):
85
85
  call: `run402 contracts call — Submit a contract write call
86
86
 
87
87
  Usage:
88
- run402 contracts call <signer_id> --to 0x... --abi <json> [--project <id>]
88
+ run402 contracts call <signer_id> --to 0x... --abi <json> [--project <project_id>]
89
89
 
90
90
  Legacy (still supported):
91
91
  run402 contracts call <project_id> <signer_id> --to 0x... --abi <json>
@@ -98,7 +98,7 @@ Returns the deterministic CREATE address synchronously — known from (signer, n
98
98
  before the tx confirms. Cost: chain gas at-cost + $0.000005 KMS sign fee.
99
99
 
100
100
  Usage:
101
- run402 contracts deploy <signer_id> --bytecode 0x... [--project <id>] [options]
101
+ run402 contracts deploy <signer_id> --bytecode 0x... [--project <project_id>] [options]
102
102
 
103
103
  Legacy (still supported):
104
104
  run402 contracts deploy <project_id> <signer_id> --bytecode 0x... [options]
@@ -125,7 +125,7 @@ Usage:
125
125
  drain: `run402 contracts drain — Drain native balance to a destination address
126
126
 
127
127
  Usage:
128
- run402 contracts drain <signer_id> --to 0x... --confirm [--project <id>]
128
+ run402 contracts drain <signer_id> --to 0x... --confirm [--project <project_id>]
129
129
 
130
130
  Legacy (still supported):
131
131
  run402 contracts drain <project_id> <signer_id> --to 0x... --confirm
@@ -133,7 +133,7 @@ Legacy (still supported):
133
133
  delete: `run402 contracts delete — Schedule the KMS key for deletion
134
134
 
135
135
  Usage:
136
- run402 contracts delete <signer_id> --confirm [--project <id>]
136
+ run402 contracts delete <signer_id> --confirm [--project <project_id>]
137
137
 
138
138
  Legacy (still supported):
139
139
  run402 contracts delete <project_id> <signer_id> --confirm
@@ -141,7 +141,7 @@ Legacy (still supported):
141
141
  "get-signer": `run402 contracts get-signer — Get signer metadata + live balance
142
142
 
143
143
  Usage:
144
- run402 contracts get-signer <signer_id> [--project <id>]
144
+ run402 contracts get-signer <signer_id> [--project <project_id>]
145
145
 
146
146
  Legacy (still supported):
147
147
  run402 contracts get-signer <project_id> <signer_id>
@@ -156,7 +156,7 @@ Examples:
156
156
  "list-signers": `run402 contracts list-signers — List all KMS signers for a project
157
157
 
158
158
  Usage:
159
- run402 contracts list-signers [--project <id>]
159
+ run402 contracts list-signers [--project <project_id>]
160
160
 
161
161
  Legacy (still supported):
162
162
  run402 contracts list-signers <project_id>
@@ -173,7 +173,7 @@ Examples:
173
173
  status: `run402 contracts status — Get a contract call's status and receipt
174
174
 
175
175
  Usage:
176
- run402 contracts status <call_id> [--project <id>]
176
+ run402 contracts status <call_id> [--project <project_id>]
177
177
 
178
178
  Legacy (still supported):
179
179
  run402 contracts status <project_id> <call_id>
@@ -502,7 +502,7 @@ async function deleteSigner(projectId, signerId, args) {
502
502
  export async function run(sub, args) {
503
503
  if (!sub || sub === "--help" || sub === "-h") { console.log(HELP); process.exit(0); }
504
504
  if (Array.isArray(args) && (args.includes("--help") || args.includes("-h"))) { console.log(SUB_HELP[sub] || HELP); process.exit(0); }
505
- // Project selection (CLI-wide convention): `--project <id>` wins, else a
505
+ // Project selection (CLI-wide convention): `--project <project_id>` wins, else a
506
506
  // legacy leading `prj_...` positional, else the active project. The signer /
507
507
  // call id stays positional (`cwlt_...` / `ccall_...`). Computed lazily so
508
508
  // unknown subcommands (and the anonymous `read`) never trip project
@@ -26,18 +26,18 @@ Usage:
26
26
  run402 credentials <subcommand> [args...]
27
27
 
28
28
  Project credentials (on the gateway — named, revocable, rotatable):
29
- issue --kind <anon|service> --name <name> [--project <id>] [--expires <iso8601>] [--import]
29
+ issue --kind <anon|service> --name <name> [--project <project_id>] [--expires <iso8601>] [--import]
30
30
  Mint one. The secret is printed ONCE.
31
31
  --import also writes it into this machine's
32
32
  local key cache (the cold-restart re-key path).
33
- list [--project <id>] [--include-revoked]
33
+ list [--project <project_id>] [--include-revoked]
34
34
  List credentials (metadata only, never secrets)
35
- status [--project <id>] Are you still on the retiring legacy key?
36
- rotate <credential_id> [--project <id>]
35
+ status [--project <project_id>] Are you still on the retiring legacy key?
36
+ rotate <credential_id> [--project <project_id>]
37
37
  Replace in one step; new secret printed ONCE
38
- revoke <credential_id> [--project <id>] [--reason <text>]
38
+ revoke <credential_id> [--project <project_id>] [--reason <text>]
39
39
  Revoke immediately, freeing the name
40
- token [--project <id>] [--kind <anon|service>]
40
+ token [--project <project_id>] [--kind <anon|service>]
41
41
  Mint a SHORT-LIVED token. Works with only a
42
42
  delegate — the unattended recovery path.
43
43
 
@@ -48,7 +48,7 @@ Notes:
48
48
  - 'issue', 'rotate' and 'revoke' need owner membership on the project's org
49
49
  plus a fresh step-up, so a scoped agent credential can never escalate
50
50
  itself into a permanent root. Authenticate with a wallet (SIWX) or a
51
- control-plane session ('run402 operator login --step-up').
51
+ sign-in session ('run402 login').
52
52
  - 'token' is the exception: a delegate can mint one with no human present.
53
53
  - Secrets are returned EXACTLY ONCE and are never recoverable. Full JSON goes
54
54
  to stdout so you can pipe it; the warnings go to stderr.
@@ -68,12 +68,12 @@ Usage:
68
68
 
69
69
  Subcommands:
70
70
  list List cached project-key entries, redacted
71
- status --project <id> Show one cached entry, redacted
72
- import --project <id> --service-key-stdin
73
- import --project <id> --service-key-env <env>
74
- import --project <id> --anon-key-env <env> Rotate only the anon key
75
- export --project <id> --reveal Print cached keys, including secrets
76
- remove --project <id> Remove one cached key entry
71
+ status --project <project_id> Show one cached entry, redacted
72
+ import --project <project_id> --service-key-stdin
73
+ import --project <project_id> --service-key-env <env>
74
+ import --project <project_id> --anon-key-env <env> Rotate only the anon key
75
+ export --project <project_id> --reveal Print cached keys, including secrets
76
+ remove --project <project_id> Remove one cached key entry
77
77
 
78
78
  Notes:
79
79
  - This is a LOCAL CACHE surface. It is not project inventory.
@@ -89,7 +89,7 @@ const SUB_HELP = {
89
89
  issue: `run402 credentials issue — mint a named project credential
90
90
 
91
91
  Usage:
92
- run402 credentials issue --kind <anon|service> --name <name> [--project <id>] [--import]
92
+ run402 credentials issue --kind <anon|service> --name <name> [--project <project_id>] [--import]
93
93
  [--expires <iso8601>]
94
94
 
95
95
  --kind "anon" is the tenant-facing key; "service" is the privileged one.
@@ -112,28 +112,28 @@ can NEVER do this; use 'run402 credentials token' instead.
112
112
  list: `run402 credentials list — list a project's credentials
113
113
 
114
114
  Usage:
115
- run402 credentials list [--project <id>] [--include-revoked]
115
+ run402 credentials list [--project <project_id>] [--include-revoked]
116
116
 
117
117
  Metadata only — never a secret or a secret hash. Only project.read is needed.
118
118
  `,
119
119
  status: `run402 credentials status — are you still on the retiring legacy key?
120
120
 
121
121
  Usage:
122
- run402 credentials status [--project <id>]
122
+ run402 credentials status [--project <project_id>]
123
123
 
124
124
  Returns state "legacy" while the project still depends on the derived
125
125
  anon/service keys, or "rotatable" once it holds credentials it can revoke
126
126
  individually.
127
127
 
128
128
  There is deliberately NO deadline: retirement is gated on conditions (every
129
- tenant migrated, 30 consecutive days of zero legacy-key use, explicit operator
129
+ tenant migrated, 30 consecutive days of zero legacy-key use, explicit staff
130
130
  approval), not a date. Read retirement.gated_on rather than planning against a
131
131
  date the platform has not committed to.
132
132
  `,
133
133
  rotate: `run402 credentials rotate — replace a credential in one step
134
134
 
135
135
  Usage:
136
- run402 credentials rotate <credential_id> [--project <id>]
136
+ run402 credentials rotate <credential_id> [--project <project_id>]
137
137
 
138
138
  Mints a replacement and revokes the old one in a single transaction, keeping
139
139
  the name. The NEW secret is printed once.
@@ -146,7 +146,7 @@ compromised.
146
146
  revoke: `run402 credentials revoke — revoke a credential immediately
147
147
 
148
148
  Usage:
149
- run402 credentials revoke <credential_id> [--project <id>] [--reason <text>]
149
+ run402 credentials revoke <credential_id> [--project <project_id>] [--reason <text>]
150
150
 
151
151
  Takes effect for every subsequent request and frees the name for reuse.
152
152
  Requires owner membership plus step-up.
@@ -154,7 +154,7 @@ Requires owner membership plus step-up.
154
154
  token: `run402 credentials token — mint a short-lived project token
155
155
 
156
156
  Usage:
157
- run402 credentials token [--project <id>] [--kind <anon|service>]
157
+ run402 credentials token [--project <project_id>] [--kind <anon|service>]
158
158
 
159
159
  The cold-restart recovery path, and the ONE credential call an agent can make
160
160
  with no human present: a delegate is accepted here. There is no step-up because
@@ -214,7 +214,7 @@ function requireProjectFlag(projectId, usage) {
214
214
  if (!projectId) {
215
215
  fail({
216
216
  code: "BAD_USAGE",
217
- message: "Missing --project <id>.",
217
+ message: "Missing --project <project_id>.",
218
218
  hint: usage,
219
219
  });
220
220
  }
@@ -227,7 +227,7 @@ function requireCachedProject(projectId) {
227
227
  fail({
228
228
  code: "PROJECT_CREDENTIAL_NOT_FOUND",
229
229
  message: `No local project credentials cached for ${projectId}.`,
230
- hint: "Import keys with `run402 credentials project-keys import --project <id> --service-key-stdin` if this operation truly requires local project credentials.",
230
+ hint: "Import keys with `run402 credentials project-keys import --project <project_id> --service-key-stdin` if this operation truly requires local project credentials.",
231
231
  details: { project_id: projectId, ...provenance() },
232
232
  next_actions: [{
233
233
  type: "run_command",
@@ -256,7 +256,7 @@ async function status(args) {
256
256
  if (rest.length > 0) {
257
257
  fail({ code: "BAD_USAGE", message: `Unexpected argument for project-keys status: ${rest[0]}` });
258
258
  }
259
- const id = requireProjectFlag(projectId, "run402 credentials project-keys status --project <id>");
259
+ const id = requireProjectFlag(projectId, "run402 credentials project-keys status --project <project_id>");
260
260
  console.log(JSON.stringify(redactedEntry(id, getProject(id)), null, 2));
261
261
  }
262
262
 
@@ -311,7 +311,7 @@ async function importKey(args) {
311
311
  if (rest.length > 0) {
312
312
  fail({ code: "BAD_USAGE", message: `Unexpected argument for project-keys import: ${rest[0]}` });
313
313
  }
314
- const id = requireProjectFlag(projectId, "run402 credentials project-keys import --project <id> --service-key-stdin");
314
+ const id = requireProjectFlag(projectId, "run402 credentials project-keys import --project <project_id> --service-key-stdin");
315
315
  // Resolve --anon-key-env before requiring a service key, so a missing service
316
316
  // key can report against the flags actually passed and an anon-only rotation
317
317
  // can reuse the cached service key.
@@ -346,12 +346,12 @@ async function exportKey(args) {
346
346
  if (rest.length > 0) {
347
347
  fail({ code: "BAD_USAGE", message: `Unexpected argument for project-keys export: ${rest[0]}` });
348
348
  }
349
- const id = requireProjectFlag(projectId, "run402 credentials project-keys export --project <id> --reveal");
349
+ const id = requireProjectFlag(projectId, "run402 credentials project-keys export --project <project_id> --reveal");
350
350
  if (!parsed.includes("--reveal")) {
351
351
  fail({
352
352
  code: "REVEAL_REQUIRED",
353
353
  message: "Exporting full project keys requires --reveal.",
354
- hint: "Use `run402 credentials project-keys status --project <id>` for redacted output.",
354
+ hint: "Use `run402 credentials project-keys status --project <project_id>` for redacted output.",
355
355
  details: { project_id: id, ...provenance() },
356
356
  });
357
357
  }
@@ -364,7 +364,7 @@ async function remove(args) {
364
364
  if (rest.length > 0) {
365
365
  fail({ code: "BAD_USAGE", message: `Unexpected argument for project-keys remove: ${rest[0]}` });
366
366
  }
367
- const id = requireProjectFlag(projectId, "run402 credentials project-keys remove --project <id>");
367
+ const id = requireProjectFlag(projectId, "run402 credentials project-keys remove --project <project_id>");
368
368
  const existed = Boolean(getProject(id));
369
369
  removeProject(id, projectCredentialsFile());
370
370
  console.log(JSON.stringify({ project_id: id, removed: existed, ...provenance() }, null, 2));
@@ -423,7 +423,7 @@ async function issue(args) {
423
423
  requirePositionalCount(rest, ISSUE_VALUE_FLAGS, {
424
424
  min: 0,
425
425
  max: 0,
426
- command: "run402 credentials issue --kind <anon|service> --name <name> [--project <id>] [--import]",
426
+ command: "run402 credentials issue --kind <anon|service> --name <name> [--project <project_id>] [--import]",
427
427
  missing: "",
428
428
  });
429
429
  if (kind !== "anon" && kind !== "service") {
@@ -485,7 +485,7 @@ async function listCredentials(args) {
485
485
  requirePositionalCount(rest, ["--project"], {
486
486
  min: 0,
487
487
  max: 0,
488
- command: "run402 credentials list [--project <id>]",
488
+ command: "run402 credentials list [--project <project_id>]",
489
489
  missing: "",
490
490
  });
491
491
  try {
@@ -503,7 +503,7 @@ async function credentialStatus(args) {
503
503
  requirePositionalCount(rest, ["--project"], {
504
504
  min: 0,
505
505
  max: 0,
506
- command: "run402 credentials status [--project <id>]",
506
+ command: "run402 credentials status [--project <project_id>]",
507
507
  missing: "",
508
508
  });
509
509
  try {
@@ -527,7 +527,7 @@ async function rotate(args) {
527
527
  const [credentialId] = requirePositionalCount(rest, ["--project"], {
528
528
  min: 1,
529
529
  max: 1,
530
- command: "run402 credentials rotate <credential_id> [--project <id>]",
530
+ command: "run402 credentials rotate <credential_id> [--project <project_id>]",
531
531
  missing: "Missing <credential_id>. Find it with: run402 credentials list",
532
532
  });
533
533
  try {
@@ -545,7 +545,7 @@ async function revoke(args) {
545
545
  const [credentialId] = requirePositionalCount(rest, ["--project", "--reason"], {
546
546
  min: 1,
547
547
  max: 1,
548
- command: "run402 credentials revoke <credential_id> [--project <id>]",
548
+ command: "run402 credentials revoke <credential_id> [--project <project_id>]",
549
549
  missing: "Missing <credential_id>. Find it with: run402 credentials list",
550
550
  });
551
551
  try {
@@ -564,7 +564,7 @@ async function token(args) {
564
564
  requirePositionalCount(rest, ["--project", "--kind"], {
565
565
  min: 0,
566
566
  max: 0,
567
- command: "run402 credentials token [--project <id>]",
567
+ command: "run402 credentials token [--project <project_id>]",
568
568
  missing: "",
569
569
  });
570
570
  if (kind && kind !== "anon" && kind !== "service") {
@@ -4,7 +4,7 @@
4
4
  * builtins (pinned by the import-graph gate test), so it must stay tiny.
5
5
  *
6
6
  * The socket lives INSIDE the client configuration directory — the same
7
- * 0700 trust boundary that already holds the allowance private key and the
7
+ * 0700 trust boundary that already holds the wallet private key and the
8
8
  * gitvault keystore — and its path is keyed by CLI version, so a CLI
9
9
  * upgrade resolves a NEW path: the new client never reaches the old daemon,
10
10
  * which idles out on its own. Windows uses a named pipe whose name carries
package/lib/delegates.mjs CHANGED
@@ -15,24 +15,24 @@ Usage:
15
15
  run402 delegates <subcommand> [args...]
16
16
 
17
17
  Subcommands:
18
- create --grant <grant_id> [--project <id>] [--capability <cap>] [--kind <kind>]
18
+ create --grant <grant_id> [--project <project_id>] [--capability <cap>] [--kind <kind>]
19
19
  [--scope <json>] [--expires <iso8601>]
20
20
  Mint a delegate. The bearer is printed ONCE.
21
- list [--project <id>] List delegates (never shows tokens)
22
- revoke <delegate_id> [--project <id>]
21
+ list [--project <project_id>] List delegates (never shows tokens)
22
+ revoke <delegate_id> [--project <project_id>]
23
23
  Revoke immediately
24
- rotate <delegate_id> [--project <id>]
24
+ rotate <delegate_id> [--project <project_id>]
25
25
  Revoke + reissue; new bearer printed ONCE
26
26
 
27
27
  Notes:
28
28
  - A delegate NARROWS an existing grant, so mint the grant first:
29
- run402 grants create <agent-wallet> --capability deploy --project <id>
29
+ run402 grants create <agent-wallet> --capability deploy --project <project_id>
30
30
  then pass the returned grant_id to 'delegates create'.
31
31
  - Mutations require you to be an owner of the project's org (wallet SIWX).
32
32
  - A delegate can never be an owner, and is revocable and expiring.
33
33
  - The token is shown ONCE and is not recoverable. Store it immediately;
34
34
  if you lose it, 'rotate' issues a new one.
35
- - Use it with: RUN402_DELEGATE_TOKEN=<token> run402 deploy apply ...
35
+ - Use it with: RUN402_DELEGATE_TOKEN=<token> run402 deploy ...
36
36
  - JSON in, JSON out.
37
37
 
38
38
  Why this exists:
@@ -51,7 +51,7 @@ const SUB_HELP = {
51
51
  create: `run402 delegates create — mint a scoped deploy credential
52
52
 
53
53
  Usage:
54
- run402 delegates create --grant <grant_id> [--project <id>] [--capability <cap>]
54
+ run402 delegates create --grant <grant_id> [--project <project_id>] [--capability <cap>]
55
55
  [--kind <kind>] [--scope <json>] [--expires <iso8601>]
56
56
 
57
57
  --capability defaults to "deploy". --kind defaults to "run402_agent_key" (the
@@ -64,21 +64,21 @@ Requires owner of the project's org.
64
64
  list: `run402 delegates list — list a project's delegates
65
65
 
66
66
  Usage:
67
- run402 delegates list [--project <id>]
67
+ run402 delegates list [--project <project_id>]
68
68
 
69
69
  Never returns tokens or secret material — id, kind, scope, expiry, revocation.
70
70
  `,
71
71
  revoke: `run402 delegates revoke — revoke a delegate immediately
72
72
 
73
73
  Usage:
74
- run402 delegates revoke <delegate_id> [--project <id>]
74
+ run402 delegates revoke <delegate_id> [--project <project_id>]
75
75
 
76
76
  Takes effect for every subsequent request. Requires owner of the project's org.
77
77
  `,
78
78
  rotate: `run402 delegates rotate — revoke and reissue in one step
79
79
 
80
80
  Usage:
81
- run402 delegates rotate <delegate_id> [--project <id>]
81
+ run402 delegates rotate <delegate_id> [--project <project_id>]
82
82
 
83
83
  Keeps the same principal, grant, kind, scope, cap and expiry. The NEW bearer is
84
84
  printed once. Use this when a token is lost or possibly exposed.
@@ -99,12 +99,12 @@ async function create(args) {
99
99
  requirePositionalCount(rest, CREATE_VALUE_FLAGS, {
100
100
  min: 0,
101
101
  max: 0,
102
- command: "run402 delegates create --grant <grant_id> [--project <id>]",
102
+ command: "run402 delegates create --grant <grant_id> [--project <project_id>]",
103
103
  missing: "",
104
104
  });
105
105
  if (!grantId) {
106
106
  console.error("Missing --grant <grant_id>. Mint one first:");
107
- console.error(" run402 grants create <agent-wallet> --capability deploy --project <id>");
107
+ console.error(" run402 grants create <agent-wallet> --capability deploy --project <project_id>");
108
108
  process.exit(1);
109
109
  }
110
110
  const scope = scopeRaw != null
@@ -135,7 +135,7 @@ async function list(args) {
135
135
  requirePositionalCount(rest, ["--project"], {
136
136
  min: 0,
137
137
  max: 0,
138
- command: "run402 delegates list [--project <id>]",
138
+ command: "run402 delegates list [--project <project_id>]",
139
139
  missing: "",
140
140
  });
141
141
  try {
@@ -153,7 +153,7 @@ function oneIdCommand(name) {
153
153
  const [delegateId] = requirePositionalCount(rest, ["--project"], {
154
154
  min: 1,
155
155
  max: 1,
156
- command: `run402 delegates ${name} <delegate_id> [--project <id>]`,
156
+ command: `run402 delegates ${name} <delegate_id> [--project <project_id>]`,
157
157
  missing: "Missing <delegate_id>.",
158
158
  });
159
159
  try {
@@ -7,12 +7,12 @@
7
7
  * produces them, which is now `contacts` and `subscriptions`.
8
8
  *
9
9
  * HTTP paths are unchanged (`/agent/v1/notifications*`) — this is client
10
- * vocabulary, and the allowance auth headers below are PATH-scoped, so they
10
+ * vocabulary, and the SIWX auth headers below are PATH-scoped, so they
11
11
  * must keep naming the real route. Renaming them would ship broken auth
12
12
  * against a live path, which is exactly how the `feedback` rename nearly went
13
13
  * wrong.
14
14
  */
15
- import { allowanceAuthHeaders } from "./config.mjs";
15
+ import { walletAuthHeaders } from "./config.mjs";
16
16
  import { getSdk } from "./sdk.mjs";
17
17
  import { reportSdkError, fail } from "./sdk-errors.mjs";
18
18
  import {
@@ -30,7 +30,7 @@ const HELP = `run402 deliveries — did a notification actually land
30
30
 
31
31
  Usage:
32
32
  run402 deliveries list [--type <event_type>] [--since <iso>] [--limit N] [--after <cursor>]
33
- run402 deliveries get <id>
33
+ run402 deliveries get <notification_id>
34
34
 
35
35
  Notes:
36
36
  - One row per delivery ATTEMPT, per channel, with its outcome — the audit
@@ -47,7 +47,7 @@ async function list(args) {
47
47
  if (extra.length > 0) {
48
48
  fail({ code: "BAD_USAGE", message: `Unexpected argument for notifications list: ${extra[0]}` });
49
49
  }
50
- allowanceAuthHeaders("/agent/v1/notifications");
50
+ walletAuthHeaders("/agent/v1/notifications");
51
51
  const opts = {};
52
52
  const type = flagValue(parsedArgs, "--type");
53
53
  const since = flagValue(parsedArgs, "--since");
@@ -70,9 +70,9 @@ async function get(args) {
70
70
  assertKnownFlags(parsedArgs, ["--help", "-h"]);
71
71
  const positionals = positionalArgs(parsedArgs);
72
72
  if (positionals.length !== 1) {
73
- fail({ code: "BAD_USAGE", message: "Usage: run402 notifications get <id>" });
73
+ fail({ code: "BAD_USAGE", message: "Usage: run402 deliveries get <notification_id>" });
74
74
  }
75
- allowanceAuthHeaders("/agent/v1/notifications");
75
+ walletAuthHeaders("/agent/v1/notifications");
76
76
  try {
77
77
  const data = await getSdk().admin.getNotification(positionals[0]);
78
78
  console.log(JSON.stringify(data, null, 2));
@@ -3,21 +3,21 @@ import assert from "node:assert/strict";
3
3
  import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  import { tmpdir } from "node:os";
6
- import { discoverRehearseManifest } from "./deploy-v2.mjs";
6
+ import { discoverDeployManifest } from "./deploy-v2.mjs";
7
7
 
8
- describe("deploy rehearse — manifest discovery (the way up does it)", () => {
8
+ describe("deploy / deploy rehearse — manifest discovery (the way up does it)", () => {
9
9
  it("prefers run402.json, then run402.deploy.json, then app.json, then executable configs", () => {
10
10
  const dir = mkdtempSync(join(tmpdir(), "run402-rehearse-discover-"));
11
11
  try {
12
- assert.equal(discoverRehearseManifest(dir), null);
12
+ assert.equal(discoverDeployManifest(dir), null);
13
13
  writeFileSync(join(dir, "run402.deploy.ts"), "export default {}");
14
- assert.equal(discoverRehearseManifest(dir), join(dir, "run402.deploy.ts"));
14
+ assert.equal(discoverDeployManifest(dir), join(dir, "run402.deploy.ts"));
15
15
  writeFileSync(join(dir, "app.json"), "{}");
16
- assert.equal(discoverRehearseManifest(dir), join(dir, "app.json"));
16
+ assert.equal(discoverDeployManifest(dir), join(dir, "app.json"));
17
17
  writeFileSync(join(dir, "run402.deploy.json"), "{}");
18
- assert.equal(discoverRehearseManifest(dir), join(dir, "run402.deploy.json"));
18
+ assert.equal(discoverDeployManifest(dir), join(dir, "run402.deploy.json"));
19
19
  writeFileSync(join(dir, "run402.json"), "{}");
20
- assert.equal(discoverRehearseManifest(dir), join(dir, "run402.json"));
20
+ assert.equal(discoverDeployManifest(dir), join(dir, "run402.json"));
21
21
  } finally {
22
22
  rmSync(dir, { recursive: true, force: true });
23
23
  }