tenjin-cli 0.1.0-alpha.30 → 0.1.0-alpha.31
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.
- package/README.md +65 -116
- package/dist/{_esm-CE7KNONL.js → _esm-MEXZI5DL.js} +4 -4
- package/dist/{alive-3J3CHOQP.js → alive-J64H46HI.js} +14 -4
- package/dist/{chunk-O2FRQ2L2.js → chunk-27EPWVOY.js} +4 -64
- package/dist/chunk-27EPWVOY.js.map +1 -0
- package/dist/{chunk-OSYTBCUC.js → chunk-2XLC3AEX.js} +16 -14
- package/dist/{chunk-OSYTBCUC.js.map → chunk-2XLC3AEX.js.map} +1 -1
- package/dist/chunk-3623BLPV.js +184 -0
- package/dist/chunk-3623BLPV.js.map +1 -0
- package/dist/chunk-3UCIG4TG.js +65 -0
- package/dist/chunk-3UCIG4TG.js.map +1 -0
- package/dist/{chunk-PAYV4XUA.js → chunk-4ZZO6ULA.js} +2 -2
- package/dist/{chunk-VUFAK2LW.js → chunk-5C32RLTA.js} +2 -2
- package/dist/{chunk-VUFAK2LW.js.map → chunk-5C32RLTA.js.map} +1 -1
- package/dist/{chunk-YHKXNYTB.js → chunk-5K5W4S66.js} +2 -2
- package/dist/{chunk-3O2BQIF6.js → chunk-5MARFNSB.js} +273 -482
- package/dist/chunk-5MARFNSB.js.map +1 -0
- package/dist/{chunk-HPWO4O6S.js → chunk-6E5R45ZO.js} +2 -2
- package/dist/{chunk-JMM6YE7J.js → chunk-77TCKDEC.js} +125 -312
- package/dist/chunk-77TCKDEC.js.map +1 -0
- package/dist/{chunk-LFZJM56J.js → chunk-7Q5FDF65.js} +2 -2
- package/dist/chunk-7WEQQJLG.js +68 -0
- package/dist/chunk-7WEQQJLG.js.map +1 -0
- package/dist/{chunk-AWFUPKTM.js → chunk-7WU4OPLP.js} +12 -6
- package/dist/{chunk-AWFUPKTM.js.map → chunk-7WU4OPLP.js.map} +1 -1
- package/dist/{chunk-AEG2PXBP.js → chunk-7ZRL2LBQ.js} +3 -3
- package/dist/{chunk-IOODYAXL.js → chunk-AGZ7PJKY.js} +6 -4
- package/dist/{chunk-IOODYAXL.js.map → chunk-AGZ7PJKY.js.map} +1 -1
- package/dist/{chunk-VFMQTSXG.js → chunk-B7HUUJOK.js} +3 -3
- package/dist/{chunk-EL56RW2J.js → chunk-BL3332HQ.js} +7 -7
- package/dist/{chunk-5LJCEMFD.js → chunk-D65GNPS3.js} +35 -27
- package/dist/{chunk-5LJCEMFD.js.map → chunk-D65GNPS3.js.map} +1 -1
- package/dist/{chunk-P7LABKCW.js → chunk-DOQGNFHM.js} +33 -2
- package/dist/{chunk-P7LABKCW.js.map → chunk-DOQGNFHM.js.map} +1 -1
- package/dist/{chunk-OK2TDZQU.js → chunk-FW75G2W4.js} +7 -5
- package/dist/chunk-FW75G2W4.js.map +1 -0
- package/dist/chunk-GA7JETVM.js +150 -0
- package/dist/chunk-GA7JETVM.js.map +1 -0
- package/dist/{chunk-6W5GYG3W.js → chunk-I3EQFHCD.js} +48 -1
- package/dist/chunk-I3EQFHCD.js.map +1 -0
- package/dist/{chunk-EBVIKMCH.js → chunk-JKKAIPTU.js} +2 -2
- package/dist/{chunk-N35E6CM2.js → chunk-K3I7C2MO.js} +6 -6
- package/dist/{chunk-KYFZTGMC.js → chunk-K72RURN3.js} +5 -3
- package/dist/{chunk-KYFZTGMC.js.map → chunk-K72RURN3.js.map} +1 -1
- package/dist/{chunk-RAULEAZ6.js → chunk-KXQ4UIP7.js} +3 -3
- package/dist/{chunk-VZGAONSJ.js → chunk-KXVP2VKA.js} +5 -5
- package/dist/chunk-LEFIX6RS.js +100 -0
- package/dist/chunk-LEFIX6RS.js.map +1 -0
- package/dist/{chunk-TTBKWWTV.js → chunk-MNXS2U45.js} +246 -83
- package/dist/chunk-MNXS2U45.js.map +1 -0
- package/dist/{chunk-AWQPGIR6.js → chunk-NEFNKLBE.js} +5 -5
- package/dist/chunk-OHRR5OYM.js +63 -0
- package/dist/chunk-OHRR5OYM.js.map +1 -0
- package/dist/{chunk-U6YQ6FRI.js → chunk-P4NH7OUK.js} +31 -11
- package/dist/chunk-P4NH7OUK.js.map +1 -0
- package/dist/chunk-QSCPK4F5.js +145 -0
- package/dist/chunk-QSCPK4F5.js.map +1 -0
- package/dist/chunk-QXP3Z3JN.js +131 -0
- package/dist/chunk-QXP3Z3JN.js.map +1 -0
- package/dist/{chunk-YFQOA5AU.js → chunk-R5LCN54M.js} +4 -4
- package/dist/{chunk-KHE6L6TD.js → chunk-UKY4CHNC.js} +92 -10
- package/dist/chunk-UKY4CHNC.js.map +1 -0
- package/dist/{chunk-QUVVWYJW.js → chunk-UQUOVWBG.js} +8 -6
- package/dist/{chunk-QUVVWYJW.js.map → chunk-UQUOVWBG.js.map} +1 -1
- package/dist/{chunk-HE2MS4QO.js → chunk-V6BSF6OC.js} +17 -13
- package/dist/{chunk-HE2MS4QO.js.map → chunk-V6BSF6OC.js.map} +1 -1
- package/dist/{chunk-WVUSXNIE.js → chunk-WJXLQXJY.js} +6 -2
- package/dist/{chunk-WVUSXNIE.js.map → chunk-WJXLQXJY.js.map} +1 -1
- package/dist/{chunk-NZIP4PA2.js → chunk-WK7F3B2E.js} +2 -2
- package/dist/chunk-XQJXNMSB.js +23 -0
- package/dist/chunk-XQJXNMSB.js.map +1 -0
- package/dist/chunk-Y527D4TV.js +56 -0
- package/dist/chunk-Y527D4TV.js.map +1 -0
- package/dist/{chunk-SPAVAYSW.js → chunk-YFPY4ONH.js} +6 -4
- package/dist/{chunk-SPAVAYSW.js.map → chunk-YFPY4ONH.js.map} +1 -1
- package/dist/{chunk-WO5BJNIB.js → chunk-YVFXE7RR.js} +9 -129
- package/dist/chunk-YVFXE7RR.js.map +1 -0
- package/dist/clack-EZ7TDWQU.js +19 -0
- package/dist/claude-cli-2YKABJJZ.js +31 -0
- package/dist/{cli-O5SN7ZJ4.js → cli-D5OE3URZ.js} +128 -56
- package/dist/{cli-O5SN7ZJ4.js.map → cli-D5OE3URZ.js.map} +1 -1
- package/dist/codex-event-PPNVRRDH.js +16 -0
- package/dist/codex-host-2RJOJW2B.js +28 -0
- package/dist/codex-install-UUZ6QMBQ.js +221 -0
- package/dist/codex-install-UUZ6QMBQ.js.map +1 -0
- package/dist/{config-OJQI27LT.js → config-ZD4OB2DO.js} +18 -12
- package/dist/{doctor-IQQJHGGM.js → doctor-KBR34Q4B.js} +48 -37
- package/dist/doctor-KBR34Q4B.js.map +1 -0
- package/dist/{fund-WEV6DMTD.js → fund-5ITKQGYF.js} +38 -31
- package/dist/{fund-WEV6DMTD.js.map → fund-5ITKQGYF.js.map} +1 -1
- package/dist/hook-command-4TYCHHRL.js +39 -0
- package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +3 -2
- package/dist/hosts/claude/tenjin/hooks/hooks.json +4 -1
- package/dist/hosts/claude/tenjin/hooks/register.tsx +589 -0
- package/dist/hosts/claude/tenjin/types/index.d.ts +41 -0
- package/dist/hosts/codex/.agents/plugins/marketplace.json +20 -0
- package/dist/hosts/codex/tenjin/.codex-plugin/plugin.json +16 -0
- package/dist/hosts/codex/tenjin/.mcp.json +12 -0
- package/dist/hosts/codex/tenjin/hooks/hooks.json +52 -0
- package/dist/hosts-FWZOV26H.js +216 -0
- package/dist/hosts-FWZOV26H.js.map +1 -0
- package/dist/index.js +5 -5
- package/dist/{install-TUCRF32I.js → install-XWGE4Q7L.js} +38 -21
- package/dist/{install-identity-WHPNMNMQ.js → install-identity-K7EJIQFP.js} +11 -7
- package/dist/{install-wallet-MA27FTQ5.js → install-wallet-XQ6XFZV4.js} +27 -23
- package/dist/{install-wallet-MA27FTQ5.js.map → install-wallet-XQ6XFZV4.js.map} +1 -1
- package/dist/{mcp-QML7ZMPH.js → mcp-3LIJSSJB.js} +184 -58
- package/dist/mcp-3LIJSSJB.js.map +1 -0
- package/dist/{package-LGKYOEPV.js → package-ZKQFDWLE.js} +2 -2
- package/dist/{pay-2C2UBBXJ.js → pay-WHBERZ3W.js} +27 -23
- package/dist/{payments-C44QUFXU.js → payments-KVICEKD2.js} +14 -10
- package/dist/{payments-C44QUFXU.js.map → payments-KVICEKD2.js.map} +1 -1
- package/dist/plugin-registration-5TIA564H.js +54 -0
- package/dist/plugin-registration-5TIA564H.js.map +1 -0
- package/dist/{send-KVJX4XIR.js → send-7G7Y7DLN.js} +25 -19
- package/dist/{send-KVJX4XIR.js.map → send-7G7Y7DLN.js.map} +1 -1
- package/dist/{status-S7C3WMSH.js → status-OF7RH5HM.js} +26 -21
- package/dist/{status-S7C3WMSH.js.map → status-OF7RH5HM.js.map} +1 -1
- package/dist/{status-line-YR2T5HC4.js → status-line-XOUE6MPL.js} +10 -6
- package/dist/{status-line-YR2T5HC4.js.map → status-line-XOUE6MPL.js.map} +1 -1
- package/dist/{uninstall-HY6LKIIT.js → uninstall-JXUAFNDB.js} +30 -21
- package/dist/{uninstall-HY6LKIIT.js.map → uninstall-JXUAFNDB.js.map} +1 -1
- package/dist/update-ZKUERSO2.js +44 -0
- package/dist/update-ZKUERSO2.js.map +1 -0
- package/dist/{usdc-JK4RRFFQ.js → usdc-OGOGEHV2.js} +7 -6
- package/dist/usdc-OGOGEHV2.js.map +1 -0
- package/dist/{viemAdapter-By13KInL-X2VY6CY3.js → viemAdapter-By13KInL-S3DA7DFW.js} +2 -2
- package/dist/viemAdapter-By13KInL-S3DA7DFW.js.map +1 -0
- package/dist/{wallet-PD2IMZDU.js → wallet-2HA6W4R4.js} +24 -20
- package/dist/wallet-2HA6W4R4.js.map +1 -0
- package/docs/agent-permissions.md +21 -5
- package/package.json +1 -1
- package/dist/chunk-3O2BQIF6.js.map +0 -1
- package/dist/chunk-6W5GYG3W.js.map +0 -1
- package/dist/chunk-JMM6YE7J.js.map +0 -1
- package/dist/chunk-KHE6L6TD.js.map +0 -1
- package/dist/chunk-O2FRQ2L2.js.map +0 -1
- package/dist/chunk-OK2TDZQU.js.map +0 -1
- package/dist/chunk-TTBKWWTV.js.map +0 -1
- package/dist/chunk-U6YQ6FRI.js.map +0 -1
- package/dist/chunk-WO5BJNIB.js.map +0 -1
- package/dist/doctor-IQQJHGGM.js.map +0 -1
- package/dist/hook-command-D2P3ILRV.js +0 -32
- package/dist/mcp-QML7ZMPH.js.map +0 -1
- package/dist/update-OJV22LR3.js +0 -36
- /package/dist/{_esm-CE7KNONL.js.map → _esm-MEXZI5DL.js.map} +0 -0
- /package/dist/{alive-3J3CHOQP.js.map → alive-J64H46HI.js.map} +0 -0
- /package/dist/{chunk-PAYV4XUA.js.map → chunk-4ZZO6ULA.js.map} +0 -0
- /package/dist/{chunk-YHKXNYTB.js.map → chunk-5K5W4S66.js.map} +0 -0
- /package/dist/{chunk-HPWO4O6S.js.map → chunk-6E5R45ZO.js.map} +0 -0
- /package/dist/{chunk-LFZJM56J.js.map → chunk-7Q5FDF65.js.map} +0 -0
- /package/dist/{chunk-AEG2PXBP.js.map → chunk-7ZRL2LBQ.js.map} +0 -0
- /package/dist/{chunk-VFMQTSXG.js.map → chunk-B7HUUJOK.js.map} +0 -0
- /package/dist/{chunk-EL56RW2J.js.map → chunk-BL3332HQ.js.map} +0 -0
- /package/dist/{chunk-EBVIKMCH.js.map → chunk-JKKAIPTU.js.map} +0 -0
- /package/dist/{chunk-N35E6CM2.js.map → chunk-K3I7C2MO.js.map} +0 -0
- /package/dist/{chunk-RAULEAZ6.js.map → chunk-KXQ4UIP7.js.map} +0 -0
- /package/dist/{chunk-VZGAONSJ.js.map → chunk-KXVP2VKA.js.map} +0 -0
- /package/dist/{chunk-AWQPGIR6.js.map → chunk-NEFNKLBE.js.map} +0 -0
- /package/dist/{chunk-YFQOA5AU.js.map → chunk-R5LCN54M.js.map} +0 -0
- /package/dist/{chunk-NZIP4PA2.js.map → chunk-WK7F3B2E.js.map} +0 -0
- /package/dist/{config-OJQI27LT.js.map → clack-EZ7TDWQU.js.map} +0 -0
- /package/dist/{hook-command-D2P3ILRV.js.map → claude-cli-2YKABJJZ.js.map} +0 -0
- /package/dist/{install-TUCRF32I.js.map → codex-event-PPNVRRDH.js.map} +0 -0
- /package/dist/{install-identity-WHPNMNMQ.js.map → codex-host-2RJOJW2B.js.map} +0 -0
- /package/dist/{package-LGKYOEPV.js.map → config-ZD4OB2DO.js.map} +0 -0
- /package/dist/{pay-2C2UBBXJ.js.map → hook-command-4TYCHHRL.js.map} +0 -0
- /package/dist/{update-OJV22LR3.js.map → install-XWGE4Q7L.js.map} +0 -0
- /package/dist/{usdc-JK4RRFFQ.js.map → install-identity-K7EJIQFP.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-X2VY6CY3.js.map → package-ZKQFDWLE.js.map} +0 -0
- /package/dist/{wallet-PD2IMZDU.js.map → pay-WHBERZ3W.js.map} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
askText,
|
|
4
|
+
confirmChoice,
|
|
5
|
+
intro,
|
|
6
|
+
outro,
|
|
7
|
+
selectMany,
|
|
8
|
+
selectOne
|
|
9
|
+
} from "./chunk-DOQGNFHM.js";
|
|
10
|
+
import "./chunk-ZXTAQYNA.js";
|
|
11
|
+
export {
|
|
12
|
+
askText,
|
|
13
|
+
confirmChoice,
|
|
14
|
+
intro,
|
|
15
|
+
outro,
|
|
16
|
+
selectMany,
|
|
17
|
+
selectOne
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=clack-EZ7TDWQU.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
CLAUDE_CODE_FLOOR,
|
|
4
|
+
CLAUDE_UPDATE_FIX,
|
|
5
|
+
claudeConfigDir,
|
|
6
|
+
findClaudeBinary,
|
|
7
|
+
jsonList,
|
|
8
|
+
jsonResult,
|
|
9
|
+
meetsFloor,
|
|
10
|
+
parseClaudeVersion,
|
|
11
|
+
readClaudeCode,
|
|
12
|
+
runClaude,
|
|
13
|
+
userMcpFile,
|
|
14
|
+
userSettingsPath
|
|
15
|
+
} from "./chunk-QXP3Z3JN.js";
|
|
16
|
+
import "./chunk-ZXTAQYNA.js";
|
|
17
|
+
export {
|
|
18
|
+
CLAUDE_CODE_FLOOR,
|
|
19
|
+
CLAUDE_UPDATE_FIX,
|
|
20
|
+
claudeConfigDir,
|
|
21
|
+
findClaudeBinary,
|
|
22
|
+
jsonList,
|
|
23
|
+
jsonResult,
|
|
24
|
+
meetsFloor,
|
|
25
|
+
parseClaudeVersion,
|
|
26
|
+
readClaudeCode,
|
|
27
|
+
runClaude,
|
|
28
|
+
userMcpFile,
|
|
29
|
+
userSettingsPath
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=claude-cli-2YKABJJZ.js.map
|
|
@@ -2,32 +2,40 @@ import { createRequire as __tenjinCreateRequire } from 'node:module'; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
maybeUpdate,
|
|
4
4
|
readUpdateSignal
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KXVP2VKA.js";
|
|
6
6
|
import {
|
|
7
7
|
PERMISSIONS_DOC_URL
|
|
8
8
|
} from "./chunk-A36LQPHV.js";
|
|
9
|
+
import {
|
|
10
|
+
HARNESSES
|
|
11
|
+
} from "./chunk-WJXLQXJY.js";
|
|
9
12
|
import {
|
|
10
13
|
defaultIo,
|
|
11
14
|
emitFailure,
|
|
12
15
|
emitSuccess
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-K72RURN3.js";
|
|
14
17
|
import {
|
|
15
18
|
noteBaseUrlFlag
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-UQUOVWBG.js";
|
|
20
|
+
import "./chunk-AGZ7PJKY.js";
|
|
18
21
|
import "./chunk-2I4QTOLB.js";
|
|
19
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-7WU4OPLP.js";
|
|
23
|
+
import "./chunk-Y527D4TV.js";
|
|
20
24
|
import {
|
|
21
|
-
CliError,
|
|
22
25
|
external_exports
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-YVFXE7RR.js";
|
|
27
|
+
import "./chunk-XQJXNMSB.js";
|
|
28
|
+
import {
|
|
29
|
+
CliError
|
|
30
|
+
} from "./chunk-3UCIG4TG.js";
|
|
31
|
+
import "./chunk-27EPWVOY.js";
|
|
32
|
+
import "./chunk-7WEQQJLG.js";
|
|
25
33
|
import {
|
|
26
34
|
dataDir
|
|
27
35
|
} from "./chunk-SJLTEINJ.js";
|
|
28
36
|
import {
|
|
29
37
|
package_default
|
|
30
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-5C32RLTA.js";
|
|
31
39
|
import {
|
|
32
40
|
__commonJS,
|
|
33
41
|
__require,
|
|
@@ -3492,9 +3500,9 @@ var INTEGRATION = "Integration:";
|
|
|
3492
3500
|
// src/cli/core.ts
|
|
3493
3501
|
function registerCore(reg) {
|
|
3494
3502
|
const { runCommand, leaf: leaf2, addGlobalFlags: addGlobalFlags2 } = reg;
|
|
3495
|
-
leaf2(SETUP, "install", "set up Tenjin for
|
|
3496
|
-
"Set up
|
|
3497
|
-
).option("--project", "register the plugin for this project only").option("--no-wallet", "create no wallet").option("--refresh", "bring the plugin this machine already has up to this version").option("--yes", "accept the defaults ($5 a day, $0.25 a call) instead of asking").option("--session-budget <usd|none>", "your own daily limit, or none, instead of asking").option("--max-auto-spend <usd>", "your own per-call limit, at least 0.25 (the default)").addHelpText(
|
|
3503
|
+
leaf2(SETUP, "install", "set up Tenjin for your agent and create a wallet").description(
|
|
3504
|
+
"Set up Tenjin for your agent: a wallet if this machine has none, spend limits for each lookup, and the Tenjin plugin (its routing hooks and its `router` MCP server), registered through the agent's own plugin commands. Run by an agent, it sets up the agent it runs in. In a terminal, it sets up Claude Code or Codex, whichever this machine has, and asks which when it has both. For Claude Code, a settings-based install from an earlier release is removed once the plugin has loaded. Codex is user scope only."
|
|
3505
|
+
).addOption(hostOverride()).option("--project", "register the plugin for this project only").option("--no-wallet", "create no wallet").option("--refresh", "bring the plugin this machine already has up to this version").option("--yes", "accept the defaults ($5 a day, $0.25 a call) instead of asking").option("--session-budget <usd|none>", "your own daily limit, or none, instead of asking").option("--max-auto-spend <usd>", "your own per-call limit, at least 0.25 (the default)").addHelpText(
|
|
3498
3506
|
"after",
|
|
3499
3507
|
`
|
|
3500
3508
|
Examples:
|
|
@@ -3513,32 +3521,62 @@ Learn more:
|
|
|
3513
3521
|
).action(async function() {
|
|
3514
3522
|
await runCommand("install", this, async (ctx) => {
|
|
3515
3523
|
const o = this.opts();
|
|
3516
|
-
const
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
}
|
|
3526
|
-
|
|
3527
|
-
);
|
|
3524
|
+
const harness = o.harness;
|
|
3525
|
+
if (harness === "codex" && o.refresh === true) {
|
|
3526
|
+
throw new CliError("USAGE", "The Codex plugin has no refresh; omit --refresh.");
|
|
3527
|
+
}
|
|
3528
|
+
const { installHosts, otherHostNote, recordInstalledHost, runEach, withNote } = await import("./hosts-FWZOV26H.js");
|
|
3529
|
+
const hostArgs = {
|
|
3530
|
+
...harness !== void 0 ? { harness } : {},
|
|
3531
|
+
...o.project === true ? { project: true } : {},
|
|
3532
|
+
...o.refresh === true ? { refresh: true } : {},
|
|
3533
|
+
...o.yes === true ? { yes: true } : {}
|
|
3534
|
+
};
|
|
3535
|
+
const hosts = await installHosts(hostArgs, ctx);
|
|
3536
|
+
const note = otherHostNote(hostArgs).catch(() => void 0);
|
|
3537
|
+
const out = await runEach(hosts, async (host) => {
|
|
3538
|
+
const one = host === "codex" ? await (await import("./codex-install-UUZ6QMBQ.js")).runCodexInstall(codexArgs(o), ctx) : await (await import("./install-XWGE4Q7L.js")).runRouterInstall(
|
|
3539
|
+
{
|
|
3540
|
+
...o.project === true ? { project: true } : {},
|
|
3541
|
+
...o.refresh === true ? { refresh: true } : {},
|
|
3542
|
+
...o.yes === true ? { yes: true } : {},
|
|
3543
|
+
...o.wallet === false ? { noWallet: true } : {},
|
|
3544
|
+
...typeof o.maxAutoSpend === "string" ? { maxAutoSpend: o.maxAutoSpend } : {},
|
|
3545
|
+
...typeof o.sessionBudget === "string" ? { sessionBudget: o.sessionBudget } : {}
|
|
3546
|
+
},
|
|
3547
|
+
ctx
|
|
3548
|
+
);
|
|
3549
|
+
if (o.refresh !== true) await recordInstalledHost(ctx.dataDir, host);
|
|
3550
|
+
return one;
|
|
3551
|
+
});
|
|
3552
|
+
return withNote(out, await note);
|
|
3528
3553
|
});
|
|
3529
3554
|
});
|
|
3530
3555
|
leaf2(SETUP, "uninstall", "remove what install wrote; the wallet is kept").description(
|
|
3531
|
-
"Remove the Tenjin plugin `tenjin install`
|
|
3532
|
-
).option("--project", "remove the project-only install").action(async function() {
|
|
3556
|
+
"Remove the Tenjin plugin from each agent `tenjin install` set up, and any settings-based install an earlier release wrote. For Codex it removes the plugin and its marketplace. Your wallet, spend ledger and config are kept."
|
|
3557
|
+
).addOption(hostOverride()).option("--project", "remove the project-only install").action(async function() {
|
|
3533
3558
|
await runCommand("uninstall", this, async (ctx) => {
|
|
3534
3559
|
const o = this.opts();
|
|
3535
|
-
const
|
|
3536
|
-
|
|
3560
|
+
const harness = o.harness;
|
|
3561
|
+
const { recordedHosts, uninstallEach } = await import("./hosts-FWZOV26H.js");
|
|
3562
|
+
const hosts = await recordedHosts(
|
|
3563
|
+
{ ...harness !== void 0 ? { harness } : {}, project: o.project === true },
|
|
3564
|
+
ctx.dataDir
|
|
3565
|
+
);
|
|
3566
|
+
return uninstallEach(
|
|
3567
|
+
hosts,
|
|
3568
|
+
ctx.dataDir,
|
|
3569
|
+
o.project === true,
|
|
3570
|
+
async (host) => host === "codex" ? (await import("./codex-install-UUZ6QMBQ.js")).runCodexUninstall(codexArgs(o), ctx) : (await import("./uninstall-JXUAFNDB.js")).runRouterUninstall(
|
|
3571
|
+
{ ...o.project === true ? { project: true } : {} },
|
|
3572
|
+
ctx
|
|
3573
|
+
)
|
|
3574
|
+
);
|
|
3537
3575
|
});
|
|
3538
3576
|
});
|
|
3539
3577
|
leaf2(SETUP, "doctor", "check this machine can run a lookup").description(
|
|
3540
|
-
"Check everything a lookup needs: the Node floor, Claude Code's version, the Tenjin plugin and its router server, any settings install an earlier release left, the spend limits, the wallet, and the router endpoint answering its 402. It prints one line per check with a fix for each failure, writes nothing, and exits nonzero if a required one fails."
|
|
3541
|
-
).option("--project", "check the project-only install, as --project registered it").addHelpText(
|
|
3578
|
+
"Check everything a lookup needs, for each agent `tenjin install` set up. For Claude Code: the Node floor, Claude Code's version, the Tenjin plugin and its router server, any settings install an earlier release left, the spend limits, the wallet, and the router endpoint answering its 402. For Codex: Codex's hook list for the plugin and its hook trust. It prints one line per check with a fix for each failure, writes nothing, and exits nonzero if a required one fails."
|
|
3579
|
+
).addOption(hostOverride()).option("--project", "check the project-only install, as --project registered it").addHelpText(
|
|
3542
3580
|
"after",
|
|
3543
3581
|
`
|
|
3544
3582
|
Examples:
|
|
@@ -3548,15 +3586,27 @@ Examples:
|
|
|
3548
3586
|
`
|
|
3549
3587
|
).action(async function() {
|
|
3550
3588
|
await runCommand("doctor", this, async (ctx) => {
|
|
3551
|
-
const
|
|
3552
|
-
|
|
3589
|
+
const o = this.opts();
|
|
3590
|
+
const harness = o.harness;
|
|
3591
|
+
const { checkEach, recordedHosts } = await import("./hosts-FWZOV26H.js");
|
|
3592
|
+
const hosts = await recordedHosts(
|
|
3593
|
+
{ ...harness !== void 0 ? { harness } : {}, project: o.project === true },
|
|
3594
|
+
ctx.dataDir
|
|
3595
|
+
);
|
|
3596
|
+
return checkEach(
|
|
3597
|
+
hosts,
|
|
3598
|
+
async (host) => host === "codex" ? (await import("./codex-install-UUZ6QMBQ.js")).runCodexDoctor(codexArgs(o), ctx) : (await import("./doctor-KBR34Q4B.js")).runRouterDoctor(
|
|
3599
|
+
ctx,
|
|
3600
|
+
o.project === true ? { project: true } : {}
|
|
3601
|
+
)
|
|
3602
|
+
);
|
|
3553
3603
|
});
|
|
3554
3604
|
});
|
|
3555
3605
|
leaf2(SETUP, "update", "update tenjin-cli to the newest published version").description(
|
|
3556
3606
|
"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."
|
|
3557
3607
|
).option("--check", "report whether a newer version exists without installing it").action(async function() {
|
|
3558
3608
|
await runCommand("update", this, async (ctx) => {
|
|
3559
|
-
const { runUpdate } = await import("./update-
|
|
3609
|
+
const { runUpdate } = await import("./update-ZKUERSO2.js");
|
|
3560
3610
|
return runUpdate({ check: this.opts().check === true }, ctx);
|
|
3561
3611
|
});
|
|
3562
3612
|
});
|
|
@@ -3575,7 +3625,7 @@ Examples:
|
|
|
3575
3625
|
);
|
|
3576
3626
|
config.action(async function() {
|
|
3577
3627
|
await runCommand("config", this, async (ctx) => {
|
|
3578
|
-
const { runConfigList } = await import("./config-
|
|
3628
|
+
const { runConfigList } = await import("./config-ZD4OB2DO.js");
|
|
3579
3629
|
return runConfigList(ctx);
|
|
3580
3630
|
});
|
|
3581
3631
|
});
|
|
@@ -3583,7 +3633,7 @@ Examples:
|
|
|
3583
3633
|
"Print one effective config value by key. The effective value is what the command would use, defaults and environment overrides included."
|
|
3584
3634
|
).action(async function(key) {
|
|
3585
3635
|
await runCommand("config.get", this, async (ctx) => {
|
|
3586
|
-
const { runConfigGet } = await import("./config-
|
|
3636
|
+
const { runConfigGet } = await import("./config-ZD4OB2DO.js");
|
|
3587
3637
|
return runConfigGet({ key }, ctx);
|
|
3588
3638
|
});
|
|
3589
3639
|
});
|
|
@@ -3595,7 +3645,7 @@ Examples:
|
|
|
3595
3645
|
).option("--local", "with --project, write .tenjin/config.local.json instead, which is yours").action(async function(key, value) {
|
|
3596
3646
|
const o = this.opts();
|
|
3597
3647
|
await runCommand("config.set", this, async (ctx) => {
|
|
3598
|
-
const { runConfigSet } = await import("./config-
|
|
3648
|
+
const { runConfigSet } = await import("./config-ZD4OB2DO.js");
|
|
3599
3649
|
return runConfigSet(
|
|
3600
3650
|
{ key, value, project: o.project === true, local: o.local === true },
|
|
3601
3651
|
ctx
|
|
@@ -3617,7 +3667,7 @@ Examples:
|
|
|
3617
3667
|
).action(async function() {
|
|
3618
3668
|
await runCommand("wallet.create", this, async (ctx) => {
|
|
3619
3669
|
const o = this.opts();
|
|
3620
|
-
const { runWalletCreate } = await import("./wallet-
|
|
3670
|
+
const { runWalletCreate } = await import("./wallet-2HA6W4R4.js");
|
|
3621
3671
|
return runWalletCreate(ctx, o.replace === true ? { replace: true } : {});
|
|
3622
3672
|
});
|
|
3623
3673
|
});
|
|
@@ -3626,7 +3676,7 @@ Examples:
|
|
|
3626
3676
|
).option("--no-qr", "print the address without the QR code").action(async function() {
|
|
3627
3677
|
await runCommand("wallet.show", this, async (ctx) => {
|
|
3628
3678
|
const o = this.opts();
|
|
3629
|
-
const { runWalletShow } = await import("./wallet-
|
|
3679
|
+
const { runWalletShow } = await import("./wallet-2HA6W4R4.js");
|
|
3630
3680
|
return runWalletShow(ctx, o.qr === false ? { qr: false } : {});
|
|
3631
3681
|
});
|
|
3632
3682
|
});
|
|
@@ -3634,7 +3684,7 @@ Examples:
|
|
|
3634
3684
|
"Read the wallet USDC balance on Base. It is a chain read: no key is unlocked and nothing is spent."
|
|
3635
3685
|
).action(async function() {
|
|
3636
3686
|
await runCommand("wallet.balance", this, async (ctx) => {
|
|
3637
|
-
const { runWalletBalance } = await import("./wallet-
|
|
3687
|
+
const { runWalletBalance } = await import("./wallet-2HA6W4R4.js");
|
|
3638
3688
|
return runWalletBalance(ctx);
|
|
3639
3689
|
});
|
|
3640
3690
|
});
|
|
@@ -3646,7 +3696,7 @@ Examples:
|
|
|
3646
3696
|
).action(async function(amountUsd) {
|
|
3647
3697
|
await runCommand("wallet.fund", this, async (ctx) => {
|
|
3648
3698
|
const o = this.opts();
|
|
3649
|
-
const { runFund } = await import("./fund-
|
|
3699
|
+
const { runFund } = await import("./fund-5ITKQGYF.js");
|
|
3650
3700
|
return runFund(ctx, {
|
|
3651
3701
|
...amountUsd !== void 0 ? { amountUsd } : {},
|
|
3652
3702
|
...o.open === false ? { open: false } : {},
|
|
@@ -3666,7 +3716,7 @@ Examples:
|
|
|
3666
3716
|
).action(async function(amount, token, to) {
|
|
3667
3717
|
await runCommand("wallet.send", this, async (ctx) => {
|
|
3668
3718
|
const o = this.opts();
|
|
3669
|
-
const { runSend } = await import("./send-
|
|
3719
|
+
const { runSend } = await import("./send-7G7Y7DLN.js");
|
|
3670
3720
|
return runSend({ amount, token, to, ...o.yes === true ? { yes: true } : {} }, ctx);
|
|
3671
3721
|
});
|
|
3672
3722
|
});
|
|
@@ -3686,7 +3736,7 @@ Examples:
|
|
|
3686
3736
|
).action(async function(url) {
|
|
3687
3737
|
await runCommand("pay", this, async (ctx) => {
|
|
3688
3738
|
const o = this.opts();
|
|
3689
|
-
const { runPay } = await import("./pay-
|
|
3739
|
+
const { runPay } = await import("./pay-WHBERZ3W.js");
|
|
3690
3740
|
return runPay(
|
|
3691
3741
|
{
|
|
3692
3742
|
url,
|
|
@@ -3702,18 +3752,35 @@ Examples:
|
|
|
3702
3752
|
});
|
|
3703
3753
|
});
|
|
3704
3754
|
}
|
|
3755
|
+
function hostOverride() {
|
|
3756
|
+
return new Option("--harness <host>", "only this agent host, instead of the ones found").choices(
|
|
3757
|
+
HARNESSES
|
|
3758
|
+
);
|
|
3759
|
+
}
|
|
3760
|
+
function codexArgs(o) {
|
|
3761
|
+
return {
|
|
3762
|
+
...o.project === true ? { project: true } : {},
|
|
3763
|
+
...o.yes === true ? { yes: true } : {},
|
|
3764
|
+
...o.wallet === false ? { noWallet: true } : {},
|
|
3765
|
+
...typeof o.maxAutoSpend === "string" ? { maxAutoSpend: o.maxAutoSpend } : {},
|
|
3766
|
+
...typeof o.sessionBudget === "string" ? { sessionBudget: o.sessionBudget } : {}
|
|
3767
|
+
};
|
|
3768
|
+
}
|
|
3705
3769
|
|
|
3706
3770
|
// src/cli/router.ts
|
|
3771
|
+
function harnessOption() {
|
|
3772
|
+
return new Option("--harness <host>", "the agent host").choices(HARNESSES).default("claude");
|
|
3773
|
+
}
|
|
3707
3774
|
function registerRouter(reg) {
|
|
3708
3775
|
const { io, runCommand, leaf: leaf2, addGlobalFlags: addGlobalFlags2, buildContext: buildContext2 } = reg;
|
|
3709
|
-
const hook = leaf2(INTEGRATION, "hook", "run one harness hook handler (called by
|
|
3710
|
-
"The handlers Tenjin's Claude Code
|
|
3776
|
+
const hook = leaf2(INTEGRATION, "hook", "run one harness hook handler (called by your agent host)").description(
|
|
3777
|
+
"The handlers Tenjin's Claude Code and Codex plugins run. Each reads one hook event on stdin and writes the harness response, or nothing, on stdout. You never run these by hand."
|
|
3711
3778
|
).helpCommand(false);
|
|
3712
3779
|
addGlobalFlags2(hook.command("alive")).summary("SessionStart: mark this session and machine as ones the plugin serves").action(async function() {
|
|
3713
3780
|
const ctx = buildContext2(this);
|
|
3714
3781
|
const [{ aliveMain }, { default: pkg }] = await Promise.all([
|
|
3715
|
-
import("./alive-
|
|
3716
|
-
import("./package-
|
|
3782
|
+
import("./alive-J64H46HI.js"),
|
|
3783
|
+
import("./package-ZKQFDWLE.js")
|
|
3717
3784
|
]);
|
|
3718
3785
|
await aliveMain({ dataDir: ctx.dataDir, version: pkg.version });
|
|
3719
3786
|
});
|
|
@@ -3728,36 +3795,41 @@ function registerRouter(reg) {
|
|
|
3728
3795
|
["ask", "PreToolUse on AskUserQuestion: allow the question, or redirect it once"],
|
|
3729
3796
|
["answer", "PostToolUse on AskUserQuestion: offer a paid lookup beside the user's answers"]
|
|
3730
3797
|
]) {
|
|
3731
|
-
addGlobalFlags2(hook.command(name)).summary(summary).action(async function() {
|
|
3798
|
+
addGlobalFlags2(hook.command(name)).addOption(harnessOption()).summary(summary).action(async function() {
|
|
3732
3799
|
const ctx = buildContext2(this);
|
|
3733
|
-
const { runHookCommand } = await import("./hook-command-
|
|
3800
|
+
const { runHookCommand } = await import("./hook-command-4TYCHHRL.js");
|
|
3734
3801
|
await runHookCommand(name, io, {
|
|
3735
3802
|
dataDir: ctx.dataDir,
|
|
3803
|
+
harness: this.opts().harness,
|
|
3736
3804
|
...ctx.flags.baseUrl !== void 0 ? { baseUrl: ctx.flags.baseUrl } : {}
|
|
3737
3805
|
});
|
|
3738
3806
|
});
|
|
3739
3807
|
}
|
|
3740
3808
|
hook.command("unknown", { hidden: true, isDefault: true }).argument("[args...]").allowUnknownOption().allowExcessArguments().action(() => {
|
|
3741
3809
|
});
|
|
3742
|
-
leaf2(INTEGRATION, "mcp", "run the local stdio MCP server").addOption(new Option("--plugin", "started by the Tenjin Claude Code plugin").hideHelp()).description(
|
|
3810
|
+
leaf2(INTEGRATION, "mcp", "run the local stdio MCP server").addOption(new Option("--plugin", "started by the Tenjin Claude Code plugin").hideHelp()).addOption(harnessOption().hideHelp()).description(
|
|
3743
3811
|
"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."
|
|
3744
3812
|
).action(async function() {
|
|
3745
3813
|
const ctx = buildContext2(this);
|
|
3746
|
-
const { runRouterMcpServer } = await import("./mcp-
|
|
3747
|
-
await runRouterMcpServer({
|
|
3814
|
+
const { runRouterMcpServer } = await import("./mcp-3LIJSSJB.js");
|
|
3815
|
+
await runRouterMcpServer({
|
|
3816
|
+
dataDir: ctx.dataDir,
|
|
3817
|
+
flags: ctx.flags,
|
|
3818
|
+
harness: this.opts().harness
|
|
3819
|
+
});
|
|
3748
3820
|
});
|
|
3749
3821
|
leaf2(INTEGRATION, "status-line", "the live footer, for Claude Code's status line").description(
|
|
3750
3822
|
"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."
|
|
3751
3823
|
).action(async function() {
|
|
3752
3824
|
const ctx = buildContext2(this);
|
|
3753
|
-
const { runStatusLine } = await import("./status-line-
|
|
3825
|
+
const { runStatusLine } = await import("./status-line-XOUE6MPL.js");
|
|
3754
3826
|
await runStatusLine(io, { dataDir: ctx.dataDir });
|
|
3755
3827
|
});
|
|
3756
3828
|
leaf2(SETUP, "status", "what this machine has spent, and what is still open").description(
|
|
3757
3829
|
"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."
|
|
3758
3830
|
).action(async function() {
|
|
3759
3831
|
await runCommand("status", this, async (ctx) => {
|
|
3760
|
-
const { runRouterStatus } = await import("./status-
|
|
3832
|
+
const { runRouterStatus } = await import("./status-OF7RH5HM.js");
|
|
3761
3833
|
return runRouterStatus(ctx);
|
|
3762
3834
|
});
|
|
3763
3835
|
});
|
|
@@ -3766,7 +3838,7 @@ function registerRouter(reg) {
|
|
|
3766
3838
|
);
|
|
3767
3839
|
payments.action(async function() {
|
|
3768
3840
|
await runCommand("payments", this, async (ctx) => {
|
|
3769
|
-
const { runPaymentsList } = await import("./payments-
|
|
3841
|
+
const { runPaymentsList } = await import("./payments-KVICEKD2.js");
|
|
3770
3842
|
return runPaymentsList(ctx);
|
|
3771
3843
|
});
|
|
3772
3844
|
});
|
|
@@ -3774,7 +3846,7 @@ function registerRouter(reg) {
|
|
|
3774
3846
|
"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."
|
|
3775
3847
|
).action(async function() {
|
|
3776
3848
|
await runCommand("payments.reconcile", this, async (ctx) => {
|
|
3777
|
-
const { runPaymentsReconcile } = await import("./payments-
|
|
3849
|
+
const { runPaymentsReconcile } = await import("./payments-KVICEKD2.js");
|
|
3778
3850
|
return runPaymentsReconcile(ctx);
|
|
3779
3851
|
});
|
|
3780
3852
|
});
|
|
@@ -3924,4 +3996,4 @@ export {
|
|
|
3924
3996
|
buildProgram,
|
|
3925
3997
|
main
|
|
3926
3998
|
};
|
|
3927
|
-
//# sourceMappingURL=cli-
|
|
3999
|
+
//# sourceMappingURL=cli-D5OE3URZ.js.map
|