tenjin-cli 0.1.0-alpha.28 → 0.1.0-alpha.29

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 (127) hide show
  1. package/README.md +13 -10
  2. package/dist/{chunk-ZG6ZZLO7.js → chunk-25GGN553.js} +9 -11
  3. package/dist/{chunk-ZG6ZZLO7.js.map → chunk-25GGN553.js.map} +1 -1
  4. package/dist/{chunk-B2L53TMK.js → chunk-2SNUOHAT.js} +28 -23
  5. package/dist/chunk-2SNUOHAT.js.map +1 -0
  6. package/dist/{chunk-UEOWNDQG.js → chunk-3FY5HG7R.js} +82 -13
  7. package/dist/chunk-3FY5HG7R.js.map +1 -0
  8. package/dist/{chunk-DJYAPACT.js → chunk-4FYMDRD3.js} +32 -24
  9. package/dist/chunk-4FYMDRD3.js.map +1 -0
  10. package/dist/{chunk-ZP7AHN7Z.js → chunk-AMEUXNJT.js} +3 -5
  11. package/dist/{chunk-ZP7AHN7Z.js.map → chunk-AMEUXNJT.js.map} +1 -1
  12. package/dist/chunk-EWLU46J6.js +100 -0
  13. package/dist/chunk-EWLU46J6.js.map +1 -0
  14. package/dist/{chunk-RLPLYUME.js → chunk-LRCJ2IZ5.js} +3 -3
  15. package/dist/{chunk-RLPLYUME.js.map → chunk-LRCJ2IZ5.js.map} +1 -1
  16. package/dist/{chunk-YFJJYHVG.js → chunk-LX5OT4TQ.js} +3 -3
  17. package/dist/{chunk-YFJJYHVG.js.map → chunk-LX5OT4TQ.js.map} +1 -1
  18. package/dist/{chunk-ZO3X5NPG.js → chunk-MG3G644T.js} +4 -4
  19. package/dist/{chunk-6KA4HFX5.js → chunk-MOG7PB3A.js} +3 -3
  20. package/dist/{chunk-DYSDQE7S.js → chunk-MRUPDSUM.js} +14 -93
  21. package/dist/chunk-MRUPDSUM.js.map +1 -0
  22. package/dist/{chunk-KAMRYUK2.js → chunk-OOSRB3OF.js} +2 -2
  23. package/dist/{chunk-PZ5N6BAL.js → chunk-ORWL5BSN.js} +5 -4
  24. package/dist/chunk-ORWL5BSN.js.map +1 -0
  25. package/dist/chunk-P4LVLFO4.js +29 -0
  26. package/dist/chunk-P4LVLFO4.js.map +1 -0
  27. package/dist/{chunk-ZP5PV3JB.js → chunk-QTGUDCIR.js} +5 -5
  28. package/dist/{chunk-FQ6DHINU.js → chunk-R4AO7GC2.js} +437 -78
  29. package/dist/chunk-R4AO7GC2.js.map +1 -0
  30. package/dist/{chunk-UOW5JXYY.js → chunk-RJEPZMYY.js} +10 -4
  31. package/dist/chunk-RJEPZMYY.js.map +1 -0
  32. package/dist/{chunk-VSUHGRVB.js → chunk-SBL4THYT.js} +712 -93
  33. package/dist/chunk-SBL4THYT.js.map +1 -0
  34. package/dist/{chunk-BRHREK7E.js → chunk-SFEQGENI.js} +2 -2
  35. package/dist/{chunk-K6AXXYCG.js → chunk-SJLTEINJ.js} +10 -2
  36. package/dist/{chunk-K6AXXYCG.js.map → chunk-SJLTEINJ.js.map} +1 -1
  37. package/dist/{chunk-XVTD7UWR.js → chunk-TROZ6HL4.js} +2 -2
  38. package/dist/{chunk-3QJREVMX.js → chunk-USOLCBKC.js} +5 -5
  39. package/dist/{chunk-W6JX4LYF.js → chunk-VKQXVCZR.js} +46 -5
  40. package/dist/chunk-VKQXVCZR.js.map +1 -0
  41. package/dist/{chunk-QTND6XWJ.js → chunk-VVAHFCX2.js} +51 -3
  42. package/dist/chunk-VVAHFCX2.js.map +1 -0
  43. package/dist/{chunk-7H3RN4WJ.js → chunk-WM7TJEBP.js} +5 -5
  44. package/dist/{chunk-MNTQMZJB.js → chunk-XDYKZRLN.js} +22 -13
  45. package/dist/chunk-XDYKZRLN.js.map +1 -0
  46. package/dist/{chunk-A5H3E5QA.js → chunk-XJQ6CH7X.js} +3 -2
  47. package/dist/{chunk-7R37M6WV.js → chunk-ZQNGTLOC.js} +5 -5
  48. package/dist/{cli-234DNHN6.js → cli-JPTDHGRX.js} +38 -33
  49. package/dist/{cli-234DNHN6.js.map → cli-JPTDHGRX.js.map} +1 -1
  50. package/dist/{config-IY2OJCAK.js → config-YYKDH2TH.js} +11 -11
  51. package/dist/{doctor-2UZZF44A.js → doctor-SSTXGCHX.js} +60 -56
  52. package/dist/doctor-SSTXGCHX.js.map +1 -0
  53. package/dist/{fund-RZ2QFULK.js → fund-QWVWRVDK.js} +14 -16
  54. package/dist/{fund-RZ2QFULK.js.map → fund-QWVWRVDK.js.map} +1 -1
  55. package/dist/hook-command-VWJXRT7H.js +31 -0
  56. package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
  57. package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
  58. package/dist/hosts/claude/tenjin/.mcp.json +2 -1
  59. package/dist/hosts/claude/tenjin/hooks/hooks.json +18 -3
  60. package/dist/index.js +6 -6
  61. package/dist/{install-O5FJ5EP3.js → install-2GXXD4DK.js} +19 -16
  62. package/dist/{install-identity-QM44IQ6Z.js → install-identity-FK3YF227.js} +7 -8
  63. package/dist/{install-wallet-Z52EDLPB.js → install-wallet-TC22U52X.js} +17 -12
  64. package/dist/{install-wallet-Z52EDLPB.js.map → install-wallet-TC22U52X.js.map} +1 -1
  65. package/dist/{mcp-33HAADDF.js → mcp-42H2F4NY.js} +2091 -348
  66. package/dist/mcp-42H2F4NY.js.map +1 -0
  67. package/dist/{package-RT24HTTP.js → package-6DJA3Y2O.js} +2 -2
  68. package/dist/{paths-MUXHUOCM.js → paths-POPTXJO6.js} +6 -2
  69. package/dist/{pay-IR2V76FX.js → pay-LSDJBIAZ.js} +18 -15
  70. package/dist/payments-SPECLBRQ.js +105 -0
  71. package/dist/payments-SPECLBRQ.js.map +1 -0
  72. package/dist/{send-PI4NUA7I.js → send-MHAOLPK3.js} +12 -14
  73. package/dist/{send-PI4NUA7I.js.map → send-MHAOLPK3.js.map} +1 -1
  74. package/dist/status-O2RWLPS5.js +114 -0
  75. package/dist/status-O2RWLPS5.js.map +1 -0
  76. package/dist/{status-line-2G5JPQAE.js → status-line-45TVCRM3.js} +7 -8
  77. package/dist/{status-line-2G5JPQAE.js.map → status-line-45TVCRM3.js.map} +1 -1
  78. package/dist/{uninstall-THKUH5ZT.js → uninstall-VOK2Z5M4.js} +27 -17
  79. package/dist/uninstall-VOK2Z5M4.js.map +1 -0
  80. package/dist/update-FGP3HNLD.js +33 -0
  81. package/dist/{wallet-53EFH4M5.js → wallet-DA7OFNEW.js} +17 -12
  82. package/docs/agent-permissions.md +11 -8
  83. package/docs/safety-model.md +3 -1
  84. package/package.json +2 -2
  85. package/dist/chunk-AO54FM4H.js +0 -563
  86. package/dist/chunk-AO54FM4H.js.map +0 -1
  87. package/dist/chunk-B2L53TMK.js.map +0 -1
  88. package/dist/chunk-DJYAPACT.js.map +0 -1
  89. package/dist/chunk-DYSDQE7S.js.map +0 -1
  90. package/dist/chunk-FQ6DHINU.js.map +0 -1
  91. package/dist/chunk-FZTSGQVK.js +0 -52
  92. package/dist/chunk-FZTSGQVK.js.map +0 -1
  93. package/dist/chunk-MNTQMZJB.js.map +0 -1
  94. package/dist/chunk-PZ5N6BAL.js.map +0 -1
  95. package/dist/chunk-QTND6XWJ.js.map +0 -1
  96. package/dist/chunk-UEOWNDQG.js.map +0 -1
  97. package/dist/chunk-UOW5JXYY.js.map +0 -1
  98. package/dist/chunk-VSUHGRVB.js.map +0 -1
  99. package/dist/chunk-W6JX4LYF.js.map +0 -1
  100. package/dist/doctor-2UZZF44A.js.map +0 -1
  101. package/dist/hook-command-PZHKS7ES.js +0 -31
  102. package/dist/mcp-33HAADDF.js.map +0 -1
  103. package/dist/payments-GFV4HU5R.js +0 -47
  104. package/dist/payments-GFV4HU5R.js.map +0 -1
  105. package/dist/status-ZUHTJK46.js +0 -71
  106. package/dist/status-ZUHTJK46.js.map +0 -1
  107. package/dist/uninstall-THKUH5ZT.js.map +0 -1
  108. package/dist/update-NPZDP24E.js +0 -18
  109. /package/dist/{chunk-ZO3X5NPG.js.map → chunk-MG3G644T.js.map} +0 -0
  110. /package/dist/{chunk-6KA4HFX5.js.map → chunk-MOG7PB3A.js.map} +0 -0
  111. /package/dist/{chunk-KAMRYUK2.js.map → chunk-OOSRB3OF.js.map} +0 -0
  112. /package/dist/{chunk-ZP5PV3JB.js.map → chunk-QTGUDCIR.js.map} +0 -0
  113. /package/dist/{chunk-BRHREK7E.js.map → chunk-SFEQGENI.js.map} +0 -0
  114. /package/dist/{chunk-XVTD7UWR.js.map → chunk-TROZ6HL4.js.map} +0 -0
  115. /package/dist/{chunk-3QJREVMX.js.map → chunk-USOLCBKC.js.map} +0 -0
  116. /package/dist/{chunk-7H3RN4WJ.js.map → chunk-WM7TJEBP.js.map} +0 -0
  117. /package/dist/{chunk-A5H3E5QA.js.map → chunk-XJQ6CH7X.js.map} +0 -0
  118. /package/dist/{chunk-7R37M6WV.js.map → chunk-ZQNGTLOC.js.map} +0 -0
  119. /package/dist/{config-IY2OJCAK.js.map → config-YYKDH2TH.js.map} +0 -0
  120. /package/dist/{hook-command-PZHKS7ES.js.map → hook-command-VWJXRT7H.js.map} +0 -0
  121. /package/dist/{install-O5FJ5EP3.js.map → install-2GXXD4DK.js.map} +0 -0
  122. /package/dist/{install-identity-QM44IQ6Z.js.map → install-identity-FK3YF227.js.map} +0 -0
  123. /package/dist/{package-RT24HTTP.js.map → package-6DJA3Y2O.js.map} +0 -0
  124. /package/dist/{paths-MUXHUOCM.js.map → paths-POPTXJO6.js.map} +0 -0
  125. /package/dist/{pay-IR2V76FX.js.map → pay-LSDJBIAZ.js.map} +0 -0
  126. /package/dist/{update-NPZDP24E.js.map → update-FGP3HNLD.js.map} +0 -0
  127. /package/dist/{wallet-53EFH4M5.js.map → wallet-DA7OFNEW.js.map} +0 -0
@@ -1,18 +1,18 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  emitNotice
4
- } from "./chunk-XVTD7UWR.js";
4
+ } from "./chunk-TROZ6HL4.js";
5
5
  import {
6
6
  external_exports,
7
7
  loadConfig,
8
8
  writeFileAtomic
9
- } from "./chunk-QTND6XWJ.js";
9
+ } from "./chunk-VVAHFCX2.js";
10
10
  import {
11
11
  updateCheckPath
12
- } from "./chunk-K6AXXYCG.js";
12
+ } from "./chunk-SJLTEINJ.js";
13
13
  import {
14
14
  package_default
15
- } from "./chunk-RLPLYUME.js";
15
+ } from "./chunk-LRCJ2IZ5.js";
16
16
 
17
17
  // src/lib/update-check.ts
18
18
  import { readFile } from "node:fs/promises";
@@ -189,4 +189,4 @@ export {
189
189
  fetchDistTags,
190
190
  isNewer
191
191
  };
192
- //# sourceMappingURL=chunk-7H3RN4WJ.js.map
192
+ //# sourceMappingURL=chunk-WM7TJEBP.js.map
@@ -1,10 +1,13 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  addressQrLines
4
- } from "./chunk-PZ5N6BAL.js";
4
+ } from "./chunk-ORWL5BSN.js";
5
5
  import {
6
6
  getUsdcBalance
7
- } from "./chunk-BRHREK7E.js";
7
+ } from "./chunk-SFEQGENI.js";
8
+ import {
9
+ channelCredit
10
+ } from "./chunk-P4LVLFO4.js";
8
11
  import {
9
12
  commitLocalWallet,
10
13
  createLocalWallet,
@@ -17,27 +20,28 @@ import {
17
20
  verifyAndPreserveOutgoingWallet,
18
21
  walletExistsError,
19
22
  walletFileExists
20
- } from "./chunk-7R37M6WV.js";
23
+ } from "./chunk-ZQNGTLOC.js";
24
+ import {
25
+ SUGGESTED_FUND_USD
26
+ } from "./chunk-MRUPDSUM.js";
21
27
  import {
22
28
  LockTimeoutError,
23
29
  withFileLock
24
30
  } from "./chunk-MEFB5KHA.js";
25
- import {
26
- toMoney
27
- } from "./chunk-FZTSGQVK.js";
28
31
  import {
29
32
  CliError,
30
33
  loadRawConfig,
31
- resolveSettings
32
- } from "./chunk-QTND6XWJ.js";
34
+ resolveSettings,
35
+ toMoney
36
+ } from "./chunk-VVAHFCX2.js";
33
37
  import {
34
38
  walletPath
35
- } from "./chunk-K6AXXYCG.js";
39
+ } from "./chunk-SJLTEINJ.js";
36
40
 
37
41
  // src/commands/wallet.ts
38
42
  import { mkdir } from "node:fs/promises";
39
43
  import { join } from "node:path";
40
- var FUNDING_LINE = "Fund it with `tenjin wallet fund` (card via Coinbase), or send USDC on Base. $5 covers ~50 typical resources.";
44
+ var FUNDING_LINE = `Fund it with \`tenjin wallet fund ${SUGGESTED_FUND_USD}\`, or send USDC on Base.`;
41
45
  var KEY_STORAGE = "encrypted (keystore v3, scrypt)";
42
46
  var isWindows = process.platform === "win32";
43
47
  async function runWalletCreate(ctx, opts = {}) {
@@ -219,9 +223,14 @@ async function runWalletBalance(ctx, opts = {}) {
219
223
  });
220
224
  }
221
225
  const balance = toMoney(atomic.toString());
226
+ const credit = toMoney(
227
+ (await channelCredit(ctx.dataDir, desc.address).catch(() => 0n)).toString()
228
+ );
222
229
  return {
223
- data: { address: desc.address, balance },
224
- humanLines: [`Balance: ${balance.usd} USDC on Base`]
230
+ data: { address: desc.address, balance, routingCredit: credit },
231
+ humanLines: [
232
+ `Balance: ${balance.usd} USDC on Base` + (credit.atomic !== "0" ? ` (+${credit.usd} routing credit)` : "")
233
+ ]
225
234
  };
226
235
  }
227
236
  function custodyWarnings() {
@@ -244,4 +253,4 @@ export {
244
253
  runWalletShow,
245
254
  runWalletBalance
246
255
  };
247
- //# sourceMappingURL=chunk-MNTQMZJB.js.map
256
+ //# sourceMappingURL=chunk-XDYKZRLN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/wallet.ts"],"sourcesContent":["import { mkdir } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { CliError } from '../lib/errors';\nimport { walletPath } from '../lib/paths';\nimport { withFileLock, LockTimeoutError } from '../lib/lock';\nimport { loadRawConfig, resolveSettings } from '../lib/config';\nimport { toMoney } from '../lib/money';\nimport { getUsdcBalance } from '../lib/usdc';\nimport { addressQrLines } from '../lib/qr';\nimport { channelCredit } from '../router/channel-credit';\nimport { SUGGESTED_FUND_USD } from '../router/fee';\nimport {\n commitLocalWallet,\n createLocalWallet,\n describeWallet,\n parkOutgoingWallet,\n prepareLocalWallet,\n resolveWalletProvider,\n restoreParkedWallet,\n verifyAndPreserveOutgoingWallet,\n type ArchivedWalletInfo,\n type ResolveWalletProviderOptions,\n} from '../lib/wallet';\nimport { walletExistsError, walletFileExists } from '../lib/wallet/store';\nimport { resolvePassphraseForCreate, type PassphraseSource } from '../lib/wallet/passphrase';\nimport type { PassphraseOverrides } from '../lib/wallet/local';\nimport type { CommandContext, CommandResult } from '../context';\n\nconst FUNDING_LINE = `Fund it with \\`tenjin wallet fund ${SUGGESTED_FUND_USD}\\`, or send USDC on Base.`;\nconst KEY_STORAGE = 'encrypted (keystore v3, scrypt)';\nconst isWindows = process.platform === 'win32';\n\nexport interface WalletCreateOptions {\n /**\n * Explicitly replace the existing active wallet (mirrors the `--yes`-style\n * explicit-flag precedent): the outgoing wallet is ARCHIVED — passphrase\n * verified against its keystore and preserved under its own address, keystore\n * parked beside the new one — never destroyed. Without it, create refuses\n * when a wallet exists. There is always exactly ONE active wallet.\n */\n replace?: boolean;\n /** Test seam for passphrase resolution (keychain exec, TTY prompt, platform). */\n passphrase?: PassphraseOverrides;\n /**\n * The environment TENJIN_WALLET_PASSPHRASE is read from; defaults to\n * process.env. A seam rather than a global read so a caller (and above all a\n * test) can settle the passphrase source WITHOUT mutating the real process\n * environment, which under a parallel runner leaks across whole test files.\n */\n env?: NodeJS.ProcessEnv;\n}\n\nexport async function runWalletCreate(\n ctx: CommandContext,\n opts: WalletCreateOptions = {},\n): Promise<CommandResult> {\n const {\n address,\n walletPath: path,\n source,\n replaced,\n } = await createWalletLocked(ctx.dataDir, opts);\n\n const warnings = custodyWarnings();\n return {\n data: {\n address,\n walletPath: path,\n provider: 'local',\n policyEnforcement: 'client-only',\n keyStorage: KEY_STORAGE,\n passphraseSource: source,\n ...(replaced !== undefined\n ? {\n replaced: {\n address: replaced.address,\n archivedWalletPath: replaced.archivedPath,\n passphrasePreserved: replaced.passphraseLocation,\n ...(replaced.unarchivedReason !== undefined\n ? { unarchivedReason: replaced.unarchivedReason }\n : {}),\n },\n }\n : {}),\n warnings,\n },\n humanLines: [\n `Wallet created: ${address}`,\n `Key stored ${KEY_STORAGE}.`,\n passphraseNote(source, address),\n ...(replaced !== undefined ? replacedNote(replaced, path) : []),\n FUNDING_LINE,\n ...warnings,\n ],\n };\n}\n\n/** Where the outgoing wallet's funds live, why they remain reachable, and how to restore it. */\nfunction replacedNote(replaced: ArchivedWalletInfo, activeWalletPath: string): string[] {\n const passphraseLine =\n replaced.passphraseLocation === 'store'\n ? `its passphrase is preserved in the OS credential store (service tenjin-cli, account ${replaced.account}).`\n : replaced.passphraseLocation === 'env'\n ? 'its passphrase is TENJIN_WALLET_PASSPHRASE — keep that value.'\n : replaced.unarchivedReason === 'rejected-characters'\n ? 'its passphrase was NOT archived: the macOS keychain writer only stores machine-generated (base64url) passphrases, and this typed one contains other characters. Keep it yourself, or set TENJIN_WALLET_PASSPHRASE to it.'\n : replaced.unarchivedReason === 'no-store'\n ? 'its passphrase was NOT archived: this platform has no OS credential store. It exists only where you keep it.'\n : 'its passphrase was NOT archived: the OS credential store write failed. It exists only where you keep it.';\n return [\n `Previous wallet archived: ${replaced.address} still holds any funds sent to it.`,\n `Its keystore was moved to ${replaced.archivedPath}; ${passphraseLine}`,\n `To make it the active wallet again later: move the current ${activeWalletPath} aside first, then \\`mv ${replaced.archivedPath} ${activeWalletPath}\\`.`,\n ];\n}\n\n/**\n * Run the whole create critical section under a cross-process file lock: the\n * existence pre-check, the passphrase generate-and-store, and the no-clobber\n * write. Without the lock these interleave across two concurrent creates — each\n * generates a distinct passphrase and persists it to the OS store BEFORE the\n * exclusive file write, so a different process could win the file while this\n * one's per-address entry names a wallet that never landed. Serializing means\n * the loser blocks until the winner commits, then trips the exists check and\n * exits WALLET_EXISTS having never generated or stored a passphrase. The\n * store-before-write ordering stays (it still guards the single-process crash\n * window), and the exclusive write stays the final authority.\n *\n * The passphrase is resolved inside the prepare step's address callback so the\n * OS-store entry is keyed to the new wallet's own address (issue #32).\n *\n * `--replace` ordering closes the no-active-wallet window: verify-and-preserve\n * the outgoing wallet (no file moves), fully PREPARE the replacement (key,\n * stored passphrase, encrypted keystore — every fallible step) while the old\n * wallet is still active, and only then park the old keystore and commit the\n * new one. A commit failure rolls the park back, so at every exit either the\n * old or the new wallet is the active one.\n */\nasync function createWalletLocked(\n dir: string,\n opts: WalletCreateOptions,\n): Promise<{\n address: string;\n walletPath: string;\n source: PassphraseSource;\n replaced?: ArchivedWalletInfo;\n}> {\n // Ensure the data dir exists so the lock's own mkdir has a parent on a fresh\n // install; the exclusive wallet write below re-ensures it at 0700 regardless.\n await mkdir(dir, { recursive: true, mode: 0o700 });\n const lockPath = join(dir, 'wallet.create.lock');\n try {\n return await withFileLock(lockPath, async () => {\n const env = opts.env ?? process.env;\n let source: PassphraseSource = 'env';\n const passphraseFor = async (forAddress: string): Promise<string> => {\n const resolved = await resolvePassphraseForCreate(\n { env, dir, ...opts.passphrase },\n forAddress,\n );\n source = resolved.source;\n return resolved.passphrase;\n };\n\n if (!(await walletFileExists(dir))) {\n const { address, walletPath: path } = await createLocalWallet(dir, passphraseFor);\n return { address, walletPath: path, source };\n }\n\n if (opts.replace !== true) throw walletExistsError(dir);\n const preserved = await verifyAndPreserveOutgoingWallet({\n dir,\n env,\n ...(opts.passphrase !== undefined ? { passphrase: opts.passphrase } : {}),\n });\n const prepared = await prepareLocalWallet(passphraseFor);\n const archivedPath = await parkOutgoingWallet(dir, preserved.account);\n try {\n const { address, walletPath: path } = await commitLocalWallet(dir, prepared);\n return { address, walletPath: path, source, replaced: { ...preserved, archivedPath } };\n } catch (err) {\n try {\n await restoreParkedWallet(dir, archivedPath);\n } catch (restoreErr) {\n // The no-clobber restore also refuses when a wallet.json appeared out\n // of band (commit EEXIST) — never overwrite it; name both files.\n throw new CliError(\n 'INTERNAL',\n 'Creating the replacement wallet failed after the old wallet was parked, and restoring it also failed.',\n {\n fix: `Your old wallet ${preserved.address} is intact at ${archivedPath} with its passphrase preserved. If a ${walletPath(dir)} now exists, another process wrote it — move it aside first. Then restore with \\`mv ${archivedPath} ${walletPath(dir)}\\`.`,\n cause: restoreErr,\n },\n );\n }\n // Old wallet restored as the active one; say so rather than surfacing a\n // raw fs error (or a WALLET_EXISTS whose fix suggests re-running --replace).\n throw new CliError(\n 'INTERNAL',\n 'Creating the replacement wallet failed; the previous wallet was restored and is the active wallet again.',\n {\n fix: 'Nothing was lost. Fix the underlying error, then retry `tenjin wallet create --replace`.',\n cause: err,\n },\n );\n }\n });\n } catch (err) {\n // A lock timeout is not the user's error; surface it as INTERNAL with the one\n // manual step (there is no auto-steal), keeping the JSON error contract. Every\n // other error — notably the loser's WALLET_EXISTS — propagates unchanged.\n if (err instanceof LockTimeoutError) {\n throw new CliError('INTERNAL', err.message, {\n fix: `If no other tenjin process is running, remove ${lockPath} and retry.`,\n cause: err,\n });\n }\n throw err;\n }\n}\n\n/** Where the encryption passphrase lives, and what the user must remember. */\nfunction passphraseNote(source: PassphraseSource, address: string): string {\n const account = address.toLowerCase();\n switch (source) {\n case 'keychain':\n return `Passphrase saved to your macOS keychain (service tenjin-cli, account ${account}); signing will be transparent on this machine.`;\n case 'dpapi':\n return `Passphrase saved to a DPAPI-encrypted per-wallet file (passphrase.${account}.dpapi), readable only by you on this Windows machine; signing will be transparent here.`;\n case 'secret-service':\n return `Passphrase saved to your Linux keyring (Secret Service, service tenjin-cli, account ${account}); signing will be transparent on this machine.`;\n case 'env':\n return 'Encrypted with TENJIN_WALLET_PASSPHRASE; keep that value to sign.';\n case 'prompt':\n return 'Remember your passphrase: it is required to sign and cannot be recovered.';\n }\n}\n\nexport interface WalletShowOptions extends ResolveWalletProviderOptions {\n /** `--no-qr`: print the address without the QR block at a TTY. */\n qr?: boolean;\n}\n\nexport async function runWalletShow(\n ctx: CommandContext,\n opts: WalletShowOptions = {},\n): Promise<CommandResult> {\n const provider = resolveWalletProvider(ctx, opts);\n const desc = await describeWallet(provider);\n // Diagnostics are the provider's own: a remote provider reports no local file\n // path or perms warning, so `show` never contaminates a remote wallet's output\n // with a stale local wallet.json's state. keyStorage/passphraseSource are the\n // custody posture reported without decrypting or requiring a passphrase.\n const {\n walletPath: path,\n keyStorage,\n passphraseSource,\n archivedWallets,\n warnings,\n } = await provider.diagnostics();\n\n const humanLines = [\n `Address: ${desc.address}`,\n ...(opts.qr !== false && ctx.io.isTTY && !ctx.flags.json\n ? addressQrLines(desc.address, ctx.io.stdout)\n : []),\n `Key source: ${desc.credentialSource}`,\n ];\n if (keyStorage !== undefined) humanLines.push(`Key storage: ${keyStorage}`);\n if (passphraseSource !== undefined) humanLines.push(`Passphrase: ${passphraseSource}`);\n if (archivedWallets !== undefined && archivedWallets.length > 0) {\n // A recovery hint, not a wallet switcher: exactly one wallet is ever active.\n humanLines.push(\n `Archived (replaced) wallets, funds recoverable via their preserved passphrases: ${archivedWallets.join(', ')}`,\n );\n }\n humanLines.push(...warnings);\n\n return {\n data: {\n address: desc.address,\n provider: desc.provider,\n credentialSource: desc.credentialSource,\n policyEnforcement: desc.policyEnforcement,\n ...(path !== undefined ? { walletPath: path } : {}),\n ...(keyStorage !== undefined ? { keyStorage } : {}),\n ...(passphraseSource !== undefined ? { passphraseSource } : {}),\n ...(archivedWallets !== undefined && archivedWallets.length > 0 ? { archivedWallets } : {}),\n warnings,\n },\n humanLines,\n };\n}\n\nexport async function runWalletBalance(\n ctx: CommandContext,\n opts: ResolveWalletProviderOptions = {},\n): Promise<CommandResult> {\n const provider = resolveWalletProvider(ctx, opts);\n const desc = await describeWallet(provider);\n\n const config = await loadRawConfig(ctx.dataDir);\n const rpcUrl = resolveSettings({\n config,\n flags: { baseUrl: ctx.flags.baseUrl },\n env: process.env,\n }).rpcUrl.value;\n\n let atomic: bigint;\n try {\n atomic = await getUsdcBalance(desc.address, rpcUrl);\n } catch (err) {\n throw new CliError('RPC_ERROR', `Could not read the USDC balance from ${rpcUrl}.`, {\n fix: 'Check your network, or set a working RPC with `tenjin config set rpcUrl <url>`.',\n cause: err,\n });\n }\n\n const balance = toMoney(atomic.toString());\n // THE ROUTING CREDIT IS STILL THE USER'S: a deposit moved it off the wallet\n // into the routing channel, where the next routing fees draw from it.\n const credit = toMoney(\n (await channelCredit(ctx.dataDir, desc.address).catch(() => 0n)).toString(),\n );\n return {\n data: { address: desc.address, balance, routingCredit: credit },\n humanLines: [\n `Balance: ${balance.usd} USDC on Base` +\n (credit.atomic !== '0' ? ` (+${credit.usd} routing credit)` : ''),\n ],\n };\n}\n\nfunction custodyWarnings(): string[] {\n const warnings: string[] = [];\n if (hasEnvKey()) {\n warnings.push('TENJIN_WALLET_KEY is set and shadows this file at runtime.');\n }\n if (isWindows) {\n warnings.push('File permissions are not enforced on Windows; the key file is not restricted.');\n }\n return warnings;\n}\n\nfunction hasEnvKey(): boolean {\n const envKey = process.env.TENJIN_WALLET_KEY;\n return envKey !== undefined && envKey.length > 0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;AACtB,SAAS,YAAY;AA2BrB,IAAM,eAAe,qCAAqC,kBAAkB;AAC5E,IAAM,cAAc;AACpB,IAAM,YAAY,QAAQ,aAAa;AAsBvC,eAAsB,gBACpB,KACA,OAA4B,CAAC,GACL;AACxB,QAAM;AAAA,IACJ;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,EACF,IAAI,MAAM,mBAAmB,IAAI,SAAS,IAAI;AAE9C,QAAM,WAAW,gBAAgB;AACjC,SAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,kBAAkB;AAAA,MAClB,GAAI,aAAa,SACb;AAAA,QACE,UAAU;AAAA,UACR,SAAS,SAAS;AA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A,SAAS,YAAqB;AAC5B,QAAM,SAAS,QAAQ,IAAI;AAC3B,SAAO,WAAW,UAAa,OAAO,SAAS;AACjD;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  CliError
4
- } from "./chunk-QTND6XWJ.js";
4
+ } from "./chunk-VVAHFCX2.js";
5
5
 
6
6
  // src/lib/destination.ts
7
7
  import { lookup } from "node:dns/promises";
@@ -101,7 +101,8 @@ async function resolvePublicDestination(raw, options = {}) {
101
101
 
102
102
  export {
103
103
  isPublicAddress,
104
+ assertPublicHttpsUrl,
104
105
  assertPublicDestination,
105
106
  resolvePublicDestination
106
107
  };
107
- //# sourceMappingURL=chunk-A5H3E5QA.js.map
108
+ //# sourceMappingURL=chunk-XJQ6CH7X.js.map
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  createLocalSpendAuthorizer
4
- } from "./chunk-ZP5PV3JB.js";
4
+ } from "./chunk-QTGUDCIR.js";
5
5
  import {
6
6
  emitNotice
7
- } from "./chunk-XVTD7UWR.js";
7
+ } from "./chunk-TROZ6HL4.js";
8
8
  import {
9
9
  hashAuthorization,
10
10
  hashMessage,
@@ -55,14 +55,14 @@ import {
55
55
  fsyncDir,
56
56
  writeFileAtomic,
57
57
  writeFileAtomicExclusive
58
- } from "./chunk-QTND6XWJ.js";
58
+ } from "./chunk-VVAHFCX2.js";
59
59
  import {
60
60
  archivedWalletPath,
61
61
  passphraseBlobPath,
62
62
  passphraseBlobPathFor,
63
63
  spendLedgerPath,
64
64
  walletPath
65
- } from "./chunk-K6AXXYCG.js";
65
+ } from "./chunk-SJLTEINJ.js";
66
66
 
67
67
  // src/lib/wallet/store.ts
68
68
  import { readFile, stat } from "node:fs/promises";
@@ -1676,4 +1676,4 @@ export {
1676
1676
  @noble/ciphers/esm/utils.js:
1677
1677
  (*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)
1678
1678
  */
1679
- //# sourceMappingURL=chunk-7R37M6WV.js.map
1679
+ //# sourceMappingURL=chunk-ZQNGTLOC.js.map
@@ -1,33 +1,32 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
- import {
3
- PERMISSIONS_DOC_URL
4
- } from "./chunk-A36LQPHV.js";
5
2
  import {
6
3
  maybeUpdate,
7
4
  readUpdateSignal
8
- } from "./chunk-7H3RN4WJ.js";
5
+ } from "./chunk-WM7TJEBP.js";
6
+ import {
7
+ PERMISSIONS_DOC_URL
8
+ } from "./chunk-A36LQPHV.js";
9
9
  import {
10
10
  defaultIo,
11
11
  emitFailure,
12
12
  emitSuccess
13
- } from "./chunk-XVTD7UWR.js";
13
+ } from "./chunk-TROZ6HL4.js";
14
14
  import {
15
15
  noteBaseUrlFlag
16
- } from "./chunk-3QJREVMX.js";
17
- import "./chunk-UOW5JXYY.js";
16
+ } from "./chunk-USOLCBKC.js";
17
+ import "./chunk-RJEPZMYY.js";
18
18
  import "./chunk-2I4QTOLB.js";
19
- import "./chunk-ZP7AHN7Z.js";
20
- import "./chunk-FZTSGQVK.js";
19
+ import "./chunk-AMEUXNJT.js";
21
20
  import {
22
21
  CliError,
23
22
  external_exports
24
- } from "./chunk-QTND6XWJ.js";
23
+ } from "./chunk-VVAHFCX2.js";
25
24
  import {
26
25
  dataDir
27
- } from "./chunk-K6AXXYCG.js";
26
+ } from "./chunk-SJLTEINJ.js";
28
27
  import {
29
28
  package_default
30
- } from "./chunk-RLPLYUME.js";
29
+ } from "./chunk-LRCJ2IZ5.js";
31
30
  import {
32
31
  __commonJS,
33
32
  __require,
@@ -3508,7 +3507,7 @@ Learn more:
3508
3507
  ).action(async function() {
3509
3508
  await runCommand("install", this, async (ctx) => {
3510
3509
  const o = this.opts();
3511
- const { runRouterInstall } = await import("./install-O5FJ5EP3.js");
3510
+ const { runRouterInstall } = await import("./install-2GXXD4DK.js");
3512
3511
  return runRouterInstall(
3513
3512
  {
3514
3513
  ...o.project === true ? { project: true } : {},
@@ -3525,7 +3524,7 @@ Learn more:
3525
3524
  ).option("--project", "remove the project-only install").action(async function() {
3526
3525
  await runCommand("uninstall", this, async (ctx) => {
3527
3526
  const o = this.opts();
3528
- const { runRouterUninstall } = await import("./uninstall-THKUH5ZT.js");
3527
+ const { runRouterUninstall } = await import("./uninstall-VOK2Z5M4.js");
3529
3528
  return runRouterUninstall({ ...o.project === true ? { project: true } : {} }, ctx);
3530
3529
  });
3531
3530
  });
@@ -3541,7 +3540,7 @@ Examples:
3541
3540
  `
3542
3541
  ).action(async function() {
3543
3542
  await runCommand("doctor", this, async (ctx) => {
3544
- const { runRouterDoctor } = await import("./doctor-2UZZF44A.js");
3543
+ const { runRouterDoctor } = await import("./doctor-SSTXGCHX.js");
3545
3544
  return runRouterDoctor(ctx, this.opts().project === true ? { project: true } : {});
3546
3545
  });
3547
3546
  });
@@ -3549,7 +3548,7 @@ Examples:
3549
3548
  "Update tenjin-cli to the newest version npm publishes on the latest tag. It then runs `install --refresh` on the new binary, so the Claude Code plugin is registered at the build that just landed."
3550
3549
  ).option("--check", "report whether a newer version exists without installing it").action(async function() {
3551
3550
  await runCommand("update", this, async (ctx) => {
3552
- const { runUpdate } = await import("./update-NPZDP24E.js");
3551
+ const { runUpdate } = await import("./update-FGP3HNLD.js");
3553
3552
  return runUpdate({ check: this.opts().check === true }, ctx);
3554
3553
  });
3555
3554
  });
@@ -3568,7 +3567,7 @@ Examples:
3568
3567
  );
3569
3568
  config.action(async function() {
3570
3569
  await runCommand("config", this, async (ctx) => {
3571
- const { runConfigList } = await import("./config-IY2OJCAK.js");
3570
+ const { runConfigList } = await import("./config-YYKDH2TH.js");
3572
3571
  return runConfigList(ctx);
3573
3572
  });
3574
3573
  });
@@ -3576,7 +3575,7 @@ Examples:
3576
3575
  "Print one effective config value by key. The effective value is what the command would use, defaults and environment overrides included."
3577
3576
  ).action(async function(key) {
3578
3577
  await runCommand("config.get", this, async (ctx) => {
3579
- const { runConfigGet } = await import("./config-IY2OJCAK.js");
3578
+ const { runConfigGet } = await import("./config-YYKDH2TH.js");
3580
3579
  return runConfigGet({ key }, ctx);
3581
3580
  });
3582
3581
  });
@@ -3588,7 +3587,7 @@ Examples:
3588
3587
  ).option("--local", "with --project, write .tenjin/config.local.json instead, which is yours").action(async function(key, value) {
3589
3588
  const o = this.opts();
3590
3589
  await runCommand("config.set", this, async (ctx) => {
3591
- const { runConfigSet } = await import("./config-IY2OJCAK.js");
3590
+ const { runConfigSet } = await import("./config-YYKDH2TH.js");
3592
3591
  return runConfigSet(
3593
3592
  { key, value, project: o.project === true, local: o.local === true },
3594
3593
  ctx
@@ -3610,7 +3609,7 @@ Examples:
3610
3609
  ).action(async function() {
3611
3610
  await runCommand("wallet.create", this, async (ctx) => {
3612
3611
  const o = this.opts();
3613
- const { runWalletCreate } = await import("./wallet-53EFH4M5.js");
3612
+ const { runWalletCreate } = await import("./wallet-DA7OFNEW.js");
3614
3613
  return runWalletCreate(ctx, o.replace === true ? { replace: true } : {});
3615
3614
  });
3616
3615
  });
@@ -3619,7 +3618,7 @@ Examples:
3619
3618
  ).option("--no-qr", "print the address without the QR code").action(async function() {
3620
3619
  await runCommand("wallet.show", this, async (ctx) => {
3621
3620
  const o = this.opts();
3622
- const { runWalletShow } = await import("./wallet-53EFH4M5.js");
3621
+ const { runWalletShow } = await import("./wallet-DA7OFNEW.js");
3623
3622
  return runWalletShow(ctx, o.qr === false ? { qr: false } : {});
3624
3623
  });
3625
3624
  });
@@ -3627,7 +3626,7 @@ Examples:
3627
3626
  "Read the wallet USDC balance on Base. It is a chain read: no key is unlocked and nothing is spent."
3628
3627
  ).action(async function() {
3629
3628
  await runCommand("wallet.balance", this, async (ctx) => {
3630
- const { runWalletBalance } = await import("./wallet-53EFH4M5.js");
3629
+ const { runWalletBalance } = await import("./wallet-DA7OFNEW.js");
3631
3630
  return runWalletBalance(ctx);
3632
3631
  });
3633
3632
  });
@@ -3639,7 +3638,7 @@ Examples:
3639
3638
  ).action(async function(amountUsd) {
3640
3639
  await runCommand("wallet.fund", this, async (ctx) => {
3641
3640
  const o = this.opts();
3642
- const { runFund } = await import("./fund-RZ2QFULK.js");
3641
+ const { runFund } = await import("./fund-QWVWRVDK.js");
3643
3642
  return runFund(ctx, {
3644
3643
  ...amountUsd !== void 0 ? { amountUsd } : {},
3645
3644
  ...o.open === false ? { open: false } : {},
@@ -3659,7 +3658,7 @@ Examples:
3659
3658
  ).action(async function(amount, token, to) {
3660
3659
  await runCommand("wallet.send", this, async (ctx) => {
3661
3660
  const o = this.opts();
3662
- const { runSend } = await import("./send-PI4NUA7I.js");
3661
+ const { runSend } = await import("./send-MHAOLPK3.js");
3663
3662
  return runSend({ amount, token, to, ...o.yes === true ? { yes: true } : {} }, ctx);
3664
3663
  });
3665
3664
  });
@@ -3679,7 +3678,7 @@ Examples:
3679
3678
  ).action(async function(url) {
3680
3679
  await runCommand("pay", this, async (ctx) => {
3681
3680
  const o = this.opts();
3682
- const { runPay } = await import("./pay-IR2V76FX.js");
3681
+ const { runPay } = await import("./pay-LSDJBIAZ.js");
3683
3682
  return runPay(
3684
3683
  {
3685
3684
  url,
@@ -3706,7 +3705,7 @@ function registerRouter(reg) {
3706
3705
  const ctx = buildContext2(this);
3707
3706
  const [{ aliveMain }, { default: pkg }] = await Promise.all([
3708
3707
  import("./alive-3J3CHOQP.js"),
3709
- import("./package-RT24HTTP.js")
3708
+ import("./package-6DJA3Y2O.js")
3710
3709
  ]);
3711
3710
  await aliveMain({ dataDir: ctx.dataDir, version: pkg.version });
3712
3711
  });
@@ -3723,7 +3722,7 @@ function registerRouter(reg) {
3723
3722
  ]) {
3724
3723
  addGlobalFlags2(hook.command(name)).summary(summary).action(async function() {
3725
3724
  const ctx = buildContext2(this);
3726
- const { runHookCommand } = await import("./hook-command-PZHKS7ES.js");
3725
+ const { runHookCommand } = await import("./hook-command-VWJXRT7H.js");
3727
3726
  await runHookCommand(name, io, {
3728
3727
  dataDir: ctx.dataDir,
3729
3728
  ...ctx.flags.baseUrl !== void 0 ? { baseUrl: ctx.flags.baseUrl } : {}
@@ -3736,32 +3735,38 @@ function registerRouter(reg) {
3736
3735
  "Run the local stdio MCP server that carries the `request` tool: one free routing decision per lookup, then the provider call, built here from the offer's spec and your assistant's input where it has one, under your local spend policy. It speaks on stdin and stdout and runs until the client disconnects, so it prints no envelope of its own."
3737
3736
  ).action(async function() {
3738
3737
  const ctx = buildContext2(this);
3739
- const { runRouterMcpServer } = await import("./mcp-33HAADDF.js");
3738
+ const { runRouterMcpServer } = await import("./mcp-42H2F4NY.js");
3740
3739
  await runRouterMcpServer({ dataDir: ctx.dataDir, flags: ctx.flags });
3741
3740
  });
3742
3741
  leaf2(INTEGRATION, "status-line", "the live footer, for Claude Code's status line").description(
3743
3742
  "Print one line naming what this session is looking up right now: the provider actually being called, its bounded parameters, and what it cost. It reads Claude Code's status event on stdin for the session identity, reads that session's own progress records, writes nothing, and prints `x402 \xB7 ready` when this session has no activity. Opt-in: set it as your Claude Code status line command yourself."
3744
3743
  ).action(async function() {
3745
3744
  const ctx = buildContext2(this);
3746
- const { runStatusLine } = await import("./status-line-2G5JPQAE.js");
3745
+ const { runStatusLine } = await import("./status-line-45TVCRM3.js");
3747
3746
  await runStatusLine(io, { dataDir: ctx.dataDir });
3748
3747
  });
3749
3748
  leaf2(SETUP, "status", "what this machine has spent, and what is still open").description(
3750
3749
  "Report the rolling 24h spend window from spend.json: what has settled, what is reserved by a request still in flight, and the per-call and per-day caps in force."
3751
3750
  ).action(async function() {
3752
3751
  await runCommand("status", this, async (ctx) => {
3753
- const { runRouterStatus } = await import("./status-ZUHTJK46.js");
3752
+ const { runRouterStatus } = await import("./status-O2RWLPS5.js");
3754
3753
  return runRouterStatus(ctx);
3755
3754
  });
3756
3755
  });
3757
3756
  const payments = leaf2(SETUP, "payments", "the paid lookups this machine made").description(
3758
- "The local record of paid router lookups, in `~/.tenjin/paid/ledger.jsonl`."
3757
+ "The local record of paid router lookups, in `~/.tenjin/paid/ledger.jsonl`. A bare `tenjin payments` lists the newest: when, who was paid, how much, whether it settled, and the transaction."
3759
3758
  );
3759
+ payments.action(async function() {
3760
+ await runCommand("payments", this, async (ctx) => {
3761
+ const { runPaymentsList } = await import("./payments-SPECLBRQ.js");
3762
+ return runPaymentsList(ctx);
3763
+ });
3764
+ });
3760
3765
  addGlobalFlags2(payments.command("reconcile")).summary("resolve paid lookups whose settlement is unknown").description(
3761
3766
  "For each paid lookup whose seller never confirmed settlement and whose authorization has expired, ask USDC on Base (through the configured rpcUrl) whether it was used: used means it was charged, unused means it never can be. Nothing is signed or sent but that one read."
3762
3767
  ).action(async function() {
3763
3768
  await runCommand("payments.reconcile", this, async (ctx) => {
3764
- const { runPaymentsReconcile } = await import("./payments-GFV4HU5R.js");
3769
+ const { runPaymentsReconcile } = await import("./payments-SPECLBRQ.js");
3765
3770
  return runPaymentsReconcile(ctx);
3766
3771
  });
3767
3772
  });
@@ -3911,4 +3916,4 @@ export {
3911
3916
  buildProgram,
3912
3917
  main
3913
3918
  };
3914
- //# sourceMappingURL=cli-234DNHN6.js.map
3919
+ //# sourceMappingURL=cli-JPTDHGRX.js.map