tenjin-cli 0.1.0-alpha.19 → 0.1.0-alpha.20

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 (100) hide show
  1. package/dist/{_esm-OVVGTKHH.js → _esm-CE7KNONL.js} +4 -4
  2. package/dist/{chunk-AMG4SONW.js → chunk-2E6GVIRP.js} +9 -9
  3. package/dist/{chunk-2SQEFBAM.js → chunk-3BS55ANY.js} +21 -4
  4. package/dist/chunk-3BS55ANY.js.map +1 -0
  5. package/dist/{chunk-XNP6VUAJ.js → chunk-4AS52HUG.js} +3 -3
  6. package/dist/{chunk-LSWVVSFX.js → chunk-4M5FBWT5.js} +18 -50
  7. package/dist/chunk-4M5FBWT5.js.map +1 -0
  8. package/dist/{chunk-ZDKEU2GF.js → chunk-5FYKPQNX.js} +3 -3
  9. package/dist/{chunk-5DOHKQ24.js → chunk-5KD5HRAJ.js} +10 -2
  10. package/dist/{chunk-5DOHKQ24.js.map → chunk-5KD5HRAJ.js.map} +1 -1
  11. package/dist/{chunk-ZTFIQC4C.js → chunk-72UHZRG6.js} +2 -2
  12. package/dist/{chunk-TDGN476R.js → chunk-7ACHDNJA.js} +3 -3
  13. package/dist/{chunk-Y66XUXVI.js → chunk-AWQPGIR6.js} +5 -5
  14. package/dist/{chunk-A6CY6BUW.js → chunk-BTX2QE2Y.js} +3 -3
  15. package/dist/{chunk-UNV4K45L.js → chunk-CCDOV45D.js} +6 -2
  16. package/dist/{chunk-UNV4K45L.js.map → chunk-CCDOV45D.js.map} +1 -1
  17. package/dist/{chunk-AISBL7EY.js → chunk-CXUYCDPX.js} +4 -4
  18. package/dist/{chunk-VFVFVQM6.js → chunk-HH3PDYIG.js} +5 -5
  19. package/dist/{chunk-FPUPBQHX.js → chunk-HPWO4O6S.js} +2 -2
  20. package/dist/{chunk-3VYGDRRL.js → chunk-LI44XLMB.js} +5 -5
  21. package/dist/{chunk-WUU3BH6G.js → chunk-LN2HISWU.js} +2 -2
  22. package/dist/{chunk-6DCELMQA.js → chunk-N35E6CM2.js} +6 -6
  23. package/dist/{chunk-FHBGTOFA.js → chunk-NSG5TVZQ.js} +8 -8
  24. package/dist/{chunk-PZQRSZJV.js → chunk-P42QX3QF.js} +2 -2
  25. package/dist/{chunk-PZQRSZJV.js.map → chunk-P42QX3QF.js.map} +1 -1
  26. package/dist/{chunk-SCAOYGKX.js → chunk-PO4HAXAW.js} +55 -31
  27. package/dist/chunk-PO4HAXAW.js.map +1 -0
  28. package/dist/{chunk-KTAW4KGH.js → chunk-RGVOODF4.js} +5 -5
  29. package/dist/chunk-RPR2C2JO.js +112 -0
  30. package/dist/chunk-RPR2C2JO.js.map +1 -0
  31. package/dist/{chunk-2BKS2FVE.js → chunk-TU7XH3JJ.js} +5 -1
  32. package/dist/chunk-TU7XH3JJ.js.map +1 -0
  33. package/dist/{chunk-XDADPAWW.js → chunk-YEBNE5NW.js} +23 -23
  34. package/dist/{chunk-BG2EXNAA.js → chunk-YREKMJPP.js} +3 -3
  35. package/dist/{cli-456F77ZY.js → cli-XJQYUOHI.js} +32 -24
  36. package/dist/{cli-456F77ZY.js.map → cli-XJQYUOHI.js.map} +1 -1
  37. package/dist/{config-BLUWOH6S.js → config-KMJLFPSI.js} +8 -8
  38. package/dist/{doctor-PS45CR3T.js → doctor-KMN55D7U.js} +23 -23
  39. package/dist/{fund-4SW2ZBWC.js → fund-LT6ZPGEQ.js} +20 -20
  40. package/dist/{hook-command-YTV7X333.js → hook-command-U5XPEHAJ.js} +31 -23
  41. package/dist/hook-command-U5XPEHAJ.js.map +1 -0
  42. package/dist/index.js +5 -2
  43. package/dist/index.js.map +1 -1
  44. package/dist/{install-U4BIDCHH.js → install-MMNXJ5LM.js} +11 -11
  45. package/dist/install-identity-B7FVIWML.js +27 -0
  46. package/dist/{install-wallet-EYHELQMG.js → install-wallet-XMVUBCHS.js} +14 -14
  47. package/dist/{mcp-AC4PIXH5.js → mcp-TUPRIPSI.js} +33 -29
  48. package/dist/{mcp-AC4PIXH5.js.map → mcp-TUPRIPSI.js.map} +1 -1
  49. package/dist/{paths-P2N4JTDZ.js → paths-LRMWNTJP.js} +4 -2
  50. package/dist/{pay-VJOP6TFT.js → pay-XAWW3NV3.js} +19 -19
  51. package/dist/{send-YH75Z6LB.js → send-HESQYRKM.js} +14 -14
  52. package/dist/{status-5CHCDLUE.js → status-ANZPRZJJ.js} +6 -6
  53. package/dist/{status-line-CZAZUOAY.js → status-line-J3TUWVRQ.js} +7 -7
  54. package/dist/{status-line-wiring-2ABDVXSJ.js → status-line-wiring-HSV7DXO5.js} +5 -5
  55. package/dist/tenjin-daemon.mjs +141 -4
  56. package/dist/{uninstall-BYVGAQMO.js → uninstall-GUU34YKP.js} +11 -11
  57. package/dist/{update-7QJDSHST.js → update-KO2NZRJ5.js} +6 -6
  58. package/dist/{viemAdapter-By13KInL-N2GIVMZ7.js → viemAdapter-By13KInL-X2VY6CY3.js} +2 -2
  59. package/dist/{wallet-YZOXIXBC.js → wallet-3URC5QPK.js} +14 -14
  60. package/dist/wallet-3URC5QPK.js.map +1 -0
  61. package/docs/agent-permissions.md +1 -1
  62. package/package.json +1 -1
  63. package/dist/chunk-2BKS2FVE.js.map +0 -1
  64. package/dist/chunk-2SQEFBAM.js.map +0 -1
  65. package/dist/chunk-LSWVVSFX.js.map +0 -1
  66. package/dist/chunk-SCAOYGKX.js.map +0 -1
  67. package/dist/hook-command-YTV7X333.js.map +0 -1
  68. /package/dist/{_esm-OVVGTKHH.js.map → _esm-CE7KNONL.js.map} +0 -0
  69. /package/dist/{chunk-AMG4SONW.js.map → chunk-2E6GVIRP.js.map} +0 -0
  70. /package/dist/{chunk-XNP6VUAJ.js.map → chunk-4AS52HUG.js.map} +0 -0
  71. /package/dist/{chunk-ZDKEU2GF.js.map → chunk-5FYKPQNX.js.map} +0 -0
  72. /package/dist/{chunk-ZTFIQC4C.js.map → chunk-72UHZRG6.js.map} +0 -0
  73. /package/dist/{chunk-TDGN476R.js.map → chunk-7ACHDNJA.js.map} +0 -0
  74. /package/dist/{chunk-Y66XUXVI.js.map → chunk-AWQPGIR6.js.map} +0 -0
  75. /package/dist/{chunk-A6CY6BUW.js.map → chunk-BTX2QE2Y.js.map} +0 -0
  76. /package/dist/{chunk-AISBL7EY.js.map → chunk-CXUYCDPX.js.map} +0 -0
  77. /package/dist/{chunk-VFVFVQM6.js.map → chunk-HH3PDYIG.js.map} +0 -0
  78. /package/dist/{chunk-FPUPBQHX.js.map → chunk-HPWO4O6S.js.map} +0 -0
  79. /package/dist/{chunk-3VYGDRRL.js.map → chunk-LI44XLMB.js.map} +0 -0
  80. /package/dist/{chunk-WUU3BH6G.js.map → chunk-LN2HISWU.js.map} +0 -0
  81. /package/dist/{chunk-6DCELMQA.js.map → chunk-N35E6CM2.js.map} +0 -0
  82. /package/dist/{chunk-FHBGTOFA.js.map → chunk-NSG5TVZQ.js.map} +0 -0
  83. /package/dist/{chunk-KTAW4KGH.js.map → chunk-RGVOODF4.js.map} +0 -0
  84. /package/dist/{chunk-XDADPAWW.js.map → chunk-YEBNE5NW.js.map} +0 -0
  85. /package/dist/{chunk-BG2EXNAA.js.map → chunk-YREKMJPP.js.map} +0 -0
  86. /package/dist/{config-BLUWOH6S.js.map → config-KMJLFPSI.js.map} +0 -0
  87. /package/dist/{doctor-PS45CR3T.js.map → doctor-KMN55D7U.js.map} +0 -0
  88. /package/dist/{fund-4SW2ZBWC.js.map → fund-LT6ZPGEQ.js.map} +0 -0
  89. /package/dist/{install-U4BIDCHH.js.map → install-MMNXJ5LM.js.map} +0 -0
  90. /package/dist/{paths-P2N4JTDZ.js.map → install-identity-B7FVIWML.js.map} +0 -0
  91. /package/dist/{install-wallet-EYHELQMG.js.map → install-wallet-XMVUBCHS.js.map} +0 -0
  92. /package/dist/{pay-VJOP6TFT.js.map → paths-LRMWNTJP.js.map} +0 -0
  93. /package/dist/{status-line-wiring-2ABDVXSJ.js.map → pay-XAWW3NV3.js.map} +0 -0
  94. /package/dist/{send-YH75Z6LB.js.map → send-HESQYRKM.js.map} +0 -0
  95. /package/dist/{status-5CHCDLUE.js.map → status-ANZPRZJJ.js.map} +0 -0
  96. /package/dist/{status-line-CZAZUOAY.js.map → status-line-J3TUWVRQ.js.map} +0 -0
  97. /package/dist/{viemAdapter-By13KInL-N2GIVMZ7.js.map → status-line-wiring-HSV7DXO5.js.map} +0 -0
  98. /package/dist/{uninstall-BYVGAQMO.js.map → uninstall-GUU34YKP.js.map} +0 -0
  99. /package/dist/{update-7QJDSHST.js.map → update-KO2NZRJ5.js.map} +0 -0
  100. /package/dist/{wallet-YZOXIXBC.js.map → viemAdapter-By13KInL-X2VY6CY3.js.map} +0 -0
@@ -5,18 +5,18 @@ import {
5
5
  mainWorktreeOf,
6
6
  ownedCandidates,
7
7
  projectRoot
8
- } from "./chunk-5DOHKQ24.js";
8
+ } from "./chunk-5KD5HRAJ.js";
9
9
  import {
10
10
  CONFIG_DEFAULTS,
11
11
  loadRawConfig,
12
12
  parseRouterLayer
13
- } from "./chunk-UNV4K45L.js";
13
+ } from "./chunk-CCDOV45D.js";
14
14
  import {
15
15
  CliError
16
16
  } from "./chunk-JLEF5WHM.js";
17
17
  import {
18
18
  configPath
19
- } from "./chunk-2BKS2FVE.js";
19
+ } from "./chunk-TU7XH3JJ.js";
20
20
 
21
21
  // src/router/settings.ts
22
22
  import { readFile } from "node:fs/promises";
@@ -124,4 +124,4 @@ export {
124
124
  readProjectRouterFile,
125
125
  projectRouterPath
126
126
  };
127
- //# sourceMappingURL=chunk-AISBL7EY.js.map
127
+ //# sourceMappingURL=chunk-CXUYCDPX.js.map
@@ -1,20 +1,20 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  emitNotice
4
- } from "./chunk-ZTFIQC4C.js";
4
+ } from "./chunk-72UHZRG6.js";
5
5
  import {
6
6
  external_exports,
7
7
  loadConfig
8
- } from "./chunk-UNV4K45L.js";
8
+ } from "./chunk-CCDOV45D.js";
9
9
  import {
10
10
  package_default
11
- } from "./chunk-PZQRSZJV.js";
11
+ } from "./chunk-P42QX3QF.js";
12
12
  import {
13
13
  writeFileAtomic
14
14
  } from "./chunk-JLEF5WHM.js";
15
15
  import {
16
16
  updateCheckPath
17
- } from "./chunk-2BKS2FVE.js";
17
+ } from "./chunk-TU7XH3JJ.js";
18
18
 
19
19
  // src/lib/update-check.ts
20
20
  import { readFile } from "node:fs/promises";
@@ -191,4 +191,4 @@ export {
191
191
  fetchDistTags,
192
192
  isNewer
193
193
  };
194
- //# sourceMappingURL=chunk-VFVFVQM6.js.map
194
+ //# sourceMappingURL=chunk-HH3PDYIG.js.map
@@ -28,7 +28,7 @@ var o = [{
28
28
  async function s(e) {
29
29
  let a3;
30
30
  try {
31
- a3 = await import("./_esm-OVVGTKHH.js");
31
+ a3 = await import("./_esm-CE7KNONL.js");
32
32
  } catch {
33
33
  throw new r(i.MISSING_PROVIDER_LIBRARY, "viem installed (npm install viem)", "viem not found");
34
34
  }
@@ -67,4 +67,4 @@ export {
67
67
  a2 as a,
68
68
  s
69
69
  };
70
- //# sourceMappingURL=chunk-FPUPBQHX.js.map
70
+ //# sourceMappingURL=chunk-HPWO4O6S.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  getUsdcBalance
4
- } from "./chunk-A6CY6BUW.js";
4
+ } from "./chunk-BTX2QE2Y.js";
5
5
  import {
6
6
  commitLocalWallet,
7
7
  createLocalWallet,
@@ -14,7 +14,7 @@ import {
14
14
  verifyAndPreserveOutgoingWallet,
15
15
  walletExistsError,
16
16
  walletFileExists
17
- } from "./chunk-XDADPAWW.js";
17
+ } from "./chunk-YEBNE5NW.js";
18
18
  import {
19
19
  LockTimeoutError,
20
20
  withFileLock
@@ -25,13 +25,13 @@ import {
25
25
  import {
26
26
  loadRawConfig,
27
27
  resolveSettings
28
- } from "./chunk-UNV4K45L.js";
28
+ } from "./chunk-CCDOV45D.js";
29
29
  import {
30
30
  CliError
31
31
  } from "./chunk-JLEF5WHM.js";
32
32
  import {
33
33
  walletPath
34
- } from "./chunk-2BKS2FVE.js";
34
+ } from "./chunk-TU7XH3JJ.js";
35
35
 
36
36
  // src/commands/wallet.ts
37
37
  import { mkdir } from "node:fs/promises";
@@ -239,4 +239,4 @@ export {
239
239
  runWalletShow,
240
240
  runWalletBalance
241
241
  };
242
- //# sourceMappingURL=chunk-3VYGDRRL.js.map
242
+ //# sourceMappingURL=chunk-LI44XLMB.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  inspectHooksFile
4
- } from "./chunk-ZDKEU2GF.js";
4
+ } from "./chunk-5FYKPQNX.js";
5
5
  import {
6
6
  CliError,
7
7
  writeFileAtomic
@@ -169,4 +169,4 @@ export {
169
169
  removeStatusLine,
170
170
  inspectStatusLine
171
171
  };
172
- //# sourceMappingURL=chunk-WUU3BH6G.js.map
172
+ //# sourceMappingURL=chunk-LN2HISWU.js.map
@@ -1,4 +1,9 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
+ import {
3
+ HashMD,
4
+ secp256k1,
5
+ sha256
6
+ } from "./chunk-JRGFKVAZ.js";
2
7
  import {
3
8
  BaseError,
4
9
  BytesSizeMismatchError,
@@ -40,11 +45,6 @@ import {
40
45
  import {
41
46
  keccak_256
42
47
  } from "./chunk-KG3D7FIF.js";
43
- import {
44
- HashMD,
45
- secp256k1,
46
- sha256
47
- } from "./chunk-JRGFKVAZ.js";
48
48
  import {
49
49
  clean,
50
50
  createHasher,
@@ -1182,4 +1182,4 @@ export {
1182
1182
  ripemd1602 as ripemd160,
1183
1183
  keccak2562 as keccak256
1184
1184
  };
1185
- //# sourceMappingURL=chunk-6DCELMQA.js.map
1185
+ //# sourceMappingURL=chunk-N35E6CM2.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-TGLKKLQG.js";
6
6
  import {
7
7
  paint
8
- } from "./chunk-ZTFIQC4C.js";
8
+ } from "./chunk-72UHZRG6.js";
9
9
  import {
10
10
  RETIRED_SKILL_NAMES,
11
11
  onPath,
@@ -13,22 +13,22 @@ import {
13
13
  readSkillFile,
14
14
  skillFrontmatterName,
15
15
  skillsDirsFor
16
- } from "./chunk-AMG4SONW.js";
16
+ } from "./chunk-2E6GVIRP.js";
17
17
  import {
18
18
  hasCode
19
19
  } from "./chunk-2I4QTOLB.js";
20
20
  import {
21
21
  resolveContextSettings
22
- } from "./chunk-5DOHKQ24.js";
22
+ } from "./chunk-5KD5HRAJ.js";
23
23
  import {
24
24
  toMoney
25
25
  } from "./chunk-O2JYBOUO.js";
26
26
  import {
27
27
  loadRawConfig
28
- } from "./chunk-UNV4K45L.js";
28
+ } from "./chunk-CCDOV45D.js";
29
29
  import {
30
30
  ensureStatusLine
31
- } from "./chunk-WUU3BH6G.js";
31
+ } from "./chunk-LN2HISWU.js";
32
32
  import {
33
33
  appendAllowlistRules,
34
34
  claudeAdapter,
@@ -36,7 +36,7 @@ import {
36
36
  inspectHooksFile,
37
37
  ownsHookEntry,
38
38
  writeHooks
39
- } from "./chunk-ZDKEU2GF.js";
39
+ } from "./chunk-5FYKPQNX.js";
40
40
  import {
41
41
  CliError
42
42
  } from "./chunk-JLEF5WHM.js";
@@ -221,7 +221,7 @@ async function runRouterInstall(args, ctx, deps = {}) {
221
221
  ]
222
222
  };
223
223
  }
224
- const { resolveWallet } = await import("./install-wallet-EYHELQMG.js");
224
+ const { resolveWallet } = await import("./install-wallet-XMVUBCHS.js");
225
225
  const wallet = await resolveWallet(ctx, deps, args.noWallet === true ? "flag" : void 0, false);
226
226
  const effective = await resolveContextSettings(ctx);
227
227
  const data = {
@@ -444,4 +444,4 @@ export {
444
444
  readMcpEntry,
445
445
  statusLineProblems
446
446
  };
447
- //# sourceMappingURL=chunk-FHBGTOFA.js.map
447
+ //# sourceMappingURL=chunk-NSG5TVZQ.js.map
@@ -3,7 +3,7 @@ import { createRequire as __tenjinCreateRequire } from 'node:module'; const requ
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "tenjin-cli",
6
- version: "0.1.0-alpha.19",
6
+ version: "0.1.0-alpha.20",
7
7
  mcpName: "blog.tenjin/tenjin",
8
8
  type: "module",
9
9
  description: "x402 router for coding agents: one paid decision per lookup, a local wallet that pays each provider per call in USDC on Base.",
@@ -80,4 +80,4 @@ var package_default = {
80
80
  export {
81
81
  package_default
82
82
  };
83
- //# sourceMappingURL=chunk-PZQRSZJV.js.map
83
+ //# sourceMappingURL=chunk-P42QX3QF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"tenjin-cli\",\n \"version\": \"0.1.0-alpha.19\",\n \"mcpName\": \"blog.tenjin/tenjin\",\n \"type\": \"module\",\n \"description\": \"x402 router for coding agents: one paid decision per lookup, a local wallet that pays each provider per call in USDC on Base.\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/BackTrackCo/tenjin-agent.git\"\n },\n \"homepage\": \"https://tenjin.blog/agents\",\n \"bugs\": \"https://github.com/BackTrackCo/tenjin-agent/issues\",\n \"keywords\": [\n \"x402\",\n \"usdc\",\n \"base\",\n \"ai-agents\",\n \"agent-payments\",\n \"mcp\",\n \"knowledge-marketplace\",\n \"micropayments\",\n \"claude\",\n \"codex\",\n \"cli\"\n ],\n \"bin\": {\n \"tenjin\": \"dist/index.js\"\n },\n \"engines\": {\n \"node\": \">=24\"\n },\n \"files\": [\n \"dist\",\n \"docs\",\n \"NOTICE.md\"\n ],\n \"packageManager\": \"pnpm@11.11.0\",\n \"scripts\": {\n \"build\": \"rm -rf dist && tsup\",\n \"test\": \"vitest run\",\n \"typecheck\": \"tsc --noEmit\",\n \"lint\": \"eslint .\",\n \"format\": \"prettier --write .\",\n \"format:check\": \"prettier --check .\",\n \"check\": \"pnpm run build && pnpm run test\",\n \"sync:skill\": \"node scripts/sync-skill.mjs\",\n \"pack-smoke\": \"bash scripts/pack-smoke.sh\",\n \"changeset\": \"changeset\",\n \"prepublishOnly\": \"pnpm run build\",\n \"githooks\": \"git config core.hooksPath .githooks\"\n },\n \"devDependencies\": {\n \"@changesets/cli\": \"^2.31.1\",\n \"@clack/prompts\": \"^1.7.0\",\n \"@eslint/js\": \"^10\",\n \"@modelcontextprotocol/sdk\": \"1.29.0\",\n \"@types/node\": \"^25\",\n \"@x402/core\": \"2.17.0\",\n \"@x402/evm\": \"2.17.0\",\n \"@x402/extensions\": \"2.17.0\",\n \"ajv\": \"^8.20.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^14.0.1\",\n \"eslint\": \"^10\",\n \"eslint-config-prettier\": \"^10\",\n \"ox\": \"0.14.30\",\n \"prettier\": \"^3\",\n \"tsup\": \"^8.5.0\",\n \"typescript\": \"^6\",\n \"typescript-eslint\": \"^8\",\n \"viem\": \"^2.53.1\",\n \"vitest\": \"^4.1.9\",\n \"zod\": \"^4.4.3\"\n }\n}\n"],"mappings":";;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,aAAe;AAAA,EACf,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,EACR,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,KAAO;AAAA,IACL,QAAU;AAAA,EACZ;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,gBAAkB;AAAA,EAClB,SAAW;AAAA,IACT,OAAS;AAAA,IACT,MAAQ;AAAA,IACR,WAAa;AAAA,IACb,MAAQ;AAAA,IACR,QAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,OAAS;AAAA,IACT,cAAc;AAAA,IACd,cAAc;AAAA,IACd,WAAa;AAAA,IACb,gBAAkB;AAAA,IAClB,UAAY;AAAA,EACd;AAAA,EACA,iBAAmB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,cAAc;AAAA,IACd,6BAA6B;AAAA,IAC7B,eAAe;AAAA,IACf,cAAc;AAAA,IACd,aAAa;AAAA,IACb,oBAAoB;AAAA,IACpB,KAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAa;AAAA,IACb,QAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B,IAAM;AAAA,IACN,UAAY;AAAA,IACZ,MAAQ;AAAA,IACR,YAAc;AAAA,IACd,qBAAqB;AAAA,IACrB,MAAQ;AAAA,IACR,QAAU;AAAA,IACV,KAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"tenjin-cli\",\n \"version\": \"0.1.0-alpha.20\",\n \"mcpName\": \"blog.tenjin/tenjin\",\n \"type\": \"module\",\n \"description\": \"x402 router for coding agents: one paid decision per lookup, a local wallet that pays each provider per call in USDC on Base.\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/BackTrackCo/tenjin-agent.git\"\n },\n \"homepage\": \"https://tenjin.blog/agents\",\n \"bugs\": \"https://github.com/BackTrackCo/tenjin-agent/issues\",\n \"keywords\": [\n \"x402\",\n \"usdc\",\n \"base\",\n \"ai-agents\",\n \"agent-payments\",\n \"mcp\",\n \"knowledge-marketplace\",\n \"micropayments\",\n \"claude\",\n \"codex\",\n \"cli\"\n ],\n \"bin\": {\n \"tenjin\": \"dist/index.js\"\n },\n \"engines\": {\n \"node\": \">=24\"\n },\n \"files\": [\n \"dist\",\n \"docs\",\n \"NOTICE.md\"\n ],\n \"packageManager\": \"pnpm@11.11.0\",\n \"scripts\": {\n \"build\": \"rm -rf dist && tsup\",\n \"test\": \"vitest run\",\n \"typecheck\": \"tsc --noEmit\",\n \"lint\": \"eslint .\",\n \"format\": \"prettier --write .\",\n \"format:check\": \"prettier --check .\",\n \"check\": \"pnpm run build && pnpm run test\",\n \"sync:skill\": \"node scripts/sync-skill.mjs\",\n \"pack-smoke\": \"bash scripts/pack-smoke.sh\",\n \"changeset\": \"changeset\",\n \"prepublishOnly\": \"pnpm run build\",\n \"githooks\": \"git config core.hooksPath .githooks\"\n },\n \"devDependencies\": {\n \"@changesets/cli\": \"^2.31.1\",\n \"@clack/prompts\": \"^1.7.0\",\n \"@eslint/js\": \"^10\",\n \"@modelcontextprotocol/sdk\": \"1.29.0\",\n \"@types/node\": \"^25\",\n \"@x402/core\": \"2.17.0\",\n \"@x402/evm\": \"2.17.0\",\n \"@x402/extensions\": \"2.17.0\",\n \"ajv\": \"^8.20.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^14.0.1\",\n \"eslint\": \"^10\",\n \"eslint-config-prettier\": \"^10\",\n \"ox\": \"0.14.30\",\n \"prettier\": \"^3\",\n \"tsup\": \"^8.5.0\",\n \"typescript\": \"^6\",\n \"typescript-eslint\": \"^8\",\n \"viem\": \"^2.53.1\",\n \"vitest\": \"^4.1.9\",\n \"zod\": \"^4.4.3\"\n }\n}\n"],"mappings":";;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,aAAe;AAAA,EACf,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,EACR,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,KAAO;AAAA,IACL,QAAU;AAAA,EACZ;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,gBAAkB;AAAA,EAClB,SAAW;AAAA,IACT,OAAS;AAAA,IACT,MAAQ;AAAA,IACR,WAAa;AAAA,IACb,MAAQ;AAAA,IACR,QAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,OAAS;AAAA,IACT,cAAc;AAAA,IACd,cAAc;AAAA,IACd,WAAa;AAAA,IACb,gBAAkB;AAAA,IAClB,UAAY;AAAA,EACd;AAAA,EACA,iBAAmB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,cAAc;AAAA,IACd,6BAA6B;AAAA,IAC7B,eAAe;AAAA,IACf,cAAc;AAAA,IACd,aAAa;AAAA,IACb,oBAAoB;AAAA,IACpB,KAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAa;AAAA,IACb,QAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B,IAAM;AAAA,IACN,UAAY;AAAA,IACZ,MAAQ;AAAA,IACR,YAAc;AAAA,IACd,qBAAqB;AAAA,IACrB,MAAQ;AAAA,IACR,QAAU;AAAA,IACV,KAAO;AAAA,EACT;AACF;","names":[]}
@@ -16,11 +16,7 @@ import {
16
16
  http,
17
17
  x402HTTPClient,
18
18
  x402Version
19
- } from "./chunk-KTAW4KGH.js";
20
- import {
21
- fetchFailureToCliError,
22
- httpRequest
23
- } from "./chunk-2SQEFBAM.js";
19
+ } from "./chunk-RGVOODF4.js";
24
20
  import {
25
21
  encodeFunctionData,
26
22
  getAddress as getAddress2,
@@ -34,7 +30,7 @@ import {
34
30
  } from "./chunk-LHHMV4GU.js";
35
31
  import {
36
32
  USDC_ADDRESS
37
- } from "./chunk-A6CY6BUW.js";
33
+ } from "./chunk-BTX2QE2Y.js";
38
34
  import {
39
35
  readUsdcBalance
40
36
  } from "./chunk-3KKKB2AQ.js";
@@ -42,19 +38,23 @@ import {
42
38
  describeWallet,
43
39
  resolveSpendAuthorizer,
44
40
  resolveWalletProvider
45
- } from "./chunk-XDADPAWW.js";
41
+ } from "./chunk-YEBNE5NW.js";
46
42
  import {
47
43
  getAddress
48
44
  } from "./chunk-EGELTSPU.js";
49
45
  import {
50
46
  sanitizeForTerminal
51
- } from "./chunk-ZTFIQC4C.js";
47
+ } from "./chunk-72UHZRG6.js";
52
48
  import {
53
49
  mask
54
50
  } from "./chunk-7QKHZQKW.js";
51
+ import {
52
+ fetchFailureToCliError,
53
+ httpRequest
54
+ } from "./chunk-3BS55ANY.js";
55
55
  import {
56
56
  resolveContextSettings
57
- } from "./chunk-5DOHKQ24.js";
57
+ } from "./chunk-5KD5HRAJ.js";
58
58
  import {
59
59
  parseUsdToAtomic,
60
60
  toMoney
@@ -62,7 +62,7 @@ import {
62
62
  import {
63
63
  external_exports,
64
64
  isSameDeployment
65
- } from "./chunk-UNV4K45L.js";
65
+ } from "./chunk-CCDOV45D.js";
66
66
  import {
67
67
  CliError
68
68
  } from "./chunk-JLEF5WHM.js";
@@ -3141,12 +3141,13 @@ var require_data = __commonJS({
3141
3141
  }
3142
3142
  });
3143
3143
 
3144
- // node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/utils.js
3144
+ // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js
3145
3145
  var require_utils = __commonJS({
3146
- "node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/utils.js"(exports, module) {
3146
+ "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js"(exports, module) {
3147
3147
  "use strict";
3148
3148
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3149
3149
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
3150
+ var isPort = RegExp.prototype.test.bind(/^\d*$/u);
3150
3151
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3151
3152
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3152
3153
  var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
@@ -3612,8 +3613,12 @@ var require_utils = __commonJS({
3612
3613
  uriTokens.push(host);
3613
3614
  }
3614
3615
  if (typeof component.port === "number" || typeof component.port === "string") {
3616
+ const port = String(component.port);
3617
+ if (!isPort(port)) {
3618
+ throw new TypeError("URI port is malformed.");
3619
+ }
3615
3620
  uriTokens.push(":");
3616
- uriTokens.push(String(component.port));
3621
+ uriTokens.push(port);
3617
3622
  }
3618
3623
  return uriTokens.length ? uriTokens.join("") : void 0;
3619
3624
  }
@@ -3638,9 +3643,9 @@ var require_utils = __commonJS({
3638
3643
  }
3639
3644
  });
3640
3645
 
3641
- // node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/schemes.js
3646
+ // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js
3642
3647
  var require_schemes = __commonJS({
3643
- "node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3648
+ "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3644
3649
  "use strict";
3645
3650
  var { isUUID } = require_utils();
3646
3651
  var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
@@ -3849,9 +3854,9 @@ var require_schemes = __commonJS({
3849
3854
  }
3850
3855
  });
3851
3856
 
3852
- // node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/index.js
3857
+ // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js
3853
3858
  var require_fast_uri = __commonJS({
3854
- "node_modules/.pnpm/fast-uri@3.1.6/node_modules/fast-uri/index.js"(exports, module) {
3859
+ "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js"(exports, module) {
3855
3860
  "use strict";
3856
3861
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3857
3862
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -4056,12 +4061,15 @@ var require_fast_uri = __commonJS({
4056
4061
  }
4057
4062
  return false;
4058
4063
  }
4064
+ function isIPLiteral(host) {
4065
+ return host[0] === "[" && host[host.length - 1] === "]";
4066
+ }
4059
4067
  function hasMalformedComponentPercentEncoding(matches) {
4060
4068
  const host = matches[4];
4061
- return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !(host[0] === "[" && host[host.length - 1] === "]") && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
4069
+ return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
4062
4070
  }
4063
4071
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
4064
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && parsed.host[0] !== "[" && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
4072
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
4065
4073
  try {
4066
4074
  parsed.host = new URL("http://" + parsed.host).hostname;
4067
4075
  } catch (e) {
@@ -4148,10 +4156,11 @@ var require_fast_uri = __commonJS({
4148
4156
  if (parsed.host) {
4149
4157
  const ipv4result = isIPv4(parsed.host);
4150
4158
  if (ipv4result === false) {
4151
- const bracketedIPLiteral = parsed.host[0] === "[" && parsed.host[parsed.host.length - 1] === "]";
4159
+ const bracketedIPLiteral = isIPLiteral(parsed.host);
4160
+ const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
4152
4161
  const ipv6result = normalizeIPv6(parsed.host);
4153
4162
  isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
4154
- malformedIPLiteral = bracketedIPLiteral && ipv6result.error === true;
4163
+ malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
4155
4164
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
4156
4165
  if (malformedIPLiteral) {
4157
4166
  parsed.error = parsed.error || "URI host is malformed.";
@@ -4174,14 +4183,17 @@ var require_fast_uri = __commonJS({
4174
4183
  parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
4175
4184
  }
4176
4185
  const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
4177
- malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
4178
- if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
4179
- if (uri.indexOf("%") !== -1) {
4180
- if (parsed.host !== void 0 && !malformedIPLiteral) {
4181
- const host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
4182
- parsed.host = reescapeHostDelimiters(host, isIP);
4183
- }
4186
+ if (!malformedIPLiteral) {
4187
+ malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
4188
+ }
4189
+ if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
4190
+ let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
4191
+ if (!isIP) {
4192
+ host = normalizePercentEncoding(host.toLowerCase());
4184
4193
  }
4194
+ parsed.host = reescapeHostDelimiters(host, isIP);
4195
+ }
4196
+ if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
4185
4197
  if (parsed.path) {
4186
4198
  parsed.path = normalizePathEncoding(parsed.path);
4187
4199
  }
@@ -10020,7 +10032,7 @@ async function executePay(args, ctx, deps, warnings) {
10020
10032
  `${url} answered ${probe.status}${said === null ? "." : `: ${said}`}`,
10021
10033
  {
10022
10034
  fix: probe.status === 404 ? "Nothing was paid. The same request will answer 404 again." : "Check the URL and the endpoint status, then retry.",
10023
- details: { status: probe.status, body: probe.json }
10035
+ details: { status: probe.status, body: probe.json, ...providerError(probe.text) }
10024
10036
  }
10025
10037
  );
10026
10038
  }
@@ -10084,7 +10096,7 @@ async function executePay(args, ctx, deps, warnings) {
10084
10096
  `${url} answered ${recheck.status} on the entitlement re-check.`,
10085
10097
  {
10086
10098
  fix: "Retry; if it persists the endpoint looks misconfigured.",
10087
- details: { status: recheck.status, body: recheck.json }
10099
+ details: { status: recheck.status, body: recheck.json, ...providerError(recheck.text) }
10088
10100
  }
10089
10101
  );
10090
10102
  }
@@ -10225,6 +10237,7 @@ async function executePay(args, ctx, deps, warnings) {
10225
10237
  details: {
10226
10238
  status: paid.status,
10227
10239
  body: paid.json,
10240
+ ...providerError(paid.text),
10228
10241
  amountAtomic: payment.amountAtomic.toString(),
10229
10242
  settlement: "unknown"
10230
10243
  }
@@ -10354,6 +10367,17 @@ function providerMessage(body) {
10354
10367
  const line = message.replace(/[\p{Cc}\p{Cf}]/gu, " ").replace(/\s+/g, " ").trim().slice(0, 300);
10355
10368
  return line.length > 0 ? line : null;
10356
10369
  }
10370
+ var PROVIDER_ERROR_CHARS = 500;
10371
+ function providerError(text) {
10372
+ const flat = sanitizeForTerminal(
10373
+ mask(text.slice(0, PROVIDER_ERROR_CHARS * 8)).replace(/\s+/g, " ")
10374
+ ).trim();
10375
+ if (flat.length === 0) return {};
10376
+ const chars = Array.from(flat);
10377
+ return {
10378
+ providerError: chars.length <= PROVIDER_ERROR_CHARS ? flat : `${chars.slice(0, PROVIDER_ERROR_CHARS).join("")}\u2026`
10379
+ };
10380
+ }
10357
10381
  function noMatchingEntry(challenge, terms) {
10358
10382
  if (terms === void 0 || terms.network === void 0 && terms.asset === void 0) {
10359
10383
  return noPayableRequirement(challenge.accepts);
@@ -10501,4 +10525,4 @@ export {
10501
10525
  MAX_PAID_LEG_TIMEOUT_MS,
10502
10526
  paidLegTimeoutMs
10503
10527
  };
10504
- //# sourceMappingURL=chunk-SCAOYGKX.js.map
10528
+ //# sourceMappingURL=chunk-PO4HAXAW.js.map