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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.6.7/node_modules/viem/op-stack/contracts.ts","../node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.6.7/node_modules/viem/op-stack/formatters.ts","../node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.6.7/node_modules/viem/op-stack/serializers.ts","../node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.6.7/node_modules/viem/op-stack/chainConfig.ts","../node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.6.7/node_modules/viem/chains/definitions/base.ts","../src/lib/usdc.ts"],"sourcesContent":["import type { Chain } from '../types/chain.js'\n\n/**\n * Predeploy contracts for OP Stack.\n * @see https://github.com/ethereum-optimism/optimism/blob/develop/specs/predeploys.md\n */\nexport const contracts = {\n gasPriceOracle: { address: '0x420000000000000000000000000000000000000F' },\n l1Block: { address: '0x4200000000000000000000000000000000000015' },\n l2CrossDomainMessenger: {\n address: '0x4200000000000000000000000000000000000007',\n },\n l2Erc721Bridge: { address: '0x4200000000000000000000000000000000000014' },\n l2StandardBridge: { address: '0x4200000000000000000000000000000000000010' },\n l2ToL1MessagePasser: {\n address: '0x4200000000000000000000000000000000000016',\n },\n} as const satisfies Chain['contracts']\n","import type { ChainFormatters } from '../types/chain.js'\nimport type { RpcTransaction } from '../types/rpc.js'\nimport { hexToBigInt, hexToNumber } from '../utils/encoding/fromHex.js'\nimport { defineBlock } from '../utils/formatters/block.js'\nimport {\n defineTransaction,\n formatTransaction,\n} from '../utils/formatters/transaction.js'\nimport { defineTransactionReceipt } from '../utils/formatters/transactionReceipt.js'\nimport type { OpStackBlock, OpStackRpcBlock } from './types/block.js'\nimport type {\n OpStackRpcTransaction,\n OpStackRpcTransactionReceipt,\n OpStackTransaction,\n OpStackTransactionReceipt,\n} from './types/transaction.js'\n\nexport const formatters = {\n block: /*#__PURE__*/ defineBlock({\n format(args: OpStackRpcBlock): OpStackBlock {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === 'string') return transaction\n const formatted = formatTransaction(\n transaction as RpcTransaction,\n ) as OpStackTransaction\n if (formatted.typeHex === '0x7e') {\n formatted.isSystemTx = transaction.isSystemTx\n formatted.mint = transaction.mint\n ? hexToBigInt(transaction.mint)\n : undefined\n formatted.sourceHash = transaction.sourceHash\n formatted.type = 'deposit'\n }\n return formatted\n })\n return {\n transactions,\n stateRoot: args.stateRoot,\n } as OpStackBlock\n },\n }),\n transaction: /*#__PURE__*/ defineTransaction({\n format(args: OpStackRpcTransaction): OpStackTransaction {\n const transaction = {} as OpStackTransaction\n if (args.type === '0x7e') {\n transaction.isSystemTx = args.isSystemTx\n transaction.mint = args.mint ? hexToBigInt(args.mint) : undefined\n transaction.sourceHash = args.sourceHash\n transaction.type = 'deposit'\n }\n return transaction\n },\n }),\n transactionReceipt: /*#__PURE__*/ defineTransactionReceipt({\n format(args: OpStackRpcTransactionReceipt): OpStackTransactionReceipt {\n return {\n ...(args.depositNonce\n ? { depositNonce: hexToBigInt(args.depositNonce) }\n : {}),\n ...(args.depositReceiptVersion\n ? { depositReceiptVersion: hexToNumber(args.depositReceiptVersion) }\n : {}),\n l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,\n l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,\n l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,\n l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null,\n } as OpStackTransactionReceipt\n },\n }),\n} as const satisfies ChainFormatters\n","import { InvalidAddressError } from '../errors/address.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { ChainSerializers } from '../types/chain.js'\nimport type { Hex, Signature } from '../types/misc.js'\nimport type { TransactionSerializable } from '../types/transaction.js'\nimport type { RequiredBy } from '../types/utils.js'\nimport { isAddress } from '../utils/address/isAddress.js'\nimport { concatHex } from '../utils/data/concat.js'\nimport { toHex } from '../utils/encoding/toHex.js'\nimport { toRlp } from '../utils/encoding/toRlp.js'\nimport {\n type SerializeTransactionErrorType as SerializeTransactionErrorType_,\n serializeTransaction as serializeTransaction_,\n} from '../utils/transaction/serializeTransaction.js'\nimport type {\n OpStackTransactionSerializable,\n TransactionSerializableDeposit,\n TransactionSerializedDeposit,\n} from './types/transaction.js'\n\nexport type SerializeTransactionReturnType = ReturnType<\n typeof serializeTransaction\n>\n\nexport type SerializeTransactionErrorType =\n | SerializeTransactionErrorType_\n | ErrorType\n\nexport function serializeTransaction(\n transaction: OpStackTransactionSerializable,\n signature?: Signature,\n) {\n if (isDeposit(transaction)) return serializeTransactionDeposit(transaction)\n return serializeTransaction_(\n transaction as TransactionSerializable,\n signature,\n )\n}\n\nexport const serializers = {\n transaction: serializeTransaction,\n} as const satisfies ChainSerializers\n\n//////////////////////////////////////////////////////////////////////////////\n// Serializers\n\nexport type SerializeTransactionDepositReturnType = TransactionSerializedDeposit\n\nfunction serializeTransactionDeposit(\n transaction: TransactionSerializableDeposit,\n): SerializeTransactionDepositReturnType {\n assertTransactionDeposit(transaction)\n\n const { sourceHash, data, from, gas, isSystemTx, mint, to, value } =\n transaction\n\n const serializedTransaction: Hex[] = [\n sourceHash,\n from,\n to ?? '0x',\n mint ? toHex(mint) : '0x',\n value ? toHex(value) : '0x',\n gas ? toHex(gas) : '0x',\n isSystemTx ? '0x1' : '0x',\n data ?? '0x',\n ]\n\n return concatHex([\n '0x7e',\n toRlp(serializedTransaction),\n ]) as SerializeTransactionDepositReturnType\n}\n\nfunction isDeposit(\n transaction: OpStackTransactionSerializable,\n): transaction is RequiredBy<TransactionSerializableDeposit, 'type'> {\n if (transaction.type === 'deposit') return true\n if (typeof transaction.sourceHash !== 'undefined') return true\n return false\n}\n\nexport function assertTransactionDeposit(\n transaction: TransactionSerializableDeposit,\n) {\n const { from, to } = transaction\n if (from && !isAddress(from)) throw new InvalidAddressError({ address: from })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n}\n","import { contracts } from './contracts.js'\nimport { formatters } from './formatters.js'\nimport { serializers } from './serializers.js'\n\nexport const chainConfig = {\n blockTime: 2_000,\n contracts,\n formatters,\n serializers,\n} as const\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 1 // mainnet\n\nexport const base = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 8453,\n name: 'Base',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.base.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Basescan',\n url: 'https://basescan.org',\n apiUrl: 'https://api.basescan.org/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x56315b90c40730925ec5485cf004d835058518A0',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 5022,\n },\n portal: {\n [sourceId]: {\n address: '0x49048044D57e1C92A77f79988d21Fa8fAF74E97e',\n blockCreated: 17482143,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x3154Cf16ccdb4C6d922629664174b904d80F2C35',\n blockCreated: 17482143,\n },\n },\n },\n sourceId,\n})\n\nexport const basePreconf = /*#__PURE__*/ defineChain({\n ...base,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: ['https://mainnet-preconf.base.org'],\n },\n },\n})\n","import {\n createPublicClient,\n decodeFunctionData,\n encodeFunctionData,\n erc20Abi,\n http,\n type Address,\n type Hex,\n} from 'viem';\nimport { base } from 'viem/chains';\nimport { USDC_ADDRESS as USDC } from './usdc-balance';\nimport type { TenjinSigner } from './wallet/provider';\n\n/** Lives in `usdc-balance.ts`, which the viem-free hooks can load. */\nexport const USDC_ADDRESS: Address = USDC;\n\nexport async function getUsdcBalance(address: Address, rpcUrl: string): Promise<bigint> {\n const client = createPublicClient({\n chain: base,\n transport: http(rpcUrl, { timeout: 2_000, retryCount: 0 }),\n });\n return client.readContract({\n address: USDC_ADDRESS,\n abi: erc20Abi,\n functionName: 'balanceOf',\n args: [address],\n });\n}\n\n// The chain boundary for `tenjin wallet send`, two-phase around the human confirm:\n// prepareUsdcSend (read-only: encode, nonce, gas, fees, ETH-for-gas balance)\n// runs BEFORE the confirm so the prompt can show the fee, broadcastUsdcSend\n// (sign via the TenjinSigner seam, broadcast, wait for the receipt) runs after.\n// Command tests mock this whole module, so no test can ever reach a real chain.\n\n/**\n * Ceilings on the RPC-supplied gas and fee fields. The RPC endpoint is\n * config-controlled and its estimates go straight into the signed transaction; a\n * hostile or broken endpoint returning huge values would burn the wallet's ETH\n * as fees. An ERC-20 transfer is ~65k gas and Base fees run well under a gwei,\n * so estimates past these bounds mean something is wrong: refuse, never clamp\n * (a clamped maxFeePerGas below the real base fee would just strand the tx).\n * A genuine extreme fee spike on Base trips the same refusal; that is intended\n * — waiting it out beats signing an irreversible transfer at panic prices.\n */\nexport const SEND_GAS_CAP = 150_000n;\nexport const SEND_MAX_FEE_PER_GAS_CAP = 10_000_000_000n; // 10 gwei\nexport const SEND_MAX_PRIORITY_FEE_CAP = 2_000_000_000n; // 2 gwei\n\n/** An RPC gas/fee estimate exceeded the send ceilings; nothing was signed. */\nexport class FeeCapExceededError extends Error {\n constructor(field: string, value: bigint, cap: bigint) {\n super(`${field} estimate ${value} exceeds the send ceiling ${cap}`);\n this.name = 'FeeCapExceededError';\n }\n}\n\n/** The transfer was mined but reverted; the fee was spent, the USDC did not move. */\nexport class SendRevertedError extends Error {\n constructor(readonly txHash: Hex) {\n super(`Transaction ${txHash} reverted`);\n this.name = 'SendRevertedError';\n }\n}\n\n/** Broadcast succeeded but no receipt arrived in time; the tx may still mine. */\nexport class SendPendingError extends Error {\n constructor(readonly txHash: Hex) {\n super(`Transaction ${txHash} was broadcast but not confirmed in time`);\n this.name = 'SendPendingError';\n }\n}\n\nexport interface PrepareUsdcSendArgs {\n from: Address;\n to: Address;\n amountAtomic: bigint;\n rpcUrl: string;\n}\n\n/**\n * Everything signed later, fixed at prepare time, plus the gas-cost preview.\n * The nonce is pinned here, BEFORE the human confirm, so anything else spending\n * from this key during that window makes the later broadcast fail nonce-stale\n * (an RPC_ERROR from the node; nothing double-spends — re-run to re-prepare).\n * `to` and `amountAtomic` are the previewed intent; broadcastUsdcSend re-decodes\n * `data` against them before signing.\n */\nexport interface PreparedUsdcSend {\n to: Address;\n amountAtomic: bigint;\n data: Hex;\n nonce: number;\n gas: bigint;\n maxFeePerGas: bigint;\n maxPriorityFeePerGas: bigint;\n /** Worst-case fee (gas * maxFeePerGas), for the confirm prompt and gas check. */\n feeWei: bigint;\n /** The sender's native ETH balance, for the has-gas pre-check. */\n ethBalanceWei: bigint;\n}\n\nexport async function prepareUsdcSend({\n from,\n to,\n amountAtomic,\n rpcUrl,\n}: PrepareUsdcSendArgs): Promise<PreparedUsdcSend> {\n const client = createPublicClient({ chain: base, transport: http(rpcUrl) });\n const data = encodeFunctionData({\n abi: erc20Abi,\n functionName: 'transfer',\n args: [to, amountAtomic],\n });\n const [nonce, gas, fees, ethBalanceWei] = await Promise.all([\n client.getTransactionCount({ address: from, blockTag: 'pending' }),\n client.estimateGas({ account: from, to: USDC_ADDRESS, data }),\n client.estimateFeesPerGas(),\n client.getBalance({ address: from }),\n ]);\n assertUnderCap('gas', gas, SEND_GAS_CAP);\n assertUnderCap('maxFeePerGas', fees.maxFeePerGas, SEND_MAX_FEE_PER_GAS_CAP);\n assertUnderCap('maxPriorityFeePerGas', fees.maxPriorityFeePerGas, SEND_MAX_PRIORITY_FEE_CAP);\n return {\n to,\n amountAtomic,\n data,\n nonce,\n gas,\n maxFeePerGas: fees.maxFeePerGas,\n maxPriorityFeePerGas: fees.maxPriorityFeePerGas,\n feeWei: gas * fees.maxFeePerGas,\n ethBalanceWei,\n };\n}\n\nexport interface BroadcastUsdcSendArgs {\n signer: TenjinSigner;\n prepared: PreparedUsdcSend;\n rpcUrl: string;\n /** Receipt wait bound in ms; Base blocks are ~2s, so the default is generous. */\n receiptTimeoutMs?: number;\n}\n\n/**\n * Sign the prepared transfer through the TenjinSigner seam (never a raw key),\n * broadcast it, and wait for the receipt so \"sent\" means mined. Throws\n * SendRevertedError (mined but failed) or SendPendingError (no receipt in time);\n * both carry the hash so the caller can report it either way.\n */\nexport async function broadcastUsdcSend({\n signer,\n prepared,\n rpcUrl,\n receiptTimeoutMs = 120_000,\n}: BroadcastUsdcSendArgs): Promise<Hex> {\n const client = createPublicClient({ chain: base, transport: http(rpcUrl) });\n // Pre-sign cross-check, the calldata twin of send.ts's signer/preview match:\n // the bytes about to be signed must still decode to the previewed recipient\n // and amount. Unreachable unless prepare-time state was corrupted; refusing\n // here means nothing is signed against a preview it does not match.\n const decoded = decodeFunctionData({ abi: erc20Abi, data: prepared.data });\n if (\n decoded.functionName !== 'transfer' ||\n decoded.args[0].toLowerCase() !== prepared.to.toLowerCase() ||\n decoded.args[1] !== prepared.amountAtomic\n ) {\n throw new Error(\n 'Prepared calldata does not decode to the previewed recipient and amount; nothing was signed.',\n );\n }\n const serializedTransaction = await signer.signTransaction({\n type: 'eip1559',\n chainId: base.id,\n to: USDC_ADDRESS,\n // Explicitly zero: an ERC-20 transfer carries no native value (test-pinned).\n value: 0n,\n data: prepared.data,\n nonce: prepared.nonce,\n gas: prepared.gas,\n maxFeePerGas: prepared.maxFeePerGas,\n maxPriorityFeePerGas: prepared.maxPriorityFeePerGas,\n });\n const txHash = await client.sendRawTransaction({ serializedTransaction });\n let receipt;\n try {\n receipt = await client.waitForTransactionReceipt({ hash: txHash, timeout: receiptTimeoutMs });\n } catch {\n throw new SendPendingError(txHash);\n }\n if (receipt.status !== 'success') throw new SendRevertedError(txHash);\n return txHash;\n}\n\nfunction assertUnderCap(field: string, value: bigint, cap: bigint): void {\n if (value > cap) throw new FeeCapExceededError(field, value, cap);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAM,YAAY;EACvB,gBAAgB,EAAE,SAAS,6CAA4C;EACvE,SAAS,EAAE,SAAS,6CAA4C;EAChE,wBAAwB;IACtB,SAAS;;EAEX,gBAAgB,EAAE,SAAS,6CAA4C;EACvE,kBAAkB,EAAE,SAAS,6CAA4C;EACzE,qBAAqB;IACnB,SAAS;;;;;ACEN,IAAM,aAAa;EACxB,OAAqB,4BAAY;IAC/B,OAAO,MAAqB;AAC1B,YAAM,eAAe,KAAK,cAAc,IAAI,CAAC,gBAAe;AAC1D,YAAI,OAAO,gBAAgB;AAAU,iBAAO;AAC5C,cAAM,YAAY,kBAChB,WAA6B;AAE/B,YAAI,UAAU,YAAY,QAAQ;AAChC,oBAAU,aAAa,YAAY;AACnC,oBAAU,OAAO,YAAY,OACzB,YAAY,YAAY,IAAI,IAC5B;AACJ,oBAAU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EACnC;AACA,MAAI,QAAQ,WAAW,UAAW,OAAM,IAAI,kBAAkB,MAAM;AACpE,SAAO;AACT;AAEA,SAAS,eAAe,OAAe,OAAe,KAAmB;AACvE,MAAI,QAAQ,IAAK,OAAM,IAAI,oBAAoB,OAAO,OAAO,GAAG;AAClE;","names":["serializeTransaction","USDC_ADDRESS"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
writeFileAtomic
|
|
4
|
+
} from "./chunk-7WEQQJLG.js";
|
|
5
|
+
|
|
6
|
+
// src/router/store-files.ts
|
|
7
|
+
import { constants } from "node:fs";
|
|
8
|
+
import { open, opendir, rm } from "node:fs/promises";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
var PRIVATE = { mode: 384, dirMode: 448 };
|
|
11
|
+
async function writePrivate(path, data) {
|
|
12
|
+
await writeFileAtomic(path, data, PRIVATE);
|
|
13
|
+
}
|
|
14
|
+
async function readJsonFile(path, maxBytes) {
|
|
15
|
+
const file = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW).catch(() => void 0);
|
|
16
|
+
if (file === void 0) return null;
|
|
17
|
+
try {
|
|
18
|
+
const stat = await file.stat();
|
|
19
|
+
if (!stat.isFile() || stat.size > maxBytes) return null;
|
|
20
|
+
const buffer = Buffer.alloc(maxBytes + 1);
|
|
21
|
+
let length = 0;
|
|
22
|
+
while (length < buffer.length) {
|
|
23
|
+
const { bytesRead } = await file.read(buffer, length, buffer.length - length, length);
|
|
24
|
+
if (bytesRead === 0) break;
|
|
25
|
+
length += bytesRead;
|
|
26
|
+
}
|
|
27
|
+
if (length > maxBytes) return null;
|
|
28
|
+
const parsed = JSON.parse(buffer.subarray(0, length).toString("utf8"));
|
|
29
|
+
return parsed === null || typeof parsed !== "object" || Array.isArray(parsed) ? null : parsed;
|
|
30
|
+
} catch {
|
|
31
|
+
return null;
|
|
32
|
+
} finally {
|
|
33
|
+
await file.close().catch(() => void 0);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function sweep(dir, expired, opts = {}) {
|
|
37
|
+
const directories = opts.directories === true;
|
|
38
|
+
try {
|
|
39
|
+
let seen = 0;
|
|
40
|
+
for await (const entry of await opendir(dir)) {
|
|
41
|
+
if (opts.limit !== void 0 && ++seen > opts.limit) return;
|
|
42
|
+
if (!(directories ? entry.isDirectory() : entry.isFile())) continue;
|
|
43
|
+
const path = join(dir, entry.name);
|
|
44
|
+
if (await expired(entry.name, path).catch(() => false)) {
|
|
45
|
+
await rm(path, { recursive: directories, force: true }).catch(() => void 0);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
} catch {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
PRIVATE,
|
|
54
|
+
writePrivate,
|
|
55
|
+
readJsonFile,
|
|
56
|
+
sweep
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=chunk-ILWCKCOI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/router/store-files.ts"],"sourcesContent":["import { constants } from 'node:fs';\nimport { open, opendir, rm } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { writeFileAtomic } from '../lib/atomic-json';\n\n/**\n * The file mechanics the router's state stores share (`progress`,\n * `notice-markers`, `alive`, `router-memo`, `job-store`): each keeps one\n * directory under the data dir, names files by a hashed key, and ages them out\n * on its own lifetime. The write, read and sweep live here; contents, names\n * and lifetimes stay in each store.\n *\n * Hook-safe: node and `lib/atomic-json` only, since most of the stores load on\n * every prompt (`dist-chunks.test.ts` pins that graph).\n */\n\n/** A store file is the user's alone: 0600, in a directory made 0700. */\nexport const PRIVATE = { mode: 0o600, dirMode: 0o700 } as const;\n\n/**\n * Write `data` to `path` at {@link PRIVATE} through an atomic rename, which\n * replaces a planted symlink rather than writing through it: a reader sees the\n * old file or the whole new one, never a torn one. Throws.\n */\nexport async function writePrivate(path: string, data: string): Promise<void> {\n await writeFileAtomic(path, data, PRIVATE);\n}\n\n/**\n * One bounded JSON object, or null: absent, not a regular file, over\n * `maxBytes`, damaged, or not an object. `O_NOFOLLOW` because these files live\n * under a directory the user can write: a symlink planted here must not turn a\n * read into a read of something else. Never throws.\n */\nexport async function readJsonFile(\n path: string,\n maxBytes: number,\n): Promise<Record<string, unknown> | null> {\n const file = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW).catch(() => undefined);\n if (file === undefined) return null;\n try {\n const stat = await file.stat();\n if (!stat.isFile() || stat.size > maxBytes) return null;\n const buffer = Buffer.alloc(maxBytes + 1);\n let length = 0;\n while (length < buffer.length) {\n const { bytesRead } = await file.read(buffer, length, buffer.length - length, length);\n if (bytesRead === 0) break;\n length += bytesRead;\n }\n if (length > maxBytes) return null;\n const parsed: unknown = JSON.parse(buffer.subarray(0, length).toString('utf8'));\n return parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)\n ? null\n : (parsed as Record<string, unknown>);\n } catch {\n return null;\n } finally {\n await file.close().catch(() => undefined);\n }\n}\n\n/**\n * Remove every entry of `dir` that `expired` says has outlived its store's\n * lifetime: its regular files, or with `directories` its subdirectories, each\n * removed whole. An `expired` that rejects keeps the entry. `limit` ends the\n * pass after that many entries of any kind, so a directory flooded past what\n * its store ever writes is never walked in full. Never throws.\n */\nexport async function sweep(\n dir: string,\n expired: (name: string, path: string) => Promise<boolean>,\n opts: { limit?: number; directories?: boolean } = {},\n): Promise<void> {\n const directories = opts.directories === true;\n try {\n let seen = 0;\n for await (const entry of await opendir(dir)) {\n if (opts.limit !== undefined && ++seen > opts.limit) return;\n if (!(directories ? entry.isDirectory() : entry.isFile())) continue;\n const path = join(dir, entry.name);\n if (await expired(entry.name, path).catch(() => false)) {\n await rm(path, { recursive: directories, force: true }).catch(() => undefined);\n }\n }\n } catch {\n // Housekeeping only. Nothing downstream depends on it having run.\n }\n}\n"],"mappings":";;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AM,OAAO,GAAI;AAC3D,YAAM,OAAO,KAAK,KAAK,MAAM,IAAI;AACjC,UAAI,MAAM,QAAQ,MAAM,MAAM,IAAI,EAAE,MAAM,MAAM,KAAK,GAAG;AACtD,cAAM,GAAG,MAAM,EAAE,WAAW,aAAa,OAAO,KAAK,CAAC,EAAE,MAAM,MAAM,MAAS;AAAA,MAC/E;AAAA,IACF;AAAA,EACF,QAAQ;AAAA,EAER;AACF;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
keccak_256
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CZJOMUBP.js";
|
|
5
5
|
import {
|
|
6
6
|
equalBytes
|
|
7
7
|
} from "./chunk-RBJPAZFI.js";
|
|
@@ -7347,7 +7347,7 @@ async function call(client, args) {
|
|
|
7347
7347
|
if (isAbortError(err))
|
|
7348
7348
|
throw err;
|
|
7349
7349
|
const data2 = getRevertErrorData(err);
|
|
7350
|
-
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-
|
|
7350
|
+
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-HOW3DZYF.js");
|
|
7351
7351
|
if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)
|
|
7352
7352
|
return {
|
|
7353
7353
|
data: await offchainLookup2(client, { data: data2, requestOptions, to })
|
|
@@ -7757,8 +7757,61 @@ async function ccipRequest({ data, requestOptions, sender, urls }) {
|
|
|
7757
7757
|
}
|
|
7758
7758
|
|
|
7759
7759
|
export {
|
|
7760
|
+
formatAbiParameters,
|
|
7761
|
+
formatAbiItem,
|
|
7762
|
+
InvalidAbiItemError,
|
|
7763
|
+
UnknownTypeError,
|
|
7764
|
+
InvalidAbiParameterError,
|
|
7765
|
+
InvalidAbiParametersError,
|
|
7766
|
+
InvalidParameterError,
|
|
7767
|
+
SolidityProtectedKeywordError,
|
|
7768
|
+
InvalidModifierError,
|
|
7769
|
+
InvalidFunctionModifierError,
|
|
7770
|
+
InvalidAbiTypeParameterError,
|
|
7771
|
+
InvalidSignatureError,
|
|
7772
|
+
UnknownSignatureError,
|
|
7773
|
+
InvalidStructSignatureError,
|
|
7774
|
+
CircularReferenceError,
|
|
7775
|
+
InvalidParenthesisError,
|
|
7776
|
+
parseAbi,
|
|
7777
|
+
parseAbiItem,
|
|
7778
|
+
parseAbiParameter2 as parseAbiParameter,
|
|
7779
|
+
parseAbiParameters,
|
|
7780
|
+
formatAbiItem2,
|
|
7781
|
+
isHex,
|
|
7782
|
+
size3 as size,
|
|
7760
7783
|
setErrorConfig,
|
|
7761
7784
|
BaseError3 as BaseError,
|
|
7785
|
+
AbiConstructorNotFoundError,
|
|
7786
|
+
AbiConstructorParamsNotFoundError,
|
|
7787
|
+
AbiDecodingDataSizeInvalidError,
|
|
7788
|
+
AbiDecodingDataSizeTooSmallError,
|
|
7789
|
+
AbiDecodingZeroDataError,
|
|
7790
|
+
AbiEncodingArrayLengthMismatchError,
|
|
7791
|
+
AbiEncodingBytesSizeMismatchError,
|
|
7792
|
+
AbiEncodingLengthMismatchError,
|
|
7793
|
+
AbiErrorInputsNotFoundError,
|
|
7794
|
+
AbiErrorNotFoundError,
|
|
7795
|
+
AbiErrorSignatureNotFoundError,
|
|
7796
|
+
AbiEventSignatureEmptyTopicsError,
|
|
7797
|
+
AbiEventSignatureNotFoundError,
|
|
7798
|
+
AbiEventNotFoundError,
|
|
7799
|
+
AbiFunctionNotFoundError,
|
|
7800
|
+
AbiFunctionOutputsNotFoundError,
|
|
7801
|
+
AbiFunctionSignatureNotFoundError,
|
|
7802
|
+
BytesSizeMismatchError,
|
|
7803
|
+
DecodeLogDataMismatch,
|
|
7804
|
+
DecodeLogTopicsMismatch,
|
|
7805
|
+
InvalidAbiEncodingTypeError,
|
|
7806
|
+
InvalidAbiDecodingTypeError,
|
|
7807
|
+
InvalidArrayError,
|
|
7808
|
+
InvalidDefinitionTypeError,
|
|
7809
|
+
UnsupportedPackedAbiType,
|
|
7810
|
+
SliceOffsetOutOfBoundsError3 as SliceOffsetOutOfBoundsError,
|
|
7811
|
+
SizeExceedsPaddingSizeError3 as SizeExceedsPaddingSizeError,
|
|
7812
|
+
pad3 as pad,
|
|
7813
|
+
padHex,
|
|
7814
|
+
padBytes,
|
|
7762
7815
|
IntegerOutOfRangeError2 as IntegerOutOfRangeError,
|
|
7763
7816
|
InvalidBytesBooleanError2 as InvalidBytesBooleanError,
|
|
7764
7817
|
InvalidHexBooleanError,
|
|
@@ -7767,19 +7820,7 @@ export {
|
|
|
7767
7820
|
RlpListBoundaryExceededError,
|
|
7768
7821
|
RlpTrailingBytesError,
|
|
7769
7822
|
SizeOverflowError3 as SizeOverflowError,
|
|
7770
|
-
SliceOffsetOutOfBoundsError3 as SliceOffsetOutOfBoundsError,
|
|
7771
|
-
SizeExceedsPaddingSizeError3 as SizeExceedsPaddingSizeError,
|
|
7772
|
-
pad3 as pad,
|
|
7773
|
-
padHex,
|
|
7774
|
-
padBytes,
|
|
7775
|
-
isHex,
|
|
7776
|
-
size3 as size,
|
|
7777
7823
|
trim3 as trim,
|
|
7778
|
-
toBytes,
|
|
7779
|
-
boolToBytes,
|
|
7780
|
-
hexToBytes,
|
|
7781
|
-
numberToBytes,
|
|
7782
|
-
stringToBytes,
|
|
7783
7824
|
fromHex2 as fromHex,
|
|
7784
7825
|
hexToBigInt,
|
|
7785
7826
|
hexToBool,
|
|
@@ -7790,24 +7831,54 @@ export {
|
|
|
7790
7831
|
bytesToHex,
|
|
7791
7832
|
numberToHex,
|
|
7792
7833
|
stringToHex,
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7834
|
+
toBytes,
|
|
7835
|
+
boolToBytes,
|
|
7836
|
+
hexToBytes,
|
|
7837
|
+
numberToBytes,
|
|
7838
|
+
stringToBytes,
|
|
7796
7839
|
keccak256,
|
|
7840
|
+
toSignature,
|
|
7841
|
+
toSignatureHash,
|
|
7842
|
+
toEventSelector,
|
|
7843
|
+
InvalidAddressError,
|
|
7844
|
+
LruMap,
|
|
7797
7845
|
checksumAddress,
|
|
7798
7846
|
getAddress,
|
|
7799
7847
|
isAddress,
|
|
7800
7848
|
concat3 as concat,
|
|
7801
7849
|
concatBytes,
|
|
7802
7850
|
concatHex,
|
|
7851
|
+
slice3 as slice,
|
|
7852
|
+
sliceBytes,
|
|
7853
|
+
sliceHex,
|
|
7854
|
+
arrayRegex,
|
|
7855
|
+
bytesRegex2 as bytesRegex,
|
|
7856
|
+
integerRegex2 as integerRegex,
|
|
7857
|
+
encodeAbiParameters,
|
|
7858
|
+
toFunctionSelector,
|
|
7859
|
+
getAbiItem,
|
|
7860
|
+
parseAccount,
|
|
7861
|
+
prepareEncodeFunctionData,
|
|
7862
|
+
encodeFunctionData,
|
|
7863
|
+
solidityError,
|
|
7803
7864
|
PositionOutOfBoundsError,
|
|
7804
7865
|
createCursor,
|
|
7866
|
+
fromBytes2 as fromBytes,
|
|
7867
|
+
bytesToBigInt,
|
|
7868
|
+
bytesToBool,
|
|
7869
|
+
bytesToNumber,
|
|
7870
|
+
bytesToString,
|
|
7871
|
+
decodeAbiParameters,
|
|
7872
|
+
decodeErrorResult,
|
|
7873
|
+
stringify2 as stringify,
|
|
7805
7874
|
etherUnits,
|
|
7806
7875
|
gweiUnits,
|
|
7807
7876
|
weiUnits,
|
|
7808
7877
|
formatUnits,
|
|
7809
7878
|
formatEther,
|
|
7810
7879
|
formatGwei,
|
|
7880
|
+
AccountStateConflictError,
|
|
7881
|
+
StateAssignmentConflictError,
|
|
7811
7882
|
prettyPrint,
|
|
7812
7883
|
FeeConflictError,
|
|
7813
7884
|
InvalidLegacyVError,
|
|
@@ -7821,6 +7892,68 @@ export {
|
|
|
7821
7892
|
TransactionReceiptNotFoundError,
|
|
7822
7893
|
TransactionReceiptRevertedError,
|
|
7823
7894
|
WaitForTransactionReceiptTimeoutError,
|
|
7895
|
+
getAbortError,
|
|
7896
|
+
isAbortError,
|
|
7897
|
+
CallExecutionError,
|
|
7898
|
+
ContractFunctionExecutionError,
|
|
7899
|
+
ContractFunctionRevertedError,
|
|
7900
|
+
ContractFunctionZeroDataError,
|
|
7901
|
+
CounterfactualDeploymentFailedError,
|
|
7902
|
+
RawContractError,
|
|
7903
|
+
HttpRequestError,
|
|
7904
|
+
ResponseBodyTooLargeError,
|
|
7905
|
+
WebSocketRequestError,
|
|
7906
|
+
RpcRequestError,
|
|
7907
|
+
SocketClosedError,
|
|
7908
|
+
TimeoutError,
|
|
7909
|
+
RpcError,
|
|
7910
|
+
ProviderRpcError,
|
|
7911
|
+
ParseRpcError,
|
|
7912
|
+
InvalidRequestRpcError,
|
|
7913
|
+
MethodNotFoundRpcError,
|
|
7914
|
+
InvalidParamsRpcError,
|
|
7915
|
+
InternalRpcError,
|
|
7916
|
+
InvalidInputRpcError,
|
|
7917
|
+
ResourceNotFoundRpcError,
|
|
7918
|
+
ResourceUnavailableRpcError,
|
|
7919
|
+
TransactionRejectedRpcError,
|
|
7920
|
+
MethodNotSupportedRpcError,
|
|
7921
|
+
LimitExceededRpcError,
|
|
7922
|
+
JsonRpcVersionUnsupportedError,
|
|
7923
|
+
UserRejectedRequestError,
|
|
7924
|
+
UnauthorizedProviderError,
|
|
7925
|
+
UnsupportedProviderMethodError,
|
|
7926
|
+
ProviderDisconnectedError,
|
|
7927
|
+
ChainDisconnectedError,
|
|
7928
|
+
SwitchChainError,
|
|
7929
|
+
UnsupportedNonOptionalCapabilityError,
|
|
7930
|
+
UnsupportedChainIdError,
|
|
7931
|
+
DuplicateIdError,
|
|
7932
|
+
UnknownBundleIdError,
|
|
7933
|
+
BundleTooLargeError,
|
|
7934
|
+
AtomicReadyWalletRejectedUpgradeError,
|
|
7935
|
+
AtomicityNotSupportedError,
|
|
7936
|
+
WalletConnectSessionSettlementError,
|
|
7937
|
+
UnknownRpcError,
|
|
7938
|
+
ExecutionRevertedError,
|
|
7939
|
+
FeeCapTooHighError,
|
|
7940
|
+
FeeCapTooLowError,
|
|
7941
|
+
NonceTooHighError,
|
|
7942
|
+
NonceTooLowError,
|
|
7943
|
+
NonceMaxValueError,
|
|
7944
|
+
InsufficientFundsError,
|
|
7945
|
+
IntrinsicGasTooHighError,
|
|
7946
|
+
IntrinsicGasTooLowError,
|
|
7947
|
+
TransactionTypeNotSupportedError,
|
|
7948
|
+
TipAboveFeeCapError,
|
|
7949
|
+
UnknownNodeError,
|
|
7950
|
+
getNodeError,
|
|
7951
|
+
extract,
|
|
7952
|
+
defineFormatter,
|
|
7953
|
+
rpcTransactionType,
|
|
7954
|
+
formatTransactionRequest,
|
|
7955
|
+
defineTransactionRequest,
|
|
7956
|
+
serializeStateOverride,
|
|
7824
7957
|
maxInt8,
|
|
7825
7958
|
maxInt16,
|
|
7826
7959
|
maxInt24,
|
|
@@ -7917,179 +8050,41 @@ export {
|
|
|
7917
8050
|
maxUint240,
|
|
7918
8051
|
maxUint248,
|
|
7919
8052
|
maxUint256,
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
InvalidChainIdError,
|
|
7925
|
-
ExecutionRevertedError,
|
|
7926
|
-
FeeCapTooHighError,
|
|
7927
|
-
FeeCapTooLowError,
|
|
7928
|
-
NonceTooHighError,
|
|
7929
|
-
NonceTooLowError,
|
|
7930
|
-
NonceMaxValueError,
|
|
7931
|
-
InsufficientFundsError,
|
|
7932
|
-
IntrinsicGasTooHighError,
|
|
7933
|
-
IntrinsicGasTooLowError,
|
|
7934
|
-
TransactionTypeNotSupportedError,
|
|
7935
|
-
TipAboveFeeCapError,
|
|
7936
|
-
UnknownNodeError,
|
|
7937
|
-
slice3 as slice,
|
|
7938
|
-
sliceBytes,
|
|
7939
|
-
sliceHex,
|
|
7940
|
-
formatAbiItem2 as formatAbiItem,
|
|
7941
|
-
AbiConstructorNotFoundError,
|
|
7942
|
-
AbiConstructorParamsNotFoundError,
|
|
7943
|
-
AbiDecodingDataSizeInvalidError,
|
|
7944
|
-
AbiDecodingDataSizeTooSmallError,
|
|
7945
|
-
AbiDecodingZeroDataError,
|
|
7946
|
-
AbiEncodingArrayLengthMismatchError,
|
|
7947
|
-
AbiEncodingBytesSizeMismatchError,
|
|
7948
|
-
AbiEncodingLengthMismatchError,
|
|
7949
|
-
AbiErrorInputsNotFoundError,
|
|
7950
|
-
AbiErrorNotFoundError,
|
|
7951
|
-
AbiErrorSignatureNotFoundError,
|
|
7952
|
-
AbiEventSignatureEmptyTopicsError,
|
|
7953
|
-
AbiEventSignatureNotFoundError,
|
|
7954
|
-
AbiEventNotFoundError,
|
|
7955
|
-
AbiFunctionNotFoundError,
|
|
7956
|
-
AbiFunctionOutputsNotFoundError,
|
|
7957
|
-
AbiFunctionSignatureNotFoundError,
|
|
7958
|
-
BytesSizeMismatchError,
|
|
7959
|
-
DecodeLogDataMismatch,
|
|
7960
|
-
DecodeLogTopicsMismatch,
|
|
7961
|
-
InvalidAbiEncodingTypeError,
|
|
7962
|
-
InvalidAbiDecodingTypeError,
|
|
7963
|
-
InvalidArrayError,
|
|
7964
|
-
InvalidDefinitionTypeError,
|
|
7965
|
-
UnsupportedPackedAbiType,
|
|
7966
|
-
arrayRegex,
|
|
7967
|
-
bytesRegex2 as bytesRegex,
|
|
7968
|
-
integerRegex2 as integerRegex,
|
|
7969
|
-
encodeAbiParameters,
|
|
7970
|
-
stringify2 as stringify,
|
|
7971
|
-
parseAccount,
|
|
8053
|
+
assertRequest,
|
|
8054
|
+
formatBlockParameter,
|
|
8055
|
+
isAddressEqual,
|
|
8056
|
+
decodeFunctionResult,
|
|
7972
8057
|
BaseError2,
|
|
7973
8058
|
stringify as stringify2,
|
|
7974
|
-
concat2,
|
|
7975
|
-
|
|
7976
|
-
fromBoolean,
|
|
7977
|
-
fromBytes,
|
|
7978
|
-
fromNumber,
|
|
7979
|
-
fromString2 as fromString,
|
|
7980
|
-
padLeft,
|
|
7981
|
-
padRight,
|
|
7982
|
-
slice2,
|
|
7983
|
-
size2,
|
|
7984
|
-
trimLeft2 as trimLeft,
|
|
7985
|
-
toNumber,
|
|
7986
|
-
validate2 as validate,
|
|
7987
|
-
IntegerOutOfRangeError as IntegerOutOfRangeError2,
|
|
7988
|
-
concat as concat3,
|
|
7989
|
-
from as from2,
|
|
8059
|
+
concat as concat2,
|
|
8060
|
+
from,
|
|
7990
8061
|
fromHex as fromHex2,
|
|
7991
|
-
fromString
|
|
8062
|
+
fromString,
|
|
7992
8063
|
isEqual,
|
|
7993
8064
|
random,
|
|
7994
|
-
size as
|
|
7995
|
-
slice as
|
|
8065
|
+
size as size2,
|
|
8066
|
+
slice as slice2,
|
|
7996
8067
|
toBigInt2 as toBigInt,
|
|
7997
8068
|
toBoolean,
|
|
7998
8069
|
toHex as toHex2,
|
|
7999
|
-
toNumber2,
|
|
8070
|
+
toNumber2 as toNumber,
|
|
8000
8071
|
toString,
|
|
8001
|
-
trimLeft
|
|
8002
|
-
validate
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
CircularReferenceError,
|
|
8018
|
-
InvalidParenthesisError,
|
|
8019
|
-
parseAbi,
|
|
8020
|
-
parseAbiItem,
|
|
8021
|
-
parseAbiParameter2 as parseAbiParameter,
|
|
8022
|
-
parseAbiParameters,
|
|
8023
|
-
toSignature,
|
|
8024
|
-
toSignatureHash,
|
|
8025
|
-
toEventSelector,
|
|
8026
|
-
toFunctionSelector,
|
|
8027
|
-
getAbiItem,
|
|
8028
|
-
prepareEncodeFunctionData,
|
|
8029
|
-
encodeFunctionData,
|
|
8030
|
-
solidityError,
|
|
8031
|
-
fromBytes2,
|
|
8032
|
-
bytesToBigInt,
|
|
8033
|
-
bytesToBool,
|
|
8034
|
-
bytesToNumber,
|
|
8035
|
-
bytesToString,
|
|
8036
|
-
decodeAbiParameters,
|
|
8037
|
-
decodeErrorResult,
|
|
8038
|
-
AccountStateConflictError,
|
|
8039
|
-
StateAssignmentConflictError,
|
|
8040
|
-
getAbortError,
|
|
8041
|
-
isAbortError,
|
|
8042
|
-
CallExecutionError,
|
|
8043
|
-
ContractFunctionExecutionError,
|
|
8044
|
-
ContractFunctionRevertedError,
|
|
8045
|
-
ContractFunctionZeroDataError,
|
|
8046
|
-
CounterfactualDeploymentFailedError,
|
|
8047
|
-
RawContractError,
|
|
8048
|
-
HttpRequestError,
|
|
8049
|
-
ResponseBodyTooLargeError,
|
|
8050
|
-
WebSocketRequestError,
|
|
8051
|
-
RpcRequestError,
|
|
8052
|
-
SocketClosedError,
|
|
8053
|
-
TimeoutError,
|
|
8054
|
-
RpcError,
|
|
8055
|
-
ProviderRpcError,
|
|
8056
|
-
ParseRpcError,
|
|
8057
|
-
InvalidRequestRpcError,
|
|
8058
|
-
MethodNotFoundRpcError,
|
|
8059
|
-
InvalidParamsRpcError,
|
|
8060
|
-
InternalRpcError,
|
|
8061
|
-
InvalidInputRpcError,
|
|
8062
|
-
ResourceNotFoundRpcError,
|
|
8063
|
-
ResourceUnavailableRpcError,
|
|
8064
|
-
TransactionRejectedRpcError,
|
|
8065
|
-
MethodNotSupportedRpcError,
|
|
8066
|
-
LimitExceededRpcError,
|
|
8067
|
-
JsonRpcVersionUnsupportedError,
|
|
8068
|
-
UserRejectedRequestError,
|
|
8069
|
-
UnauthorizedProviderError,
|
|
8070
|
-
UnsupportedProviderMethodError,
|
|
8071
|
-
ProviderDisconnectedError,
|
|
8072
|
-
ChainDisconnectedError,
|
|
8073
|
-
SwitchChainError,
|
|
8074
|
-
UnsupportedNonOptionalCapabilityError,
|
|
8075
|
-
UnsupportedChainIdError,
|
|
8076
|
-
DuplicateIdError,
|
|
8077
|
-
UnknownBundleIdError,
|
|
8078
|
-
BundleTooLargeError,
|
|
8079
|
-
AtomicReadyWalletRejectedUpgradeError,
|
|
8080
|
-
AtomicityNotSupportedError,
|
|
8081
|
-
WalletConnectSessionSettlementError,
|
|
8082
|
-
UnknownRpcError,
|
|
8083
|
-
getNodeError,
|
|
8084
|
-
extract,
|
|
8085
|
-
defineFormatter,
|
|
8086
|
-
rpcTransactionType,
|
|
8087
|
-
formatTransactionRequest,
|
|
8088
|
-
defineTransactionRequest,
|
|
8089
|
-
serializeStateOverride,
|
|
8090
|
-
assertRequest,
|
|
8091
|
-
isAddressEqual,
|
|
8092
|
-
decodeFunctionResult,
|
|
8072
|
+
trimLeft,
|
|
8073
|
+
validate,
|
|
8074
|
+
concat2 as concat3,
|
|
8075
|
+
from2,
|
|
8076
|
+
fromBoolean,
|
|
8077
|
+
fromBytes as fromBytes2,
|
|
8078
|
+
fromNumber,
|
|
8079
|
+
fromString2,
|
|
8080
|
+
padLeft,
|
|
8081
|
+
padRight,
|
|
8082
|
+
slice2 as slice3,
|
|
8083
|
+
size2 as size3,
|
|
8084
|
+
trimLeft2,
|
|
8085
|
+
toNumber as toNumber2,
|
|
8086
|
+
validate2,
|
|
8087
|
+
IntegerOutOfRangeError as IntegerOutOfRangeError2,
|
|
8093
8088
|
toRpc2 as toRpc,
|
|
8094
8089
|
multicall3Abi,
|
|
8095
8090
|
batchGatewayAbi,
|
|
@@ -8108,6 +8103,11 @@ export {
|
|
|
8108
8103
|
deploylessCallViaFactoryBytecode,
|
|
8109
8104
|
erc6492SignatureValidatorByteCode,
|
|
8110
8105
|
multicall3Bytecode,
|
|
8106
|
+
ChainDoesNotSupportContract,
|
|
8107
|
+
ChainMismatchError,
|
|
8108
|
+
ChainNotFoundError,
|
|
8109
|
+
ClientChainNotConfiguredError,
|
|
8110
|
+
InvalidChainIdError,
|
|
8111
8111
|
encodeDeployData,
|
|
8112
8112
|
getChainContractAddress,
|
|
8113
8113
|
getCallError,
|
|
@@ -8123,4 +8123,4 @@ export {
|
|
|
8123
8123
|
ccipRequest,
|
|
8124
8124
|
call
|
|
8125
8125
|
};
|
|
8126
|
-
//# sourceMappingURL=chunk-
|
|
8126
|
+
//# sourceMappingURL=chunk-INSIW65E.js.map
|
|
@@ -9,10 +9,19 @@ var SKILLS_DIR_PLUGIN_ID = `${PLUGIN_NAME}@skills-dir`;
|
|
|
9
9
|
var PLUGIN_SERVER = `plugin:${PLUGIN_NAME}:${MCP_SERVER_NAME}`;
|
|
10
10
|
var TOOL_PREFIX = `mcp__plugin_${PLUGIN_NAME}_${MCP_SERVER_NAME}`;
|
|
11
11
|
var REQUEST_TOOL = `${TOOL_PREFIX}__request`;
|
|
12
|
+
var SUBAGENT_TOOL = `${TOOL_PREFIX}__subagent`;
|
|
12
13
|
var PLUGIN_HOOK_TOOL = `${TOOL_PREFIX}__hook`;
|
|
13
14
|
var LEGACY_MCP_SERVER_NAME = "x402";
|
|
14
15
|
var LEGACY_REQUEST_TOOL = `mcp__${LEGACY_MCP_SERVER_NAME}__request`;
|
|
15
16
|
var LEGACY_HOOK_TOOL = `mcp__${LEGACY_MCP_SERVER_NAME}__hook`;
|
|
17
|
+
var CLAUDE_TENJIN_TOOLS = [
|
|
18
|
+
TOOL_PREFIX,
|
|
19
|
+
`mcp__${LEGACY_MCP_SERVER_NAME}`
|
|
20
|
+
].flatMap(
|
|
21
|
+
(server) => ["subagent", "subagent_activity", "request", "approve", "hook"].map(
|
|
22
|
+
(tool) => `${server}__${tool}`
|
|
23
|
+
)
|
|
24
|
+
);
|
|
16
25
|
function launchedByPlugin(env = process.env) {
|
|
17
26
|
const root = env.CLAUDE_PLUGIN_ROOT;
|
|
18
27
|
return typeof root === "string" && root.length > 0;
|
|
@@ -33,14 +42,16 @@ export {
|
|
|
33
42
|
SKILLS_DIR_PLUGIN_ID,
|
|
34
43
|
PLUGIN_SERVER,
|
|
35
44
|
REQUEST_TOOL,
|
|
45
|
+
SUBAGENT_TOOL,
|
|
36
46
|
PLUGIN_HOOK_TOOL,
|
|
37
47
|
LEGACY_MCP_SERVER_NAME,
|
|
38
48
|
LEGACY_REQUEST_TOOL,
|
|
39
49
|
LEGACY_HOOK_TOOL,
|
|
50
|
+
CLAUDE_TENJIN_TOOLS,
|
|
40
51
|
launchedByPlugin,
|
|
41
52
|
HARNESSES,
|
|
42
53
|
CODEX_REQUEST_TOOL,
|
|
43
54
|
CODEX_HOOK_TOOL,
|
|
44
55
|
requestToolName
|
|
45
56
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-IULCDMVG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/router/names.ts"],"sourcesContent":["/**\n * THE NAMES THE HARNESS KNOWS THE ROUTER BY, spelled once. `install` registers\n * the Claude Code plugin {@link PLUGIN_NAME}, whose MCP server is\n * {@link MCP_SERVER_NAME}, and Claude Code names a plugin's tools\n * `mcp__plugin_<plugin>_<server>__<tool>`. The plugin's hooks, the server's own\n * name and every hint line the hooks inject read these, so a rename moves them\n * together.\n *\n * A module of its own because the hooks need the tool name and must not load\n * `install` to get it: their chunk graph is the product's floor.\n */\nexport const PLUGIN_NAME = 'tenjin';\nexport const MCP_SERVER_NAME = 'router';\n/** The marketplace `install` adds from the package, so the plugin id is `tenjin@tenjin`. */\nexport const MARKETPLACE_NAME = 'tenjin';\nexport const PLUGIN_ID = `${PLUGIN_NAME}@${MARKETPLACE_NAME}`;\n/** The id Claude Code gives the same plugin loaded from a skills-directory folder. */\nexport const SKILLS_DIR_PLUGIN_ID = `${PLUGIN_NAME}@skills-dir`;\n/** How a plugin's `hooks.json` and `claude mcp` name the plugin's own server. */\nexport const PLUGIN_SERVER = `plugin:${PLUGIN_NAME}:${MCP_SERVER_NAME}`;\nconst TOOL_PREFIX = `mcp__plugin_${PLUGIN_NAME}_${MCP_SERVER_NAME}`;\nexport const REQUEST_TOOL = `${TOOL_PREFIX}__request`;\nexport const SUBAGENT_TOOL = `${TOOL_PREFIX}__subagent`;\n/** The tool the plugin's hook legs call, which its own deny hook keeps from the model. */\nexport const PLUGIN_HOOK_TOOL = `${TOOL_PREFIX}__hook`;\n\n/**\n * The settings-based install's names, for its migration and nothing else.\n * Older releases registered the server as `x402` through `claude mcp add` and\n * wrote seven hook entries and two permission rules into settings.json.\n *\n * SHIM: remove on or after 2026-12-01, the first release cut 30 or more days\n * after the plugin PR 2 ships. Doctor keeps naming an unmigrated machine after.\n */\nexport const LEGACY_MCP_SERVER_NAME = 'x402';\nexport const LEGACY_REQUEST_TOOL = `mcp__${LEGACY_MCP_SERVER_NAME}__request`;\nexport const LEGACY_HOOK_TOOL = `mcp__${LEGACY_MCP_SERVER_NAME}__hook`;\n/**\n * EVERY TENJIN MCP TOOL, under each name Tenjin registers its server by in Claude Code:\n * the plugin's, and the settings install's. A DeepSeek worker's model is offered none of\n * them, so a worker starts no DeepSeek worker and pays for nothing outside its job. A\n * `tenjin mcp` that starts inside a worker also has none of them but `hook`, whatever\n * name it is registered under (`buildRouterMcpServer`).\n */\nexport const CLAUDE_TENJIN_TOOLS: readonly string[] = [\n TOOL_PREFIX,\n `mcp__${LEGACY_MCP_SERVER_NAME}`,\n].flatMap((server) =>\n ['subagent', 'subagent_activity', 'request', 'approve', 'hook'].map(\n (tool) => `${server}__${tool}`,\n ),\n);\n\n/**\n * Is this process one Claude Code launched from the plugin? Claude Code sets\n * `CLAUDE_PLUGIN_ROOT` for a plugin's MCP server and its command hooks\n * (checked on 2.1.296), and not for a server registered in `~/.claude.json`.\n */\nexport function launchedByPlugin(env: NodeJS.ProcessEnv = process.env): boolean {\n const root = env.CLAUDE_PLUGIN_ROOT;\n return typeof root === 'string' && root.length > 0;\n}\n\n/** The agent hosts the router serves, as the CLI names them to the server. */\nexport const HARNESSES = ['claude', 'codex'] as const;\nexport type Harness = (typeof HARNESSES)[number];\n\n/**\n * Codex names an MCP tool `mcp__<server>__<tool>`, and its plugin's server is\n * {@link MCP_SERVER_NAME}, so the grant key and the tool name move together.\n */\nexport const CODEX_REQUEST_TOOL = `mcp__${MCP_SERVER_NAME}__request`;\n/** The tool the Codex plugin's routing legs call, which its own deny hook keeps from the model. */\nexport const CODEX_HOOK_TOOL = `mcp__${MCP_SERVER_NAME}__hook`;\n\n/**\n * The request tool's name as the host exposes it, so an offer line never names\n * a tool the model does not have. In Claude Code: the plugin's tool for a\n * server the plugin launched, and the `x402` server's tool for one a settings\n * install launched.\n *\n * SHIM: the Claude settings branch goes on or after 2026-12-01 (see\n * {@link LEGACY_MCP_SERVER_NAME}); Claude's name is then always {@link REQUEST_TOOL}.\n */\nexport function requestToolName(\n host: Harness = 'claude',\n env: NodeJS.ProcessEnv = process.env,\n): string {\n if (host === 'codex') return CODEX_REQUEST_TOOL;\n return launchedByPlugin(env) ? REQUEST_TOOL : LEGACY_REQUEST_TOOL;\n}\n"],"mappings":";;;AAWO,IAAM,cAAc;AACpB,IAAM,kBAAkB;AAExB,IAAM,mBAAmB;AACzB,IAAM,YAAY,GAAG,WAAW,IAAI,gBAAgB;AAEpD,IAAM,uBAAuB,GAAG,WAAW;AAE3C,IAAM,gBAAgB,UAAU,WAAW,IAAI,eAAe;AACrE,IAAM,cAAc,eAAe,WAAW,IAAI,eAAe;AAC1D,IAAM,eAAe,GAAG,WAAW;AACnC,IAAM,gBAAgB,GAAG,WAAW;AAEpC,IAAM,mBAAmB,GAAG,WAAW;AAUvC,IAAM,yBAAyB;AAC/B,IAAM,sBAAsB,QAAQ,sBAAsB;AAC1D,IAAM,mBAAmB,QAAQ,sBAAsB;AAQvD,IAAM,sBAAyC;AAAA,EACpD;AAAA,EACA,QAAQ,sBAAsB;AAChC,EAAE;AAAA,EAAQ,CAAC,WACT,CAAC,YAAY,qBAAqB,WAAW,WAAW,MAAM,EAAE;AAAA,IAC9D,CAAC,SAAS,GAAG,MAAM,KAAK,IAAI;AAAA,EAC9B;AACF;AAOO,SAAS,iBAAiB,MAAyB,QAAQ,KAAc;AAC9E,QAAM,OAAO,IAAI;AACjB,SAAO,OAAO,SAAS,YAAY,KAAK,SAAS;AACnD;AAGO,IAAM,YAAY,CAAC,UAAU,OAAO;AAOpC,IAAM,qBAAqB,QAAQ,eAAe;AAElD,IAAM,kBAAkB,QAAQ,eAAe;AAW/C,SAAS,gBACd,OAAgB,UAChB,MAAyB,QAAQ,KACzB;AACR,MAAI,SAAS,QAAS,QAAO;AAC7B,SAAO,iBAAiB,GAAG,IAAI,eAAe;AAChD;","names":[]}
|