run402 4.97.0 → 4.98.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 (163) hide show
  1. package/README.md +1 -1
  2. package/core-dist/binding-file.js +28 -1
  3. package/core-dist/wallet.js +3 -3
  4. package/lib/auth.mjs +1 -2
  5. package/lib/buzz-doctor.mjs +21 -806
  6. package/lib/buzz-doctor.test.mjs +7 -6
  7. package/lib/buzz.test.mjs +13 -2
  8. package/lib/doctor.mjs +72 -811
  9. package/lib/init.mjs +35 -576
  10. package/lib/org-context.mjs +39 -376
  11. package/lib/orgs.mjs +22 -106
  12. package/lib/projects.mjs +1 -2
  13. package/lib/repos.mjs +6 -6
  14. package/lib/rooms.mjs +1 -2
  15. package/lib/sdk-errors.mjs +26 -0
  16. package/lib/status.mjs +14 -154
  17. package/lib/up.mjs +1 -2
  18. package/lib/vault-scaffold.mjs +2 -3
  19. package/lib/vault-target.mjs +14 -141
  20. package/lib/wallet-context.mjs +61 -227
  21. package/lib/wallets.mjs +47 -310
  22. package/package.json +1 -2
  23. package/sdk/core-dist/binding-file.js +28 -1
  24. package/sdk/core-dist/wallet.js +3 -3
  25. package/sdk/dist/errors.d.ts +24 -2
  26. package/sdk/dist/errors.d.ts.map +1 -1
  27. package/sdk/dist/errors.js +44 -2
  28. package/sdk/dist/errors.js.map +1 -1
  29. package/sdk/dist/index.d.ts +18 -3
  30. package/sdk/dist/index.d.ts.map +1 -1
  31. package/sdk/dist/index.js +12 -1
  32. package/sdk/dist/index.js.map +1 -1
  33. package/sdk/dist/kernel.d.ts +34 -0
  34. package/sdk/dist/kernel.d.ts.map +1 -1
  35. package/sdk/dist/kernel.js +15 -1
  36. package/sdk/dist/kernel.js.map +1 -1
  37. package/sdk/dist/namespaces/admin.d.ts.map +1 -1
  38. package/sdk/dist/namespaces/admin.js +8 -0
  39. package/sdk/dist/namespaces/admin.js.map +1 -1
  40. package/sdk/dist/namespaces/agent.d.ts +2 -2
  41. package/sdk/dist/namespaces/agent.d.ts.map +1 -1
  42. package/sdk/dist/namespaces/agent.js +4 -0
  43. package/sdk/dist/namespaces/agent.js.map +1 -1
  44. package/sdk/dist/namespaces/agent.types.d.ts +5 -0
  45. package/sdk/dist/namespaces/agent.types.d.ts.map +1 -1
  46. package/sdk/dist/namespaces/apps.d.ts.map +1 -1
  47. package/sdk/dist/namespaces/apps.js +2 -0
  48. package/sdk/dist/namespaces/apps.js.map +1 -1
  49. package/sdk/dist/namespaces/auth.d.ts.map +1 -1
  50. package/sdk/dist/namespaces/auth.js +9 -0
  51. package/sdk/dist/namespaces/auth.js.map +1 -1
  52. package/sdk/dist/namespaces/branches.d.ts.map +1 -1
  53. package/sdk/dist/namespaces/branches.js +2 -0
  54. package/sdk/dist/namespaces/branches.js.map +1 -1
  55. package/sdk/dist/namespaces/ci.d.ts.map +1 -1
  56. package/sdk/dist/namespaces/ci.js +2 -0
  57. package/sdk/dist/namespaces/ci.js.map +1 -1
  58. package/sdk/dist/namespaces/credentials.d.ts +0 -23
  59. package/sdk/dist/namespaces/credentials.d.ts.map +1 -1
  60. package/sdk/dist/namespaces/credentials.js +29 -0
  61. package/sdk/dist/namespaces/credentials.js.map +1 -1
  62. package/sdk/dist/namespaces/escalations.d.ts.map +1 -1
  63. package/sdk/dist/namespaces/escalations.js +2 -0
  64. package/sdk/dist/namespaces/escalations.js.map +1 -1
  65. package/sdk/dist/namespaces/grants.d.ts.map +1 -1
  66. package/sdk/dist/namespaces/grants.js +4 -0
  67. package/sdk/dist/namespaces/grants.js.map +1 -1
  68. package/sdk/dist/namespaces/live.d.ts +0 -16
  69. package/sdk/dist/namespaces/live.d.ts.map +1 -1
  70. package/sdk/dist/namespaces/live.js +19 -0
  71. package/sdk/dist/namespaces/live.js.map +1 -1
  72. package/sdk/dist/namespaces/me.d.ts.map +1 -1
  73. package/sdk/dist/namespaces/me.js +3 -0
  74. package/sdk/dist/namespaces/me.js.map +1 -1
  75. package/sdk/dist/namespaces/org.d.ts.map +1 -1
  76. package/sdk/dist/namespaces/org.js +3 -0
  77. package/sdk/dist/namespaces/org.js.map +1 -1
  78. package/sdk/dist/namespaces/projects.d.ts.map +1 -1
  79. package/sdk/dist/namespaces/projects.js +5 -0
  80. package/sdk/dist/namespaces/projects.js.map +1 -1
  81. package/sdk/dist/namespaces/repos.d.ts.map +1 -1
  82. package/sdk/dist/namespaces/repos.js +5 -0
  83. package/sdk/dist/namespaces/repos.js.map +1 -1
  84. package/sdk/dist/namespaces/rooms.d.ts.map +1 -1
  85. package/sdk/dist/namespaces/rooms.js +3 -0
  86. package/sdk/dist/namespaces/rooms.js.map +1 -1
  87. package/sdk/dist/namespaces/session.d.ts.map +1 -1
  88. package/sdk/dist/namespaces/session.js +18 -0
  89. package/sdk/dist/namespaces/session.js.map +1 -1
  90. package/sdk/dist/namespaces/transfers.d.ts.map +1 -1
  91. package/sdk/dist/namespaces/transfers.js +3 -0
  92. package/sdk/dist/namespaces/transfers.js.map +1 -1
  93. package/sdk/dist/namespaces/wallets.d.ts.map +1 -1
  94. package/sdk/dist/namespaces/wallets.js +2 -0
  95. package/sdk/dist/namespaces/wallets.js.map +1 -1
  96. package/sdk/dist/namespaces/write-approval.d.ts.map +1 -1
  97. package/sdk/dist/namespaces/write-approval.js +3 -0
  98. package/sdk/dist/namespaces/write-approval.js.map +1 -1
  99. package/sdk/dist/node/actions-node.d.ts.map +1 -1
  100. package/sdk/dist/node/actions-node.js +3 -0
  101. package/sdk/dist/node/actions-node.js.map +1 -1
  102. package/sdk/dist/node/buzz-doctor-contract.d.ts +155 -0
  103. package/sdk/dist/node/buzz-doctor-contract.d.ts.map +1 -0
  104. package/sdk/dist/node/buzz-doctor-contract.js +385 -0
  105. package/sdk/dist/node/buzz-doctor-contract.js.map +1 -0
  106. package/sdk/dist/node/buzz-doctor.d.ts +155 -0
  107. package/sdk/dist/node/buzz-doctor.d.ts.map +1 -0
  108. package/sdk/dist/node/buzz-doctor.js +810 -0
  109. package/sdk/dist/node/buzz-doctor.js.map +1 -0
  110. package/sdk/dist/node/credentials.d.ts +9 -4
  111. package/sdk/dist/node/credentials.d.ts.map +1 -1
  112. package/sdk/dist/node/credentials.js +1 -1
  113. package/sdk/dist/node/credentials.js.map +1 -1
  114. package/sdk/dist/node/diagnostics.d.ts +45 -0
  115. package/sdk/dist/node/diagnostics.d.ts.map +1 -0
  116. package/sdk/dist/node/diagnostics.js +67 -0
  117. package/sdk/dist/node/diagnostics.js.map +1 -0
  118. package/sdk/dist/node/doctor.d.ts +101 -0
  119. package/sdk/dist/node/doctor.d.ts.map +1 -0
  120. package/sdk/dist/node/doctor.js +618 -0
  121. package/sdk/dist/node/doctor.js.map +1 -0
  122. package/sdk/dist/node/index.d.ts +57 -5
  123. package/sdk/dist/node/index.d.ts.map +1 -1
  124. package/sdk/dist/node/index.js +36 -1
  125. package/sdk/dist/node/index.js.map +1 -1
  126. package/sdk/dist/node/init.d.ts +137 -0
  127. package/sdk/dist/node/init.d.ts.map +1 -0
  128. package/sdk/dist/node/init.js +507 -0
  129. package/sdk/dist/node/init.js.map +1 -0
  130. package/sdk/dist/node/lightning-wallet.d.ts +61 -0
  131. package/sdk/dist/node/lightning-wallet.d.ts.map +1 -0
  132. package/sdk/dist/node/lightning-wallet.js +126 -0
  133. package/sdk/dist/node/lightning-wallet.js.map +1 -0
  134. package/sdk/dist/node/local-actions.d.ts +23 -0
  135. package/sdk/dist/node/local-actions.d.ts.map +1 -0
  136. package/sdk/dist/node/local-actions.js +38 -0
  137. package/sdk/dist/node/local-actions.js.map +1 -0
  138. package/sdk/dist/node/org-context.d.ts +169 -0
  139. package/sdk/dist/node/org-context.d.ts.map +1 -0
  140. package/sdk/dist/node/org-context.js +403 -0
  141. package/sdk/dist/node/org-context.js.map +1 -0
  142. package/sdk/dist/node/status.d.ts +62 -0
  143. package/sdk/dist/node/status.d.ts.map +1 -0
  144. package/sdk/dist/node/status.js +132 -0
  145. package/sdk/dist/node/status.js.map +1 -0
  146. package/sdk/dist/node/vault-target.d.ts +49 -0
  147. package/sdk/dist/node/vault-target.d.ts.map +1 -0
  148. package/sdk/dist/node/vault-target.js +109 -0
  149. package/sdk/dist/node/vault-target.js.map +1 -0
  150. package/sdk/dist/node/wallets.d.ts +242 -0
  151. package/sdk/dist/node/wallets.d.ts.map +1 -0
  152. package/sdk/dist/node/wallets.js +484 -0
  153. package/sdk/dist/node/wallets.js.map +1 -0
  154. package/sdk/dist/secret-gate.d.ts +377 -0
  155. package/sdk/dist/secret-gate.d.ts.map +1 -0
  156. package/sdk/dist/secret-gate.js +273 -0
  157. package/sdk/dist/secret-gate.js.map +1 -0
  158. package/vault-surface.json +1 -1
  159. package/fixtures/buzz-v0.5.2-cli-capabilities.json +0 -92
  160. package/fixtures/run402-buzz-doctor-v1-contract.json +0 -140
  161. package/lib/buzz-doctor-contract.mjs +0 -97
  162. package/lib/buzz-doctor-contract.test.mjs +0 -134
  163. package/lib/lightning-wallet.mjs +0 -115
package/lib/wallets.mjs CHANGED
@@ -1,44 +1,20 @@
1
1
  /**
2
2
  * run402 wallets — manage named wallets (profiles).
3
3
  *
4
- * Each named wallet is a self-contained profile directory under
5
- * `{config_dir}/profiles/<name>/` with its own key, project keystore, and
6
- * non-secret meta.json. The reserved `default` wallet lives at the config-dir
7
- * root (zero migration). Selection (which wallet a normal command uses) is
8
- * resolved at the CLI edge — see wallet-context.mjs. These subcommands operate
9
- * on EXPLICIT named targets via core's path-aware helpers, so they are
10
- * independent of the active selection.
4
+ * A shim over `r.wallets` on `@run402/sdk/node`, which owns wallet selection
5
+ * and the named-wallet (profile) verbs: this module parses argv, makes one SDK
6
+ * call, and prints its JSON. `fund`, `balance`, and `lightning` act on the
7
+ * ACTIVE wallet.
11
8
  *
12
9
  * Agent-first: JSON to stdout, structured errors to stderr, no interactive
13
10
  * prompts (destructive `rm` requires an explicit --yes).
14
11
  */
15
12
 
16
- import { writeFileSync, readFileSync, existsSync, rmSync } from "node:fs";
13
+ import { readFileSync } from "node:fs";
17
14
  import { failUnknownSubcommand } from "./argparse.mjs";
18
- import { join } from "node:path";
19
- import { fail, reportSdkError } from "./sdk-errors.mjs";
20
- import { walletFile, readWallet as readActiveWallet, saveWallet as saveActiveWallet } from "./config.mjs";
21
- import { isValidProfileName, getActiveProfile } from "../core-dist/config.js";
22
- import {
23
- listProfileNames,
24
- profileExists,
25
- profileDir,
26
- readMeta,
27
- writeMeta,
28
- ensureProfileDir,
29
- removeProfile,
30
- renameProfile,
31
- getDefaultWallet,
32
- setDefaultWallet,
33
- } from "../core-dist/profiles.js";
34
- import { readWallet, saveWallet } from "../core-dist/wallet.js";
35
- import { describeRejectedValue } from "../core-dist/redact.js";
15
+ import { fail, reportLocalOrSdkError, reportSdkError } from "./sdk-errors.mjs";
16
+ import { readWallet as readActiveWallet, saveWallet as saveActiveWallet } from "./config.mjs";
36
17
  import { getSdk } from "./sdk.mjs";
37
- import { readBindingFile, updateBindingFile } from "./wallet-context.mjs";
38
- import { initializeWalletAction } from "./next-actions.mjs";
39
-
40
- const DEFAULT = "default";
41
- const PRIVATE_KEY_RE = /^0x[0-9a-fA-F]{64}$/;
42
18
 
43
19
  const HELP = `run402 wallets — manage named wallets (profiles)
44
20
 
@@ -73,307 +49,68 @@ Notes:
73
49
  • .run402.json holds only a wallet NAME (never a key) — safe to commit.
74
50
  `;
75
51
 
76
- function shortAddr(a) {
77
- return typeof a === "string" && a.length >= 12 ? `${a.slice(0, 6)}…${a.slice(-4)}` : a ?? null;
78
- }
79
-
80
52
  function out(obj) {
81
53
  console.log(JSON.stringify(obj, null, 2));
82
54
  }
83
55
 
84
- // See core-dist/redact.js's doc comment: a
85
- // value that fails this check may be a secret pasted into a name argument
86
- // by mistake, so it must never be echoed verbatim — describeRejectedValue()
87
- // still shows a short/plain typo in full.
88
- function requireName(name, what = "wallet name") {
89
- if (!name) fail({ code: "BAD_USAGE", message: `Missing ${what}.`, hint: "run402 wallets --help" });
90
- if (name === DEFAULT) return name;
91
- if (!isValidProfileName(name)) {
92
- fail({
93
- code: "BAD_WALLET_NAME",
94
- message: `Invalid ${what} ${JSON.stringify(describeRejectedValue(name))}.`,
95
- hint: "Names must match /^[a-z0-9][a-z0-9_-]{0,63}$/ (lowercase letters, digits, '_' and '-').",
96
- details: { name: describeRejectedValue(name) },
97
- });
98
- }
99
- return name;
100
- }
101
-
102
- function walletInfo(name, active) {
103
- const meta = readMeta(name);
104
- let address = meta?.address ?? null;
105
- let rail = meta?.rail ?? null;
106
- const label = meta?.label ?? null;
107
- if (!address) {
108
- try {
109
- const a = readWallet(join(profileDir(name), "wallet.json"));
110
- address = a?.address ?? null;
111
- rail = rail ?? a?.rail ?? null;
112
- } catch {
113
- /* best-effort */
114
- }
115
- }
116
- return { local_label: name, server_label: label, address, address_short: shortAddr(address), rail, active: name === active };
56
+ function firstPositional(args) {
57
+ return args.find((a) => a && !a.startsWith("-"));
117
58
  }
118
59
 
119
- function activeContext() {
120
- try {
121
- const ctx = JSON.parse(process.env.RUN402_ACTIVE_WALLET_JSON || "");
122
- if (ctx && typeof ctx === "object") return ctx;
123
- } catch {
124
- /* not set / malformed */
60
+ function flagVal(args, flag) {
61
+ const i = args.indexOf(flag);
62
+ if (i === -1) return null;
63
+ const v = args[i + 1];
64
+ if (v === undefined || (typeof v === "string" && v.startsWith("-") && v !== "-")) {
65
+ fail({ code: "BAD_FLAG", message: `${flag} requires a value`, details: { flag } });
125
66
  }
126
- return null;
127
- }
128
-
129
- function cmdList() {
130
- const active = getActiveProfile();
131
- out(listProfileNames().map((n) => walletInfo(n, active)));
67
+ return v;
132
68
  }
133
69
 
134
- async function cmdCurrent() {
135
- const ctx = activeContext();
136
- const name = ctx?.name ?? getActiveProfile();
137
- const info = walletInfo(name, name);
138
- const warnings = [];
139
- if (ctx?.diverged && ctx.binding) {
140
- warnings.push({
141
- code: "WALLET_SELECTION_CONFLICT",
142
- message: `RUN402_WALLET=${ctx.envName} but ${ctx.binding.file} selects '${ctx.binding.wallet}'.`,
143
- hint: "Resolve with: --wallet <name>, unset RUN402_WALLET, or run402 wallets unbind.",
144
- });
145
- }
146
- if (info.server_label && info.server_label !== name) {
147
- warnings.push({
148
- code: "WALLET_LABEL_DRIFT",
149
- message: `Local label '${name}' differs from the server label '${info.server_label}'.`,
150
- hint: "Run 'run402 wallets rename' to reconcile.",
151
- });
152
- }
153
- // The active wallet's own file: when it was created, its persisted rail, and
154
- // whether the faucet has been used on it. `faucet_used` tracks faucet
155
- // invocation, not pay-readiness — `run402 wallets balance` reads real funds.
156
- let local = null;
70
+ async function call(fn) {
157
71
  try {
158
- local = await getSdk().wallets.status();
72
+ out(await fn(getSdk().wallets));
159
73
  } catch (err) {
160
- reportSdkError(err);
74
+ reportLocalOrSdkError(err);
161
75
  }
162
- out({
163
- local_label: name,
164
- source: ctx?.source ?? "unknown",
165
- source_detail: ctx?.sourceDetail ?? null,
166
- address: local?.configured ? local.address : info.address,
167
- server_label: info.server_label,
168
- configured: !!local?.configured,
169
- created: local?.created ?? null,
170
- rail: local?.configured ? local.rail ?? "x402" : info.rail,
171
- faucet_used: !!local?.faucet_used,
172
- path: local?.path ?? walletFile(),
173
- ...(local?.configured ? {} : { next_actions: [initializeWalletAction()] }),
174
- warnings,
175
- });
176
76
  }
177
77
 
178
- async function cmdNew(args) {
179
- const name = requireName(args.find((a) => a && !a.startsWith("-")));
180
- if (profileExists(name)) {
181
- fail({ code: "WALLET_EXISTS", message: `A wallet named '${name}' already exists.`, hint: "run402 wallets list", details: { name } });
182
- }
78
+ const cmdList = () => call((w) => w.list());
79
+ const cmdCurrent = () => call((w) => w.current());
80
+
81
+ function cmdNew(args) {
183
82
  const railFlag = args.indexOf("--rail");
184
- const requested = railFlag >= 0 ? args[railFlag + 1] : args.includes("--mpp") ? "mpp" : "x402";
185
- if (!["x402", "mpp", "lightning"].includes(requested)) {
186
- fail({ code: "BAD_USAGE", message: "--rail must be x402, mpp, or lightning", details: { rail: requested } });
187
- }
188
- const rail = requested;
189
- const { generatePrivateKey, privateKeyToAccount } = await import("viem/accounts");
190
- const privateKey = generatePrivateKey();
191
- const address = privateKeyToAccount(privateKey).address;
192
- const created = new Date().toISOString();
193
- ensureProfileDir(name);
194
- saveWallet({ address, privateKey, created, funded: false, rail }, join(profileDir(name), "wallet.json"));
195
- // The reserved `default` wallet lives at the config-dir root and carries no
196
- // server label; a named wallet mirrors its name as the label.
197
- if (name === DEFAULT) {
198
- writeMeta(name, { name, address, rail, created });
199
- } else {
200
- writeMeta(name, { name, address, label: name, rail, created });
201
- await maybePushLabel(name, name, address);
202
- }
203
- // requireName constrains aliases to shell-safe lowercase identifiers.
204
- const command = rail === "lightning"
205
- ? `run402 --wallet ${name} init lightning`
206
- : name === DEFAULT ? "run402 wallets fund" : `run402 wallets use ${name}`;
207
- const why = rail === "lightning"
208
- ? "Initialize this Lightning wallet."
209
- : name === DEFAULT ? "Fund the wallet you just created from the testnet faucet." : "Select the wallet you just created.";
210
- out({ local_label: name, address, rail, created: true, next: command, next_actions: [{ type: "run_command", command, why }] });
83
+ const rail = railFlag >= 0 ? args[railFlag + 1] : args.includes("--mpp") ? "mpp" : "x402";
84
+ return call((w) => w.create(firstPositional(args), { rail }));
211
85
  }
212
86
 
213
- function cmdUse(args) {
214
- const name = requireName(args.find((a) => a && !a.startsWith("-")));
215
- if (name !== DEFAULT && !profileExists(name)) {
216
- // `name` already passed requireName's charset check, but a bare (no
217
- // "0x") 64-hex private key satisfies that charset too — describeRejectedValue()
218
- // is the backstop against echoing it here.
219
- fail({ code: "WALLET_NOT_FOUND", message: `No local wallet named '${describeRejectedValue(name)}'.`, hint: "run402 wallets list", details: { name: describeRejectedValue(name) } });
220
- }
221
- setDefaultWallet(name);
222
- out({ local_label: name, active: true });
223
- }
87
+ const cmdUse = (args) => call((w) => w.use(firstPositional(args)));
224
88
 
225
- async function cmdRename(args) {
89
+ function cmdRename(args) {
226
90
  const toFlag = flagVal(args, "--to");
227
91
  const positionals = args.filter((a, i) => a && !a.startsWith("-") && args[i - 1] !== "--to");
228
- const oldName = requireName(positionals[0], "old wallet name");
229
- const newName = requireName(toFlag ?? positionals[1], "new wallet name");
230
- if (newName === DEFAULT) {
231
- fail({ code: "BAD_WALLET_NAME", message: "Cannot rename a wallet to the reserved name 'default'.", details: { name: newName } });
232
- }
233
- if (!profileExists(oldName)) {
234
- fail({ code: "WALLET_NOT_FOUND", message: `No local wallet named '${describeRejectedValue(oldName)}'.`, hint: "run402 wallets list", details: { name: describeRejectedValue(oldName) } });
235
- }
236
- try {
237
- renameProfile(oldName, newName);
238
- } catch (e) {
239
- fail({ code: "WALLET_RENAME_FAILED", message: e?.message ?? "rename failed", details: { from: oldName, to: newName } });
240
- }
241
- if (getDefaultWallet() === oldName) setDefaultWallet(newName);
242
- const meta = readMeta(newName) ?? {};
243
- let address = meta.address ?? null;
244
- if (!address) {
245
- try {
246
- address = readWallet(join(profileDir(newName), "wallet.json"))?.address ?? null;
247
- } catch {
248
- /* best-effort */
249
- }
250
- }
251
- writeMeta(newName, { ...meta, name: newName, label: newName, ...(address ? { address } : {}) });
252
- await maybePushLabel(newName, newName, address);
253
- out({ from: oldName, to: newName, renamed: true });
254
- }
255
-
256
- function cmdBind(args) {
257
- let name = args.find((a) => a && !a.startsWith("-"));
258
- name = name ? requireName(name) : getActiveProfile();
259
- // MERGE, never clobber: the same file carries `org`/`room` from `orgs bind`.
260
- const { contents } = updateBindingFile(process.cwd(), { wallet: name });
261
- const result = {
262
- wallet: name,
263
- file: ".run402.json",
264
- bound: true,
265
- safe_to_commit: true,
266
- note: "Safe to commit — contains no secrets, only the wallet name.",
267
- binding: contents,
268
- };
269
- if (name !== DEFAULT && !profileExists(name)) {
270
- result.warning = `No local wallet named '${name}' yet — create it with 'run402 wallets new ${name}'.`;
271
- }
272
- out(result);
273
- }
274
-
275
- function cmdUnbind() {
276
- // Removes only the WALLET key. An `org`/`room` binding in the same file
277
- // belongs to another tier and must survive; the file is deleted only when
278
- // unbinding leaves nothing behind.
279
- const had = readBindingFile(process.cwd()).wallet !== undefined;
280
- const { contents, removed } = updateBindingFile(process.cwd(), { wallet: null });
281
- out({ file: ".run402.json", unbound: had, removed, binding: contents });
282
- }
283
-
284
- async function cmdImport(args) {
285
- const name = requireName(args.find((a) => a && !a.startsWith("-")));
286
- if (name === DEFAULT) {
287
- fail({ code: "BAD_WALLET_NAME", message: "'default' is reserved.", details: { name } });
288
- }
289
- if (profileExists(name)) {
290
- fail({ code: "WALLET_EXISTS", message: `A wallet named '${name}' already exists.`, details: { name } });
291
- }
292
- const keyArg = flagVal(args, "--key");
293
- if (!keyArg) {
294
- fail({ code: "BAD_USAGE", message: "--key <path|-> is required for import.", hint: "Use '-' to read the key from stdin." });
295
- }
296
- let raw;
297
- try {
298
- raw = keyArg === "-" ? readFileSync(0, "utf8") : readFileSync(keyArg, "utf8");
299
- } catch (e) {
300
- fail({ code: "FILE_NOT_FOUND", message: `Could not read key from ${keyArg === "-" ? "stdin" : keyArg}: ${e?.message}`, details: { key: keyArg } });
301
- }
302
- const privateKey = raw.trim();
303
- if (!PRIVATE_KEY_RE.test(privateKey)) {
304
- fail({ code: "BAD_PRIVATE_KEY", message: "Key must be a 0x-prefixed 64-hex secp256k1 private key.", details: { name } });
305
- }
306
- const { privateKeyToAccount } = await import("viem/accounts");
307
- let address;
308
- try {
309
- address = privateKeyToAccount(privateKey).address;
310
- } catch (e) {
311
- fail({ code: "BAD_PRIVATE_KEY", message: `Invalid private key: ${e?.message}`, details: { name } });
312
- }
313
- const created = new Date().toISOString();
314
- ensureProfileDir(name);
315
- saveWallet({ address, privateKey, created, funded: false, rail: "x402" }, join(profileDir(name), "wallet.json"));
316
- writeMeta(name, { name, address, label: name, rail: "x402", created });
317
- await maybePushLabel(name, name, address);
318
- out({ local_label: name, address, imported: true });
92
+ return call((w) => w.rename(positionals[0], toFlag ?? positionals[1]));
319
93
  }
320
94
 
321
- function cmdRm(args) {
322
- const name = requireName(args.find((a) => a && !a.startsWith("-")));
323
- if (name === DEFAULT) {
324
- fail({ code: "WALLET_PROTECTED", message: "Refusing to remove the reserved 'default' wallet.", details: { name } });
325
- }
326
- if (!profileExists(name)) {
327
- fail({ code: "WALLET_NOT_FOUND", message: `No local wallet named '${describeRejectedValue(name)}'.`, hint: "run402 wallets list", details: { name: describeRejectedValue(name) } });
328
- }
329
- if (!args.includes("--yes")) {
330
- fail({
331
- code: "CONFIRMATION_REQUIRED",
332
- message: `Removing wallet '${name}' deletes its private key and project keystore. This cannot be undone.`,
333
- hint: `Re-run with --yes to confirm: run402 wallets rm ${name} --yes`,
334
- details: { name },
335
- });
336
- }
337
- removeProfile(name);
338
- if (getDefaultWallet() === name) setDefaultWallet(DEFAULT);
339
- out({ local_label: name, removed: true });
340
- }
95
+ const cmdBind = (args) => call((w) => w.bind(firstPositional(args)));
96
+ const cmdUnbind = () => call((w) => w.unbind());
341
97
 
342
- function flagVal(args, flag) {
343
- const i = args.indexOf(flag);
344
- if (i === -1) return null;
345
- const v = args[i + 1];
346
- if (v === undefined || (typeof v === "string" && v.startsWith("-") && v !== "-")) {
347
- fail({ code: "BAD_FLAG", message: `${flag} requires a value`, details: { flag } });
348
- }
349
- return v;
98
+ function cmdImport(args) {
99
+ // The key is read only after the SDK has accepted the name.
100
+ return call((w) => w.import(firstPositional(args), () => {
101
+ const keyArg = flagVal(args, "--key");
102
+ if (!keyArg) {
103
+ fail({ code: "BAD_USAGE", message: "--key <path|-> is required for import.", hint: "Use '-' to read the key from stdin." });
104
+ }
105
+ try {
106
+ return keyArg === "-" ? readFileSync(0, "utf8") : readFileSync(keyArg, "utf8");
107
+ } catch (e) {
108
+ fail({ code: "FILE_NOT_FOUND", message: `Could not read key from ${keyArg === "-" ? "stdin" : keyArg}: ${e?.message}`, details: { key: keyArg } });
109
+ }
110
+ }));
350
111
  }
351
112
 
352
- /**
353
- * Best-effort server-side label push. Signs with the TARGET wallet's key
354
- * (not the active one) so a just-created/renamed wallet can set its own label.
355
- *
356
- * ON by default — the gateway label endpoint is live, and the display label is
357
- * what makes the wallet name show up cross-machine and in the console
358
- * (WEB). Set `RUN402_WALLET_LABEL_SYNC=0` to disable (fully-offline wallet ops,
359
- * or hermetic tests). The local folder name is always the source of truth; this
360
- * only mirrors the display label to the server. Always best-effort — `setLabel`
361
- * swallows its own errors and this never throws, so wallet creation/rename stays
362
- * fully functional offline.
363
- */
364
- async function maybePushLabel(name, label, address) {
365
- if (process.env.RUN402_WALLET_LABEL_SYNC === "0") return;
366
- if (!address) return;
367
- try {
368
- const sdk = getSdk({
369
- walletPath: join(profileDir(name), "wallet.json"),
370
- keystorePath: join(profileDir(name), "projects.json"),
371
- });
372
- await sdk.wallet(address).setLabel(label);
373
- } catch {
374
- /* best-effort — never block the local operation */
375
- }
376
- }
113
+ const cmdRm = (args) => call((w) => w.remove(firstPositional(args), { confirm: args.includes("--yes") }));
377
114
 
378
115
  export async function run(sub, args = []) {
379
116
  const rest = Array.isArray(args) ? args : [];
@@ -404,7 +141,7 @@ export async function run(sub, args = []) {
404
141
  // The pairing secret stays in wallet.json and is never printed.
405
142
  async function cmdLightning(args) {
406
143
  const action = args.find((a) => a && !a.startsWith("-")) ?? "status";
407
- const { ensureLightningWallet, revokeLightningWallet, describeLightning, readLightningBalance } = await import("./lightning-wallet.mjs");
144
+ const { ensureLightningWallet, revokeLightningWallet, describeLightning, readLightningBalance } = await import("#sdk/node");
408
145
  const { readWallet } = await import("../core-dist/wallet.js");
409
146
  try {
410
147
  if (action === "status") {
@@ -421,13 +158,13 @@ async function cmdLightning(args) {
421
158
  return;
422
159
  }
423
160
  if (action === "mint") {
424
- const result = await ensureLightningWallet();
161
+ const result = await ensureLightningWallet(getSdk().agent);
425
162
  const balance = result.outcome === "stored" || result.outcome === "present" ? await readLightningBalance(result.localWallet) : null;
426
163
  out({ outcome: result.outcome, rail: result.localWallet.rail ?? "x402", lightning: describeLightning(result.localWallet, result.wallet, balance) });
427
164
  return;
428
165
  }
429
166
  if (action === "revoke") {
430
- const wallet = await revokeLightningWallet();
167
+ const wallet = await revokeLightningWallet(getSdk().agent);
431
168
  out({ revoked: true, status: wallet?.status ?? "revoked", rail: "x402", next: "run402 init lightning (mint again once the deletion completes)" });
432
169
  return;
433
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.97.0",
3
+ "version": "4.98.0",
4
4
  "description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,6 @@
18
18
  "cli.mjs",
19
19
  "git-remote-run402.mjs",
20
20
  "lib/",
21
- "fixtures/",
22
21
  "core-dist/",
23
22
  "sdk/",
24
23
  "vault-surface.json"
@@ -22,7 +22,7 @@
22
22
  * Unknown keys are ignored on purpose: that is what makes an older client
23
23
  * forward-compatible with a binding file written by a newer one.
24
24
  */
25
- import { readFileSync } from "node:fs";
25
+ import { existsSync, readFileSync, rmSync, writeFileSync } from "node:fs";
26
26
  import { dirname, join, resolve } from "node:path";
27
27
  /** The committed binding file. Safe to check in — it names, never authorizes. */
28
28
  export const BINDING_FILE = ".run402.json";
@@ -80,4 +80,31 @@ export function readBindingFile(dir = process.cwd()) {
80
80
  return {};
81
81
  }
82
82
  }
83
+ /**
84
+ * MERGE keys into a directory's committed binding file. A `null` (or
85
+ * `undefined`) value removes its key; a file left with no keys is deleted
86
+ * rather than committed empty.
87
+ *
88
+ * The file is shared by tiers (`wallet` from `wallets bind`, `org`/`room` from
89
+ * `orgs bind`) and unknown keys are preserved, so one tier can never clobber
90
+ * another's binding.
91
+ */
92
+ export function updateBindingFile(dir, patch) {
93
+ const file = bindingFilePath(dir);
94
+ const next = { ...readBindingFile(dir) };
95
+ for (const [k, v] of Object.entries(patch)) {
96
+ if (v === null || v === undefined)
97
+ delete next[k];
98
+ else
99
+ next[k] = v;
100
+ }
101
+ if (Object.keys(next).length === 0) {
102
+ const existed = existsSync(file);
103
+ if (existed)
104
+ rmSync(file, { force: true });
105
+ return { file, contents: null, removed: existed };
106
+ }
107
+ writeFileSync(file, JSON.stringify(next, null, 2) + "\n");
108
+ return { file, contents: next, removed: false };
109
+ }
83
110
  //# sourceMappingURL=binding-file.js.map
@@ -22,9 +22,9 @@ const PRIVATE_KEY_RE = /^0x[a-fA-F0-9]{64}$/;
22
22
  * - `core/src/wallet-auth.ts` passes a malformed `privateKey` to
23
23
  * `@noble/curves` which throws "expected 32 bytes, got N".
24
24
  *
25
- * The CLI's `cli/lib/config.mjs:readWallet()` wrapper and the MCP
26
- * `src/tools/{status,init}.ts` callers translate the throw into their own
27
- * structured envelopes (`code: BAD_WALLET_FILE`).
25
+ * The CLI's `cli/lib/config.mjs:readWallet()` wrapper and the Node SDK's
26
+ * `readLocalWallet()` (`sdk/src/node/wallets.ts`) translate the throw into
27
+ * their own structured envelopes (`code: BAD_WALLET_FILE`).
28
28
  */
29
29
  /**
30
30
  * If a wallet file is readable by group or other (any of the low 0o077
@@ -232,26 +232,46 @@ export declare class LocalError extends Run402Error {
232
232
  static readonly DEFAULT_RETRYABLE = false;
233
233
  readonly kind: "local_error";
234
234
  readonly cause?: unknown;
235
+ /** One-line remedy for a person reading the error, when the thrower has one. */
236
+ readonly hint?: string;
235
237
  /**
236
238
  * @param message Human-readable error message.
237
239
  * @param context Short verb phrase identifying the operation (used for triage).
238
240
  * @param opts Optional. Pass a raw `unknown` for back-compat (treated as `cause`),
239
- * or an options bag `{ cause?, code?, details?, next_actions? }` to thread a stable error
241
+ * or an options bag `{ cause?, code?, hint?, details?, next_actions? }` to thread a stable error
240
242
  * `code` (mirrors a gateway error code so client-side validators throw with
241
243
  * the same `code` field consumers branch on).
242
244
  */
243
245
  constructor(message: string, context: string, opts?: unknown | {
244
246
  cause?: unknown;
245
247
  code?: string;
248
+ hint?: string;
246
249
  details?: unknown;
247
250
  next_actions?: unknown[];
248
251
  });
252
+ toJSON(): Record<string, unknown>;
249
253
  }
250
254
  /** Local credential-cache miss — the project may exist, but no cached keys are available locally. */
251
255
  export declare class ProjectCredentialNotFound extends LocalError {
252
256
  readonly projectId: string;
253
257
  constructor(projectId: string, context: string, details?: Record<string, unknown>);
254
258
  }
259
+ /**
260
+ * `SECRET_REQUIRES_CLI` — a method that would return or consume a one-time
261
+ * secret (a grant key, a Handoff or Invite Key, project credentials, a
262
+ * private key, a Lightning pairing) was called on a client whose
263
+ * `capabilities.returnSecrets` is false: the `sandbox` surface an MCP `run`
264
+ * snippet executes on. Thrown before any request is made, so nothing secret
265
+ * ever reaches the snippet or the MCP result cache. Carries exactly one
266
+ * `run_cli_command` next action naming the CLI command that performs the
267
+ * same operation, where the secret prints once to a person's terminal.
268
+ */
269
+ export declare class SecretRequiresCliError extends LocalError {
270
+ /** The exact CLI command line for the same operation. */
271
+ readonly command: string;
272
+ constructor(command: string, why?: string);
273
+ toJSON(): Record<string, unknown>;
274
+ }
255
275
  export declare const PROJECT_CREDENTIAL_ERROR_CODES: readonly ["PROJECT_CREDENTIAL_NOT_FOUND", "PROJECT_CREDENTIAL_INVALID", "PROJECT_CREDENTIAL_EXPIRED", "PROJECT_CREDENTIAL_PROJECT_MISMATCH"];
256
276
  export type ProjectCredentialErrorCode = typeof PROJECT_CREDENTIAL_ERROR_CODES[number];
257
277
  /**
@@ -352,7 +372,7 @@ export declare class TransferFreezeError extends Run402Error {
352
372
  * longer) an admitted writer.
353
373
  * Tolerates unknown future gateway types via the `(string & {})` fallback.
354
374
  */
355
- export type NextActionType = "retry" | "poll" | "reconcile_payment" | "authenticate" | "submit_payment" | "renew_tier" | "check_usage" | "resume_deploy" | "edit_request" | "edit_migration" | "create_project" | "initialize_wallet" | "deploy" | "approve_write" | "hand_to_member" | "register_contact" | "contact_staff" | "contact_support" | "vault_policy_required" | "set_org_slug" | "set_repo_name" | "push_repo" | "create_nested_repo" | "verify_refs" | "submit_gc" | "use_moved_command" | "access_repair_pending" | "configure_mirror" | "resume_handoff" | "revoke_handoff" | "remove_member" | "sync_writers" | "request_writer_sync" | "join_invite" | "revoke_invite" | "wait_room" | "send_room_message" | "create_manifest" | "create_file" | "check_manifest" | "run_in_directory" | "commit_changes" | "add_subdomain";
375
+ export type NextActionType = "retry" | "poll" | "reconcile_payment" | "authenticate" | "submit_payment" | "renew_tier" | "check_usage" | "resume_deploy" | "edit_request" | "edit_migration" | "create_project" | "initialize_wallet" | "deploy" | "approve_write" | "hand_to_member" | "register_contact" | "contact_staff" | "contact_support" | "vault_policy_required" | "set_org_slug" | "set_repo_name" | "push_repo" | "create_nested_repo" | "verify_refs" | "submit_gc" | "use_moved_command" | "access_repair_pending" | "configure_mirror" | "resume_handoff" | "revoke_handoff" | "remove_member" | "sync_writers" | "request_writer_sync" | "join_invite" | "revoke_invite" | "wait_room" | "send_room_message" | "create_manifest" | "create_file" | "check_manifest" | "run_in_directory" | "commit_changes" | "add_subdomain" | "run_cli_command";
356
376
  /**
357
377
  * A single advisory "what to do next" entry. Mirrors the gateway's
358
378
  * `next_actions[]` shape (`{ type, method?, path?, auth?, why? }`) extended with
@@ -472,6 +492,8 @@ export declare function isPaymentAttemptError(e: unknown): e is PaymentAttemptEr
472
492
  /** True if `e` is a {@link LocalError}. */
473
493
  export declare function isLocalError(e: unknown): e is LocalError;
474
494
  /** True if `e` is a {@link Run402DeployError}. */
495
+ /** True for the local refusal a `sandbox` client throws instead of returning a one-time secret. */
496
+ export declare function isSecretRequiresCli(e: unknown): e is SecretRequiresCliError;
475
497
  export declare function isDeployError(e: unknown): e is Run402DeployError;
476
498
  /** True if `e` is a {@link TransferFreezeError}. */
477
499
  export declare function isTransferFreezeError(e: unknown): e is TransferFreezeError;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,gBAAgB,GAChB,WAAW,GACX,eAAe,GACf,uBAAuB,GACvB,qBA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