tenjin-cli 0.1.0-alpha.33 → 0.1.0-alpha.35
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/NOTICE.md +110 -0
- package/README.md +87 -81
- package/dist/{_esm-BIN7VY2L.js → _esm-2KST7HQ7.js} +7 -7
- package/dist/alive-5TV22PNF.js +51 -0
- package/dist/auth-XI7BJFLW.js +47 -0
- package/dist/{auto-update-Y24UL56V.js → auto-update-7L24KDWA.js} +4 -5
- package/dist/balance-DFHC6XEU.js +71 -0
- package/dist/{ccip-DHDFKTQV.js → ccip-HOW3DZYF.js} +4 -4
- package/dist/chunk-24XKUN2S.js +202 -0
- package/dist/chunk-24XKUN2S.js.map +1 -0
- package/dist/chunk-2L7TDGLV.js +56 -0
- package/dist/chunk-2L7TDGLV.js.map +1 -0
- package/dist/{chunk-C2Q76BVM.js → chunk-2U7H35IP.js} +29 -7
- package/dist/chunk-2U7H35IP.js.map +1 -0
- package/dist/chunk-2W4DQQUU.js +176 -0
- package/dist/chunk-2W4DQQUU.js.map +1 -0
- package/dist/{chunk-LRW6S53P.js → chunk-34SAECKZ.js} +35 -11
- package/dist/chunk-34SAECKZ.js.map +1 -0
- package/dist/{chunk-2I4QTOLB.js → chunk-3MZ7DYRO.js} +1 -1
- package/dist/chunk-3MZ7DYRO.js.map +1 -0
- package/dist/{chunk-RVPYTUP4.js → chunk-3Y2EHT4F.js} +13 -9
- package/dist/chunk-3Y2EHT4F.js.map +1 -0
- package/dist/chunk-3Y6BHIN6.js +169 -0
- package/dist/chunk-3Y6BHIN6.js.map +1 -0
- package/dist/{chunk-4K7TQHNP.js → chunk-3YPL6T3P.js} +17 -33
- package/dist/chunk-3YPL6T3P.js.map +1 -0
- package/dist/{chunk-E7SW44LM.js → chunk-44MVIRZH.js} +121 -6
- package/dist/chunk-44MVIRZH.js.map +1 -0
- package/dist/chunk-45MMSBHA.js +321 -0
- package/dist/chunk-45MMSBHA.js.map +1 -0
- package/dist/{chunk-3FMZGI7I.js → chunk-4CE6TMI5.js} +1 -1
- package/dist/chunk-4CE6TMI5.js.map +1 -0
- package/dist/{chunk-QXP3Z3JN.js → chunk-4MBCJFY4.js} +35 -3
- package/dist/chunk-4MBCJFY4.js.map +1 -0
- package/dist/chunk-4TPL54KW.js +227 -0
- package/dist/chunk-4TPL54KW.js.map +1 -0
- package/dist/chunk-54ELBTKE.js +1615 -0
- package/dist/chunk-54ELBTKE.js.map +1 -0
- package/dist/{chunk-NDGZDTSJ.js → chunk-5F4OB5B3.js} +115 -57
- package/dist/chunk-5F4OB5B3.js.map +1 -0
- package/dist/chunk-5HN4KVQU.js +3348 -0
- package/dist/chunk-5HN4KVQU.js.map +1 -0
- package/dist/{chunk-ZDZERB6L.js → chunk-5J4E5GYI.js} +572 -407
- package/dist/chunk-5J4E5GYI.js.map +1 -0
- package/dist/{chunk-ZNNXRNFD.js → chunk-5N4GGUBN.js} +48 -6
- package/dist/chunk-5N4GGUBN.js.map +1 -0
- package/dist/chunk-5USBZ2MU.js +58 -0
- package/dist/chunk-5USBZ2MU.js.map +1 -0
- package/dist/chunk-64WOMNYR.js +183 -0
- package/dist/chunk-64WOMNYR.js.map +1 -0
- package/dist/{chunk-ILNIZ5I2.js → chunk-65RS4LQS.js} +1825 -1715
- package/dist/chunk-65RS4LQS.js.map +1 -0
- package/dist/{chunk-IE7P2BZE.js → chunk-6QMDUDF2.js} +3 -3
- package/dist/{chunk-IADZOXKN.js → chunk-7SLOTLO7.js} +19 -697
- package/dist/chunk-7SLOTLO7.js.map +1 -0
- package/dist/{chunk-WFSPCCVW.js → chunk-7V25UAQO.js} +99 -99
- package/dist/{chunk-WFSPCCVW.js.map → chunk-7V25UAQO.js.map} +1 -1
- package/dist/chunk-BGA4DO5M.js +719 -0
- package/dist/chunk-BGA4DO5M.js.map +1 -0
- package/dist/chunk-BVP7YK2J.js +706 -0
- package/dist/chunk-BVP7YK2J.js.map +1 -0
- package/dist/chunk-C265QIMJ.js +83 -0
- package/dist/chunk-C265QIMJ.js.map +1 -0
- package/dist/{chunk-XQJXNMSB.js → chunk-CRG54LEB.js} +1 -1
- package/dist/chunk-CRG54LEB.js.map +1 -0
- package/dist/{chunk-KG3D7FIF.js → chunk-CZJOMUBP.js} +2 -2
- package/dist/{chunk-36RVGZNY.js → chunk-D6M3ZK66.js} +22 -39
- package/dist/chunk-D6M3ZK66.js.map +1 -0
- package/dist/{chunk-3UCIG4TG.js → chunk-DI4QAGRZ.js} +1 -11
- package/dist/chunk-DI4QAGRZ.js.map +1 -0
- package/dist/{chunk-JKKAIPTU.js → chunk-DIH2G3YG.js} +47 -10
- package/dist/chunk-DIH2G3YG.js.map +1 -0
- package/dist/chunk-DJ36BM62.js +78 -0
- package/dist/chunk-DJ36BM62.js.map +1 -0
- package/dist/chunk-DTEWAVNE.js +114 -0
- package/dist/chunk-DTEWAVNE.js.map +1 -0
- package/dist/chunk-F2KJAJ7T.js +13 -0
- package/dist/chunk-F2KJAJ7T.js.map +1 -0
- package/dist/{chunk-BF4XHEQK.js → chunk-F3QPGYOY.js} +6 -6
- package/dist/chunk-F3QPGYOY.js.map +1 -0
- package/dist/{chunk-3GNJXKIT.js → chunk-F43CV6UC.js} +2 -2
- package/dist/{chunk-J57UC3DD.js → chunk-FKVJKLPI.js} +3 -3
- package/dist/{chunk-V2LQLN5H.js → chunk-FYFHH7V5.js} +59 -8
- package/dist/{chunk-V2LQLN5H.js.map → chunk-FYFHH7V5.js.map} +1 -1
- package/dist/chunk-GAJC4BQZ.js +1096 -0
- package/dist/chunk-GAJC4BQZ.js.map +1 -0
- package/dist/{chunk-DOQGNFHM.js → chunk-GH5UKMZD.js} +2 -12
- package/dist/{chunk-DOQGNFHM.js.map → chunk-GH5UKMZD.js.map} +1 -1
- package/dist/{chunk-WYXUQGOL.js → chunk-HAZAN4UM.js} +7 -6
- package/dist/chunk-HAZAN4UM.js.map +1 -0
- package/dist/chunk-HI5XQOX2.js +393 -0
- package/dist/chunk-HI5XQOX2.js.map +1 -0
- package/dist/chunk-HKGUKAQW.js +488 -0
- package/dist/chunk-HKGUKAQW.js.map +1 -0
- package/dist/{chunk-SO3XRZPX.js → chunk-HPRVFJPM.js} +6 -6
- package/dist/{chunk-L6JEXB3E.js → chunk-HQR4BWKX.js} +3 -131
- package/dist/chunk-HQR4BWKX.js.map +1 -0
- package/dist/chunk-HZKANST2.js +177 -0
- package/dist/chunk-HZKANST2.js.map +1 -0
- package/dist/{chunk-UUGOUOVT.js → chunk-I557SAOM.js} +8 -2
- package/dist/chunk-I557SAOM.js.map +1 -0
- package/dist/{chunk-TC2WZLSC.js → chunk-IGLWLH73.js} +8 -7
- package/dist/chunk-IGLWLH73.js.map +1 -0
- package/dist/chunk-ILWCKCOI.js +58 -0
- package/dist/chunk-ILWCKCOI.js.map +1 -0
- package/dist/{chunk-2GP3HRYK.js → chunk-INSIW65E.js} +182 -182
- package/dist/{chunk-MPZUYCAP.js → chunk-IULCDMVG.js} +12 -1
- package/dist/chunk-IULCDMVG.js.map +1 -0
- package/dist/{chunk-INTFHMU4.js → chunk-IVNSUAVC.js} +25 -26
- package/dist/chunk-IVNSUAVC.js.map +1 -0
- package/dist/chunk-JDQZCREI.js +87 -0
- package/dist/chunk-JDQZCREI.js.map +1 -0
- package/dist/chunk-JHFFUVON.js +1050 -0
- package/dist/chunk-JHFFUVON.js.map +1 -0
- package/dist/{chunk-RL5UUDT4.js → chunk-JNUKLSMZ.js} +3 -3
- package/dist/chunk-JTILUN4W.js +2933 -0
- package/dist/chunk-JTILUN4W.js.map +1 -0
- package/dist/{chunk-OJNTCYQQ.js → chunk-JTX3BUDK.js} +37 -53
- package/dist/chunk-JTX3BUDK.js.map +1 -0
- package/dist/{chunk-X5ZBP3IY.js → chunk-JUUBBBY5.js} +2 -2
- package/dist/chunk-JUUBBBY5.js.map +1 -0
- package/dist/chunk-JWAK7JQB.js +15 -0
- package/dist/chunk-JWAK7JQB.js.map +1 -0
- package/dist/{chunk-UXZONNEQ.js → chunk-K5KNGC4I.js} +34 -31
- package/dist/chunk-K5KNGC4I.js.map +1 -0
- package/dist/chunk-KAQ4Q3TO.js +135 -0
- package/dist/chunk-KAQ4Q3TO.js.map +1 -0
- package/dist/chunk-KFVJYLVL.js +125 -0
- package/dist/chunk-KFVJYLVL.js.map +1 -0
- package/dist/chunk-KGUE5AVX.js +69 -0
- package/dist/chunk-KGUE5AVX.js.map +1 -0
- package/dist/{chunk-FVIGCDSV.js → chunk-KLDMLWXT.js} +11 -85
- package/dist/chunk-KLDMLWXT.js.map +1 -0
- package/dist/chunk-KNKDMTHU.js +453 -0
- package/dist/chunk-KNKDMTHU.js.map +1 -0
- package/dist/chunk-LDA6TAYQ.js +95 -0
- package/dist/chunk-LDA6TAYQ.js.map +1 -0
- package/dist/chunk-LWSSIZOY.js +347 -0
- package/dist/chunk-LWSSIZOY.js.map +1 -0
- package/dist/{chunk-ZURZHELF.js → chunk-MAHNZA6C.js} +158 -41
- package/dist/chunk-MAHNZA6C.js.map +1 -0
- package/dist/chunk-MEWZCIA6.js +220 -0
- package/dist/chunk-MEWZCIA6.js.map +1 -0
- package/dist/{chunk-2SNUOHAT.js → chunk-MEZJ3I63.js} +49 -1
- package/dist/chunk-MEZJ3I63.js.map +1 -0
- package/dist/chunk-MJDO4EXD.js +353 -0
- package/dist/chunk-MJDO4EXD.js.map +1 -0
- package/dist/chunk-NJA6NT3A.js +6595 -0
- package/dist/chunk-NJA6NT3A.js.map +1 -0
- package/dist/{chunk-LHHMV4GU.js → chunk-NVSKJPRC.js} +1 -1
- package/dist/{chunk-LHHMV4GU.js.map → chunk-NVSKJPRC.js.map} +1 -1
- package/dist/{chunk-4YOZGGTZ.js → chunk-OC7K2DVZ.js} +5 -5
- package/dist/chunk-OC7K2DVZ.js.map +1 -0
- package/dist/chunk-ODRPASFP.js +2078 -0
- package/dist/chunk-ODRPASFP.js.map +1 -0
- package/dist/chunk-OJJFANO6.js +133 -0
- package/dist/chunk-OJJFANO6.js.map +1 -0
- package/dist/{chunk-JNJWBTU2.js → chunk-OQWPRFAC.js} +332 -882
- package/dist/chunk-OQWPRFAC.js.map +1 -0
- package/dist/chunk-P4I7BFNJ.js +11 -0
- package/dist/chunk-P4I7BFNJ.js.map +1 -0
- package/dist/{chunk-SNNSAGMT.js → chunk-P6YQWIT2.js} +4058 -4039
- package/dist/chunk-P6YQWIT2.js.map +1 -0
- package/dist/{chunk-JRGFKVAZ.js → chunk-PETQ5WEA.js} +2 -2
- package/dist/{chunk-HMWYAUA6.js → chunk-Q6RSJCXB.js} +29 -69
- package/dist/chunk-Q6RSJCXB.js.map +1 -0
- package/dist/{chunk-U3IKUGRP.js → chunk-QKEUKBRK.js} +17 -23
- package/dist/chunk-QKEUKBRK.js.map +1 -0
- package/dist/{chunk-2RWB7RKE.js → chunk-QKYUCITR.js} +174 -5814
- package/dist/chunk-QKYUCITR.js.map +1 -0
- package/dist/chunk-QQDPRTLP.js +127 -0
- package/dist/chunk-QQDPRTLP.js.map +1 -0
- package/dist/chunk-QQYCYAKI.js +79 -0
- package/dist/chunk-QQYCYAKI.js.map +1 -0
- package/dist/chunk-R4KDH477.js +1064 -0
- package/dist/chunk-R4KDH477.js.map +1 -0
- package/dist/chunk-R5TR2DIK.js +119 -0
- package/dist/chunk-R5TR2DIK.js.map +1 -0
- package/dist/chunk-R62PKTAG.js +66 -0
- package/dist/chunk-R62PKTAG.js.map +1 -0
- package/dist/{chunk-BFDQ4WNW.js → chunk-RFZA7PSM.js} +4 -5
- package/dist/chunk-RFZA7PSM.js.map +1 -0
- package/dist/chunk-RGCPELQN.js +219 -0
- package/dist/chunk-RGCPELQN.js.map +1 -0
- package/dist/chunk-RGVCOG2S.js +910 -0
- package/dist/chunk-RGVCOG2S.js.map +1 -0
- package/dist/chunk-SOLNJ3AZ.js +209 -0
- package/dist/chunk-SOLNJ3AZ.js.map +1 -0
- package/dist/chunk-TFT2X7SH.js +77 -0
- package/dist/chunk-TFT2X7SH.js.map +1 -0
- package/dist/chunk-TUCKEEXE.js +2 -0
- package/dist/chunk-TVWCLUBI.js +293 -0
- package/dist/chunk-TVWCLUBI.js.map +1 -0
- package/dist/chunk-U4TRWSVE.js +78 -0
- package/dist/chunk-U4TRWSVE.js.map +1 -0
- package/dist/chunk-UIB33QQP.js +379 -0
- package/dist/chunk-UIB33QQP.js.map +1 -0
- package/dist/chunk-V6GIVALQ.js +1889 -0
- package/dist/chunk-V6GIVALQ.js.map +1 -0
- package/dist/chunk-VHXCPXUS.js +366 -0
- package/dist/chunk-VHXCPXUS.js.map +1 -0
- package/dist/{chunk-HGZEPQUT.js → chunk-VU6GMWF6.js} +17 -8
- package/dist/chunk-VU6GMWF6.js.map +1 -0
- package/dist/chunk-VWZYE3NC.js +8415 -0
- package/dist/chunk-VWZYE3NC.js.map +1 -0
- package/dist/{chunk-AGMVASXZ.js → chunk-W2GXIARJ.js} +88 -11
- package/dist/chunk-W2GXIARJ.js.map +1 -0
- package/dist/chunk-W4G3K3V7.js +288 -0
- package/dist/chunk-W4G3K3V7.js.map +1 -0
- package/dist/chunk-W74LJ5OT.js +588 -0
- package/dist/chunk-W74LJ5OT.js.map +1 -0
- package/dist/chunk-W7ELYLYK.js +233 -0
- package/dist/chunk-W7ELYLYK.js.map +1 -0
- package/dist/{chunk-BPMWXTFX.js → chunk-WFZX352D.js} +7 -7
- package/dist/chunk-WXA3WTPF.js +20 -0
- package/dist/chunk-WXA3WTPF.js.map +1 -0
- package/dist/chunk-XRGFH7FI.js +454 -0
- package/dist/chunk-XRGFH7FI.js.map +1 -0
- package/dist/chunk-XSCGUO2U.js +330 -0
- package/dist/chunk-XSCGUO2U.js.map +1 -0
- package/dist/chunk-XWROSMI5.js +1039 -0
- package/dist/chunk-XWROSMI5.js.map +1 -0
- package/dist/chunk-Y2EXZ47H.js +40 -0
- package/dist/chunk-Y2EXZ47H.js.map +1 -0
- package/dist/chunk-YJGEVBKZ.js +47 -0
- package/dist/chunk-YJGEVBKZ.js.map +1 -0
- package/dist/{chunk-6CMM6YCB.js → chunk-YWWMISDY.js} +2 -2
- package/dist/{chunk-WXA2BWTE.js → chunk-ZCT5DJ3G.js} +2 -48
- package/dist/chunk-ZCT5DJ3G.js.map +1 -0
- package/dist/chunk-ZEYA2WWX.js +982 -0
- package/dist/chunk-ZEYA2WWX.js.map +1 -0
- package/dist/chunk-ZRC7Z5X3.js +82 -0
- package/dist/chunk-ZRC7Z5X3.js.map +1 -0
- package/dist/{chunk-3AIHRXKO.js → chunk-ZS7JIUJ3.js} +12 -10
- package/dist/chunk-ZS7JIUJ3.js.map +1 -0
- package/dist/{clack-EZ7TDWQU.js → clack-Q4RNC5VE.js} +2 -6
- package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
- package/dist/claude-install-BAUSJMW3.js +64 -0
- package/dist/{cli-E36SPKBW.js → cli-QY4KKA3D.js} +632 -150
- package/dist/cli-QY4KKA3D.js.map +1 -0
- package/dist/client-3YQKORVK.js +710 -0
- package/dist/client-3YQKORVK.js.map +1 -0
- package/dist/{codex-event-ZO2GEFE6.js → codex-event-EUTCAOTQ.js} +3 -5
- package/dist/{codex-host-KECJVTA2.js → codex-host-ZON3S6HU.js} +7 -7
- package/dist/{codex-install-HQZDGFXW.js → codex-install-HZV2DOAB.js} +242 -88
- package/dist/codex-install-HZV2DOAB.js.map +1 -0
- package/dist/config-QZOBMTEL.js +57 -0
- package/dist/config-names-Z5NZD5R2.js +224 -0
- package/dist/config-names-Z5NZD5R2.js.map +1 -0
- package/dist/config-rules-YOYHS6YL.js +55 -0
- package/dist/config-subagents-WQV2ZAD5.js +362 -0
- package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
- package/dist/connect-YDWTYU4B.js +1020 -0
- package/dist/connect-YDWTYU4B.js.map +1 -0
- package/dist/core-0a66n3e7-TTP554XV.js +127 -0
- package/dist/core-0a66n3e7-TTP554XV.js.map +1 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js +10790 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js.map +1 -0
- package/dist/core-9je8ee1j-74DGHWPV.js +30 -0
- package/dist/core-9je8ee1j-74DGHWPV.js.map +1 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js +666 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js.map +1 -0
- package/dist/core-zg882d22-LKV5DZYW.js +37 -0
- package/dist/core-zg882d22-LKV5DZYW.js.map +1 -0
- package/dist/decision-QSKHOGCO.js +145 -0
- package/dist/{doctor-I6XQEKWD.js → doctor-ZWJXRD75.js} +162 -148
- package/dist/doctor-ZWJXRD75.js.map +1 -0
- package/dist/{env-proxy-R6ZMLQTT.js → env-proxy-XLSLHBKQ.js} +2 -2
- package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js → ethersCompat-Df4a6QIZ-K3DMHR6Y.js} +5 -5
- package/dist/explicit-ME2NRADQ.js +371 -0
- package/dist/explicit-ME2NRADQ.js.map +1 -0
- package/dist/flush-stdio-NYIJ3QXT.js +18 -0
- package/dist/fund-VF7TLDJH.js +722 -0
- package/dist/fund-VF7TLDJH.js.map +1 -0
- package/dist/hook-command-VZ27MGWO.js +49 -0
- package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
- package/dist/hosts/claude/tenjin/hooks/hook-data.ts +152 -0
- package/dist/hosts/claude/tenjin/hooks/hooks.json +7 -0
- package/dist/hosts/claude/tenjin/hooks/model-viewer.tsx +2987 -0
- package/dist/hosts/claude/tenjin/hooks/register.tsx +527 -56
- package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
- package/dist/hosts/claude/tenjin/types/index.d.ts +144 -1
- package/dist/{hosts-DVQJ32QC.js → hosts-3EMTVM4H.js} +7 -6
- package/dist/index.js +18 -15
- package/dist/index.js.map +1 -1
- package/dist/install-ZA7L2UF3.js +115 -0
- package/dist/install-funding-JDGYTF72.js +30 -0
- package/dist/install-identity-FFAYEFLX.js +30 -0
- package/dist/{install-wallet-5M4OTYLX.js → install-wallet-2SFOVE3Q.js} +68 -53
- package/dist/install-wallet-2SFOVE3Q.js.map +1 -0
- package/dist/mcp-36S6MK3C.js +67642 -0
- package/dist/mcp-36S6MK3C.js.map +1 -0
- package/dist/new-install-5L4GY3LN.js +51 -0
- package/dist/{package-IJFGMWEV.js → package-BONDXSV3.js} +2 -2
- package/dist/{passphrase-IFTDS3CU.js → passphrase-T4ULBN4M.js} +16 -12
- package/dist/{paths-XCSAKISU.js → paths-O2KDWZ76.js} +18 -28
- package/dist/pay-CMV5KL74.js +74 -0
- package/dist/{payments-HFPPWHTV.js → payments-Z6UBZL4Z.js} +36 -26
- package/dist/payments-Z6UBZL4Z.js.map +1 -0
- package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
- package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
- package/dist/{redact-D7ASVWKL.js → redact-LOTHE5TS.js} +2 -8
- package/dist/redact-LOTHE5TS.js.map +1 -0
- package/dist/routing-quote-AHLAREXR.js +40 -0
- package/dist/routing-quote-AHLAREXR.js.map +1 -0
- package/dist/run-JH7ELYAM.js +88 -0
- package/dist/run-JH7ELYAM.js.map +1 -0
- package/dist/runtime-2GX4ALJP.js +410 -0
- package/dist/runtime-2GX4ALJP.js.map +1 -0
- package/dist/runtime-activate-IDQ2NCSP.js +39 -0
- package/dist/runtime-activate-IDQ2NCSP.js.map +1 -0
- package/dist/{runtime-fetch-ZSSSK72Y.js → runtime-fetch-6LOBHBEN.js} +4 -4
- package/dist/runtime-fetch-6LOBHBEN.js.map +1 -0
- package/dist/runtime-launchers-YAPKCBHV.js +31 -0
- package/dist/runtime-launchers-YAPKCBHV.js.map +1 -0
- package/dist/{runtime-layout-WIDILZ6K.js → runtime-layout-QHZQJV7C.js} +5 -4
- package/dist/runtime-layout-QHZQJV7C.js.map +1 -0
- package/dist/runtime-place-4POL4KK4.js +37 -0
- package/dist/runtime-place-4POL4KK4.js.map +1 -0
- package/dist/runtime-provenance-MNJGVBV2.js +12 -0
- package/dist/runtime-provenance-MNJGVBV2.js.map +1 -0
- package/dist/{secp256k1-ZZZT2CAX.js → secp256k1-N5P2GVGF.js} +3 -3
- package/dist/secp256k1-N5P2GVGF.js.map +1 -0
- package/dist/{send-GCVEAQKL.js → send-ELXFKEKY.js} +35 -32
- package/dist/send-ELXFKEKY.js.map +1 -0
- package/dist/status-FXUFWJDM.js +404 -0
- package/dist/status-FXUFWJDM.js.map +1 -0
- package/dist/{status-line-OPCXDHL2.js → status-line-IH5JBWBC.js} +51 -43
- package/dist/status-line-IH5JBWBC.js.map +1 -0
- package/dist/streamableHttp-CP2ZQBIK.js +768 -0
- package/dist/streamableHttp-CP2ZQBIK.js.map +1 -0
- package/dist/{uninstall-BAWRBXXQ.js → uninstall-LJZUKM4D.js} +76 -76
- package/dist/uninstall-LJZUKM4D.js.map +1 -0
- package/dist/update-EUIX72IX.js +68 -0
- package/dist/update-EUIX72IX.js.map +1 -0
- package/dist/usage-EKDC7LUC.js +180 -0
- package/dist/usage-EKDC7LUC.js.map +1 -0
- package/dist/{usdc-VG4CIOUK.js → usdc-YIHK2OMC.js} +8 -12
- package/dist/usdc-YIHK2OMC.js.map +1 -0
- package/dist/{viemAdapter-By13KInL-DOFTEIJV.js → viemAdapter-By13KInL-PRLSIESK.js} +5 -5
- package/dist/viemAdapter-By13KInL-PRLSIESK.js.map +1 -0
- package/dist/wallet-HSW757W6.js +80 -0
- package/dist/wallet-HSW757W6.js.map +1 -0
- package/dist/wallet-kdf-worker.mjs +1433 -818
- package/docs/agent-permissions.md +88 -155
- package/docs/router-reference.md +236 -0
- package/docs/safety-model.md +31 -33
- package/docs/subagents-internals.md +97 -0
- package/docs/subagents.md +348 -0
- package/docs/troubleshooting.md +10 -6
- package/package.json +12 -8
- package/scripts/installers/install.sh +7 -1
- package/dist/alive-GSOWKUOY.js +0 -38
- package/dist/chunk-2I4QTOLB.js.map +0 -1
- package/dist/chunk-2M2VPI2E.js +0 -560
- package/dist/chunk-2M2VPI2E.js.map +0 -1
- package/dist/chunk-2RWB7RKE.js.map +0 -1
- package/dist/chunk-2SNUOHAT.js.map +0 -1
- package/dist/chunk-3623BLPV.js +0 -184
- package/dist/chunk-3623BLPV.js.map +0 -1
- package/dist/chunk-36RVGZNY.js.map +0 -1
- package/dist/chunk-3AIHRXKO.js.map +0 -1
- package/dist/chunk-3FMZGI7I.js.map +0 -1
- package/dist/chunk-3UCIG4TG.js.map +0 -1
- package/dist/chunk-4K7TQHNP.js.map +0 -1
- package/dist/chunk-4LMUQMBH.js +0 -29
- package/dist/chunk-4LMUQMBH.js.map +0 -1
- package/dist/chunk-4USCZ2NI.js +0 -228
- package/dist/chunk-4USCZ2NI.js.map +0 -1
- package/dist/chunk-4YOZGGTZ.js.map +0 -1
- package/dist/chunk-62KNUYWD.js +0 -111
- package/dist/chunk-62KNUYWD.js.map +0 -1
- package/dist/chunk-A5GKIG5O.js +0 -2037
- package/dist/chunk-A5GKIG5O.js.map +0 -1
- package/dist/chunk-AGMVASXZ.js.map +0 -1
- package/dist/chunk-BF4XHEQK.js.map +0 -1
- package/dist/chunk-BFDQ4WNW.js.map +0 -1
- package/dist/chunk-C2Q76BVM.js.map +0 -1
- package/dist/chunk-CEXSOI5R.js +0 -808
- package/dist/chunk-CEXSOI5R.js.map +0 -1
- package/dist/chunk-E7SW44LM.js.map +0 -1
- package/dist/chunk-EDJWHDDL.js +0 -33
- package/dist/chunk-EDJWHDDL.js.map +0 -1
- package/dist/chunk-FVIGCDSV.js.map +0 -1
- package/dist/chunk-GTTUCOPD.js +0 -105
- package/dist/chunk-GTTUCOPD.js.map +0 -1
- package/dist/chunk-HDPUXS3Z.js +0 -122
- package/dist/chunk-HDPUXS3Z.js.map +0 -1
- package/dist/chunk-HGGWCP7W.js +0 -120
- package/dist/chunk-HGGWCP7W.js.map +0 -1
- package/dist/chunk-HGZEPQUT.js.map +0 -1
- package/dist/chunk-HMWYAUA6.js.map +0 -1
- package/dist/chunk-IADZOXKN.js.map +0 -1
- package/dist/chunk-ILNIZ5I2.js.map +0 -1
- package/dist/chunk-INTFHMU4.js.map +0 -1
- package/dist/chunk-JKKAIPTU.js.map +0 -1
- package/dist/chunk-JNJWBTU2.js.map +0 -1
- package/dist/chunk-KM7RY2ZS.js +0 -246
- package/dist/chunk-KM7RY2ZS.js.map +0 -1
- package/dist/chunk-KOGZDMHO.js +0 -21
- package/dist/chunk-KOGZDMHO.js.map +0 -1
- package/dist/chunk-L6JEXB3E.js.map +0 -1
- package/dist/chunk-LRW6S53P.js.map +0 -1
- package/dist/chunk-LXAYUOXI.js +0 -511
- package/dist/chunk-LXAYUOXI.js.map +0 -1
- package/dist/chunk-MEFB5KHA.js +0 -59
- package/dist/chunk-MEFB5KHA.js.map +0 -1
- package/dist/chunk-MPZUYCAP.js.map +0 -1
- package/dist/chunk-NDGZDTSJ.js.map +0 -1
- package/dist/chunk-OJNTCYQQ.js.map +0 -1
- package/dist/chunk-P3LFTKE7.js +0 -58
- package/dist/chunk-P3LFTKE7.js.map +0 -1
- package/dist/chunk-QXP3Z3JN.js.map +0 -1
- package/dist/chunk-RVPYTUP4.js.map +0 -1
- package/dist/chunk-SNNSAGMT.js.map +0 -1
- package/dist/chunk-TC2WZLSC.js.map +0 -1
- package/dist/chunk-TKPF35W6.js +0 -29
- package/dist/chunk-TKPF35W6.js.map +0 -1
- package/dist/chunk-U3IKUGRP.js.map +0 -1
- package/dist/chunk-UUGOUOVT.js.map +0 -1
- package/dist/chunk-UXZONNEQ.js.map +0 -1
- package/dist/chunk-WXA2BWTE.js.map +0 -1
- package/dist/chunk-WYXUQGOL.js.map +0 -1
- package/dist/chunk-X5ZBP3IY.js.map +0 -1
- package/dist/chunk-XKESD27X.js +0 -10
- package/dist/chunk-XKESD27X.js.map +0 -1
- package/dist/chunk-XQJXNMSB.js.map +0 -1
- package/dist/chunk-Y527D4TV.js +0 -56
- package/dist/chunk-Y527D4TV.js.map +0 -1
- package/dist/chunk-ZDZERB6L.js.map +0 -1
- package/dist/chunk-ZNNXRNFD.js.map +0 -1
- package/dist/chunk-ZURZHELF.js.map +0 -1
- package/dist/cli-E36SPKBW.js.map +0 -1
- package/dist/codex-install-HQZDGFXW.js.map +0 -1
- package/dist/config-HY2E4GGW.js +0 -55
- package/dist/doctor-I6XQEKWD.js.map +0 -1
- package/dist/fund-2QRO7OJL.js +0 -378
- package/dist/fund-2QRO7OJL.js.map +0 -1
- package/dist/hook-command-2UBCSZG6.js +0 -43
- package/dist/install-ILUX5C4A.js +0 -107
- package/dist/install-identity-TZKGY6LQ.js +0 -31
- package/dist/install-wallet-5M4OTYLX.js.map +0 -1
- package/dist/mcp-LE4DUS22.js +0 -14127
- package/dist/mcp-LE4DUS22.js.map +0 -1
- package/dist/pay-WCG3IH4R.js +0 -55
- package/dist/payments-HFPPWHTV.js.map +0 -1
- package/dist/plugin-registration-PZFI5GZW.js +0 -68
- package/dist/runtime-UZOKSUZX.js +0 -1321
- package/dist/runtime-UZOKSUZX.js.map +0 -1
- package/dist/send-GCVEAQKL.js.map +0 -1
- package/dist/status-HCVAOCN7.js +0 -150
- package/dist/status-HCVAOCN7.js.map +0 -1
- package/dist/status-line-OPCXDHL2.js.map +0 -1
- package/dist/uninstall-BAWRBXXQ.js.map +0 -1
- package/dist/update-CACXLQLR.js +0 -56
- package/dist/wallet-QL4UUXEZ.js +0 -55
- /package/dist/{_esm-BIN7VY2L.js.map → _esm-2KST7HQ7.js.map} +0 -0
- /package/dist/{alive-GSOWKUOY.js.map → alive-5TV22PNF.js.map} +0 -0
- /package/dist/{auto-update-Y24UL56V.js.map → auth-XI7BJFLW.js.map} +0 -0
- /package/dist/{ccip-DHDFKTQV.js.map → auto-update-7L24KDWA.js.map} +0 -0
- /package/dist/{clack-EZ7TDWQU.js.map → balance-DFHC6XEU.js.map} +0 -0
- /package/dist/{claude-cli-2YKABJJZ.js.map → ccip-HOW3DZYF.js.map} +0 -0
- /package/dist/{chunk-IE7P2BZE.js.map → chunk-6QMDUDF2.js.map} +0 -0
- /package/dist/{chunk-KG3D7FIF.js.map → chunk-CZJOMUBP.js.map} +0 -0
- /package/dist/{chunk-3GNJXKIT.js.map → chunk-F43CV6UC.js.map} +0 -0
- /package/dist/{chunk-J57UC3DD.js.map → chunk-FKVJKLPI.js.map} +0 -0
- /package/dist/{chunk-SO3XRZPX.js.map → chunk-HPRVFJPM.js.map} +0 -0
- /package/dist/{chunk-2GP3HRYK.js.map → chunk-INSIW65E.js.map} +0 -0
- /package/dist/{chunk-RL5UUDT4.js.map → chunk-JNUKLSMZ.js.map} +0 -0
- /package/dist/{chunk-JRGFKVAZ.js.map → chunk-PETQ5WEA.js.map} +0 -0
- /package/dist/{codex-event-ZO2GEFE6.js.map → chunk-TUCKEEXE.js.map} +0 -0
- /package/dist/{chunk-BPMWXTFX.js.map → chunk-WFZX352D.js.map} +0 -0
- /package/dist/{chunk-6CMM6YCB.js.map → chunk-YWWMISDY.js.map} +0 -0
- /package/dist/{codex-host-KECJVTA2.js.map → clack-Q4RNC5VE.js.map} +0 -0
- /package/dist/{config-HY2E4GGW.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
- /package/dist/{env-proxy-R6ZMLQTT.js.map → claude-install-BAUSJMW3.js.map} +0 -0
- /package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js.map → codex-event-EUTCAOTQ.js.map} +0 -0
- /package/dist/{hook-command-2UBCSZG6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
- /package/dist/{hosts-DVQJ32QC.js.map → config-QZOBMTEL.js.map} +0 -0
- /package/dist/{install-ILUX5C4A.js.map → config-rules-YOYHS6YL.js.map} +0 -0
- /package/dist/{install-identity-TZKGY6LQ.js.map → decision-QSKHOGCO.js.map} +0 -0
- /package/dist/{package-IJFGMWEV.js.map → env-proxy-XLSLHBKQ.js.map} +0 -0
- /package/dist/{passphrase-IFTDS3CU.js.map → ethersCompat-Df4a6QIZ-K3DMHR6Y.js.map} +0 -0
- /package/dist/{paths-XCSAKISU.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
- /package/dist/{pay-WCG3IH4R.js.map → hook-command-VZ27MGWO.js.map} +0 -0
- /package/dist/{plugin-registration-PZFI5GZW.js.map → hosts-3EMTVM4H.js.map} +0 -0
- /package/dist/{redact-D7ASVWKL.js.map → install-ZA7L2UF3.js.map} +0 -0
- /package/dist/{runtime-fetch-ZSSSK72Y.js.map → install-funding-JDGYTF72.js.map} +0 -0
- /package/dist/{runtime-layout-WIDILZ6K.js.map → install-identity-FFAYEFLX.js.map} +0 -0
- /package/dist/{secp256k1-ZZZT2CAX.js.map → new-install-5L4GY3LN.js.map} +0 -0
- /package/dist/{update-CACXLQLR.js.map → package-BONDXSV3.js.map} +0 -0
- /package/dist/{usdc-VG4CIOUK.js.map → passphrase-T4ULBN4M.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-DOFTEIJV.js.map → paths-O2KDWZ76.js.map} +0 -0
- /package/dist/{wallet-QL4UUXEZ.js.map → pay-CMV5KL74.js.map} +0 -0
|
@@ -2,42 +2,48 @@ import { createRequire as __tenjinCreateRequire } from 'node:module'; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
maybeUpdate,
|
|
4
4
|
readUpdateSignal
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QKEUKBRK.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
HARNESSES
|
|
8
|
+
} from "./chunk-IULCDMVG.js";
|
|
9
|
+
import {
|
|
10
|
+
underAgentHarness
|
|
11
|
+
} from "./chunk-WXA3WTPF.js";
|
|
12
|
+
import {
|
|
13
|
+
noteBaseUrlFlag
|
|
14
|
+
} from "./chunk-3YPL6T3P.js";
|
|
15
|
+
import "./chunk-JWAK7JQB.js";
|
|
16
|
+
import {
|
|
17
|
+
closestNames
|
|
18
|
+
} from "./chunk-R62PKTAG.js";
|
|
9
19
|
import {
|
|
10
20
|
defaultIo,
|
|
11
21
|
emitFailure,
|
|
12
22
|
emitSuccess
|
|
13
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KLDMLWXT.js";
|
|
14
24
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import "./chunk-
|
|
25
|
+
markLive
|
|
26
|
+
} from "./chunk-5N4GGUBN.js";
|
|
27
|
+
import "./chunk-UIB33QQP.js";
|
|
28
|
+
import "./chunk-7WEQQJLG.js";
|
|
29
|
+
import "./chunk-ZCT5DJ3G.js";
|
|
30
|
+
import "./chunk-3MZ7DYRO.js";
|
|
21
31
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-WXA2BWTE.js";
|
|
29
|
-
import "./chunk-XQJXNMSB.js";
|
|
32
|
+
dataDir
|
|
33
|
+
} from "./chunk-JTX3BUDK.js";
|
|
34
|
+
import "./chunk-D6M3ZK66.js";
|
|
35
|
+
import "./chunk-RGCPELQN.js";
|
|
36
|
+
import "./chunk-CRG54LEB.js";
|
|
37
|
+
import "./chunk-TUCKEEXE.js";
|
|
30
38
|
import {
|
|
31
39
|
external_exports
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-7WEQQJLG.js";
|
|
40
|
+
} from "./chunk-P6YQWIT2.js";
|
|
34
41
|
import {
|
|
35
42
|
CliError
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-EDJWHDDL.js";
|
|
43
|
+
} from "./chunk-DI4QAGRZ.js";
|
|
38
44
|
import {
|
|
39
|
-
|
|
40
|
-
} from "./chunk-
|
|
45
|
+
package_default
|
|
46
|
+
} from "./chunk-3Y2EHT4F.js";
|
|
41
47
|
import {
|
|
42
48
|
__commonJS,
|
|
43
49
|
__require,
|
|
@@ -3494,6 +3500,10 @@ var {
|
|
|
3494
3500
|
Help
|
|
3495
3501
|
} = import_index.default;
|
|
3496
3502
|
|
|
3503
|
+
// src/lib/permissions.ts
|
|
3504
|
+
var PERMISSIONS_DOC_URL = "https://github.com/BackTrackCo/tenjin-agent/blob/main/docs/agent-permissions.md";
|
|
3505
|
+
var SETTINGS_DOC_URL = "https://github.com/BackTrackCo/tenjin-agent/blob/main/docs/router-reference.md#your-settings";
|
|
3506
|
+
|
|
3497
3507
|
// src/cli/core.ts
|
|
3498
3508
|
import { homedir } from "node:os";
|
|
3499
3509
|
|
|
@@ -3505,21 +3515,79 @@ function collect(value, previous) {
|
|
|
3505
3515
|
return [...previous ?? [], value];
|
|
3506
3516
|
}
|
|
3507
3517
|
|
|
3518
|
+
// src/router/install-output.ts
|
|
3519
|
+
function installOutput(result, ctx, refresh, env = process.env) {
|
|
3520
|
+
if (refresh || ctx.flags.json || ctx.io.isTTY || !underAgentHarness(env)) return result;
|
|
3521
|
+
return { ...result, data: handoff(result.data), compactJson: true };
|
|
3522
|
+
}
|
|
3523
|
+
function record(value) {
|
|
3524
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
3525
|
+
}
|
|
3526
|
+
function handoff(value) {
|
|
3527
|
+
if (!record(value)) return value;
|
|
3528
|
+
if (Array.isArray(value.hosts)) {
|
|
3529
|
+
const out = { ...value };
|
|
3530
|
+
for (const host of value.hosts) {
|
|
3531
|
+
if (typeof host === "string" && Object.hasOwn(value, host)) out[host] = handoff(value[host]);
|
|
3532
|
+
}
|
|
3533
|
+
return out;
|
|
3534
|
+
}
|
|
3535
|
+
const { next, nextSteps, plugin, wallet, claudeCode, runtime, launcher, mcpServer, ...rest } = value;
|
|
3536
|
+
return {
|
|
3537
|
+
next,
|
|
3538
|
+
nextSteps,
|
|
3539
|
+
...rest,
|
|
3540
|
+
plugin: registeredPlugin(plugin),
|
|
3541
|
+
wallet: walletHandoff(wallet),
|
|
3542
|
+
// Preserve blocked/unknown readiness and every fix; omit only successful diagnostics.
|
|
3543
|
+
...record(claudeCode) && claudeCode.meetsFloor === true && !claudeCode.fix && !claudeCode.reason ? {} : { claudeCode },
|
|
3544
|
+
...record(runtime) && ["active", "current", "kept"].includes(String(runtime.state)) && !runtime.reason && !runtime.fix ? {} : { runtime },
|
|
3545
|
+
...record(launcher) && ["written", "current"].includes(String(launcher.state)) && !launcher.reason && !launcher.fix ? {} : { launcher },
|
|
3546
|
+
...record(mcpServer) && mcpServer.status === "ok" && mcpServer.required === false && !mcpServer.fix ? {} : { mcpServer }
|
|
3547
|
+
};
|
|
3548
|
+
}
|
|
3549
|
+
function registeredPlugin(value) {
|
|
3550
|
+
if (!record(value) || !["installed", "updated", "current", "written"].includes(String(value.state)))
|
|
3551
|
+
return value;
|
|
3552
|
+
const registration = { ...value };
|
|
3553
|
+
delete registration.steps;
|
|
3554
|
+
return registration;
|
|
3555
|
+
}
|
|
3556
|
+
function walletHandoff(value) {
|
|
3557
|
+
if (!record(value) || !record(value.signing) || value.signing.status !== "ready" || value.shellOnly !== void 0 || value.warning || value.reason || value.fix || record(value.passphrase) && value.passphrase.durable === false)
|
|
3558
|
+
return value;
|
|
3559
|
+
if (value.status !== "created" && value.status !== "existing") return value;
|
|
3560
|
+
return { status: value.status, signing: { status: "ready" } };
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3508
3563
|
// src/cli/core.ts
|
|
3509
3564
|
function registerCore(reg) {
|
|
3510
3565
|
const { runCommand, leaf: leaf2, addGlobalFlags: addGlobalFlags2 } = reg;
|
|
3511
|
-
leaf2(SETUP, "install", "set up Tenjin for
|
|
3512
|
-
"
|
|
3513
|
-
).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(
|
|
3566
|
+
leaf2(SETUP, "install", "set up Tenjin for Claude Code or Codex").description(
|
|
3567
|
+
"Install the Tenjin plugin, create a local wallet if needed, and choose spending limits. Your agent sets itself up; a terminal detects Claude Code and Codex and lets you choose when both are present. Funding is optional. Codex supports user scope only."
|
|
3568
|
+
).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(
|
|
3569
|
+
"--yes",
|
|
3570
|
+
"accept setup and spending defaults ($5 a day, $1 a call). Subagents require their own choice"
|
|
3571
|
+
).addOption(
|
|
3572
|
+
new Option(
|
|
3573
|
+
"--subagents <on|off>",
|
|
3574
|
+
"answer the DeepSeek subagent question, where no answer is saved yet"
|
|
3575
|
+
).choices(["on", "off"])
|
|
3576
|
+
).option("--session-budget <usd|none>", "your own daily budget shared across chats, or none").option(
|
|
3577
|
+
"--max-auto-spend <usd>",
|
|
3578
|
+
"your own non-negative per-call limit (default 1.00; 0 blocks positive automatic payments)"
|
|
3579
|
+
).addHelpText(
|
|
3514
3580
|
"after",
|
|
3515
3581
|
`
|
|
3516
3582
|
Examples:
|
|
3517
3583
|
$ tenjin install
|
|
3518
3584
|
$ tenjin install --project
|
|
3585
|
+
$ tenjin install --yes --subagents off
|
|
3519
3586
|
$ tenjin install --max-auto-spend 0.50 --session-budget 10
|
|
3520
3587
|
|
|
3521
|
-
The daily
|
|
3522
|
-
|
|
3588
|
+
The daily budget is shared across chats. Its spending counter resets 24 hours after its window starts;
|
|
3589
|
+
opening a new chat does not reset it. The per-call limit bounds each call, and the wallet balance is
|
|
3590
|
+
the hard stop. To disable Tenjin requests and automatic routing here:
|
|
3523
3591
|
$ tenjin config set router.enabled false
|
|
3524
3592
|
|
|
3525
3593
|
Learn more:
|
|
@@ -3533,7 +3601,12 @@ Learn more:
|
|
|
3533
3601
|
if (harness === "codex" && o.refresh === true) {
|
|
3534
3602
|
throw new CliError("USAGE", "The Codex plugin has no refresh; omit --refresh.");
|
|
3535
3603
|
}
|
|
3536
|
-
|
|
3604
|
+
if (o.refresh === true && o.subagents !== void 0) {
|
|
3605
|
+
throw new CliError("USAGE", "Omit --refresh when choosing whether to enable subagents.");
|
|
3606
|
+
}
|
|
3607
|
+
const { captureNewInstall, finishNewInstall } = await import("./new-install-5L4GY3LN.js");
|
|
3608
|
+
const newInstall = await captureNewInstall(ctx.dataDir);
|
|
3609
|
+
const { installHosts, otherHostNote, recordInstalledHost, runEach, withNote } = await import("./hosts-3EMTVM4H.js");
|
|
3537
3610
|
const hostArgs = {
|
|
3538
3611
|
...harness !== void 0 ? { harness } : {},
|
|
3539
3612
|
...o.project === true ? { project: true } : {},
|
|
@@ -3541,10 +3614,11 @@ Learn more:
|
|
|
3541
3614
|
...o.yes === true ? { yes: true } : {}
|
|
3542
3615
|
};
|
|
3543
3616
|
const hosts = await installHosts(hostArgs, ctx);
|
|
3544
|
-
const
|
|
3545
|
-
const
|
|
3617
|
+
const { fundingOncePerRun, finishTerminalFunding } = await import("./install-funding-JDGYTF72.js");
|
|
3618
|
+
const funding = fundingOncePerRun();
|
|
3619
|
+
const runtime = (await import("./install-ZA7L2UF3.js")).runtimeOncePerRun();
|
|
3546
3620
|
const installAll = () => runEach(hosts, async (host) => {
|
|
3547
|
-
const one = host === "codex" ? await (await import("./codex-install-
|
|
3621
|
+
const one = host === "codex" ? await (await import("./codex-install-HZV2DOAB.js")).runCodexInstall(codexArgs(o), ctx, { runtime, funding, newInstall }) : await (await import("./install-ZA7L2UF3.js")).runRouterInstall(
|
|
3548
3622
|
{
|
|
3549
3623
|
...o.project === true ? { project: true } : {},
|
|
3550
3624
|
...o.refresh === true ? { refresh: true } : {},
|
|
@@ -3554,20 +3628,28 @@ Learn more:
|
|
|
3554
3628
|
...typeof o.sessionBudget === "string" ? { sessionBudget: o.sessionBudget } : {}
|
|
3555
3629
|
},
|
|
3556
3630
|
ctx,
|
|
3557
|
-
{ runtime }
|
|
3631
|
+
{ runtime, funding, newInstall }
|
|
3558
3632
|
);
|
|
3559
3633
|
if (o.refresh !== true) await recordInstalledHost(ctx.dataDir, host);
|
|
3560
3634
|
return one;
|
|
3561
3635
|
});
|
|
3562
3636
|
if (o.refresh !== true || harness !== void 0) {
|
|
3563
|
-
|
|
3637
|
+
const installed = await installAll();
|
|
3638
|
+
const result = o.refresh === true || !hosts.includes("claude") ? installed : await finishNewInstall(installed, newInstall, ctx, {
|
|
3639
|
+
...o.subagents !== void 0 ? { choice: o.subagents } : {},
|
|
3640
|
+
...harness !== void 0 ? { harness } : {},
|
|
3641
|
+
yes: o.yes === true
|
|
3642
|
+
});
|
|
3643
|
+
const finished = o.refresh === true ? result : await finishTerminalFunding(result, ctx, { yes: o.yes === true });
|
|
3644
|
+
const note = await otherHostNote(hostArgs, ctx.dataDir);
|
|
3645
|
+
return installOutput(withNote(finished, note), ctx, o.refresh === true);
|
|
3564
3646
|
}
|
|
3565
|
-
const { alongsideCodexRefresh, refreshCodexPlugin } = await import("./codex-install-
|
|
3647
|
+
const { alongsideCodexRefresh, refreshCodexPlugin } = await import("./codex-install-HZV2DOAB.js");
|
|
3566
3648
|
return alongsideCodexRefresh(installAll, () => refreshCodexPlugin(ctx));
|
|
3567
3649
|
});
|
|
3568
3650
|
});
|
|
3569
3651
|
leaf2(SETUP, "uninstall", "remove what install wrote; the wallet is kept").description(
|
|
3570
|
-
"Remove Tenjin
|
|
3652
|
+
"Remove Tenjin from this project, or from your agent when there is no project install. Keep your wallet, funds, spending history and config. Shared runtime files stay while another Tenjin install needs them. Run this before `npm uninstall -g tenjin-cli`."
|
|
3571
3653
|
).addOption(hostOverride()).option(
|
|
3572
3654
|
"--project [path]",
|
|
3573
3655
|
"remove that project's install (this folder's when no path is given), from any folder"
|
|
@@ -3583,8 +3665,8 @@ Learn more:
|
|
|
3583
3665
|
throw new CliError("USAGE", "Codex has no project install; omit --project.");
|
|
3584
3666
|
}
|
|
3585
3667
|
const [{ recordedHosts, uninstallEach }, uninstall] = await Promise.all([
|
|
3586
|
-
import("./hosts-
|
|
3587
|
-
import("./uninstall-
|
|
3668
|
+
import("./hosts-3EMTVM4H.js"),
|
|
3669
|
+
import("./uninstall-LJZUKM4D.js")
|
|
3588
3670
|
]);
|
|
3589
3671
|
const target = harness === "codex" ? { kind: o.all === true ? "all" : "user" } : await uninstall.resolveUninstallTarget(
|
|
3590
3672
|
{
|
|
@@ -3601,7 +3683,7 @@ Learn more:
|
|
|
3601
3683
|
hosts,
|
|
3602
3684
|
ctx.dataDir,
|
|
3603
3685
|
target,
|
|
3604
|
-
async (host) => host === "codex" ? (await import("./codex-install-
|
|
3686
|
+
async (host) => host === "codex" ? (await import("./codex-install-HZV2DOAB.js")).runCodexUninstall(codexArgs(o), ctx) : uninstall.runRouterUninstall({ target }, ctx),
|
|
3605
3687
|
{
|
|
3606
3688
|
remove: () => uninstall.removeRuntimeAndLaunchers(ctx.dataDir, homedir()),
|
|
3607
3689
|
claudeLeft: () => uninstall.claudeInstallsLeft(ctx),
|
|
@@ -3610,8 +3692,8 @@ Learn more:
|
|
|
3610
3692
|
);
|
|
3611
3693
|
});
|
|
3612
3694
|
});
|
|
3613
|
-
leaf2(SETUP, "doctor", "
|
|
3614
|
-
"Check
|
|
3695
|
+
leaf2(SETUP, "doctor", "show setup status and routing readiness").description(
|
|
3696
|
+
"Check the agents Tenjin installed, without making a paid call. Show setup status, session evidence and routing readiness, followed by diagnostics and fixes. Codex checks plugin hooks only; it does not verify the current chat, wallet or funds. A required failure shows its error and fix instead of the summary, and exits nonzero. An unknown check remains a warning. Use --json for structured results."
|
|
3615
3697
|
).addOption(hostOverride()).option("--project", "check the project-only install, as --project registered it").addHelpText(
|
|
3616
3698
|
"after",
|
|
3617
3699
|
`
|
|
@@ -3624,14 +3706,14 @@ Examples:
|
|
|
3624
3706
|
await runCommand("doctor", this, async (ctx) => {
|
|
3625
3707
|
const o = this.opts();
|
|
3626
3708
|
const harness = o.harness;
|
|
3627
|
-
const { checkEach, recordedHosts } = await import("./hosts-
|
|
3709
|
+
const { checkEach, recordedHosts } = await import("./hosts-3EMTVM4H.js");
|
|
3628
3710
|
const hosts = await recordedHosts(
|
|
3629
3711
|
{ ...harness !== void 0 ? { harness } : {}, project: o.project === true },
|
|
3630
3712
|
ctx.dataDir
|
|
3631
3713
|
);
|
|
3632
3714
|
return checkEach(
|
|
3633
3715
|
hosts,
|
|
3634
|
-
async (host) => host === "codex" ? (await import("./codex-install-
|
|
3716
|
+
async (host) => host === "codex" ? (await import("./codex-install-HZV2DOAB.js")).runCodexDoctor(codexArgs(o), ctx) : (await import("./doctor-ZWJXRD75.js")).runRouterDoctor(
|
|
3635
3717
|
ctx,
|
|
3636
3718
|
o.project === true ? { project: true } : {}
|
|
3637
3719
|
)
|
|
@@ -3642,61 +3724,115 @@ Examples:
|
|
|
3642
3724
|
"Update Tenjin to the newest version on npm's latest tag, without npm: it downloads the release, checks it, and switches only once it runs; the previous version stays as the fallback."
|
|
3643
3725
|
).option("--check", "report whether a newer version exists without installing it").addOption(new Option("--background").hideHelp()).action(async function() {
|
|
3644
3726
|
await runCommand("update", this, async (ctx) => {
|
|
3645
|
-
const { runUpdate } = await import("./update-
|
|
3727
|
+
const { runUpdate } = await import("./update-EUIX72IX.js");
|
|
3646
3728
|
return runUpdate(
|
|
3647
3729
|
{ check: this.opts().check === true, background: this.opts().background === true },
|
|
3648
3730
|
ctx
|
|
3649
3731
|
);
|
|
3650
3732
|
});
|
|
3651
3733
|
});
|
|
3652
|
-
const config = leaf2(SETUP, "config", "
|
|
3653
|
-
"Print every effective config value, or read and write one. Values are stored in config.json under your Tenjin data dir (~/.tenjin by default). maxAutoSpend caps automatic router spending per call; sessionBudget caps it within a 24-hour budget window, across agent sessions. An unset sendMaxAmount blocks tenjin wallet send until you set a cap; only an explicit none allows uncapped sends."
|
|
3654
|
-
);
|
|
3655
|
-
config.addHelpText(
|
|
3656
|
-
"after",
|
|
3657
|
-
`
|
|
3658
|
-
Examples:
|
|
3659
|
-
$ tenjin config
|
|
3660
|
-
$ tenjin config set router.context turn
|
|
3661
|
-
$ tenjin config set maxAutoSpend 0.25
|
|
3662
|
-
$ tenjin config set --project router.enabled false
|
|
3663
|
-
`
|
|
3664
|
-
);
|
|
3665
|
-
config.action(async function() {
|
|
3734
|
+
const config = leaf2(SETUP, "config", "your rules, limits and settings").argument("[command]").option("--all", "print every setting with its value, where it comes from and what it does").action(async function(typed) {
|
|
3666
3735
|
await runCommand("config", this, async (ctx) => {
|
|
3667
|
-
|
|
3668
|
-
|
|
3736
|
+
if (typed !== void 0) throw unknownConfigCommand(typed, this);
|
|
3737
|
+
const { runConfigList } = await import("./config-QZOBMTEL.js");
|
|
3738
|
+
return runConfigList(ctx, this.opts().all === true ? { all: true } : {});
|
|
3669
3739
|
});
|
|
3670
3740
|
});
|
|
3671
|
-
addGlobalFlags2(config.command("
|
|
3672
|
-
"
|
|
3673
|
-
|
|
3741
|
+
addGlobalFlags2(config.command("subagents [mode]")).summary("show DeepSeek subagents, turn them on or off, or list why calls got no offer").option(
|
|
3742
|
+
"--repository <path...>",
|
|
3743
|
+
"limit the consent to these directories and their subfolders; without it, on covers every workspace"
|
|
3744
|
+
).option(
|
|
3745
|
+
"--max-job <USD>",
|
|
3746
|
+
"a lower ceiling per job than your per-call spend limit, which is the default cap"
|
|
3747
|
+
).option("--windows-worker-sid <sid>", "SID of the dedicated standard Windows worker account").option("--windows-launcher <path>", "absolute local path to the Windows worker launcher .exe").option("--windows-claude <path>", "absolute local path to the native Claude Code .exe").option(
|
|
3748
|
+
"--windows-config-dir <path>",
|
|
3749
|
+
"separate shared Claude configuration directory on Windows"
|
|
3750
|
+
).option(
|
|
3751
|
+
"--accept-windows-shell-access",
|
|
3752
|
+
"allow the unsandboxed Windows worker to share results from files and networks its account can reach with Tenjin and DeepSeek"
|
|
3753
|
+
).addHelpText(
|
|
3754
|
+
"after",
|
|
3755
|
+
configExamples(
|
|
3756
|
+
[
|
|
3757
|
+
"subagents",
|
|
3758
|
+
"subagents on",
|
|
3759
|
+
"subagents on --max-job 0.50",
|
|
3760
|
+
"subagents on --repository ~/work ~/notes",
|
|
3761
|
+
"subagents off",
|
|
3762
|
+
"subagents why"
|
|
3763
|
+
],
|
|
3764
|
+
"Details and recipients: https://github.com/BackTrackCo/tenjin-agent/blob/main/docs/subagents.md"
|
|
3765
|
+
)
|
|
3766
|
+
).action(async function(mode, options) {
|
|
3767
|
+
await runCommand(
|
|
3768
|
+
"config subagents",
|
|
3769
|
+
this,
|
|
3770
|
+
async (ctx) => (await import("./config-subagents-WQV2ZAD5.js")).runConfigSubagents(mode, options, ctx)
|
|
3771
|
+
);
|
|
3772
|
+
});
|
|
3773
|
+
addGlobalFlags2(config.command("get <key>")).summary("print one value").description("Print one setting's value as Tenjin uses it, defaults and environment included.").addHelpText("after", configExamples(["get maxAutoSpend", "get router.enabled"], EVERY_KEY)).action(async function(key) {
|
|
3674
3774
|
await runCommand("config.get", this, async (ctx) => {
|
|
3675
|
-
const { runConfigGet } = await import("./config-
|
|
3775
|
+
const { runConfigGet } = await import("./config-QZOBMTEL.js");
|
|
3676
3776
|
return runConfigGet({ key }, ctx);
|
|
3677
3777
|
});
|
|
3678
3778
|
});
|
|
3679
|
-
addGlobalFlags2(config.command("set <key> <value>")).summary("set
|
|
3680
|
-
"Write one
|
|
3779
|
+
addGlobalFlags2(config.command("set <key> <value>")).summary("set one value").description(
|
|
3780
|
+
"Write one setting, checked against its key. Spend keys take decimal USD, such as 0.50."
|
|
3681
3781
|
).option(
|
|
3682
3782
|
"--project",
|
|
3683
3783
|
"write a router key into this project's .tenjin/config.json, which is committed"
|
|
3684
|
-
).option("--local", "with --project, write .tenjin/config.local.json instead, which is yours").
|
|
3784
|
+
).option("--local", "with --project, write .tenjin/config.local.json instead, which is yours").addHelpText(
|
|
3785
|
+
"after",
|
|
3786
|
+
configExamples(
|
|
3787
|
+
["set maxAutoSpend 0.50", "set router.improve false", "set --project router.enabled false"],
|
|
3788
|
+
EVERY_KEY
|
|
3789
|
+
)
|
|
3790
|
+
).action(async function(key, value) {
|
|
3685
3791
|
const o = this.opts();
|
|
3686
3792
|
await runCommand("config.set", this, async (ctx) => {
|
|
3687
|
-
const { runConfigSet } = await import("./config-
|
|
3793
|
+
const { runConfigSet } = await import("./config-QZOBMTEL.js");
|
|
3688
3794
|
return runConfigSet(
|
|
3689
3795
|
{ key, value, project: o.project === true, local: o.local === true },
|
|
3690
3796
|
ctx
|
|
3691
3797
|
);
|
|
3692
3798
|
});
|
|
3693
3799
|
});
|
|
3800
|
+
addGlobalFlags2(config.command("names [word...]")).summary("every name you can use in a rule").description(
|
|
3801
|
+
"List every name a rule can use, by kind, with the id to type after its flag. A word filters them; case, spaces and a typo are fine."
|
|
3802
|
+
).option("--kind <kind>", "only one kind: task, category, provider, seller, service or account").addHelpText(
|
|
3803
|
+
"after",
|
|
3804
|
+
configExamples(["names", "names firecrawl", "names --kind task"], SETTINGS_DOCS)
|
|
3805
|
+
).action(async function(words) {
|
|
3806
|
+
const o = this.opts();
|
|
3807
|
+
await runCommand("config.names", this, async (ctx) => {
|
|
3808
|
+
const { runConfigNames } = await import("./config-names-Z5NZD5R2.js");
|
|
3809
|
+
return runConfigNames(
|
|
3810
|
+
{
|
|
3811
|
+
...words.length > 0 ? { search: words.join(" ") } : {},
|
|
3812
|
+
...typeof o.kind === "string" ? { kind: o.kind } : {}
|
|
3813
|
+
},
|
|
3814
|
+
ctx
|
|
3815
|
+
);
|
|
3816
|
+
});
|
|
3817
|
+
});
|
|
3818
|
+
registerConfigRules(config, reg);
|
|
3819
|
+
config.configureHelp({ formatHelp: () => CONFIG_HELP });
|
|
3820
|
+
fundCommand(
|
|
3821
|
+
leaf2(WALLET, "fund [amountUsd]", "add funds in your browser, and watch them land"),
|
|
3822
|
+
"fund",
|
|
3823
|
+
runCommand
|
|
3824
|
+
);
|
|
3825
|
+
balanceCommand(
|
|
3826
|
+
leaf2(WALLET, "balance", "show your balance and spending limits", ["--timeout"]),
|
|
3827
|
+
"balance",
|
|
3828
|
+
runCommand
|
|
3829
|
+
);
|
|
3694
3830
|
const wallet = leaf2(
|
|
3695
3831
|
WALLET,
|
|
3696
3832
|
"wallet",
|
|
3697
3833
|
"create, show, fund, repair and send from the local wallet"
|
|
3698
3834
|
).description(
|
|
3699
|
-
"Manage the local x402 payment wallet
|
|
3835
|
+
"Manage the local x402 payment wallet the router and `tenjin pay` spend from. The private key is generated on this machine, stored encrypted, and never printed."
|
|
3700
3836
|
);
|
|
3701
3837
|
addGlobalFlags2(wallet.command("create")).summary("create a new local wallet").description(
|
|
3702
3838
|
"Create a new local wallet and store its keystore encrypted under your Tenjin data dir. It refuses when one already exists, so replacing an active wallet is the deliberate --replace."
|
|
@@ -3709,22 +3845,22 @@ Examples:
|
|
|
3709
3845
|
).action(async function() {
|
|
3710
3846
|
await runCommand("wallet.create", this, async (ctx) => {
|
|
3711
3847
|
const o = this.opts();
|
|
3712
|
-
const { runWalletCreate } = await import("./wallet-
|
|
3848
|
+
const { runWalletCreate } = await import("./wallet-HSW757W6.js");
|
|
3713
3849
|
return runWalletCreate(ctx, {
|
|
3714
3850
|
...o.replace === true ? { replace: true } : {},
|
|
3715
3851
|
...o.insecureStorage === true ? { insecureStorage: true } : {}
|
|
3716
3852
|
});
|
|
3717
3853
|
});
|
|
3718
3854
|
});
|
|
3719
|
-
addGlobalFlags2(wallet.command("repair")).summary("save the wallet passphrase so
|
|
3720
|
-
"
|
|
3855
|
+
addGlobalFlags2(wallet.command("repair")).summary("save the wallet passphrase so your agent can unlock it").description(
|
|
3856
|
+
"Check the passphrase locally and save it in the OS keychain, or a file only you can read where no keychain is available. The wallet address stays the same. Enter the passphrase in the terminal prompt, never in chat. Start a new agent session afterwards and check it with doctor."
|
|
3721
3857
|
).option(
|
|
3722
3858
|
"--insecure-storage",
|
|
3723
3859
|
"save the passphrase to a file only you can read, even where an OS keychain exists"
|
|
3724
3860
|
).action(async function() {
|
|
3725
3861
|
await runCommand("wallet.repair", this, async (ctx) => {
|
|
3726
3862
|
const o = this.opts();
|
|
3727
|
-
const { runWalletRepair } = await import("./wallet-
|
|
3863
|
+
const { runWalletRepair } = await import("./wallet-HSW757W6.js");
|
|
3728
3864
|
return runWalletRepair(ctx, o.insecureStorage === true ? { insecureStorage: true } : {});
|
|
3729
3865
|
});
|
|
3730
3866
|
});
|
|
@@ -3733,35 +3869,24 @@ Examples:
|
|
|
3733
3869
|
).option("--no-qr", "print the address without the QR code").action(async function() {
|
|
3734
3870
|
await runCommand("wallet.show", this, async (ctx) => {
|
|
3735
3871
|
const o = this.opts();
|
|
3736
|
-
const { runWalletShow } = await import("./wallet-
|
|
3872
|
+
const { runWalletShow } = await import("./wallet-HSW757W6.js");
|
|
3737
3873
|
return runWalletShow(ctx, o.qr === false ? { qr: false } : {});
|
|
3738
3874
|
});
|
|
3739
3875
|
});
|
|
3740
|
-
|
|
3741
|
-
"
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
"
|
|
3752
|
-
|
|
3753
|
-
)
|
|
3754
|
-
await runCommand("wallet.fund", this, async (ctx) => {
|
|
3755
|
-
const o = this.opts();
|
|
3756
|
-
const { runFund } = await import("./fund-2QRO7OJL.js");
|
|
3757
|
-
return runFund(ctx, {
|
|
3758
|
-
...amountUsd !== void 0 ? { amountUsd } : {},
|
|
3759
|
-
...o.open === false ? { open: false } : {},
|
|
3760
|
-
...o.qr === false ? { qr: false } : {},
|
|
3761
|
-
...o.wait === false ? { wait: false } : {}
|
|
3762
|
-
});
|
|
3763
|
-
});
|
|
3764
|
-
});
|
|
3876
|
+
balanceCommand(
|
|
3877
|
+
addGlobalFlags2(wallet.command("balance"), ["--timeout"]).summary(
|
|
3878
|
+
"show your balance and spending limits (same as `tenjin balance`)"
|
|
3879
|
+
),
|
|
3880
|
+
"wallet.balance",
|
|
3881
|
+
runCommand
|
|
3882
|
+
);
|
|
3883
|
+
fundCommand(
|
|
3884
|
+
addGlobalFlags2(wallet.command("fund [amountUsd]")).summary(
|
|
3885
|
+
"add funds in your browser (same as `tenjin fund`)"
|
|
3886
|
+
),
|
|
3887
|
+
"wallet.fund",
|
|
3888
|
+
runCommand
|
|
3889
|
+
);
|
|
3765
3890
|
addGlobalFlags2(wallet.command("send <amount> <token> <to>")).summary("move funds out of the wallet (escape hatch)").description(
|
|
3766
3891
|
"Move funds OUT of the agent wallet: preview the resolved recipient and amount, confirm explicitly, then transfer on Base and print the tx hash. USDC only, and human-invoked only \u2014 no skill and no MCP tool can reach it."
|
|
3767
3892
|
).option("--yes", "skip the interactive confirm (required to send when not at a TTY)").addHelpText(
|
|
@@ -3773,10 +3898,22 @@ Examples:
|
|
|
3773
3898
|
).action(async function(amount, token, to) {
|
|
3774
3899
|
await runCommand("wallet.send", this, async (ctx) => {
|
|
3775
3900
|
const o = this.opts();
|
|
3776
|
-
const { runSend } = await import("./send-
|
|
3901
|
+
const { runSend } = await import("./send-ELXFKEKY.js");
|
|
3777
3902
|
return runSend({ amount, token, to, ...o.yes === true ? { yes: true } : {} }, ctx);
|
|
3778
3903
|
});
|
|
3779
3904
|
});
|
|
3905
|
+
leaf2(
|
|
3906
|
+
WALLET,
|
|
3907
|
+
"reclaim-subagent-credit",
|
|
3908
|
+
"return credit parked in the old shared subagent channels"
|
|
3909
|
+
).description(
|
|
3910
|
+
"One time, for a machine that ran an early build of DeepSeek subagents: refund to your wallet the credit that build left in its two shared inference channels (shown as `modelCredit` by `tenjin balance --json`). It asks the router for the same cooperative refund a worker run gets at its end and prints what came back with its transaction. Run it twice and the second finds nothing."
|
|
3911
|
+
).action(async function() {
|
|
3912
|
+
await runCommand("wallet.reclaim-subagent-credit", this, async (ctx) => {
|
|
3913
|
+
const { runReclaimSubagentCredit } = await import("./reclaim-subagent-credit-ABSF67SJ.js");
|
|
3914
|
+
return runReclaimSubagentCredit(ctx);
|
|
3915
|
+
});
|
|
3916
|
+
});
|
|
3780
3917
|
leaf2(WALLET, "pay <url>", "pay an x402 endpoint with explicit user consent").description(
|
|
3781
3918
|
"Pay an x402 endpoint (exact scheme, USDC on Base) with explicit user consent. Manual pay ignores automatic router limits and always confirms; --yes records prior consent for this quote. Never use it as an autonomous workaround for router refusal. Unlisted endpoints need no warning flag. Registry lookup failures or listed-term mismatches require --ignore-warnings separately. Every paid call pays; entitled delivery remains free."
|
|
3782
3919
|
).option(
|
|
@@ -3807,7 +3944,7 @@ Examples:
|
|
|
3807
3944
|
).action(async function(url) {
|
|
3808
3945
|
await runCommand("pay", this, async (ctx) => {
|
|
3809
3946
|
const o = this.opts();
|
|
3810
|
-
const { runPay } = await import("./pay-
|
|
3947
|
+
const { runPay } = await import("./pay-CMV5KL74.js");
|
|
3811
3948
|
return runPay(
|
|
3812
3949
|
{
|
|
3813
3950
|
url,
|
|
@@ -3826,6 +3963,63 @@ Examples:
|
|
|
3826
3963
|
});
|
|
3827
3964
|
});
|
|
3828
3965
|
}
|
|
3966
|
+
function fundCommand(cmd, name, runCommand) {
|
|
3967
|
+
cmd.description(
|
|
3968
|
+
"Open checkout in your browser to add funds, then watch the payment land: the page opening, the payment, and the new balance. Confirm the amount and any fee in the browser. Ctrl-C stops watching; it does not cancel checkout. With --usdc, show the address to send USDC to instead."
|
|
3969
|
+
).option("--no-open", "print the checkout link without opening a browser").option("--no-qr", "no QR code, even when no browser can open the link").option(
|
|
3970
|
+
"--no-wait",
|
|
3971
|
+
"return once the link is issued instead of watching for the payment (already the default when not at a terminal)"
|
|
3972
|
+
).option("--usdc", "send USDC from a crypto wallet instead: shows the address and its QR code").option("--for <label>", "what the money is for, shown on the checkout page (with --price)").option("--price <usd>", "the price of that call in USD (with --for)").addOption(
|
|
3973
|
+
new Option("--source <where>", "where the link was asked for").choices(["install", "agent", "terminal"]).hideHelp()
|
|
3974
|
+
).addHelpText(
|
|
3975
|
+
"after",
|
|
3976
|
+
`
|
|
3977
|
+
Examples:
|
|
3978
|
+
$ tenjin fund
|
|
3979
|
+
$ tenjin fund 10
|
|
3980
|
+
$ tenjin fund 5 --for "X post read" --price 0.006
|
|
3981
|
+
$ tenjin fund --usdc
|
|
3982
|
+
`
|
|
3983
|
+
).action(async function(amountUsd) {
|
|
3984
|
+
await runCommand(name, this, async (ctx) => {
|
|
3985
|
+
const o = this.opts();
|
|
3986
|
+
const { runFund } = await import("./fund-VF7TLDJH.js");
|
|
3987
|
+
return runFund(ctx, {
|
|
3988
|
+
...amountUsd !== void 0 ? { amountUsd } : {},
|
|
3989
|
+
...o.open === false ? { open: false } : {},
|
|
3990
|
+
...o.qr === false ? { qr: false } : {},
|
|
3991
|
+
...o.wait === false ? { wait: false } : {},
|
|
3992
|
+
...o.usdc === true ? { usdc: true } : {},
|
|
3993
|
+
...typeof o.for === "string" ? { forLabel: o.for } : {},
|
|
3994
|
+
...typeof o.price === "string" ? { priceUsd: o.price } : {},
|
|
3995
|
+
...typeof o.source === "string" ? { source: o.source } : {}
|
|
3996
|
+
});
|
|
3997
|
+
});
|
|
3998
|
+
});
|
|
3999
|
+
}
|
|
4000
|
+
function balanceCommand(cmd, name, runCommand) {
|
|
4001
|
+
cmd.description(
|
|
4002
|
+
"Show your Tenjin balance and the spending limits your agent works within. It is a read: no key is unlocked and nothing is spent. With --wait, watch until funds arrive, then print what was added: what your agent runs in the background after opening checkout."
|
|
4003
|
+
).option("--wait", "wait until the balance rises, then print what arrived").option("--timeout <duration>", "with --wait, how long to wait, like 15m or 90s (default 15m)").addHelpText(
|
|
4004
|
+
"after",
|
|
4005
|
+
`
|
|
4006
|
+
Examples:
|
|
4007
|
+
$ tenjin balance
|
|
4008
|
+
$ tenjin balance --wait
|
|
4009
|
+
$ tenjin balance --wait --timeout 30m
|
|
4010
|
+
`
|
|
4011
|
+
).action(async function() {
|
|
4012
|
+
await runCommand(name, this, async (ctx) => {
|
|
4013
|
+
const o = this.opts();
|
|
4014
|
+
const { runBalance } = await import("./balance-DFHC6XEU.js");
|
|
4015
|
+
const typed = this.getOptionValueSourceWithGlobals("timeout") === "cli";
|
|
4016
|
+
return runBalance(ctx, {
|
|
4017
|
+
...o.wait === true ? { wait: true } : {},
|
|
4018
|
+
...o.wait === true && typed ? { waitMs: ctx.flags.timeout } : {}
|
|
4019
|
+
});
|
|
4020
|
+
});
|
|
4021
|
+
});
|
|
4022
|
+
}
|
|
3829
4023
|
function hostOverride() {
|
|
3830
4024
|
return new Option("--harness <host>", "only this agent host, instead of the ones found").choices(
|
|
3831
4025
|
HARNESSES
|
|
@@ -3840,86 +4034,366 @@ function codexArgs(o) {
|
|
|
3840
4034
|
...typeof o.sessionBudget === "string" ? { sessionBudget: o.sessionBudget } : {}
|
|
3841
4035
|
};
|
|
3842
4036
|
}
|
|
4037
|
+
var CONFIG_HELP = `Usage: tenjin config [command] [options]
|
|
4038
|
+
|
|
4039
|
+
Your rules for what Tenjin offers on its own, plus your limits and settings.
|
|
4040
|
+
|
|
4041
|
+
Show
|
|
4042
|
+
tenjin config your rules, limits and what you changed
|
|
4043
|
+
tenjin config --all every setting, with its default
|
|
4044
|
+
tenjin config names [word] every name you can use in a rule
|
|
4045
|
+
|
|
4046
|
+
Change what Tenjin offers on its own
|
|
4047
|
+
block / unblock never offer something, or undo that
|
|
4048
|
+
prefer try something first
|
|
4049
|
+
only offer only what you name
|
|
4050
|
+
reset remove a rule, or --all of them
|
|
4051
|
+
|
|
4052
|
+
Switches
|
|
4053
|
+
speed on|off also offer faster paid tools
|
|
4054
|
+
replacement on|off run Tenjin's picks automatically (Claude Code)
|
|
4055
|
+
fallback on|off use Tenjin's tool when your account refuses
|
|
4056
|
+
subagents [on|off|why] DeepSeek for eligible subagent jobs; why: calls with no offer
|
|
4057
|
+
|
|
4058
|
+
Values
|
|
4059
|
+
get <key> / set <key> <value>
|
|
4060
|
+
|
|
4061
|
+
Examples
|
|
4062
|
+
tenjin config names firecrawl
|
|
4063
|
+
tenjin config block --provider firecrawl
|
|
4064
|
+
tenjin config prefer --task "web research" --provider exa
|
|
4065
|
+
|
|
4066
|
+
A tool you or your agent asks for by name always runs.
|
|
4067
|
+
Learn more: tenjin config <command> --help \xB7 docs: ${SETTINGS_DOC_URL}
|
|
4068
|
+
`;
|
|
4069
|
+
var FIND_NAMES = "Find names: tenjin config names <word>";
|
|
4070
|
+
var EVERY_KEY = "Every key, with what it does: tenjin config --all";
|
|
4071
|
+
var SETTINGS_DOCS = `Learn more: ${SETTINGS_DOC_URL}`;
|
|
4072
|
+
function configExamples(examples, footer = FIND_NAMES) {
|
|
4073
|
+
return `
|
|
4074
|
+
Examples:
|
|
4075
|
+
${examples.map((example) => ` $ tenjin config ${example}`).join("\n")}
|
|
4076
|
+
|
|
4077
|
+
${footer}
|
|
4078
|
+
`;
|
|
4079
|
+
}
|
|
4080
|
+
function unknownConfigCommand(typed, config) {
|
|
4081
|
+
const operations = config.commands.map((command) => ({
|
|
4082
|
+
id: command.name(),
|
|
4083
|
+
label: command.name()
|
|
4084
|
+
}));
|
|
4085
|
+
const near = closestNames(operations, typed).map(({ id }) => id);
|
|
4086
|
+
return new CliError("USAGE", `tenjin config has no command "${typed}".`, {
|
|
4087
|
+
fix: `${near.length > 0 ? `Did you mean: ${near.join(", ")}? ` : ""}See tenjin config --help.`
|
|
4088
|
+
});
|
|
4089
|
+
}
|
|
4090
|
+
var TARGET_FLAGS = {
|
|
4091
|
+
task: 'a task, such as "web research" (repeatable)',
|
|
4092
|
+
category: "a category of tasks, such as images (repeatable)",
|
|
4093
|
+
provider: "a provider, such as exa (repeatable)",
|
|
4094
|
+
seller: "who sells the call, such as stableenrich (repeatable)",
|
|
4095
|
+
service: "one service, such as exa-search (repeatable)",
|
|
4096
|
+
source: "one of your accounts, or tenjin for Tenjin's own tools (repeatable)"
|
|
4097
|
+
};
|
|
4098
|
+
function targetOptions(cmd, kinds, scopes = []) {
|
|
4099
|
+
for (const kind of kinds) {
|
|
4100
|
+
const help = scopes.includes(kind) ? TARGET_FLAGS[kind].replace(" (repeatable)", "") : TARGET_FLAGS[kind];
|
|
4101
|
+
cmd.option(`--${kind} <name>`, help, collect);
|
|
4102
|
+
}
|
|
4103
|
+
return cmd;
|
|
4104
|
+
}
|
|
4105
|
+
function targetFlags(o) {
|
|
4106
|
+
const out = {};
|
|
4107
|
+
for (const key of Object.keys(TARGET_FLAGS)) {
|
|
4108
|
+
if (Array.isArray(o[key])) out[key] = o[key];
|
|
4109
|
+
}
|
|
4110
|
+
return out;
|
|
4111
|
+
}
|
|
4112
|
+
function registerConfigRules(config, reg) {
|
|
4113
|
+
const { runCommand, addGlobalFlags: addGlobalFlags2 } = reg;
|
|
4114
|
+
const rules = () => import("./config-rules-YOYHS6YL.js");
|
|
4115
|
+
const all = Object.keys(TARGET_FLAGS);
|
|
4116
|
+
targetOptions(
|
|
4117
|
+
addGlobalFlags2(config.command("prefer")),
|
|
4118
|
+
["task", "category", "provider", "service", "source"],
|
|
4119
|
+
["task", "category"]
|
|
4120
|
+
).summary("try something first").description(
|
|
4121
|
+
"Try what you name first, in order: for one task or category, or with --source alone for every job. Other allowed tools stay the fallback."
|
|
4122
|
+
).option("--global", "the account-wide preference (with --source)").addHelpText(
|
|
4123
|
+
"after",
|
|
4124
|
+
configExamples([
|
|
4125
|
+
'prefer --task "web research" --provider exa',
|
|
4126
|
+
"prefer --category images --source fal",
|
|
4127
|
+
"prefer --source apify"
|
|
4128
|
+
])
|
|
4129
|
+
).action(async function() {
|
|
4130
|
+
const o = this.opts();
|
|
4131
|
+
await runCommand(
|
|
4132
|
+
"config.prefer",
|
|
4133
|
+
this,
|
|
4134
|
+
async (ctx) => (await rules()).runConfigPrefer(
|
|
4135
|
+
{ ...targetFlags(o), ...o.global === true ? { global: true } : {} },
|
|
4136
|
+
ctx
|
|
4137
|
+
)
|
|
4138
|
+
);
|
|
4139
|
+
});
|
|
4140
|
+
targetOptions(addGlobalFlags2(config.command("only")), [
|
|
4141
|
+
"task",
|
|
4142
|
+
"category",
|
|
4143
|
+
"provider",
|
|
4144
|
+
"seller",
|
|
4145
|
+
"service"
|
|
4146
|
+
]).summary("offer only what you name").description(
|
|
4147
|
+
"Offer only what you name: with --global, which tasks Tenjin does; with --task, who does that one task. Anything else still runs when asked for by name."
|
|
4148
|
+
).option("--global", "apply everywhere: with --category or --task, which tasks Tenjin does").addHelpText(
|
|
4149
|
+
"after",
|
|
4150
|
+
configExamples([
|
|
4151
|
+
'only --task "web research" --provider exa',
|
|
4152
|
+
"only --global --category images",
|
|
4153
|
+
'only --global --task "web research" --task "read an exact page"'
|
|
4154
|
+
])
|
|
4155
|
+
).action(async function() {
|
|
4156
|
+
const o = this.opts();
|
|
4157
|
+
await runCommand(
|
|
4158
|
+
"config.only",
|
|
4159
|
+
this,
|
|
4160
|
+
async (ctx) => (await rules()).runConfigOnly(
|
|
4161
|
+
{ ...targetFlags(o), ...o.global === true ? { global: true } : {} },
|
|
4162
|
+
ctx
|
|
4163
|
+
)
|
|
4164
|
+
);
|
|
4165
|
+
});
|
|
4166
|
+
targetOptions(addGlobalFlags2(config.command("block")), all).summary("never offer something on its own").description(
|
|
4167
|
+
"Never offer what you name on its own: a provider, seller, service, task, category or account. You or your agent can still ask for it by name."
|
|
4168
|
+
).addHelpText(
|
|
4169
|
+
"after",
|
|
4170
|
+
configExamples([
|
|
4171
|
+
"block --provider firecrawl",
|
|
4172
|
+
'block --task "crypto price quote"',
|
|
4173
|
+
"block --source tenjin"
|
|
4174
|
+
])
|
|
4175
|
+
).action(async function() {
|
|
4176
|
+
const o = this.opts();
|
|
4177
|
+
await runCommand(
|
|
4178
|
+
"config.block",
|
|
4179
|
+
this,
|
|
4180
|
+
async (ctx) => (await rules()).runConfigBlock(targetFlags(o), ctx)
|
|
4181
|
+
);
|
|
4182
|
+
});
|
|
4183
|
+
targetOptions(addGlobalFlags2(config.command("unblock")), all).summary("undo a block").description("Remove the blocks you name, and nothing else. Works offline.").addHelpText(
|
|
4184
|
+
"after",
|
|
4185
|
+
configExamples(["unblock --provider firecrawl", "unblock --source tenjin"])
|
|
4186
|
+
).action(async function() {
|
|
4187
|
+
const o = this.opts();
|
|
4188
|
+
await runCommand(
|
|
4189
|
+
"config.unblock",
|
|
4190
|
+
this,
|
|
4191
|
+
async (ctx) => (await rules()).runConfigUnblock(targetFlags(o), ctx)
|
|
4192
|
+
);
|
|
4193
|
+
});
|
|
4194
|
+
targetOptions(addGlobalFlags2(config.command("reset")), [
|
|
4195
|
+
"task",
|
|
4196
|
+
"category",
|
|
4197
|
+
"provider",
|
|
4198
|
+
"service",
|
|
4199
|
+
"source"
|
|
4200
|
+
]).summary("remove a rule, or --all of them").description(
|
|
4201
|
+
"Remove the one rule you name: a --preference, a --restriction (an only rule), the --capabilities limit, or --all of them, blocks included. Works offline."
|
|
4202
|
+
).option("--global", "the account-wide preference, or the global restrictions").option("--preference", "reset a preference").option("--restriction", "reset only rules").option(
|
|
4203
|
+
"--dimension <dimension>",
|
|
4204
|
+
"with --restriction: capability, provider, seller or service"
|
|
4205
|
+
).option("--capabilities", "reset which tasks Tenjin may do").option("--all", "reset every saved routing rule").addHelpText(
|
|
4206
|
+
"after",
|
|
4207
|
+
configExamples([
|
|
4208
|
+
'reset --task "web research" --preference',
|
|
4209
|
+
'reset --task "web research" --restriction --dimension provider',
|
|
4210
|
+
"reset --all"
|
|
4211
|
+
])
|
|
4212
|
+
).action(async function() {
|
|
4213
|
+
const o = this.opts();
|
|
4214
|
+
await runCommand(
|
|
4215
|
+
"config.reset",
|
|
4216
|
+
this,
|
|
4217
|
+
async (ctx) => (await rules()).runConfigReset(
|
|
4218
|
+
{
|
|
4219
|
+
...targetFlags(o),
|
|
4220
|
+
...o.global === true ? { global: true } : {},
|
|
4221
|
+
...o.preference === true ? { preference: true } : {},
|
|
4222
|
+
...o.restriction === true ? { restriction: true } : {},
|
|
4223
|
+
...o.capabilities === true ? { capabilities: true } : {},
|
|
4224
|
+
...o.all === true || this.parent?.opts().all === true ? { all: true } : {},
|
|
4225
|
+
...typeof o.dimension === "string" ? { dimension: o.dimension } : {}
|
|
4226
|
+
},
|
|
4227
|
+
ctx
|
|
4228
|
+
)
|
|
4229
|
+
);
|
|
4230
|
+
});
|
|
4231
|
+
addGlobalFlags2(config.command("speed <state>")).summary("also offer faster paid tools: on or off").description(
|
|
4232
|
+
"on: also offer paid tools as accurate as your agent's own and clearly faster, within your limits. off (the default): only when your agent's own can't do the job as well."
|
|
4233
|
+
).addHelpText("after", configExamples(["speed on", "speed off"], SETTINGS_DOCS)).action(async function(state) {
|
|
4234
|
+
await runCommand(
|
|
4235
|
+
"config.speed",
|
|
4236
|
+
this,
|
|
4237
|
+
async (ctx) => (await rules()).runConfigSpeed({ state }, ctx)
|
|
4238
|
+
);
|
|
4239
|
+
});
|
|
4240
|
+
addGlobalFlags2(config.command("replacement <state>")).summary("run Tenjin's picks automatically: on or off").description(
|
|
4241
|
+
"Run Tenjin's pick in place of your agent's web search or page fetch, within your limits, instead of offering it first. Claude Code with the Tenjin plugin only; off by default."
|
|
4242
|
+
).option("--provider <name>", "only when Tenjin picks this provider (repeatable)", collect).option("--all-providers", "for any allowed provider").addHelpText(
|
|
4243
|
+
"after",
|
|
4244
|
+
configExamples([
|
|
4245
|
+
"replacement on --provider exa",
|
|
4246
|
+
"replacement on --all-providers",
|
|
4247
|
+
"replacement off"
|
|
4248
|
+
])
|
|
4249
|
+
).action(async function(state) {
|
|
4250
|
+
const o = this.opts();
|
|
4251
|
+
await runCommand(
|
|
4252
|
+
"config.replacement",
|
|
4253
|
+
this,
|
|
4254
|
+
async (ctx) => (await rules()).runConfigReplacement(
|
|
4255
|
+
{
|
|
4256
|
+
state,
|
|
4257
|
+
...Array.isArray(o.provider) ? { provider: o.provider } : {},
|
|
4258
|
+
...o.allProviders === true ? { allProviders: true } : {}
|
|
4259
|
+
},
|
|
4260
|
+
ctx
|
|
4261
|
+
)
|
|
4262
|
+
);
|
|
4263
|
+
});
|
|
4264
|
+
addGlobalFlags2(config.command("fallback <state>")).summary("use Tenjin's tool when your account refuses: on or off").description(
|
|
4265
|
+
"When one of your accounts refuses a call, on runs Tenjin's own tool in its place, from your Tenjin balance within your limits. off (the default) offers it and asks first."
|
|
4266
|
+
).option("--source <account>", "the connected account, such as apify", collect).addHelpText(
|
|
4267
|
+
"after",
|
|
4268
|
+
configExamples(["fallback on --source apify", "fallback off --source apify"])
|
|
4269
|
+
).action(async function(state) {
|
|
4270
|
+
const o = this.opts();
|
|
4271
|
+
await runCommand(
|
|
4272
|
+
"config.fallback",
|
|
4273
|
+
this,
|
|
4274
|
+
async (ctx) => (await rules()).runConfigFallback(
|
|
4275
|
+
{ state, ...Array.isArray(o.source) ? { source: o.source } : {} },
|
|
4276
|
+
ctx
|
|
4277
|
+
)
|
|
4278
|
+
);
|
|
4279
|
+
});
|
|
4280
|
+
}
|
|
3843
4281
|
|
|
3844
4282
|
// src/cli/router.ts
|
|
4283
|
+
import { dirname } from "node:path";
|
|
4284
|
+
import { fileURLToPath } from "node:url";
|
|
3845
4285
|
function harnessOption() {
|
|
3846
4286
|
return new Option("--harness <host>", "the agent host").choices(HARNESSES).default("claude");
|
|
3847
4287
|
}
|
|
3848
4288
|
function registerRouter(reg) {
|
|
3849
4289
|
const { io, runCommand, leaf: leaf2, addGlobalFlags: addGlobalFlags2, buildContext: buildContext2 } = reg;
|
|
3850
4290
|
const hook = leaf2(INTEGRATION, "hook", "run one harness hook handler (called by your agent host)").description(
|
|
3851
|
-
"The handlers Tenjin's Claude Code and
|
|
4291
|
+
"The handlers Tenjin's plugins run, and the ones an older setup wrote. `alive` marks a session the Claude Code plugin serves. `prompt`, `native`, `shortfall`, `agent`, `ask` and `answer` are left from older setups: the plugins route through `tenjin mcp`, which pays the routing fee, so each of these reads one hook event on stdin, routes nothing, and tells the person once per session to ask their agent to set Tenjin up again (nothing in a session the Claude Code plugin serves). You never run these by hand."
|
|
3852
4292
|
).helpCommand(false);
|
|
3853
4293
|
addGlobalFlags2(hook.command("alive")).summary("SessionStart: mark this session and machine as ones the plugin serves").action(async function() {
|
|
3854
4294
|
const ctx = buildContext2(this);
|
|
3855
4295
|
const [{ aliveMain }, { default: pkg }] = await Promise.all([
|
|
3856
|
-
import("./alive-
|
|
3857
|
-
import("./package-
|
|
4296
|
+
import("./alive-5TV22PNF.js"),
|
|
4297
|
+
import("./package-BONDXSV3.js")
|
|
3858
4298
|
]);
|
|
3859
4299
|
await aliveMain({ dataDir: ctx.dataDir, version: pkg.version });
|
|
3860
4300
|
});
|
|
3861
4301
|
for (const [name, summary] of [
|
|
3862
|
-
["prompt", "UserPromptSubmit:
|
|
3863
|
-
["native", "PreToolUse on WebSearch|WebFetch
|
|
3864
|
-
[
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
]
|
|
3868
|
-
["agent", "PreToolUse on Agent|Task: append any paid offer to the subagent's task"],
|
|
3869
|
-
["ask", "PreToolUse on AskUserQuestion: allow the question, or redirect it once"],
|
|
3870
|
-
["answer", "PostToolUse on AskUserQuestion: offer a paid lookup beside the user's answers"]
|
|
4302
|
+
["prompt", "UserPromptSubmit, from an older setup: tell the person to set Tenjin up again"],
|
|
4303
|
+
["native", "PreToolUse on WebSearch|WebFetch, from an older setup: the same"],
|
|
4304
|
+
["shortfall", "PostToolUse(Failure) on WebSearch|WebFetch, from an older setup: the same"],
|
|
4305
|
+
["agent", "PreToolUse on Agent|Task, from an older setup: the same"],
|
|
4306
|
+
["ask", "PreToolUse on AskUserQuestion, from an older setup: the same"],
|
|
4307
|
+
["answer", "PostToolUse on AskUserQuestion, from an older setup: the same"]
|
|
3871
4308
|
]) {
|
|
3872
4309
|
addGlobalFlags2(hook.command(name)).addOption(harnessOption()).summary(summary).action(async function() {
|
|
3873
4310
|
const ctx = buildContext2(this);
|
|
3874
|
-
const { runHookCommand } = await import("./hook-command-
|
|
3875
|
-
await runHookCommand(
|
|
4311
|
+
const { runHookCommand } = await import("./hook-command-VZ27MGWO.js");
|
|
4312
|
+
await runHookCommand(io, {
|
|
3876
4313
|
dataDir: ctx.dataDir,
|
|
3877
|
-
harness: this.opts().harness
|
|
3878
|
-
...ctx.flags.baseUrl !== void 0 ? { baseUrl: ctx.flags.baseUrl } : {}
|
|
4314
|
+
harness: this.opts().harness
|
|
3879
4315
|
});
|
|
3880
4316
|
});
|
|
3881
4317
|
}
|
|
3882
4318
|
hook.command("unknown", { hidden: true, isDefault: true }).argument("[args...]").allowUnknownOption().allowExcessArguments().action(() => {
|
|
3883
4319
|
});
|
|
3884
4320
|
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(
|
|
3885
|
-
"Run the local stdio MCP server that carries the `request` tool: one
|
|
4321
|
+
"Run the local stdio MCP server that carries the `request` tool: one routing decision per lookup, paid with a small routing fee, 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."
|
|
3886
4322
|
).action(async function() {
|
|
4323
|
+
const unmark = markLive(dirname(fileURLToPath(import.meta.url)));
|
|
3887
4324
|
const ctx = buildContext2(this);
|
|
3888
4325
|
const harness = this.opts().harness;
|
|
3889
4326
|
if (harness === "codex") {
|
|
3890
|
-
(await import("./auto-update-
|
|
4327
|
+
(await import("./auto-update-7L24KDWA.js")).maybeAutoUpdate({
|
|
3891
4328
|
dataDir: ctx.dataDir,
|
|
3892
4329
|
env: process.env
|
|
3893
4330
|
});
|
|
3894
4331
|
}
|
|
3895
|
-
const { runRouterMcpServer } = await import("./mcp-
|
|
4332
|
+
const { runRouterMcpServer } = await import("./mcp-36S6MK3C.js");
|
|
3896
4333
|
await runRouterMcpServer({
|
|
3897
4334
|
dataDir: ctx.dataDir,
|
|
3898
4335
|
flags: ctx.flags,
|
|
3899
4336
|
harness
|
|
3900
4337
|
});
|
|
4338
|
+
unmark();
|
|
3901
4339
|
});
|
|
3902
4340
|
leaf2(INTEGRATION, "status-line", "the live footer, for Claude Code's status line").description(
|
|
3903
4341
|
"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."
|
|
3904
4342
|
).action(async function() {
|
|
3905
4343
|
const ctx = buildContext2(this);
|
|
3906
|
-
const { runStatusLine } = await import("./status-line-
|
|
4344
|
+
const { runStatusLine } = await import("./status-line-IH5JBWBC.js");
|
|
3907
4345
|
await runStatusLine(io, { dataDir: ctx.dataDir });
|
|
3908
4346
|
});
|
|
3909
|
-
leaf2(SETUP, "status", "
|
|
3910
|
-
"
|
|
4347
|
+
leaf2(SETUP, "status", "whether Tenjin is on, your balance, limits, accounts and settings").description(
|
|
4348
|
+
"Whether Tenjin is on or paused here; your Tenjin balance, read as `tenjin balance` reads it; today's spending against your daily limit, and your per-call limit, both on the Tenjin balance only; your connected accounts, which their own plans pay for, outside those limits; and your settings in plain words. --json adds the detail: what lookups cost, the prepaid routing credit, and requests still in flight."
|
|
3911
4349
|
).action(async function() {
|
|
3912
4350
|
await runCommand("status", this, async (ctx) => {
|
|
3913
|
-
const { runRouterStatus } = await import("./status-
|
|
4351
|
+
const { runRouterStatus } = await import("./status-FXUFWJDM.js");
|
|
3914
4352
|
return runRouterStatus(ctx);
|
|
3915
4353
|
});
|
|
3916
4354
|
});
|
|
4355
|
+
leaf2(SETUP, "usage", "what lookups cost, by day and by who ran them").description(
|
|
4356
|
+
"Totals from this machine's own record, by day: Tenjin's tools, paid from your Tenjin balance, and each of your connected accounts, billed to that account's own plan. A call on an account that was still running, failed after the account's job started, or got the account's own error may have charged it: it shows as may have charged and isn't counted as billed. --since takes 24h, 7d (the default), 30d or a date. Amounts are rounded to the cent; --json has them exact. Routing fees aren't in it: `tenjin status` shows today's."
|
|
4357
|
+
).option("--since <window>", "how far back: 24h, 7d, 30d or a date such as 2026-10-01").action(async function() {
|
|
4358
|
+
await runCommand("usage", this, async (ctx) => {
|
|
4359
|
+
const opts = this.opts();
|
|
4360
|
+
const { runRouterUsage } = await import("./usage-EKDC7LUC.js");
|
|
4361
|
+
return runRouterUsage(ctx, opts.since !== void 0 ? { since: opts.since } : {});
|
|
4362
|
+
});
|
|
4363
|
+
});
|
|
4364
|
+
leaf2(SETUP, "connect <name>", "connect your own account at a provider, such as Apify or fal").description(
|
|
4365
|
+
"Connect your own account so Tenjin can run the jobs it knows for it on that account, which your own plan pays for (not your Tenjin balance, and not counted in its limits). <name> is an account Tenjin knows, such as Apify, fal, Firecrawl or Exa, or an MCP server's https address. You approve the sign-in in your browser; where that can't work, --paste reads a key at a hidden prompt in your own terminal, or --from-env reads one from an environment variable once. Tenjin checks the account's tools for free, keeps the sign-in encrypted on this machine with its key in your OS keychain, and puts the account first for its jobs unless you say --no-prefer. `tenjin config reset --source <name> --preference` stops putting it first. The sign-in lets Tenjin act on your account (Apify's, on the whole account), and Tenjin runs only the jobs it knows for it and the services you ask for by name. Never paste a key into a chat."
|
|
4366
|
+
).addHelpText(
|
|
4367
|
+
"after",
|
|
4368
|
+
`
|
|
4369
|
+
Examples:
|
|
4370
|
+
$ tenjin connect apify
|
|
4371
|
+
$ tenjin connect fal --paste
|
|
4372
|
+
$ tenjin connect firecrawl --from-env FIRECRAWL_API_KEY
|
|
4373
|
+
$ tenjin connect apify --no-prefer
|
|
4374
|
+
$ tenjin connect https://mcp.example.com/mcp
|
|
4375
|
+
`
|
|
4376
|
+
).option("--paste", "type or paste a key at a hidden prompt (needs your own terminal)").option("--from-env <var>", "read the key from this environment variable, once").option("--no-prefer", "connect without putting this account first for its jobs").action(async function(name) {
|
|
4377
|
+
await runCommand("connect", this, async (ctx) => {
|
|
4378
|
+
const opts = this.opts();
|
|
4379
|
+
const { runConnect } = await import("./connect-YDWTYU4B.js");
|
|
4380
|
+
return runConnect(name, opts, ctx);
|
|
4381
|
+
});
|
|
4382
|
+
});
|
|
4383
|
+
leaf2(SETUP, "disconnect <name>", "sign out of a connected account and forget it here").description(
|
|
4384
|
+
"Sign out of a connected account where it allows that, delete its sign-in from this machine, and take it out of your preferences. Your other settings and accounts stay as they are; `tenjin connect <name>` connects it again."
|
|
4385
|
+
).action(async function(name) {
|
|
4386
|
+
await runCommand("disconnect", this, async (ctx) => {
|
|
4387
|
+
const { runDisconnect } = await import("./connect-YDWTYU4B.js");
|
|
4388
|
+
return runDisconnect(name, ctx);
|
|
4389
|
+
});
|
|
4390
|
+
});
|
|
3917
4391
|
const payments = leaf2(SETUP, "payments", "the paid lookups this machine made").description(
|
|
3918
|
-
"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."
|
|
4392
|
+
"The local record of paid router lookups and direct `tenjin pay` calls, in `~/.tenjin/paid/ledger.jsonl`. A bare `tenjin payments` lists the newest: when, who was paid, how much, whether it settled, and the transaction. A call on your own account reads `your account`, or `your account \xB7 may have charged` when it was still running, failed after the account's job started, or got the account's own error."
|
|
3919
4393
|
);
|
|
3920
4394
|
payments.action(async function() {
|
|
3921
4395
|
await runCommand("payments", this, async (ctx) => {
|
|
3922
|
-
const { runPaymentsList } = await import("./payments-
|
|
4396
|
+
const { runPaymentsList } = await import("./payments-Z6UBZL4Z.js");
|
|
3923
4397
|
return runPaymentsList(ctx);
|
|
3924
4398
|
});
|
|
3925
4399
|
});
|
|
@@ -3927,7 +4401,7 @@ function registerRouter(reg) {
|
|
|
3927
4401
|
"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."
|
|
3928
4402
|
).action(async function() {
|
|
3929
4403
|
await runCommand("payments.reconcile", this, async (ctx) => {
|
|
3930
|
-
const { runPaymentsReconcile } = await import("./payments-
|
|
4404
|
+
const { runPaymentsReconcile } = await import("./payments-Z6UBZL4Z.js");
|
|
3931
4405
|
return runPaymentsReconcile(ctx);
|
|
3932
4406
|
});
|
|
3933
4407
|
});
|
|
@@ -3937,20 +4411,31 @@ function registerRouter(reg) {
|
|
|
3937
4411
|
var GlobalOptsSchema = external_exports.object({
|
|
3938
4412
|
json: external_exports.boolean().default(false),
|
|
3939
4413
|
baseUrl: external_exports.url().optional(),
|
|
3940
|
-
timeout: external_exports.
|
|
4414
|
+
timeout: external_exports.preprocess((v) => typeof v === "string" ? durationMs(v) : v, external_exports.number().int().positive()).default(1e4)
|
|
3941
4415
|
});
|
|
4416
|
+
function durationMs(raw) {
|
|
4417
|
+
const m = /^\s*(\d+(?:\.\d+)?)\s*(ms|s|m|h)?\s*$/i.exec(raw);
|
|
4418
|
+
if (m === null) return NaN;
|
|
4419
|
+
const unit = (m[2] ?? "ms").toLowerCase();
|
|
4420
|
+
const scale = unit === "h" ? 36e5 : unit === "m" ? 6e4 : unit === "s" ? 1e3 : 1;
|
|
4421
|
+
return Math.round(Number(m[1]) * scale);
|
|
4422
|
+
}
|
|
3942
4423
|
var GLOBAL_FLAGS = [
|
|
3943
4424
|
["--json", "emit one machine JSON envelope on stdout instead of the human rendering"],
|
|
3944
4425
|
["--base-url <url>", "Tenjin API base URL"],
|
|
3945
4426
|
["--timeout <ms>", "request timeout in milliseconds", "10000"]
|
|
3946
4427
|
];
|
|
3947
|
-
function addGlobalFlags(cmd) {
|
|
3948
|
-
for (const [flags, help] of GLOBAL_FLAGS)
|
|
4428
|
+
function addGlobalFlags(cmd, except = []) {
|
|
4429
|
+
for (const [flags, help] of GLOBAL_FLAGS) {
|
|
4430
|
+
if (except.includes(flags.split(" ")[0])) continue;
|
|
4431
|
+
cmd.addOption(new Option(flags, help).hideHelp());
|
|
4432
|
+
}
|
|
3949
4433
|
return cmd;
|
|
3950
4434
|
}
|
|
3951
|
-
function leaf(program2, group, nameAndArgs, summary) {
|
|
4435
|
+
function leaf(program2, group, nameAndArgs, summary, except = []) {
|
|
3952
4436
|
return addGlobalFlags(
|
|
3953
|
-
program2.command(nameAndArgs).helpGroup(group).summary(summary).helpCommand(false).helpOption("-h, --help", "show this help")
|
|
4437
|
+
program2.command(nameAndArgs).helpGroup(group).summary(summary).helpCommand(false).helpOption("-h, --help", "show this help"),
|
|
4438
|
+
except
|
|
3954
4439
|
);
|
|
3955
4440
|
}
|
|
3956
4441
|
function rootHelpCommand() {
|
|
@@ -3972,8 +4457,7 @@ function buildContext(cmd, io) {
|
|
|
3972
4457
|
noteBaseUrlFlag(flags.baseUrl);
|
|
3973
4458
|
return { flags, dataDir: dataDir(process.env), io };
|
|
3974
4459
|
}
|
|
3975
|
-
|
|
3976
|
-
function buildProgram(io, setExit, products = PRODUCTS) {
|
|
4460
|
+
function buildProgram(io, setExit) {
|
|
3977
4461
|
const program2 = new Command();
|
|
3978
4462
|
const runCommand = async (command, cmd, run) => {
|
|
3979
4463
|
const json = cmd.optsWithGlobals().json === true;
|
|
@@ -3982,8 +4466,10 @@ function buildProgram(io, setExit, products = PRODUCTS) {
|
|
|
3982
4466
|
try {
|
|
3983
4467
|
const ctx = buildContext(cmd, io);
|
|
3984
4468
|
const result = await run(ctx);
|
|
3985
|
-
|
|
4469
|
+
const human = [...result.humanLines ?? [], ...result.humanTail ?? []];
|
|
4470
|
+
emitSuccess(ctx.io, command, result.data, human, {
|
|
3986
4471
|
json: ctx.flags.json,
|
|
4472
|
+
compactJson: result.compactJson,
|
|
3987
4473
|
updateAvailable
|
|
3988
4474
|
});
|
|
3989
4475
|
} catch (err) {
|
|
@@ -4016,36 +4502,33 @@ function buildProgram(io, setExit, products = PRODUCTS) {
|
|
|
4016
4502
|
program: program2,
|
|
4017
4503
|
io,
|
|
4018
4504
|
runCommand,
|
|
4019
|
-
leaf: (group, nameAndArgs, summary) => leaf(program2, group, nameAndArgs, summary),
|
|
4505
|
+
leaf: (group, nameAndArgs, summary, except) => leaf(program2, group, nameAndArgs, summary, except),
|
|
4020
4506
|
addGlobalFlags,
|
|
4021
4507
|
buildContext: (cmd) => buildContext(cmd, io)
|
|
4022
4508
|
};
|
|
4023
|
-
|
|
4509
|
+
registerCore(registration);
|
|
4510
|
+
registerRouter(registration);
|
|
4024
4511
|
program2.addHelpText(
|
|
4025
4512
|
"after",
|
|
4026
4513
|
`
|
|
4027
4514
|
Examples:
|
|
4028
4515
|
$ tenjin install
|
|
4029
|
-
$ tenjin
|
|
4516
|
+
$ tenjin fund
|
|
4030
4517
|
$ tenjin status
|
|
4031
4518
|
|
|
4032
4519
|
Learn more:
|
|
4033
|
-
Run
|
|
4520
|
+
Run tenjin <command> --help for details.
|
|
4034
4521
|
Permissions: ${PERMISSIONS_DOC_URL}
|
|
4035
4522
|
Issues: ${package_default.bugs}
|
|
4036
4523
|
`
|
|
4037
4524
|
);
|
|
4038
4525
|
return program2;
|
|
4039
4526
|
}
|
|
4040
|
-
async function main(argv, io = defaultIo()
|
|
4527
|
+
async function main(argv, io = defaultIo()) {
|
|
4041
4528
|
let exitCode = 0;
|
|
4042
|
-
const program2 = buildProgram(
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
exitCode = code;
|
|
4046
|
-
},
|
|
4047
|
-
products
|
|
4048
|
-
);
|
|
4529
|
+
const program2 = buildProgram(io, (code) => {
|
|
4530
|
+
exitCode = code;
|
|
4531
|
+
});
|
|
4049
4532
|
try {
|
|
4050
4533
|
await program2.parseAsync(argv, { from: "user" });
|
|
4051
4534
|
} catch (err) {
|
|
@@ -4073,8 +4556,7 @@ function handleParseError(err, io, program2) {
|
|
|
4073
4556
|
return emitFailure(io, "tenjin", err, { json }).exitCode;
|
|
4074
4557
|
}
|
|
4075
4558
|
export {
|
|
4076
|
-
PRODUCTS,
|
|
4077
4559
|
buildProgram,
|
|
4078
4560
|
main
|
|
4079
4561
|
};
|
|
4080
|
-
//# sourceMappingURL=cli-
|
|
4562
|
+
//# sourceMappingURL=cli-QY4KKA3D.js.map
|