tenjin-cli 0.1.0-alpha.34 → 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 +30 -0
- package/README.md +20 -18
- package/dist/{_esm-MMYV66AX.js → _esm-2KST7HQ7.js} +4 -4
- package/dist/{alive-VOIL5W3I.js → alive-5TV22PNF.js} +13 -13
- package/dist/{auth-UHD3QFX4.js → auth-XI7BJFLW.js} +4 -4
- package/dist/balance-DFHC6XEU.js +71 -0
- package/dist/{ccip-CS7K5QRQ.js → ccip-HOW3DZYF.js} +3 -3
- package/dist/{chunk-RJ5HRPAZ.js → chunk-24XKUN2S.js} +68 -10
- 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-PZHBPGDE.js → chunk-34SAECKZ.js} +34 -10
- package/dist/chunk-34SAECKZ.js.map +1 -0
- package/dist/{chunk-EQZ2CCWC.js → chunk-3Y2EHT4F.js} +5 -2
- package/dist/chunk-3Y2EHT4F.js.map +1 -0
- package/dist/{chunk-FSYH7J75.js → chunk-3Y6BHIN6.js} +3 -3
- package/dist/{chunk-FZZWTDWP.js → chunk-3YPL6T3P.js} +6 -6
- package/dist/{chunk-JEZMWJEF.js → chunk-44MVIRZH.js} +4 -4
- package/dist/{chunk-27FIHFXF.js → chunk-45MMSBHA.js} +5 -5
- 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-7JB6SYJX.js → chunk-54ELBTKE.js} +2 -2
- package/dist/{chunk-6J64MQFD.js → chunk-5F4OB5B3.js} +21 -15
- package/dist/chunk-5F4OB5B3.js.map +1 -0
- package/dist/{chunk-PYVQ74D5.js → chunk-5HN4KVQU.js} +189 -117
- package/dist/chunk-5HN4KVQU.js.map +1 -0
- package/dist/{chunk-VFKPIIV2.js → chunk-5J4E5GYI.js} +35 -32
- package/dist/chunk-5J4E5GYI.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-APWELUI7.js → chunk-65RS4LQS.js} +57 -43
- package/dist/chunk-65RS4LQS.js.map +1 -0
- package/dist/{chunk-HWZO6HYZ.js → chunk-6QMDUDF2.js} +3 -3
- package/dist/{chunk-FNBGRKS6.js → chunk-7V25UAQO.js} +2 -2
- 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-MXN2ZEUB.js → chunk-D6M3ZK66.js} +2 -2
- package/dist/chunk-D6M3ZK66.js.map +1 -0
- package/dist/chunk-DJ36BM62.js +78 -0
- package/dist/chunk-DJ36BM62.js.map +1 -0
- package/dist/{chunk-JOKPBYXP.js → chunk-DTEWAVNE.js} +2 -2
- package/dist/chunk-F2KJAJ7T.js +13 -0
- package/dist/chunk-F2KJAJ7T.js.map +1 -0
- package/dist/{chunk-KAILF7QA.js → chunk-F43CV6UC.js} +2 -2
- package/dist/{chunk-ACO7ZCR2.js → chunk-FKVJKLPI.js} +2 -2
- package/dist/{chunk-43HLS2HM.js → chunk-FYFHH7V5.js} +54 -3
- package/dist/{chunk-43HLS2HM.js.map → chunk-FYFHH7V5.js.map} +1 -1
- package/dist/{chunk-2F5JUAHZ.js → chunk-GAJC4BQZ.js} +3 -3
- package/dist/{chunk-L7N73ZAW.js → chunk-HAZAN4UM.js} +2 -2
- package/dist/{chunk-6QJZA6EX.js → chunk-HI5XQOX2.js} +2 -2
- package/dist/{chunk-BOENA6XR.js → chunk-HKGUKAQW.js} +6 -6
- package/dist/{chunk-LJSCGIYH.js → chunk-HPRVFJPM.js} +2 -2
- package/dist/{chunk-OO6FIBL7.js → chunk-HZKANST2.js} +3 -6
- package/dist/chunk-HZKANST2.js.map +1 -0
- package/dist/{chunk-UVDJ5SSQ.js → chunk-I557SAOM.js} +8 -2
- package/dist/chunk-I557SAOM.js.map +1 -0
- package/dist/{chunk-SDUOJRSV.js → chunk-IGLWLH73.js} +3 -3
- package/dist/{chunk-3AKH7ODX.js → chunk-INSIW65E.js} +5 -5
- package/dist/{chunk-PNHNXUSL.js → chunk-IULCDMVG.js} +12 -1
- package/dist/chunk-IULCDMVG.js.map +1 -0
- package/dist/{chunk-JF4T4HCQ.js → chunk-IVNSUAVC.js} +10 -5
- 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-2P3NJTHE.js → chunk-JHFFUVON.js} +23 -23
- package/dist/{chunk-7JVARP5R.js → chunk-JTILUN4W.js} +55 -29
- package/dist/{chunk-7JVARP5R.js.map → chunk-JTILUN4W.js.map} +1 -1
- package/dist/{chunk-2TO5F6CT.js → chunk-K5KNGC4I.js} +8 -8
- package/dist/{chunk-HUWTFKEM.js → chunk-KAQ4Q3TO.js} +3 -3
- package/dist/{chunk-E6VP6MQM.js → chunk-KGUE5AVX.js} +4 -4
- package/dist/chunk-KGUE5AVX.js.map +1 -0
- package/dist/{chunk-GS5RZF7U.js → chunk-KLDMLWXT.js} +2 -2
- package/dist/{chunk-HN2EN6P4.js → chunk-KNKDMTHU.js} +5 -5
- 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-5VWQSCDO.js → chunk-MAHNZA6C.js} +89 -9
- package/dist/chunk-MAHNZA6C.js.map +1 -0
- package/dist/{chunk-46HAB26L.js → chunk-MEWZCIA6.js} +56 -9
- package/dist/chunk-MEWZCIA6.js.map +1 -0
- package/dist/{chunk-R2KMLONN.js → chunk-MJDO4EXD.js} +4 -4
- package/dist/{chunk-IHVUE3XF.js → chunk-NJA6NT3A.js} +3 -3
- package/dist/{chunk-TSIID2LV.js → chunk-ODRPASFP.js} +375 -1166
- package/dist/chunk-ODRPASFP.js.map +1 -0
- package/dist/{chunk-S3JKF3IK.js → chunk-OJJFANO6.js} +3 -3
- package/dist/{chunk-56SOPRM2.js → chunk-OQWPRFAC.js} +344 -4
- package/dist/chunk-OQWPRFAC.js.map +1 -0
- package/dist/{chunk-QEZZDIQT.js → chunk-P6YQWIT2.js} +4053 -4039
- package/dist/chunk-P6YQWIT2.js.map +1 -0
- package/dist/{chunk-GGGEGMWC.js → chunk-Q6RSJCXB.js} +9 -9
- package/dist/{chunk-OTIUEUIS.js → chunk-QKEUKBRK.js} +7 -7
- package/dist/{chunk-X52BVGCJ.js → chunk-QQDPRTLP.js} +5 -5
- 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-6AQSUBNR.js → chunk-RGCPELQN.js} +2 -2
- package/dist/{chunk-AXODGQ23.js → chunk-RGVCOG2S.js} +9 -2
- package/dist/{chunk-AXODGQ23.js.map → chunk-RGVCOG2S.js.map} +1 -1
- package/dist/chunk-SOLNJ3AZ.js +209 -0
- package/dist/chunk-SOLNJ3AZ.js.map +1 -0
- package/dist/{chunk-LQ33RLHL.js → chunk-TFT2X7SH.js} +3 -3
- package/dist/chunk-TVWCLUBI.js +293 -0
- package/dist/chunk-TVWCLUBI.js.map +1 -0
- package/dist/{chunk-VH7JMLTG.js → chunk-UIB33QQP.js} +25 -16
- 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-IVHGQNIN.js → chunk-VHXCPXUS.js} +8 -8
- package/dist/{chunk-7DW7GAM6.js → chunk-VU6GMWF6.js} +2 -2
- package/dist/chunk-VWZYE3NC.js +8415 -0
- package/dist/chunk-VWZYE3NC.js.map +1 -0
- package/dist/{chunk-3X4GOMXT.js → chunk-W2GXIARJ.js} +12 -7
- 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-FHXTEVO7.js → chunk-W74LJ5OT.js} +21 -28
- package/dist/chunk-W74LJ5OT.js.map +1 -0
- package/dist/{chunk-FOEPH67T.js → chunk-W7ELYLYK.js} +1 -74
- package/dist/chunk-W7ELYLYK.js.map +1 -0
- package/dist/{chunk-YU3DLVSQ.js → chunk-XSCGUO2U.js} +5 -5
- package/dist/{chunk-EPCIJLLU.js → chunk-XWROSMI5.js} +9 -9
- package/dist/{chunk-HMT6L65V.js → chunk-YJGEVBKZ.js} +4 -4
- package/dist/{chunk-7U3P4PB7.js → chunk-ZEYA2WWX.js} +4 -4
- 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-I47ARU5G.js → chunk-ZS7JIUJ3.js} +2 -2
- package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
- package/dist/claude-install-BAUSJMW3.js +64 -0
- package/dist/{cli-BFDKEX53.js → cli-QY4KKA3D.js} +116 -49
- package/dist/cli-QY4KKA3D.js.map +1 -0
- package/dist/{client-XMWEKXX7.js → client-3YQKORVK.js} +4 -4
- package/dist/{codex-host-B6NAUWL6.js → codex-host-ZON3S6HU.js} +5 -5
- package/dist/{codex-install-GTGO5FYN.js → codex-install-HZV2DOAB.js} +62 -47
- package/dist/codex-install-HZV2DOAB.js.map +1 -0
- package/dist/{config-THJANIU5.js → config-QZOBMTEL.js} +18 -18
- package/dist/{config-names-JU54HYWY.js → config-names-Z5NZD5R2.js} +18 -18
- package/dist/{config-rules-VNU23RL4.js → config-rules-YOYHS6YL.js} +19 -19
- package/dist/config-subagents-WQV2ZAD5.js +362 -0
- package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
- package/dist/{connect-HPWS7U63.js → connect-YDWTYU4B.js} +28 -27
- package/dist/{connect-HPWS7U63.js.map → connect-YDWTYU4B.js.map} +1 -1
- 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-JIIHDTOF.js → decision-QSKHOGCO.js} +6 -6
- package/dist/{doctor-4MMHBRDU.js → doctor-ZWJXRD75.js} +67 -66
- package/dist/doctor-ZWJXRD75.js.map +1 -0
- package/dist/{explicit-AGENAX6E.js → explicit-ME2NRADQ.js} +45 -42
- package/dist/{explicit-AGENAX6E.js.map → explicit-ME2NRADQ.js.map} +1 -1
- package/dist/flush-stdio-NYIJ3QXT.js +18 -0
- package/dist/{fund-MLXUH24Q.js → fund-VF7TLDJH.js} +110 -34
- package/dist/fund-VF7TLDJH.js.map +1 -0
- package/dist/{hook-command-UB7FOEUL.js → hook-command-VZ27MGWO.js} +21 -20
- 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 +265 -30
- package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
- package/dist/hosts/claude/tenjin/types/index.d.ts +133 -0
- package/dist/{hosts-WNQKYKP2.js → hosts-3EMTVM4H.js} +5 -3
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/{install-Q5SHHEDH.js → install-ZA7L2UF3.js} +34 -30
- package/dist/{install-funding-EGSW2KEP.js → install-funding-JDGYTF72.js} +9 -13
- package/dist/{install-identity-OID43B4D.js → install-identity-FFAYEFLX.js} +8 -8
- package/dist/{install-wallet-TZFWY5GK.js → install-wallet-2SFOVE3Q.js} +48 -33
- package/dist/{install-wallet-TZFWY5GK.js.map → install-wallet-2SFOVE3Q.js.map} +1 -1
- 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-NRHU7HBR.js → package-BONDXSV3.js} +2 -2
- package/dist/{passphrase-3JEVW5XG.js → passphrase-T4ULBN4M.js} +4 -4
- package/dist/{pay-I47AIUQR.js → pay-CMV5KL74.js} +37 -30
- package/dist/{payments-A5FNI5GN.js → payments-Z6UBZL4Z.js} +10 -10
- package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
- package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
- package/dist/{routing-quote-QQW2I5MH.js → routing-quote-AHLAREXR.js} +16 -18
- package/dist/{run-4SHEOBIU.js → run-JH7ELYAM.js} +41 -38
- package/dist/{runtime-BABJMHY7.js → runtime-2GX4ALJP.js} +12 -12
- package/dist/{runtime-activate-N6VLQI2C.js → runtime-activate-IDQ2NCSP.js} +9 -9
- package/dist/{runtime-launchers-GMAUICRW.js → runtime-launchers-YAPKCBHV.js} +7 -7
- package/dist/{runtime-place-DOEWFTF3.js → runtime-place-4POL4KK4.js} +3 -3
- package/dist/{send-ECXS6JEO.js → send-ELXFKEKY.js} +17 -17
- package/dist/{status-AHE5HSR7.js → status-FXUFWJDM.js} +89 -36
- package/dist/status-FXUFWJDM.js.map +1 -0
- package/dist/{status-line-63XFJAXR.js → status-line-IH5JBWBC.js} +11 -11
- package/dist/{streamableHttp-Z3YF6LTQ.js → streamableHttp-CP2ZQBIK.js} +4 -4
- package/dist/{uninstall-YGQPRCVY.js → uninstall-LJZUKM4D.js} +42 -38
- package/dist/{uninstall-YGQPRCVY.js.map → uninstall-LJZUKM4D.js.map} +1 -1
- package/dist/{update-GTLMLFA3.js → update-EUIX72IX.js} +34 -30
- package/dist/{usage-FCWP2CHO.js → usage-EKDC7LUC.js} +13 -13
- package/dist/{usdc-25RNBYYR.js → usdc-YIHK2OMC.js} +5 -5
- package/dist/{viemAdapter-By13KInL-3CG63XDX.js → viemAdapter-By13KInL-PRLSIESK.js} +2 -2
- 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/docs/agent-permissions.md +19 -11
- package/docs/router-reference.md +21 -12
- package/docs/safety-model.md +4 -2
- package/docs/subagents-internals.md +97 -0
- package/docs/subagents.md +348 -0
- package/package.json +4 -1
- package/dist/balance-RQW5T5FB.js +0 -55
- package/dist/chunk-3X4GOMXT.js.map +0 -1
- package/dist/chunk-46HAB26L.js.map +0 -1
- package/dist/chunk-56SOPRM2.js.map +0 -1
- package/dist/chunk-5VWQSCDO.js.map +0 -1
- package/dist/chunk-6J64MQFD.js.map +0 -1
- package/dist/chunk-7U3P4PB7.js.map +0 -1
- package/dist/chunk-APWELUI7.js.map +0 -1
- package/dist/chunk-E6VP6MQM.js.map +0 -1
- package/dist/chunk-EQZ2CCWC.js.map +0 -1
- package/dist/chunk-FHXTEVO7.js.map +0 -1
- package/dist/chunk-FOEPH67T.js.map +0 -1
- package/dist/chunk-IVXPIIZJ.js +0 -91
- package/dist/chunk-IVXPIIZJ.js.map +0 -1
- package/dist/chunk-JF4T4HCQ.js.map +0 -1
- package/dist/chunk-LPQNZKSG.js +0 -269
- package/dist/chunk-LPQNZKSG.js.map +0 -1
- package/dist/chunk-MXN2ZEUB.js.map +0 -1
- package/dist/chunk-OO6FIBL7.js.map +0 -1
- package/dist/chunk-PNHNXUSL.js.map +0 -1
- package/dist/chunk-PYVQ74D5.js.map +0 -1
- package/dist/chunk-PZHBPGDE.js.map +0 -1
- package/dist/chunk-QEZZDIQT.js.map +0 -1
- package/dist/chunk-QXP3Z3JN.js.map +0 -1
- package/dist/chunk-RJ5HRPAZ.js.map +0 -1
- package/dist/chunk-TSIID2LV.js.map +0 -1
- package/dist/chunk-UVDJ5SSQ.js.map +0 -1
- package/dist/chunk-VFKPIIV2.js.map +0 -1
- package/dist/chunk-VH7JMLTG.js.map +0 -1
- package/dist/claude-install-7CVYQ73E.js +0 -60
- package/dist/cli-BFDKEX53.js.map +0 -1
- package/dist/codex-install-GTGO5FYN.js.map +0 -1
- package/dist/doctor-4MMHBRDU.js.map +0 -1
- package/dist/fund-MLXUH24Q.js.map +0 -1
- package/dist/mcp-CC3H7LFO.js +0 -3655
- package/dist/mcp-CC3H7LFO.js.map +0 -1
- package/dist/status-AHE5HSR7.js.map +0 -1
- package/dist/wallet-CJGEHP2Q.js +0 -64
- /package/dist/{_esm-MMYV66AX.js.map → _esm-2KST7HQ7.js.map} +0 -0
- /package/dist/{alive-VOIL5W3I.js.map → alive-5TV22PNF.js.map} +0 -0
- /package/dist/{auth-UHD3QFX4.js.map → auth-XI7BJFLW.js.map} +0 -0
- /package/dist/{balance-RQW5T5FB.js.map → balance-DFHC6XEU.js.map} +0 -0
- /package/dist/{ccip-CS7K5QRQ.js.map → ccip-HOW3DZYF.js.map} +0 -0
- /package/dist/{chunk-FSYH7J75.js.map → chunk-3Y6BHIN6.js.map} +0 -0
- /package/dist/{chunk-FZZWTDWP.js.map → chunk-3YPL6T3P.js.map} +0 -0
- /package/dist/{chunk-JEZMWJEF.js.map → chunk-44MVIRZH.js.map} +0 -0
- /package/dist/{chunk-27FIHFXF.js.map → chunk-45MMSBHA.js.map} +0 -0
- /package/dist/{chunk-7JB6SYJX.js.map → chunk-54ELBTKE.js.map} +0 -0
- /package/dist/{chunk-HWZO6HYZ.js.map → chunk-6QMDUDF2.js.map} +0 -0
- /package/dist/{chunk-FNBGRKS6.js.map → chunk-7V25UAQO.js.map} +0 -0
- /package/dist/{chunk-JOKPBYXP.js.map → chunk-DTEWAVNE.js.map} +0 -0
- /package/dist/{chunk-KAILF7QA.js.map → chunk-F43CV6UC.js.map} +0 -0
- /package/dist/{chunk-ACO7ZCR2.js.map → chunk-FKVJKLPI.js.map} +0 -0
- /package/dist/{chunk-2F5JUAHZ.js.map → chunk-GAJC4BQZ.js.map} +0 -0
- /package/dist/{chunk-L7N73ZAW.js.map → chunk-HAZAN4UM.js.map} +0 -0
- /package/dist/{chunk-6QJZA6EX.js.map → chunk-HI5XQOX2.js.map} +0 -0
- /package/dist/{chunk-BOENA6XR.js.map → chunk-HKGUKAQW.js.map} +0 -0
- /package/dist/{chunk-LJSCGIYH.js.map → chunk-HPRVFJPM.js.map} +0 -0
- /package/dist/{chunk-SDUOJRSV.js.map → chunk-IGLWLH73.js.map} +0 -0
- /package/dist/{chunk-3AKH7ODX.js.map → chunk-INSIW65E.js.map} +0 -0
- /package/dist/{chunk-2P3NJTHE.js.map → chunk-JHFFUVON.js.map} +0 -0
- /package/dist/{chunk-2TO5F6CT.js.map → chunk-K5KNGC4I.js.map} +0 -0
- /package/dist/{chunk-HUWTFKEM.js.map → chunk-KAQ4Q3TO.js.map} +0 -0
- /package/dist/{chunk-GS5RZF7U.js.map → chunk-KLDMLWXT.js.map} +0 -0
- /package/dist/{chunk-HN2EN6P4.js.map → chunk-KNKDMTHU.js.map} +0 -0
- /package/dist/{chunk-R2KMLONN.js.map → chunk-MJDO4EXD.js.map} +0 -0
- /package/dist/{chunk-IHVUE3XF.js.map → chunk-NJA6NT3A.js.map} +0 -0
- /package/dist/{chunk-S3JKF3IK.js.map → chunk-OJJFANO6.js.map} +0 -0
- /package/dist/{chunk-GGGEGMWC.js.map → chunk-Q6RSJCXB.js.map} +0 -0
- /package/dist/{chunk-OTIUEUIS.js.map → chunk-QKEUKBRK.js.map} +0 -0
- /package/dist/{chunk-X52BVGCJ.js.map → chunk-QQDPRTLP.js.map} +0 -0
- /package/dist/{chunk-6AQSUBNR.js.map → chunk-RGCPELQN.js.map} +0 -0
- /package/dist/{chunk-LQ33RLHL.js.map → chunk-TFT2X7SH.js.map} +0 -0
- /package/dist/{chunk-IVHGQNIN.js.map → chunk-VHXCPXUS.js.map} +0 -0
- /package/dist/{chunk-7DW7GAM6.js.map → chunk-VU6GMWF6.js.map} +0 -0
- /package/dist/{chunk-YU3DLVSQ.js.map → chunk-XSCGUO2U.js.map} +0 -0
- /package/dist/{chunk-EPCIJLLU.js.map → chunk-XWROSMI5.js.map} +0 -0
- /package/dist/{chunk-HMT6L65V.js.map → chunk-YJGEVBKZ.js.map} +0 -0
- /package/dist/{chunk-I47ARU5G.js.map → chunk-ZS7JIUJ3.js.map} +0 -0
- /package/dist/{claude-cli-2YKABJJZ.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
- /package/dist/{claude-install-7CVYQ73E.js.map → claude-install-BAUSJMW3.js.map} +0 -0
- /package/dist/{client-XMWEKXX7.js.map → client-3YQKORVK.js.map} +0 -0
- /package/dist/{codex-host-B6NAUWL6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
- /package/dist/{config-THJANIU5.js.map → config-QZOBMTEL.js.map} +0 -0
- /package/dist/{config-names-JU54HYWY.js.map → config-names-Z5NZD5R2.js.map} +0 -0
- /package/dist/{config-rules-VNU23RL4.js.map → config-rules-YOYHS6YL.js.map} +0 -0
- /package/dist/{decision-JIIHDTOF.js.map → decision-QSKHOGCO.js.map} +0 -0
- /package/dist/{hook-command-UB7FOEUL.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
- /package/dist/{hosts-WNQKYKP2.js.map → hook-command-VZ27MGWO.js.map} +0 -0
- /package/dist/{install-Q5SHHEDH.js.map → hosts-3EMTVM4H.js.map} +0 -0
- /package/dist/{install-funding-EGSW2KEP.js.map → install-ZA7L2UF3.js.map} +0 -0
- /package/dist/{install-identity-OID43B4D.js.map → install-funding-JDGYTF72.js.map} +0 -0
- /package/dist/{package-NRHU7HBR.js.map → install-identity-FFAYEFLX.js.map} +0 -0
- /package/dist/{passphrase-3JEVW5XG.js.map → new-install-5L4GY3LN.js.map} +0 -0
- /package/dist/{pay-I47AIUQR.js.map → package-BONDXSV3.js.map} +0 -0
- /package/dist/{routing-quote-QQW2I5MH.js.map → passphrase-T4ULBN4M.js.map} +0 -0
- /package/dist/{run-4SHEOBIU.js.map → pay-CMV5KL74.js.map} +0 -0
- /package/dist/{payments-A5FNI5GN.js.map → payments-Z6UBZL4Z.js.map} +0 -0
- /package/dist/{runtime-activate-N6VLQI2C.js.map → routing-quote-AHLAREXR.js.map} +0 -0
- /package/dist/{runtime-launchers-GMAUICRW.js.map → run-JH7ELYAM.js.map} +0 -0
- /package/dist/{runtime-BABJMHY7.js.map → runtime-2GX4ALJP.js.map} +0 -0
- /package/dist/{runtime-place-DOEWFTF3.js.map → runtime-activate-IDQ2NCSP.js.map} +0 -0
- /package/dist/{update-GTLMLFA3.js.map → runtime-launchers-YAPKCBHV.js.map} +0 -0
- /package/dist/{usdc-25RNBYYR.js.map → runtime-place-4POL4KK4.js.map} +0 -0
- /package/dist/{send-ECXS6JEO.js.map → send-ELXFKEKY.js.map} +0 -0
- /package/dist/{status-line-63XFJAXR.js.map → status-line-IH5JBWBC.js.map} +0 -0
- /package/dist/{streamableHttp-Z3YF6LTQ.js.map → streamableHttp-CP2ZQBIK.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-3CG63XDX.js.map → update-EUIX72IX.js.map} +0 -0
- /package/dist/{usage-FCWP2CHO.js.map → usage-EKDC7LUC.js.map} +0 -0
- /package/dist/{wallet-CJGEHP2Q.js.map → usdc-YIHK2OMC.js.map} +0 -0
package/NOTICE.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Third-Party Notices
|
|
2
2
|
|
|
3
|
+
## Claude Agent SDK
|
|
4
|
+
|
|
5
|
+
The external subagent runner bundles the JavaScript core of Anthropic's Claude Agent SDK. Copyright Anthropic PBC; all rights reserved. Its use is subject to the [Anthropic legal agreements](https://code.claude.com/docs/en/legal-and-compliance). The runner uses an installed Claude Code executable; this package does not redistribute that executable.
|
|
6
|
+
|
|
3
7
|
## BlockRun MCP
|
|
4
8
|
|
|
5
9
|
Portions of this project are adapted from
|
|
@@ -210,3 +214,29 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
210
214
|
PERFORMANCE OF THIS SOFTWARE.
|
|
211
215
|
|
|
212
216
|
Modified for hash-wasm by Dani Biró
|
|
217
|
+
|
|
218
|
+
## undici
|
|
219
|
+
|
|
220
|
+
The paid model call bundles [undici](https://github.com/nodejs/undici) 7.28.0 (MIT), whose HTTP dispatcher carries its own waits for headers and body. Its license is reproduced below.
|
|
221
|
+
|
|
222
|
+
MIT License
|
|
223
|
+
|
|
224
|
+
Copyright (c) Matteo Collina and Undici contributors
|
|
225
|
+
|
|
226
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
227
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
228
|
+
in the Software without restriction, including without limitation the rights
|
|
229
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
230
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
231
|
+
furnished to do so, subject to the following conditions:
|
|
232
|
+
|
|
233
|
+
The above copyright notice and this permission notice shall be included in all
|
|
234
|
+
copies or substantial portions of the Software.
|
|
235
|
+
|
|
236
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
237
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
238
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
239
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
240
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
241
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
242
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -72,7 +72,9 @@ npm install -g tenjin-cli
|
|
|
72
72
|
tenjin install
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Setup asks about spending limits, then offers to add $5 so you can start using tools. **Add $5** opens checkout in your browser, and Tenjin carries on as soon as the money lands. With **Not now**, your agent asks when a task first needs a paid tool. Follow the activation step.
|
|
75
|
+
Setup asks about spending limits and, on a fresh install, whether to turn on DeepSeek subagents. It then offers to add $5 so you can start using tools. **Add $5** opens checkout in your browser, and Tenjin carries on as soon as the money lands. With **Not now**, your agent asks when a task first needs a paid tool. Follow the activation step.
|
|
76
|
+
|
|
77
|
+
DeepSeek subagents are off by default. Turn them on during setup or with `tenjin config subagents on`, and Tenjin can offer DeepSeek V4.1 Flash for eligible Claude Code subagent jobs; Claude accepts or declines each one. A job costs up to your per-call limit ($1 by default), within your daily budget. Existing users keep their settings. Turn them off with `tenjin config subagents off`. [Sharing, charges and controls →](./docs/subagents.md)
|
|
76
78
|
|
|
77
79
|
Claude Code is supported; Codex is experimental. [Supported systems, setup and permissions →](./docs/agent-permissions.md)
|
|
78
80
|
|
|
@@ -100,19 +102,19 @@ Use Tenjin to make a 10-second welcome voiceover for my app.
|
|
|
100
102
|
|
|
101
103
|
## What your agent can do
|
|
102
104
|
|
|
103
|
-
| Your agent needs
|
|
104
|
-
|
|
|
105
|
-
| Library docs
|
|
106
|
-
| Web search and page reads
|
|
107
|
-
| Math and live crypto prices
|
|
108
|
-
| People, companies and emails
|
|
109
|
-
| X and Reddit
|
|
110
|
-
| Images
|
|
111
|
-
| Voiceovers, sound effects, music
|
|
112
|
-
| Video clips
|
|
113
|
-
| Papers and SEC filings
|
|
114
|
-
| Instagram, TikTok and Google Maps
|
|
115
|
-
| PDFs,
|
|
105
|
+
| Your agent needs | Provider examples | Provider price |
|
|
106
|
+
| --------------------------------- | ------------------------------- | -------------- |
|
|
107
|
+
| Library docs | Context7 | free |
|
|
108
|
+
| Web search and page reads | Exa, Firecrawl | 0.1¢ to 1.5¢ |
|
|
109
|
+
| Math and live crypto prices | Wolfram Alpha, CoinMarketCap | 1¢ to 2¢ |
|
|
110
|
+
| People, companies and emails | Apollo, Hunter, CompanyEnrich | 0.8¢ to 5¢ |
|
|
111
|
+
| X and Reddit | glim | 0.1¢ to 1¢ |
|
|
112
|
+
| Images | GPT Image, Nano Banana, Recraft | 3.5¢ to 14.4¢ |
|
|
113
|
+
| Voiceovers, sound effects, music | ElevenLabs, Google Lyria | 1¢ to 12¢ |
|
|
114
|
+
| Video clips | MiniMax Hailuo | 15.5¢ to 84¢ |
|
|
115
|
+
| Papers and SEC filings | arXiv, PubMed, SEC EDGAR | 0.3¢ to 4¢ |
|
|
116
|
+
| Instagram, TikTok and Google Maps | Scrape Creators, Google Maps | 2¢ |
|
|
117
|
+
| PDFs, screenshots and hosting | Cloudflare and others | 0.2¢ to 50¢ |
|
|
116
118
|
|
|
117
119
|
Example provider prices vary by tool and inputs and exclude Tenjin's routing fee. The quote for your call applies; [the full catalog has every tool and its current price →](https://tenjin.sh/tools)
|
|
118
120
|
|
|
@@ -123,9 +125,9 @@ Browsing and inspection are free. A selected tool pays only its provider; select
|
|
|
123
125
|
| Automatic spending | Default |
|
|
124
126
|
| -------------------------------- | ------- |
|
|
125
127
|
| Daily budget shared across chats | $5 |
|
|
126
|
-
| Per-call limit | $
|
|
128
|
+
| Per-call limit | $1.00 |
|
|
127
129
|
|
|
128
|
-
A new chat does not reset the daily budget. Routing fees vary by answer. Tool charges are separate. [Limits and approval →](./docs/agent-permissions.md#what-bounds-a-payment)
|
|
130
|
+
A new chat does not reset the daily budget. Set any non-negative per-call USD limit with up to 6 decimal places; `0` blocks positive automatic payments. Routing fees vary by answer. Tool charges are separate. [Limits and approval →](./docs/agent-permissions.md#what-bounds-a-payment)
|
|
129
131
|
|
|
130
132
|
## Commands
|
|
131
133
|
|
|
@@ -143,13 +145,13 @@ A new chat does not reset the daily budget. Routing fees vary by answer. Tool ch
|
|
|
143
145
|
| `tenjin update` | Update Tenjin |
|
|
144
146
|
| `tenjin uninstall` | Remove Tenjin from your agent; your balance stays |
|
|
145
147
|
|
|
146
|
-
`tenjin fund --usdc` shows the address to send USDC to from a crypto wallet instead. `tenjin wallet fund` and `tenjin wallet balance` still work.
|
|
148
|
+
`tenjin fund --usdc` shows the address to send USDC to from a crypto wallet instead. `tenjin wallet fund` and `tenjin wallet balance` still work. Have a code? Run `tenjin fund` and enter it under **Have a code?** on the page.
|
|
147
149
|
|
|
148
150
|
Calls on your own account bill its plan, not your Tenjin balance. [Your own accounts →](./docs/agent-permissions.md#your-own-accounts)
|
|
149
151
|
|
|
150
152
|
## Privacy and help
|
|
151
153
|
|
|
152
|
-
Routing sends relevant task context to Tenjin, with known secrets masked. Tool-result bodies are excluded. The wallet key stays local. [What is sent and retained →](./docs/agent-permissions.md#what-the-hooks-send)
|
|
154
|
+
Routing sends relevant task context to Tenjin, with known secrets masked. Tool-result bodies are excluded. The wallet key stays local, also for a DeepSeek worker, which masks nothing else it reads and forwards to Tenjin and DeepSeek; only its job's tokens and your wallet key and passphrase are removed. [What is sent and retained →](./docs/agent-permissions.md#what-the-hooks-send)
|
|
153
155
|
|
|
154
156
|
- [Setup and permissions](./docs/agent-permissions.md): installation, activation, spending and sharing.
|
|
155
157
|
- [Troubleshooting](./docs/troubleshooting.md): a failed install, locked wallet or missing tool.
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
withTimeout,
|
|
126
126
|
zeroAddress,
|
|
127
127
|
zeroHash
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-7V25UAQO.js";
|
|
129
129
|
import "./chunk-PETQ5WEA.js";
|
|
130
130
|
import {
|
|
131
131
|
AbiConstructorNotFoundError,
|
|
@@ -428,9 +428,9 @@ import {
|
|
|
428
428
|
toSignatureHash,
|
|
429
429
|
trim,
|
|
430
430
|
weiUnits
|
|
431
|
-
} from "./chunk-
|
|
432
|
-
import "./chunk-RBJPAZFI.js";
|
|
431
|
+
} from "./chunk-INSIW65E.js";
|
|
433
432
|
import "./chunk-CZJOMUBP.js";
|
|
433
|
+
import "./chunk-RBJPAZFI.js";
|
|
434
434
|
import "./chunk-WFZX352D.js";
|
|
435
435
|
import "./chunk-ZXTAQYNA.js";
|
|
436
436
|
export {
|
|
@@ -873,4 +873,4 @@ export {
|
|
|
873
873
|
zeroAddress,
|
|
874
874
|
zeroHash
|
|
875
875
|
};
|
|
876
|
-
//# sourceMappingURL=_esm-
|
|
876
|
+
//# sourceMappingURL=_esm-2KST7HQ7.js.map
|
|
@@ -11,29 +11,29 @@ import {
|
|
|
11
11
|
sessionServedByPlugin,
|
|
12
12
|
walletAtStart,
|
|
13
13
|
walletNotice
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-5F4OB5B3.js";
|
|
15
|
+
import "./chunk-ZS7JIUJ3.js";
|
|
16
16
|
import "./chunk-JWAK7JQB.js";
|
|
17
17
|
import "./chunk-ILWCKCOI.js";
|
|
18
18
|
import "./chunk-RFZA7PSM.js";
|
|
19
19
|
import "./chunk-JUUBBBY5.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-W2GXIARJ.js";
|
|
21
|
+
import "./chunk-TFT2X7SH.js";
|
|
22
|
+
import "./chunk-DTEWAVNE.js";
|
|
23
|
+
import "./chunk-UIB33QQP.js";
|
|
23
24
|
import "./chunk-7WEQQJLG.js";
|
|
24
|
-
import "./chunk-VH7JMLTG.js";
|
|
25
|
-
import "./chunk-3MZ7DYRO.js";
|
|
26
25
|
import "./chunk-ZCT5DJ3G.js";
|
|
26
|
+
import "./chunk-3MZ7DYRO.js";
|
|
27
27
|
import "./chunk-JTX3BUDK.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-ZEYA2WWX.js";
|
|
29
29
|
import "./chunk-DIH2G3YG.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-D6M3ZK66.js";
|
|
31
|
+
import "./chunk-RGCPELQN.js";
|
|
32
32
|
import "./chunk-CRG54LEB.js";
|
|
33
33
|
import "./chunk-TUCKEEXE.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-P6YQWIT2.js";
|
|
35
35
|
import "./chunk-DI4QAGRZ.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-3Y2EHT4F.js";
|
|
37
37
|
import "./chunk-ZXTAQYNA.js";
|
|
38
38
|
export {
|
|
39
39
|
BALANCE_NOTICE_EVERY_MS,
|
|
@@ -48,4 +48,4 @@ export {
|
|
|
48
48
|
walletAtStart,
|
|
49
49
|
walletNotice
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=alive-
|
|
51
|
+
//# sourceMappingURL=alive-5TV22PNF.js.map
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
selectClientAuthMethod,
|
|
20
20
|
selectResourceURL,
|
|
21
21
|
startAuthorization
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-GAJC4BQZ.js";
|
|
23
|
+
import "./chunk-54ELBTKE.js";
|
|
24
|
+
import "./chunk-P6YQWIT2.js";
|
|
25
25
|
import "./chunk-ZXTAQYNA.js";
|
|
26
26
|
export {
|
|
27
27
|
UnauthorizedError,
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
selectResourceURL,
|
|
45
45
|
startAuthorization
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=auth-
|
|
47
|
+
//# sourceMappingURL=auth-XI7BJFLW.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
BALANCE_READ_MS,
|
|
4
|
+
DEFAULT_WAIT_MS,
|
|
5
|
+
balanceReader,
|
|
6
|
+
lowBalance,
|
|
7
|
+
runBalance
|
|
8
|
+
} from "./chunk-MEWZCIA6.js";
|
|
9
|
+
import "./chunk-V6GIVALQ.js";
|
|
10
|
+
import "./chunk-5USBZ2MU.js";
|
|
11
|
+
import "./chunk-F2KJAJ7T.js";
|
|
12
|
+
import "./chunk-24XKUN2S.js";
|
|
13
|
+
import "./chunk-64WOMNYR.js";
|
|
14
|
+
import "./chunk-TVWCLUBI.js";
|
|
15
|
+
import "./chunk-YJGEVBKZ.js";
|
|
16
|
+
import "./chunk-JTILUN4W.js";
|
|
17
|
+
import "./chunk-6QMDUDF2.js";
|
|
18
|
+
import "./chunk-P4I7BFNJ.js";
|
|
19
|
+
import "./chunk-DJ36BM62.js";
|
|
20
|
+
import "./chunk-W7ELYLYK.js";
|
|
21
|
+
import "./chunk-OQWPRFAC.js";
|
|
22
|
+
import "./chunk-K5KNGC4I.js";
|
|
23
|
+
import "./chunk-FYFHH7V5.js";
|
|
24
|
+
import "./chunk-HPRVFJPM.js";
|
|
25
|
+
import "./chunk-RGVCOG2S.js";
|
|
26
|
+
import "./chunk-FKVJKLPI.js";
|
|
27
|
+
import "./chunk-YWWMISDY.js";
|
|
28
|
+
import "./chunk-JNUKLSMZ.js";
|
|
29
|
+
import "./chunk-HI5XQOX2.js";
|
|
30
|
+
import "./chunk-XRGFH7FI.js";
|
|
31
|
+
import "./chunk-IGLWLH73.js";
|
|
32
|
+
import "./chunk-7V25UAQO.js";
|
|
33
|
+
import "./chunk-PETQ5WEA.js";
|
|
34
|
+
import "./chunk-INSIW65E.js";
|
|
35
|
+
import "./chunk-CZJOMUBP.js";
|
|
36
|
+
import "./chunk-RBJPAZFI.js";
|
|
37
|
+
import "./chunk-WFZX352D.js";
|
|
38
|
+
import "./chunk-ZS7JIUJ3.js";
|
|
39
|
+
import "./chunk-JWAK7JQB.js";
|
|
40
|
+
import "./chunk-KGUE5AVX.js";
|
|
41
|
+
import "./chunk-2W4DQQUU.js";
|
|
42
|
+
import "./chunk-KLDMLWXT.js";
|
|
43
|
+
import "./chunk-HZKANST2.js";
|
|
44
|
+
import "./chunk-MEZJ3I63.js";
|
|
45
|
+
import "./chunk-ILWCKCOI.js";
|
|
46
|
+
import "./chunk-RFZA7PSM.js";
|
|
47
|
+
import "./chunk-JUUBBBY5.js";
|
|
48
|
+
import "./chunk-DTEWAVNE.js";
|
|
49
|
+
import "./chunk-UIB33QQP.js";
|
|
50
|
+
import "./chunk-7WEQQJLG.js";
|
|
51
|
+
import "./chunk-ZCT5DJ3G.js";
|
|
52
|
+
import "./chunk-3MZ7DYRO.js";
|
|
53
|
+
import "./chunk-JTX3BUDK.js";
|
|
54
|
+
import "./chunk-ZEYA2WWX.js";
|
|
55
|
+
import "./chunk-DIH2G3YG.js";
|
|
56
|
+
import "./chunk-D6M3ZK66.js";
|
|
57
|
+
import "./chunk-RGCPELQN.js";
|
|
58
|
+
import "./chunk-CRG54LEB.js";
|
|
59
|
+
import "./chunk-TUCKEEXE.js";
|
|
60
|
+
import "./chunk-P6YQWIT2.js";
|
|
61
|
+
import "./chunk-DI4QAGRZ.js";
|
|
62
|
+
import "./chunk-3Y2EHT4F.js";
|
|
63
|
+
import "./chunk-ZXTAQYNA.js";
|
|
64
|
+
export {
|
|
65
|
+
BALANCE_READ_MS,
|
|
66
|
+
DEFAULT_WAIT_MS,
|
|
67
|
+
balanceReader,
|
|
68
|
+
lowBalance,
|
|
69
|
+
runBalance
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=balance-DFHC6XEU.js.map
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
offchainLookup,
|
|
5
5
|
offchainLookupAbiItem,
|
|
6
6
|
offchainLookupSignature
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-RBJPAZFI.js";
|
|
7
|
+
} from "./chunk-INSIW65E.js";
|
|
9
8
|
import "./chunk-CZJOMUBP.js";
|
|
9
|
+
import "./chunk-RBJPAZFI.js";
|
|
10
10
|
import "./chunk-WFZX352D.js";
|
|
11
11
|
import "./chunk-ZXTAQYNA.js";
|
|
12
12
|
export {
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
offchainLookupAbiItem,
|
|
16
16
|
offchainLookupSignature
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=ccip-
|
|
18
|
+
//# sourceMappingURL=ccip-HOW3DZYF.js.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
normalizeChannelId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6QMDUDF2.js";
|
|
5
5
|
import {
|
|
6
|
+
ROUTING_DEPOSIT_KEY,
|
|
6
7
|
payerDir
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HZKANST2.js";
|
|
8
9
|
|
|
9
10
|
// src/router/channel-credit.ts
|
|
10
11
|
import { readdir } from "node:fs/promises";
|
|
11
|
-
import { join as
|
|
12
|
+
import { join as join4 } from "node:path";
|
|
12
13
|
|
|
13
14
|
// node_modules/.pnpm/@x402+evm@2.28.0_typescript@6.0.3/node_modules/@x402/evm/dist/esm/chunk-3632HGL3.mjs
|
|
14
15
|
import { mkdir, readFile, rename, unlink, writeFile } from "fs/promises";
|
|
@@ -106,12 +107,55 @@ var FileClientChannelStorage = class {
|
|
|
106
107
|
}
|
|
107
108
|
};
|
|
108
109
|
|
|
110
|
+
// src/router/model-channel.ts
|
|
111
|
+
import { createHash } from "node:crypto";
|
|
112
|
+
import { join as join3 } from "node:path";
|
|
113
|
+
function modelChannelLane(path) {
|
|
114
|
+
return path === "/api/model-router/route" ? "model-routing" : "model-inference";
|
|
115
|
+
}
|
|
116
|
+
function modelChannelScope(origin, lane) {
|
|
117
|
+
const canonicalOrigin = new URL(origin).origin;
|
|
118
|
+
const id = createHash("sha256").update(JSON.stringify(["tenjin-model-channel", 1, canonicalOrigin, lane])).digest("hex");
|
|
119
|
+
return { origin: canonicalOrigin, id, salt: `0x${id}` };
|
|
120
|
+
}
|
|
121
|
+
function modelChannelDir(dataDir, address, lane, origin) {
|
|
122
|
+
return join3(payerDir(dataDir, address), lane, modelChannelScope(origin, lane).id);
|
|
123
|
+
}
|
|
124
|
+
function modelInferenceRunScope(origin, runId) {
|
|
125
|
+
const canonicalOrigin = new URL(origin).origin;
|
|
126
|
+
const id = createHash("sha256").update(JSON.stringify(["tenjin-model-channel", 2, canonicalOrigin, "model-inference", runId])).digest("hex");
|
|
127
|
+
return { origin: canonicalOrigin, id, salt: `0x${id}` };
|
|
128
|
+
}
|
|
129
|
+
function modelInferenceRunDir(dataDir, address, origin, runId) {
|
|
130
|
+
return join3(
|
|
131
|
+
payerDir(dataDir, address),
|
|
132
|
+
"model-inference",
|
|
133
|
+
modelInferenceRunScope(origin, runId).id
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
function legacySharedInferenceChannel(origin, slot) {
|
|
137
|
+
const canonicalOrigin = new URL(origin).origin;
|
|
138
|
+
const id = createHash("sha256").update(
|
|
139
|
+
JSON.stringify([
|
|
140
|
+
"tenjin-model-channel",
|
|
141
|
+
1,
|
|
142
|
+
canonicalOrigin,
|
|
143
|
+
"model-inference",
|
|
144
|
+
...slot === 1 ? [1] : []
|
|
145
|
+
])
|
|
146
|
+
).digest("hex");
|
|
147
|
+
return { id, salt: `0x${id}` };
|
|
148
|
+
}
|
|
149
|
+
function modelRunDepositKeys(origin, runId) {
|
|
150
|
+
const { id } = modelInferenceRunScope(origin, runId);
|
|
151
|
+
return { prefix: `${ROUTING_DEPOSIT_KEY}run:${id}:`, kept: `${ROUTING_DEPOSIT_KEY}kept:${id}` };
|
|
152
|
+
}
|
|
153
|
+
|
|
109
154
|
// src/router/channel-credit.ts
|
|
110
|
-
async function channels(
|
|
111
|
-
const dir = payerDir(dataDir, address);
|
|
155
|
+
async function channels(dir) {
|
|
112
156
|
const storage = new FileClientChannelStorage({ directory: dir });
|
|
113
157
|
const out = [];
|
|
114
|
-
for (const name of await readdir(
|
|
158
|
+
for (const name of await readdir(join4(dir, "client")).catch(() => [])) {
|
|
115
159
|
const id = /^(0x[0-9a-f]{64})\.json$/.exec(name)?.[1];
|
|
116
160
|
const channel = id === void 0 ? void 0 : await storage.get(id).catch(() => void 0);
|
|
117
161
|
if (channel === void 0) continue;
|
|
@@ -121,16 +165,23 @@ async function channels(dataDir, address) {
|
|
|
121
165
|
}
|
|
122
166
|
return out;
|
|
123
167
|
}
|
|
124
|
-
async function
|
|
168
|
+
async function bestCredit(dir) {
|
|
125
169
|
let best = 0n;
|
|
126
|
-
for (const { leftAtomic } of await channels(
|
|
170
|
+
for (const { leftAtomic } of await channels(dir)) {
|
|
127
171
|
if (leftAtomic > best) best = leftAtomic;
|
|
128
172
|
}
|
|
129
173
|
return best;
|
|
130
174
|
}
|
|
175
|
+
async function channelCredit(dataDir, address, lane = "tool", origin) {
|
|
176
|
+
if (lane === "tool") return bestCredit(payerDir(dataDir, address));
|
|
177
|
+
if (!origin) throw new Error("Model credit requires its server origin");
|
|
178
|
+
return bestCredit(
|
|
179
|
+
modelChannelDir(dataDir, address, lane === "model" ? "model-inference" : lane, origin)
|
|
180
|
+
);
|
|
181
|
+
}
|
|
131
182
|
async function routingSpent(dataDir, address) {
|
|
132
183
|
let total = 0n;
|
|
133
|
-
for (const { depositedAtomic, leftAtomic } of await channels(dataDir, address)) {
|
|
184
|
+
for (const { depositedAtomic, leftAtomic } of await channels(payerDir(dataDir, address))) {
|
|
134
185
|
total += depositedAtomic - leftAtomic;
|
|
135
186
|
}
|
|
136
187
|
return total;
|
|
@@ -138,7 +189,14 @@ async function routingSpent(dataDir, address) {
|
|
|
138
189
|
|
|
139
190
|
export {
|
|
140
191
|
FileClientChannelStorage,
|
|
192
|
+
modelChannelLane,
|
|
193
|
+
modelChannelScope,
|
|
194
|
+
modelChannelDir,
|
|
195
|
+
modelInferenceRunScope,
|
|
196
|
+
modelInferenceRunDir,
|
|
197
|
+
legacySharedInferenceChannel,
|
|
198
|
+
modelRunDepositKeys,
|
|
141
199
|
channelCredit,
|
|
142
200
|
routingSpent
|
|
143
201
|
};
|
|
144
|
-
//# sourceMappingURL=chunk-
|
|
202
|
+
//# sourceMappingURL=chunk-24XKUN2S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/router/channel-credit.ts","../node_modules/.pnpm/@x402+evm@2.28.0_typescript@6.0.3/node_modules/@x402/evm/src/batch-settlement/storage-utils.ts","../node_modules/.pnpm/@x402+evm@2.28.0_typescript@6.0.3/node_modules/@x402/evm/src/batch-settlement/client/fileStorage.ts","../src/router/model-channel.ts"],"sourcesContent":["import { readdir } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { FileClientChannelStorage } from '@x402/evm/batch-settlement/client/file-storage';\nimport { payerDir } from './fee';\nimport { modelChannelDir } from './model-channel';\n\n/**\n * The wallet's routing channels, from the SDK's own files: what each one was\n * deposited (`balance`) and what the router has charged against it\n * (`chargedCumulativeAmount`). Local estimates, with no chain read.\n *\n * Not hook-safe (it loads the x402 SDK's storage), so `fee.ts` does not carry it.\n */\nasync function channels(dir: string): Promise<{ depositedAtomic: bigint; leftAtomic: bigint }[]> {\n const storage = new FileClientChannelStorage({ directory: dir });\n const out: { depositedAtomic: bigint; leftAtomic: bigint }[] = [];\n for (const name of await readdir(join(dir, 'client')).catch(() => [] as string[])) {\n const id = /^(0x[0-9a-f]{64})\\.json$/.exec(name)?.[1];\n const channel = id === undefined ? undefined : await storage.get(id).catch(() => undefined);\n if (channel === undefined) continue;\n const depositedAtomic = BigInt(channel.balance ?? '0');\n const left = depositedAtomic - BigInt(channel.chargedCumulativeAmount ?? '0');\n out.push({ depositedAtomic, leftAtomic: left > 0n ? left : 0n });\n }\n return out;\n}\n\nasync function bestCredit(dir: string): Promise<bigint> {\n let best = 0n;\n for (const { leftAtomic } of await channels(dir)) {\n if (leftAtomic > best) best = leftAtomic;\n }\n return best;\n}\n\n/**\n * What the wallet has set aside in the active routing channel, or in the\n * reusable inference channel. Each directory may contain earlier channel\n * records, so take its largest available balance.\n */\nexport async function channelCredit(\n dataDir: string,\n address: string,\n lane: 'tool' | 'model' | 'model-routing' = 'tool',\n origin?: string,\n): Promise<bigint> {\n if (lane === 'tool') return bestCredit(payerDir(dataDir, address));\n if (!origin) throw new Error('Model credit requires its server origin');\n return bestCredit(\n modelChannelDir(dataDir, address, lane === 'model' ? 'model-inference' : lane, origin),\n );\n}\n\n/**\n * WHAT ROUTING HAS COST, the routing total status and wallet balance show:\n * the deposits sent less the credit they still hold, over every channel file\n * this wallet has here. Offers show no fee, so this is where a person finds it.\n */\nexport async function routingSpent(dataDir: string, address: string): Promise<bigint> {\n let total = 0n;\n for (const { depositedAtomic, leftAtomic } of await channels(payerDir(dataDir, address))) {\n total += depositedAtomic - leftAtomic;\n }\n return total;\n}\n","import { mkdir, readFile, rename, unlink, writeFile } from \"node:fs/promises\";\nimport { dirname, join, resolve, sep } from \"node:path\";\n\n/**\n * Resolves `filename` under `baseDir` and asserts the result stays within `baseDir`.\n *\n * @param baseDir - Directory that must contain the resolved path.\n * @param filename - Filename to resolve against `baseDir`.\n * @returns The absolute resolved path.\n * @throws When the resolved path escapes `baseDir` (e.g. via `..` or separators).\n */\nexport function resolveWithinDir(baseDir: string, filename: string): string {\n const base = resolve(baseDir);\n const target = resolve(base, filename);\n if (target !== base && !target.startsWith(base + sep)) {\n throw new Error(\"resolved channel path escapes storage root\");\n }\n return target;\n}\n\n/**\n * Returns true when `err` is a Node.js `ENOENT` filesystem error (file does not exist).\n *\n * @param err - The thrown value to inspect.\n * @returns `true` for `ENOENT`, `false` for any other value or error code.\n */\nexport function isNodeEnoent(err: unknown): boolean {\n if (!err || typeof err !== \"object\" || !(\"code\" in err)) return false;\n return (err as NodeJS.ErrnoException).code === \"ENOENT\";\n}\n\n/**\n * Reads a JSON file and parses it. Returns `undefined` if the file does not exist.\n * Other errors (permission, malformed JSON) are rethrown.\n *\n * @param filePath - Path to the JSON file.\n * @returns Parsed value, or `undefined` for `ENOENT`.\n */\nexport async function readJsonFile<T>(filePath: string): Promise<T | undefined> {\n try {\n const raw = await readFile(filePath, \"utf8\");\n return JSON.parse(raw) as T;\n } catch (err: unknown) {\n if (isNodeEnoent(err)) return undefined;\n throw err;\n }\n}\n\n/**\n * Writes JSON to `filePath` atomically (temp file in the same directory, then rename).\n * Creates parent directories as needed.\n *\n * @param filePath - Destination file path; parent dirs are created if missing.\n * @param value - JSON-serializable value to persist.\n */\nexport async function writeJsonAtomic(filePath: string, value: unknown): Promise<void> {\n const dir = dirname(filePath);\n await mkdir(dir, { recursive: true });\n const tmp = join(dir, `.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`);\n const body = `${JSON.stringify(value, null, 2)}\\n`;\n await writeFile(tmp, body, \"utf8\");\n try {\n await rename(tmp, filePath);\n } catch {\n // On Windows, rename() onto an existing file throws EEXIST; unlink + rename is intentional.\n await unlink(filePath).catch(() => {});\n await rename(tmp, filePath);\n }\n}\n","import { unlink } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nimport { isNodeEnoent, readJsonFile, resolveWithinDir, writeJsonAtomic } from \"../storage-utils\";\nimport { normalizeChannelId } from \"../utils\";\nimport type { FileChannelStorageOptions } from \"../types\";\nimport type { ClientChannelStorage, BatchSettlementClientContext } from \"./storage\";\n\nexport type { FileChannelStorageOptions };\n\n/**\n * Node.js file-backed {@link ClientChannelStorage} for the batched client scheme.\n * Each channel's context is persisted as `{root}/client/{channelId}.json` so that channel\n * records survive process restarts.\n */\nexport class FileClientChannelStorage implements ClientChannelStorage {\n private readonly root: string;\n\n /**\n * Creates file-backed client channel storage under the given root directory.\n *\n * @param options - Configuration including the storage root directory.\n */\n constructor(options: FileChannelStorageOptions) {\n this.root = options.directory;\n }\n\n /**\n * Loads the stored client context for a channel, if present.\n *\n * @param key - Channel storage key (typically a lowercased channelId).\n * @returns Parsed context or `undefined` when the file is missing.\n */\n async get(key: string): Promise<BatchSettlementClientContext | undefined> {\n return readJsonFile<BatchSettlementClientContext>(this.filePath(key));\n }\n\n /**\n * Persists the client context for a channel.\n *\n * @param key - Channel storage key.\n * @param context - Context record to write.\n */\n async set(key: string, context: BatchSettlementClientContext): Promise<void> {\n await writeJsonAtomic(this.filePath(key), context);\n }\n\n /**\n * Removes the persisted context file for a channel, if it exists.\n *\n * @param key - Channel storage key.\n */\n async delete(key: string): Promise<void> {\n try {\n await unlink(this.filePath(key));\n } catch (err: unknown) {\n if (isNodeEnoent(err)) return;\n throw err;\n }\n }\n\n /**\n * Absolute path to the JSON file for a channel.\n *\n * @param key - Channel storage key (a canonical `bytes32` channel id).\n * @returns Filesystem path under `{root}/client/...`.\n * @throws When `key` is not a canonical `bytes32` string or escapes the storage root.\n */\n private filePath(key: string): string {\n const id = normalizeChannelId(key);\n return resolveWithinDir(join(this.root, \"client\"), `${id}.json`);\n }\n}\n","import { createHash } from 'node:crypto';\nimport { join } from 'node:path';\nimport { payerDir, ROUTING_DEPOSIT_KEY } from './fee';\n\nexport type ModelPaymentPath = '/api/model-router/route' | '/api/model-proxy/messages';\nexport type ModelChannelLane = 'model-routing' | 'model-inference';\n\nexport function modelChannelLane(path: ModelPaymentPath): ModelChannelLane {\n return path === '/api/model-router/route' ? 'model-routing' : 'model-inference';\n}\n\n/** URL is not part of the SDK's channel ID. Scope its supported salt ourselves,\n * so independent local/production ledgers cannot fork one onchain channel. */\nexport function modelChannelScope(origin: string, lane: ModelChannelLane) {\n const canonicalOrigin = new URL(origin).origin;\n const id = createHash('sha256')\n .update(JSON.stringify(['tenjin-model-channel', 1, canonicalOrigin, lane]))\n .digest('hex');\n return { origin: canonicalOrigin, id, salt: `0x${id}` as `0x${string}` };\n}\n\nexport function modelChannelDir(\n dataDir: string,\n address: string,\n lane: ModelChannelLane,\n origin: string,\n) {\n return join(payerDir(dataDir, address), lane, modelChannelScope(origin, lane).id);\n}\n\n/** A new channel for every accepted run, including a continuation of a paid job. */\nexport function modelInferenceRunScope(origin: string, runId: string) {\n const canonicalOrigin = new URL(origin).origin;\n const id = createHash('sha256')\n .update(JSON.stringify(['tenjin-model-channel', 2, canonicalOrigin, 'model-inference', runId]))\n .digest('hex');\n return { origin: canonicalOrigin, id, salt: `0x${id}` as `0x${string}` };\n}\n\nexport function modelInferenceRunDir(\n dataDir: string,\n address: string,\n origin: string,\n runId: string,\n) {\n return join(\n payerDir(dataDir, address),\n 'model-inference',\n modelInferenceRunScope(origin, runId).id,\n );\n}\n\n/**\n * THE OLD SHARED INFERENCE CHANNELS of earlier dev builds: two per wallet and router, slot 0\n * (the scope `modelChannelScope(origin, 'model-inference')` still names) and slot 1, which\n * had a `1` in its scope. Nothing opens or pays on them any more; only the one-time recovery\n * of what they hold reads them (`tenjin wallet reclaim-subagent-credit`). Delete with it.\n */\nexport function legacySharedInferenceChannel(origin: string, slot: 0 | 1) {\n const canonicalOrigin = new URL(origin).origin;\n const id = createHash('sha256')\n .update(\n JSON.stringify([\n 'tenjin-model-channel',\n 1,\n canonicalOrigin,\n 'model-inference',\n ...(slot === 1 ? [1] : []),\n ]),\n )\n .digest('hex');\n return { id, salt: `0x${id}` as `0x${string}` };\n}\n\n/**\n * THE LEDGER KEYS OF ONE RUN'S DEPOSITS. A run's own channel is refunded when the run\n * ends, so its deposits are counted under the run (`prefix`): a confirmed refund gives\n * back that run's own exposure and no other spend. What the run kept is then counted\n * under `kept`, still a routing deposit to `tenjin status`.\n */\nexport function modelRunDepositKeys(origin: string, runId: string) {\n const { id } = modelInferenceRunScope(origin, runId);\n return { prefix: `${ROUTING_DEPOSIT_KEY}run:${id}:`, kept: `${ROUTING_DEPOSIT_KEY}kept:${id}` };\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,QAAAA,aAAY;;;ACDrB,SAAS,OAAO,UAAU,QAAQ,QAAQ,iBAAiB;AAC3D,SAAS,SAAS,MAAM,SAAS,WAAW;AAUrC,SAAS,iBAAiB,SAAiB,UAA0B;AAC1E,QAAM,OAAO,QAAQ,OAAO;AAC5B,QAAM,SAAS,QAAQ,MAAM,QAAQ;AACrC,MAAI,WAAW,QAAQ,CAAC,OAAO,WAAW,OAAO,GAAG,GAAG;AACrD,UAAM,IAAI,MAAM,4CAA4C;EAC9D;AACA,SAAO;AACT;AAQO,SAAS,aAAa,KAAuB;AAClD,MAAI,CAAC,OAAO,OAAO,QAAQ,YAAY,EAAE,UAAU,KAAM,QAAO;AAChE,SAAQ,IAA8B,SAAS;AACjD;AASA,eAAsB,aAAgB,UAA0C;AAC9E,MAAI;AACF,UAAM,MAAM,MAAM,SAAS,UAAU,MAAM;AAC3C,WAAO,KAAK,MAAM,GAAG;EACvB,SAAS,KAAc;AACrB,QAAI,aAAa,GAAG,EAAG,QAAO;AAC9B,UAAM;EACR;AACF;AASA,eAAsB,gBAAgB,UAAkB,OAA+B;AACrF,QAAM,MAAM,QAAQ,QAAQ;AAC5B,QAAM,MAAM,KAAK,EAAE,WAAW,KAAK,CAAC;AACpC,QAAM,MAAM,KAAK,KA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node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
jt
|
|
4
|
+
} from "./chunk-W4G3K3V7.js";
|
|
5
|
+
import {
|
|
6
|
+
_
|
|
7
|
+
} from "./chunk-VWZYE3NC.js";
|
|
8
|
+
|
|
9
|
+
// node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.325_@anthropic-ai+sdk@0.137.0_zod@4.6.7__@modelconte_6201ba81a17d8b6bc4087a6afdf0345f/node_modules/@anthropic-ai/claude-agent-sdk/core-fxa8mwbm.mjs
|
|
10
|
+
import { execFile as f } from "child_process";
|
|
11
|
+
import { promisify as m } from "util";
|
|
12
|
+
import { existsSync as n, lstatSync as s, readdirSync as l, statSync as a } from "fs";
|
|
13
|
+
import { isAbsolute as c, join as p } from "path";
|
|
14
|
+
if (typeof Symbol.dispose !== "symbol") {
|
|
15
|
+
try {
|
|
16
|
+
Symbol.dispose = /* @__PURE__ */ Symbol.for("Symbol.dispose");
|
|
17
|
+
} catch {
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (typeof Symbol.asyncDispose !== "symbol") {
|
|
21
|
+
try {
|
|
22
|
+
Symbol.asyncDispose = /* @__PURE__ */ Symbol.for("Symbol.asyncDispose");
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function i(r, e) {
|
|
27
|
+
if (process.platform !== "darwin" || Boolean(e.DEVELOPER_DIR)) return false;
|
|
28
|
+
try {
|
|
29
|
+
return (r.includes("/") ? r : (e.PATH ?? "").split(":").filter((t) => c(t)).map((t) => p(t, r)).find((t) => n(t))) === "/usr/bin/git" && a("/Library/Developer/CommandLineTools", { throwIfNoEntry: false }) === void 0 && s("/var/db/xcode_select_link", { throwIfNoEntry: false }) === void 0 && !l("/Applications").some((t) => /^Xcode.*\.app$/i.test(t));
|
|
30
|
+
} catch {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
var d = m(f);
|
|
35
|
+
async function qe(r) {
|
|
36
|
+
let e = jt("git");
|
|
37
|
+
if (e === null || i(e, process.env)) return [];
|
|
38
|
+
try {
|
|
39
|
+
let { stdout: o } = await d(e, ["-c", "core.hooksPath=/dev/null", "-c", "core.fsmonitor=", "worktree", "list", "--porcelain"], { cwd: r, timeout: 5e3, windowsHide: true });
|
|
40
|
+
if (!o) return [];
|
|
41
|
+
return o.split(`
|
|
42
|
+
`).filter((t) => t.startsWith("worktree ")).map((t) => _(t.slice(9)));
|
|
43
|
+
} catch {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
qe
|
|
50
|
+
};
|
|
51
|
+
/*! Bundled license information:
|
|
52
|
+
|
|
53
|
+
@anthropic-ai/claude-agent-sdk/core-fxa8mwbm.mjs:
|
|
54
|
+
(*! symbol-dispose-prelude: defines Symbol.dispose and Symbol.asyncDispose if missing, for this bundle's `using`. *)
|
|
55
|
+
*/
|
|
56
|
+
//# sourceMappingURL=chunk-2L7TDGLV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.325_@anthropic-ai+sdk@0.137.0_zod@4.6.7__@modelconte_6201ba81a17d8b6bc4087a6afdf0345f/node_modules/@anthropic-ai/claude-agent-sdk/core-fxa8mwbm.mjs"],"sourcesContent":["// (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.\n\n// Version: 0.3.325\n\n//! symbol-dispose-prelude: defines Symbol.dispose and Symbol.asyncDispose if missing, for this bundle's `using`.\nif (typeof Symbol.dispose !== 'symbol') {\n try {\n Symbol.dispose = Symbol.for('Symbol.dispose')\n } catch {}\n}\nif (typeof Symbol.asyncDispose !== 'symbol') {\n try {\n Symbol.asyncDispose = Symbol.for('Symbol.asyncDispose')\n } catch {}\n}\nimport{_}from\"./core-msnqqcc2.mjs\";import{jt}from\"./core-gbbw9cgm.mjs\";import{execFile as f}from\"child_process\";import{promisify as m}from\"util\";import{existsSync as n,lstatSync as s,readdirSync as l,statSync as a}from\"fs\";import{isAbsolute as c,join as p}from\"path\";function i(r,e){if(process.platform!==\"darwin\"||Boolean(e.DEVELOPER_DIR))return!1;try{return(r.includes(\"/\")?r:(e.PATH??\"\").split(\":\").filter((t)=>c(t)).map((t)=>p(t,r)).find((t)=>n(t)))===\"/usr/bin/git\"&&a(\"/Library/Developer/CommandLineTools\",{throwIfNoEntry:!1})===void 0&&s(\"/var/db/xcode_select_link\",{throwIfNoEntry:!1})===void 0&&!l(\"/Applications\").some((t)=>/^Xcode.*\\.app$/i.test(t))}catch{return!1}}var d=m(f);async function qe(r){let e=jt(\"git\");if(e===null||i(e,process.env))return[];try{let{stdout:o}=await d(e,[\"-c\",\"core.hooksPath=/dev/null\",\"-c\",\"core.fsmonitor=\",\"worktree\",\"list\",\"--porcelain\"],{cwd:r,timeout:5000,windowsHide:!0});if(!o)return[];return o.split(`\n`).filter((t)=>t.startsWith(\"worktree \")).map((t)=>_(t.slice(9)))}catch{return[]}}\nexport{qe};\n"],"mappings":";;;;;;;;;AAeuE,SAAO,YAAY,SAAM;AAAgB,SAAO,aAAa,SAAM;AAAO,SAAO,cAAc,GAAE,aAAa,GAAE,eAAe,GAAE,YAAY,SAAM;AAAK,SAAO,cAAc,GAAE,QAAQ,SAAM;AAVpQ,IAAI,OAAO,OAAO,YAAY,UAAU;AACtC,MAAI;AACF,WAAO,UAAU,uBAAO,IAAI,gBAAgB;AAAA,EAC9C,QAAQ;AAAA,EAAC;AACX;AACA,IAAI,OAAO,OAAO,iBAAiB,UAAU;AAC3C,MAAI;AACF,WAAO,eAAe,uBAAO,IAAI,qBAAqB;AAAA,EACxD,QAAQ;AAAA,EAAC;AACX;AAC2Q,SAAS,EAAE,GAAE,GAAE;AAAC,MAAG,QAAQ,aAAW,YAAU,QAAQ,EAAE,aAAa,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TOOL,
|
|
10
10
|
CODEX_REQUEST_TOOL,
|
|
@@ -13,8 +13,9 @@ import {
|
|
|
13
13
|
PLUGIN_HOOK_TOOL,
|
|
14
14
|
PLUGIN_NAME,
|
|
15
15
|
PLUGIN_SERVER,
|
|
16
|
-
REQUEST_TOOL
|
|
17
|
-
|
|
16
|
+
REQUEST_TOOL,
|
|
17
|
+
SUBAGENT_TOOL
|
|
18
|
+
} from "./chunk-IULCDMVG.js";
|
|
18
19
|
import {
|
|
19
20
|
PRODUCTION_ORIGIN
|
|
20
21
|
} from "./chunk-CRG54LEB.js";
|
|
@@ -59,6 +60,11 @@ cannot pay the endpoint. A 2xx on the probe is delivered free. Read the quote
|
|
|
59
60
|
before the first call to an endpoint, and again when the body or the headers
|
|
60
61
|
change: some endpoints price by request shape.
|
|
61
62
|
|
|
63
|
+
\`signIn: true\` with no \`accepts\` means the endpoint, such as a paid run's
|
|
64
|
+
status URL, asks the wallet that paid it to sign in. \`tenjin pay <url> --json\`
|
|
65
|
+
(a GET, with no \`--max-price\` or \`--yes\`) signs in and pays nothing. It
|
|
66
|
+
refuses with exit 3 when this wallet has not paid that host.
|
|
67
|
+
|
|
62
68
|
## Pay
|
|
63
69
|
|
|
64
70
|
\`\`\`bash
|
|
@@ -82,10 +88,15 @@ tenjin pay <url> --json --max-price <usd> [-X <method>] [-d '<json-body>'] [-H '
|
|
|
82
88
|
- Every paid call pays. There is no cache and no dedupe: a loop pays on every
|
|
83
89
|
turn. Batch work needs the user's consent for the whole batch and its total.
|
|
84
90
|
- A paid 2xx returns \`amountPaid\`, \`payTo\`, \`settlementTxHash\` when the
|
|
85
|
-
seller reported one, and the body. A
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
seller reported one, and the body. A file (an image, a sound, a PDF) is saved
|
|
92
|
+
instead, and \`savedTo\` is its path; \`saveError\` says why when Downloads could
|
|
93
|
+
not take it. If no folder could, \`bodyBase64\` holds the bytes.
|
|
94
|
+
- A 4xx or 5xx AFTER payment is exit 4 (\`PAYMENT_FAILED\`): the signed
|
|
95
|
+
authorization already left, so do not retry blindly. Read \`details.body\` and
|
|
96
|
+
\`details.paymentError\` (the seller's reason), fix the request, and quote
|
|
97
|
+
again. When \`details.settlement\` is \`"settled"\`, say it was charged. When
|
|
98
|
+
only \`details.reportedTxHash\` is set, say the seller reports a charge the
|
|
99
|
+
chain does not show yet. In both cases, do not ask for funds.
|
|
89
100
|
|
|
90
101
|
## Refusals are answers
|
|
91
102
|
|
|
@@ -176,7 +187,13 @@ function renderPluginHooks(entry = PLUGIN_ROOT_ENTRY, o = {}) {
|
|
|
176
187
|
{ event: "SessionStart", hooks: command(cliLaunch(ALIVE_ARGS, entry, o)) },
|
|
177
188
|
...routerHookPlan(),
|
|
178
189
|
{ event: "PreToolUse", matcher: PLUGIN_HOOK_TOOL, hooks: command(denyHook(o)) },
|
|
179
|
-
{
|
|
190
|
+
{
|
|
191
|
+
event: "PreToolUse",
|
|
192
|
+
// With the mod, its `tool.check` allows an accept of an offer, and no hook runs
|
|
193
|
+
// for it, so the host draws no row of its own beside the accept's.
|
|
194
|
+
matcher: o.mod !== void 0 ? REQUEST_TOOL : `${REQUEST_TOOL}|${SUBAGENT_TOOL}`,
|
|
195
|
+
hooks: command(allowHook(o))
|
|
196
|
+
}
|
|
180
197
|
];
|
|
181
198
|
const hooks = {};
|
|
182
199
|
for (const { event, hooks: handlers, ...rest } of plan) {
|
|
@@ -224,13 +241,20 @@ function renderMarketplace(version) {
|
|
|
224
241
|
var PLUGIN_FILES = [
|
|
225
242
|
".mcp.json",
|
|
226
243
|
"types/index.d.ts",
|
|
244
|
+
"hooks/hook-data.ts",
|
|
245
|
+
"hooks/model-viewer.tsx",
|
|
227
246
|
"hooks/register.tsx",
|
|
228
247
|
"hooks/hooks.json",
|
|
229
248
|
PAY_SKILL_PATH,
|
|
230
249
|
".claude-plugin/plugin.json"
|
|
231
250
|
];
|
|
232
251
|
var MOD_TYPES = "types/index.d.ts";
|
|
233
|
-
var MOD_FILES = [
|
|
252
|
+
var MOD_FILES = [
|
|
253
|
+
MOD_TYPES,
|
|
254
|
+
"hooks/hook-data.ts",
|
|
255
|
+
"hooks/model-viewer.tsx",
|
|
256
|
+
"hooks/register.tsx"
|
|
257
|
+
];
|
|
234
258
|
var json = (value) => `${JSON.stringify(value, null, 2)}
|
|
235
259
|
`;
|
|
236
260
|
function renderPluginFiles(version, entry, o = {}) {
|
|
@@ -447,4 +471,4 @@ export {
|
|
|
447
471
|
renderCodexHooks,
|
|
448
472
|
renderCodexHostFiles
|
|
449
473
|
};
|
|
450
|
-
//# sourceMappingURL=chunk-
|
|
474
|
+
//# sourceMappingURL=chunk-34SAECKZ.js.map
|