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/@modelcontextprotocol+sdk@1.32.0_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/src/experimental/tasks/client.ts","../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.0_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/src/client/index.ts"],"sourcesContent":[null,null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCM,IAAO,0BAAP,MAA8B;EAKhC,YAA6B,SAAiD;AAAjD,SAAA,UAAA;EAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCjF,OAAO,eACH,QACA,eAAkB,sBAClB,SAAwB;AAGxB,UAAM,iBAAiB,KAAK;AAG5B,UAAM,kBAAkB;MACpB,GAAG;;;MAGH,MAAM,SAAS,SAAS,eAAe,WAAW,OAAO,IAAI,IAAI,CAAA,IAAK;;AAG1E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
|
7
|
+
import "./chunk-P4I7BFNJ.js";
|
|
10
8
|
import "./chunk-ZXTAQYNA.js";
|
|
11
9
|
export {
|
|
12
10
|
codexResponse,
|
|
13
11
|
codexRouterEvent,
|
|
14
12
|
codexSession
|
|
15
13
|
};
|
|
16
|
-
//# sourceMappingURL=codex-event-
|
|
14
|
+
//# sourceMappingURL=codex-event-EUTCAOTQ.js.map
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
codexVersion,
|
|
9
9
|
listCodexHooks,
|
|
10
10
|
readCodexConfig
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-E7SW44LM.js";
|
|
11
|
+
} from "./chunk-44MVIRZH.js";
|
|
13
12
|
import "./chunk-F3ED5WTR.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-34SAECKZ.js";
|
|
14
|
+
import "./chunk-I557SAOM.js";
|
|
15
|
+
import "./chunk-IULCDMVG.js";
|
|
16
|
+
import "./chunk-P4I7BFNJ.js";
|
|
17
|
+
import "./chunk-CRG54LEB.js";
|
|
18
18
|
import "./chunk-ZXTAQYNA.js";
|
|
19
19
|
export {
|
|
20
20
|
CODEX_MARKETPLACE,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
listCodexHooks,
|
|
27
27
|
readCodexConfig
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=codex-host-
|
|
29
|
+
//# sourceMappingURL=codex-host-ZON3S6HU.js.map
|
|
@@ -7,93 +7,121 @@ import {
|
|
|
7
7
|
codexHookRows,
|
|
8
8
|
codexVersion,
|
|
9
9
|
listCodexHooks,
|
|
10
|
-
readCodexConfig
|
|
11
|
-
|
|
10
|
+
readCodexConfig,
|
|
11
|
+
resolveCodex,
|
|
12
|
+
withAppServer
|
|
13
|
+
} from "./chunk-44MVIRZH.js";
|
|
14
|
+
import "./chunk-F3ED5WTR.js";
|
|
12
15
|
import {
|
|
13
16
|
readInstalledHosts,
|
|
14
17
|
withNote
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IVNSUAVC.js";
|
|
16
19
|
import {
|
|
20
|
+
CAPABILITY_LINES,
|
|
21
|
+
DISCLOSURE,
|
|
17
22
|
NOTHING_TO_REFRESH,
|
|
18
23
|
approveLimits,
|
|
19
24
|
assertPluginInstallation,
|
|
20
25
|
continuationCommand,
|
|
21
26
|
defaultRuntime,
|
|
22
27
|
effectiveLimits,
|
|
23
|
-
hasRuntime,
|
|
24
28
|
namedLimits,
|
|
29
|
+
receiptTail,
|
|
25
30
|
requireRuntime,
|
|
26
31
|
runtimeData,
|
|
27
32
|
runtimeLines,
|
|
28
33
|
spendStepFor,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import
|
|
37
|
-
EVENT_LABEL,
|
|
38
|
-
persistRouterDefaults,
|
|
39
|
-
rowsOf,
|
|
40
|
-
shownLimits,
|
|
41
|
-
trustCodexHooks
|
|
42
|
-
} from "./chunk-A5GKIG5O.js";
|
|
43
|
-
import "./chunk-4LMUQMBH.js";
|
|
44
|
-
import "./chunk-3623BLPV.js";
|
|
45
|
-
import "./chunk-XKESD27X.js";
|
|
46
|
-
import "./chunk-FVIGCDSV.js";
|
|
47
|
-
import "./chunk-HDPUXS3Z.js";
|
|
48
|
-
import "./chunk-2SNUOHAT.js";
|
|
49
|
-
import {
|
|
50
|
-
resolveCodex
|
|
51
|
-
} from "./chunk-E7SW44LM.js";
|
|
52
|
-
import "./chunk-F3ED5WTR.js";
|
|
53
|
-
import "./chunk-DOQGNFHM.js";
|
|
54
|
-
import "./chunk-L6JEXB3E.js";
|
|
34
|
+
versionFreeEntry,
|
|
35
|
+
walletLines
|
|
36
|
+
} from "./chunk-65RS4LQS.js";
|
|
37
|
+
import "./chunk-QKEUKBRK.js";
|
|
38
|
+
import "./chunk-Y2EXZ47H.js";
|
|
39
|
+
import "./chunk-F43CV6UC.js";
|
|
40
|
+
import "./chunk-HQR4BWKX.js";
|
|
41
|
+
import "./chunk-OJJFANO6.js";
|
|
55
42
|
import {
|
|
56
43
|
CODEX_MCP_HOOKS_VERSION,
|
|
57
44
|
renderCodexHooks
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-MPZUYCAP.js";
|
|
62
|
-
import "./chunk-4YOZGGTZ.js";
|
|
63
|
-
import "./chunk-3FMZGI7I.js";
|
|
64
|
-
import "./chunk-36RVGZNY.js";
|
|
65
|
-
import "./chunk-QXP3Z3JN.js";
|
|
45
|
+
} from "./chunk-34SAECKZ.js";
|
|
46
|
+
import "./chunk-I557SAOM.js";
|
|
47
|
+
import "./chunk-IULCDMVG.js";
|
|
66
48
|
import {
|
|
67
|
-
|
|
68
|
-
} from "./chunk-
|
|
69
|
-
import
|
|
49
|
+
underAgentHarness
|
|
50
|
+
} from "./chunk-WXA3WTPF.js";
|
|
51
|
+
import {
|
|
52
|
+
fundStep
|
|
53
|
+
} from "./chunk-QQDPRTLP.js";
|
|
54
|
+
import {
|
|
55
|
+
isRecord
|
|
56
|
+
} from "./chunk-P4I7BFNJ.js";
|
|
57
|
+
import "./chunk-4MBCJFY4.js";
|
|
58
|
+
import "./chunk-OC7K2DVZ.js";
|
|
59
|
+
import "./chunk-5F4OB5B3.js";
|
|
60
|
+
import "./chunk-ZS7JIUJ3.js";
|
|
61
|
+
import {
|
|
62
|
+
autoUpdateLine
|
|
63
|
+
} from "./chunk-F3QPGYOY.js";
|
|
64
|
+
import "./chunk-JWAK7JQB.js";
|
|
65
|
+
import {
|
|
66
|
+
captureNewInstall,
|
|
67
|
+
reserveNewInstall
|
|
68
|
+
} from "./chunk-4TPL54KW.js";
|
|
69
|
+
import "./chunk-ZRC7Z5X3.js";
|
|
70
|
+
import "./chunk-QQYCYAKI.js";
|
|
71
|
+
import "./chunk-LDA6TAYQ.js";
|
|
72
|
+
import {
|
|
73
|
+
persistRouterDefaults
|
|
74
|
+
} from "./chunk-W74LJ5OT.js";
|
|
75
|
+
import "./chunk-KNKDMTHU.js";
|
|
76
|
+
import "./chunk-3Y6BHIN6.js";
|
|
77
|
+
import "./chunk-R62PKTAG.js";
|
|
78
|
+
import "./chunk-HAZAN4UM.js";
|
|
79
|
+
import {
|
|
80
|
+
shownLimits
|
|
81
|
+
} from "./chunk-KGUE5AVX.js";
|
|
82
|
+
import "./chunk-2W4DQQUU.js";
|
|
83
|
+
import "./chunk-KLDMLWXT.js";
|
|
84
|
+
import {
|
|
85
|
+
SUGGESTED_FUND_USD
|
|
86
|
+
} from "./chunk-HZKANST2.js";
|
|
87
|
+
import "./chunk-MEZJ3I63.js";
|
|
88
|
+
import "./chunk-ILWCKCOI.js";
|
|
89
|
+
import "./chunk-RFZA7PSM.js";
|
|
90
|
+
import "./chunk-JUUBBBY5.js";
|
|
91
|
+
import "./chunk-GH5UKMZD.js";
|
|
92
|
+
import {
|
|
93
|
+
atLeast,
|
|
94
|
+
hasRuntime
|
|
95
|
+
} from "./chunk-5N4GGUBN.js";
|
|
96
|
+
import "./chunk-W2GXIARJ.js";
|
|
97
|
+
import "./chunk-TFT2X7SH.js";
|
|
70
98
|
import {
|
|
71
99
|
resolveContextSettings
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import "./chunk-Y527D4TV.js";
|
|
74
|
-
import "./chunk-NDGZDTSJ.js";
|
|
75
|
-
import "./chunk-BFDQ4WNW.js";
|
|
76
|
-
import "./chunk-3AIHRXKO.js";
|
|
77
|
-
import "./chunk-X5ZBP3IY.js";
|
|
78
|
-
import "./chunk-2I4QTOLB.js";
|
|
100
|
+
} from "./chunk-DTEWAVNE.js";
|
|
79
101
|
import {
|
|
80
102
|
loadRawConfig
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import "./chunk-WXA2BWTE.js";
|
|
83
|
-
import "./chunk-XQJXNMSB.js";
|
|
84
|
-
import "./chunk-SNNSAGMT.js";
|
|
103
|
+
} from "./chunk-UIB33QQP.js";
|
|
85
104
|
import "./chunk-7WEQQJLG.js";
|
|
105
|
+
import "./chunk-ZCT5DJ3G.js";
|
|
106
|
+
import "./chunk-3MZ7DYRO.js";
|
|
86
107
|
import {
|
|
87
|
-
|
|
88
|
-
|
|
108
|
+
runtimeDir,
|
|
109
|
+
tilde
|
|
110
|
+
} from "./chunk-JTX3BUDK.js";
|
|
111
|
+
import "./chunk-ZEYA2WWX.js";
|
|
112
|
+
import "./chunk-DIH2G3YG.js";
|
|
113
|
+
import "./chunk-D6M3ZK66.js";
|
|
114
|
+
import "./chunk-RGCPELQN.js";
|
|
115
|
+
import "./chunk-CRG54LEB.js";
|
|
116
|
+
import "./chunk-TUCKEEXE.js";
|
|
117
|
+
import "./chunk-P6YQWIT2.js";
|
|
89
118
|
import {
|
|
90
|
-
|
|
91
|
-
} from "./chunk-
|
|
92
|
-
import "./chunk-ZNNXRNFD.js";
|
|
93
|
-
import "./chunk-EDJWHDDL.js";
|
|
119
|
+
CliError
|
|
120
|
+
} from "./chunk-DI4QAGRZ.js";
|
|
94
121
|
import {
|
|
95
|
-
|
|
96
|
-
} from "./chunk-
|
|
122
|
+
package_default
|
|
123
|
+
} from "./chunk-3Y2EHT4F.js";
|
|
124
|
+
import "./chunk-4CE6TMI5.js";
|
|
97
125
|
import "./chunk-ZXTAQYNA.js";
|
|
98
126
|
|
|
99
127
|
// src/router/codex-install.ts
|
|
@@ -103,6 +131,115 @@ import { stat } from "node:fs/promises";
|
|
|
103
131
|
import { homedir } from "node:os";
|
|
104
132
|
import { dirname, join, resolve } from "node:path";
|
|
105
133
|
import { fileURLToPath } from "node:url";
|
|
134
|
+
|
|
135
|
+
// src/lib/codex-trust.ts
|
|
136
|
+
var EVENT_LABEL = {
|
|
137
|
+
PreToolUse: "pre_tool_use",
|
|
138
|
+
PermissionRequest: "permission_request",
|
|
139
|
+
PostToolUse: "post_tool_use",
|
|
140
|
+
PreCompact: "pre_compact",
|
|
141
|
+
PostCompact: "post_compact",
|
|
142
|
+
SessionStart: "session_start",
|
|
143
|
+
SessionEnd: "session_end",
|
|
144
|
+
UserPromptSubmit: "user_prompt_submit",
|
|
145
|
+
SubagentStart: "subagent_start",
|
|
146
|
+
SubagentStop: "subagent_stop",
|
|
147
|
+
Stop: "stop",
|
|
148
|
+
Interrupt: "interrupt"
|
|
149
|
+
};
|
|
150
|
+
var PROBE_MS = 8e3;
|
|
151
|
+
function rowsOf(result) {
|
|
152
|
+
if (!isRecord(result) || !Array.isArray(result.data)) return [];
|
|
153
|
+
const out = [];
|
|
154
|
+
for (const group of result.data) {
|
|
155
|
+
if (!isRecord(group) || !Array.isArray(group.hooks)) continue;
|
|
156
|
+
for (const hook of group.hooks) if (isRecord(hook)) out.push(hook);
|
|
157
|
+
}
|
|
158
|
+
return out;
|
|
159
|
+
}
|
|
160
|
+
async function trustCodexHooks(home, keys, ownedBy, opts = {}) {
|
|
161
|
+
const env = opts.env ?? process.env;
|
|
162
|
+
const timeoutMs = opts.timeoutMs ?? PROBE_MS;
|
|
163
|
+
if (keys.length === 0) return { ok: true, trusted: [] };
|
|
164
|
+
const run = async (request) => {
|
|
165
|
+
const before = await request("hooks/list", { cwds: [] });
|
|
166
|
+
if (before === void 0) {
|
|
167
|
+
return {
|
|
168
|
+
ok: false,
|
|
169
|
+
trusted: [],
|
|
170
|
+
failedAt: "list",
|
|
171
|
+
reason: "hooks/list did not answer"
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
const wanted = new Set(keys);
|
|
175
|
+
const mine = rowsOf(before).filter(
|
|
176
|
+
(r) => typeof r.key === "string" && wanted.has(r.key) && ownedBy(r)
|
|
177
|
+
);
|
|
178
|
+
if (mine.length !== keys.length) {
|
|
179
|
+
return {
|
|
180
|
+
ok: false,
|
|
181
|
+
trusted: [],
|
|
182
|
+
failedAt: "list",
|
|
183
|
+
reason: `Codex listed ${mine.length} of the ${keys.length} entries this install wrote`
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const value = {};
|
|
187
|
+
for (const row of mine) {
|
|
188
|
+
const hash = typeof row.currentHash === "string" ? row.currentHash : null;
|
|
189
|
+
if (hash === null) {
|
|
190
|
+
return {
|
|
191
|
+
ok: false,
|
|
192
|
+
trusted: [],
|
|
193
|
+
failedAt: "list",
|
|
194
|
+
reason: "Codex reported an entry with no currentHash"
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
value[row.key] = { trusted_hash: hash, enabled: true };
|
|
198
|
+
}
|
|
199
|
+
const wrote = await request("config/batchWrite", {
|
|
200
|
+
edits: [{ keyPath: "hooks.state", value, mergeStrategy: "upsert" }],
|
|
201
|
+
reloadUserConfig: true
|
|
202
|
+
});
|
|
203
|
+
if (wrote === void 0) {
|
|
204
|
+
return {
|
|
205
|
+
ok: false,
|
|
206
|
+
trusted: [],
|
|
207
|
+
failedAt: "write",
|
|
208
|
+
reason: "config/batchWrite was refused"
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
const after = await request("hooks/list", { cwds: [] });
|
|
212
|
+
if (after === void 0) {
|
|
213
|
+
return {
|
|
214
|
+
ok: false,
|
|
215
|
+
trusted: [],
|
|
216
|
+
failedAt: "verify",
|
|
217
|
+
reason: "the verifying hooks/list did not answer"
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
const confirmed = rowsOf(after).filter(
|
|
221
|
+
(r) => typeof r.key === "string" && wanted.has(r.key) && ownedBy(r) && r.enabled !== false && (r.trustStatus === "trusted" || r.trustStatus === "managed") && r.currentHash === value[r.key]?.trusted_hash
|
|
222
|
+
);
|
|
223
|
+
if (confirmed.length !== keys.length) {
|
|
224
|
+
return {
|
|
225
|
+
ok: false,
|
|
226
|
+
trusted: confirmed.map((r) => r.key),
|
|
227
|
+
failedAt: "verify",
|
|
228
|
+
reason: `Codex confirmed ${confirmed.length} of ${keys.length} entries as trusted after the write`
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
return { ok: true, trusted: confirmed.map((r) => r.key) };
|
|
232
|
+
};
|
|
233
|
+
const outcome = opts.connect !== void 0 ? await run(opts.connect) : await withAppServer(home, env, timeoutMs, run);
|
|
234
|
+
return outcome ?? {
|
|
235
|
+
ok: false,
|
|
236
|
+
trusted: [],
|
|
237
|
+
failedAt: "list",
|
|
238
|
+
reason: "the codex app server could not be reached"
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// src/router/codex-install.ts
|
|
106
243
|
var RUN_TIMEOUT_MS = 3e4;
|
|
107
244
|
function runCodex(args) {
|
|
108
245
|
const codex = resolveCodex();
|
|
@@ -245,7 +382,7 @@ async function refreshCodexPlugin(ctx, deps = {}) {
|
|
|
245
382
|
if (rows.state === "absent") return void 0;
|
|
246
383
|
if (rows.state === "unknown") return CODEX_REFRESH_LINES.failed;
|
|
247
384
|
if (rows.routing !== "free") return void 0;
|
|
248
|
-
if (!
|
|
385
|
+
if (!atLeast(version, CODEX_MCP_HOOKS_VERSION)) return CODEX_REFRESH_LINES.old;
|
|
249
386
|
const runtimeCodex = join(runtimeDir(ctx.dataDir), "codex");
|
|
250
387
|
const hosts = existsSync(join(runtimeCodex, ".agents", "plugins", "marketplace.json")) ? runtimeCodex : deps.hostsDir === void 0 ? await codexHostsDir() : deps.hostsDir;
|
|
251
388
|
const config = await (deps.config ?? (() => readCodexConfig(process.cwd(), 3e3)))();
|
|
@@ -266,6 +403,7 @@ function userScopeOnly(args) {
|
|
|
266
403
|
}
|
|
267
404
|
}
|
|
268
405
|
async function runCodexInstall(args, ctx, deps = {}) {
|
|
406
|
+
const newInstall = deps.newInstall ?? await captureNewInstall(ctx.dataDir);
|
|
269
407
|
userScopeOnly(args);
|
|
270
408
|
const run = deps.run ?? runCodex;
|
|
271
409
|
const home = deps.homeDir ?? homedir();
|
|
@@ -277,6 +415,11 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
277
415
|
const answered = args.yes === true || named.keys.length > 0;
|
|
278
416
|
const unasked = config.maxAutoSpend === void 0 && config.sessionBudget === void 0;
|
|
279
417
|
const limits = named.keys.length > 0 ? { ...shownLimits(config), ...named.limits } : args.yes === true ? shownLimits(config) : canPrompt && unasked ? await approveLimits(deps) : {};
|
|
418
|
+
const initialCodexConfig = newInstall.absent ? await (deps.config ?? (() => readCodexConfig(process.cwd(), 3e3)))() : void 0;
|
|
419
|
+
await reserveNewInstall(
|
|
420
|
+
newInstall,
|
|
421
|
+
!newInstall.absent || initialCodexConfig !== null && typeof initialCodexConfig === "object" && !Array.isArray(initialCodexConfig) && at(initialCodexConfig, "plugins", CODEX_PLUGIN) === void 0 && at(initialCodexConfig, "marketplaces", CODEX_MARKETPLACE) === void 0
|
|
422
|
+
);
|
|
280
423
|
const rt = await (deps.runtime ?? defaultRuntime)({
|
|
281
424
|
dataDir: ctx.dataDir,
|
|
282
425
|
home,
|
|
@@ -286,7 +429,7 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
286
429
|
refresh: false
|
|
287
430
|
});
|
|
288
431
|
requireRuntime(rt);
|
|
289
|
-
const { resolveWallet
|
|
432
|
+
const { resolveWallet } = await import("./install-wallet-2SFOVE3Q.js");
|
|
290
433
|
const wallet = await resolveWallet(
|
|
291
434
|
ctx,
|
|
292
435
|
deps,
|
|
@@ -297,10 +440,10 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
297
440
|
const fromRuntime = runtimeHosts(rt);
|
|
298
441
|
const hosts = rt.state === "skipped" ? deps.hostsDir === void 0 ? await codexHostsDir() : deps.hostsDir : fromRuntime;
|
|
299
442
|
const version = await (deps.version ?? codexVersion)();
|
|
300
|
-
const tooOld = version !== null && !
|
|
443
|
+
const tooOld = version !== null && !atLeast(version, CODEX_MCP_HOOKS_VERSION);
|
|
301
444
|
let next = CODEX_TOO_OLD;
|
|
302
445
|
if (!tooOld) {
|
|
303
|
-
const codexConfig = await (deps.config ?? (() => readCodexConfig(process.cwd(), 3e3)))();
|
|
446
|
+
const codexConfig = initialCodexConfig ?? await (deps.config ?? (() => readCodexConfig(process.cwd(), 3e3)))();
|
|
304
447
|
await addPlugin(
|
|
305
448
|
run,
|
|
306
449
|
hosts,
|
|
@@ -310,36 +453,54 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
310
453
|
);
|
|
311
454
|
next = await trustPlugin(deps).catch(() => false) ? NEW_SESSION_STEP : TRUST_STEP;
|
|
312
455
|
}
|
|
313
|
-
const
|
|
456
|
+
const settings = await resolveContextSettings(ctx);
|
|
457
|
+
const { policy } = settings;
|
|
458
|
+
const effective = effectiveLimits(policy);
|
|
314
459
|
const install = [
|
|
315
460
|
`${continuationCommand(rt)} install`,
|
|
316
461
|
...args.noWallet ? ["--no-wallet"] : []
|
|
317
462
|
].join(" ");
|
|
318
463
|
const spendAsk = !canPrompt && !answered && unasked ? spendStepFor(install) : void 0;
|
|
319
|
-
const
|
|
464
|
+
const asksAgent = !canPrompt && underAgentHarness(deps.env ?? process.env);
|
|
465
|
+
const funding = !tooOld && (asksAgent || canPrompt) && spendAsk === void 0 ? await (deps.funding ?? fundStep)(
|
|
466
|
+
wallet,
|
|
467
|
+
settings.rpcUrl,
|
|
468
|
+
deps,
|
|
469
|
+
`${continuationCommand(rt)} fund ${SUGGESTED_FUND_USD}`
|
|
470
|
+
) : void 0;
|
|
471
|
+
const nextSteps = [
|
|
472
|
+
...spendAsk !== void 0 ? [spendAsk] : [],
|
|
473
|
+
...funding?.step !== void 0 ? [funding.step] : []
|
|
474
|
+
];
|
|
475
|
+
if (asksAgent && nextSteps.length > 0)
|
|
476
|
+
next = `Follow the instructions in nextSteps, then ${next}`;
|
|
477
|
+
newInstall.completed.push(!tooOld);
|
|
478
|
+
newInstall.continueWith ??= install;
|
|
320
479
|
return {
|
|
321
480
|
data: {
|
|
322
481
|
plugin: CODEX_PLUGIN,
|
|
323
482
|
wallet,
|
|
324
483
|
spend: { ...spend, effective },
|
|
325
484
|
runtime: runtimeData(rt),
|
|
326
|
-
nextSteps
|
|
485
|
+
nextSteps,
|
|
486
|
+
disclosure: DISCLOSURE,
|
|
487
|
+
...funding?.warning !== void 0 ? { fundingWarning: funding.warning } : {},
|
|
327
488
|
next
|
|
328
489
|
},
|
|
329
490
|
humanLines: [
|
|
330
|
-
`
|
|
331
|
-
tooOld ?
|
|
332
|
-
...runtimeLines(ctx, rt, home),
|
|
333
|
-
|
|
491
|
+
tooOld ? `Tenjin keeps its earlier Codex setup until Codex is updated (${version}).` : "Tenjin is installed for Codex.",
|
|
492
|
+
...tooOld ? [] : CAPABILITY_LINES.map((line) => ` ${line}`),
|
|
493
|
+
...runtimeLines(ctx, rt, home, true),
|
|
494
|
+
...walletLines(ctx, wallet, "Codex"),
|
|
495
|
+
...funding?.warning !== void 0 ? [funding.warning] : [],
|
|
334
496
|
...spendAsk !== void 0 ? [
|
|
335
497
|
` Ask the person in this session: ${spendAsk.question}`,
|
|
336
498
|
...spendAsk.options.map(
|
|
337
499
|
(o) => ` ${o.label}${o.recommended ? " (recommended)" : ""}: ${o.command}`
|
|
338
500
|
)
|
|
339
|
-
] : []
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
]
|
|
501
|
+
] : []
|
|
502
|
+
],
|
|
503
|
+
humanTail: receiptTail(ctx, policy, next)
|
|
343
504
|
};
|
|
344
505
|
}
|
|
345
506
|
async function runCodexUninstall(args, _ctx, deps = {}) {
|
|
@@ -369,16 +530,6 @@ function runsFrom(ctx, deps, source) {
|
|
|
369
530
|
if (!hasRuntime(ctx.dataDir, home)) return null;
|
|
370
531
|
return "`tenjin` from your PATH; run `tenjin install --harness codex` to move it to Tenjin's runtime";
|
|
371
532
|
}
|
|
372
|
-
function codexAtLeast(version, floor) {
|
|
373
|
-
const parts = (v) => v.split(/[-+]/)[0].split(".").map((n) => Number.parseInt(n, 10));
|
|
374
|
-
const have = parts(version);
|
|
375
|
-
for (const [i, least] of parts(floor).entries()) {
|
|
376
|
-
const part = have[i] ?? 0;
|
|
377
|
-
if (!Number.isFinite(part)) return false;
|
|
378
|
-
if (part !== least) return part > least;
|
|
379
|
-
}
|
|
380
|
-
return true;
|
|
381
|
-
}
|
|
382
533
|
var ROUTING_LINE = {
|
|
383
534
|
paid: "its routing hooks call the router MCP server, which pays the routing fee under your wallet spend limits",
|
|
384
535
|
free: "its routing hooks are commands from an older build, which cannot pay the routing fee, so they offer nothing. Run `tenjin update` or `tenjin install --harness codex` to replace them",
|
|
@@ -393,12 +544,16 @@ async function runCodexDoctor(args, ctx, deps = {}) {
|
|
|
393
544
|
]);
|
|
394
545
|
const hooks = codexHookRows(list);
|
|
395
546
|
const refused = hooks.allowOff && at(config, "approval_policy") === "never";
|
|
396
|
-
const tooOld = version !== null && !
|
|
547
|
+
const tooOld = version !== null && !atLeast(version, CODEX_MCP_HOOKS_VERSION);
|
|
397
548
|
const routing = hooks.state === "absent" ? null : hooks.routing;
|
|
398
549
|
const ok = hooks.state === "trusted" && !refused && routing !== "unknown" && !tooOld;
|
|
399
550
|
const runs = runsFrom(ctx, deps, at(config, "marketplaces", CODEX_MARKETPLACE, "source"));
|
|
400
551
|
const auto = hasRuntime(ctx.dataDir, deps.homeDir ?? homedir()) ? autoUpdateLine(runtimeDir(ctx.dataDir)) : null;
|
|
401
552
|
const lines = [
|
|
553
|
+
`Setup: ${ok && routing !== "free" ? "ready for Codex" : "needs attention"}.`,
|
|
554
|
+
"Current Codex session: not verified by this check.",
|
|
555
|
+
"Paid routing: wallet and funds not checked.",
|
|
556
|
+
"",
|
|
402
557
|
`Codex plugin: ${PLUGIN_LINE[hooks.state]}`,
|
|
403
558
|
`Request tool: ${refused ? "refused: its allow hook is off in /hooks and approval_policy is never" : hooks.allowOff ? "asks before each call (its allow hook is off in /hooks)" : "allowed by its plugin hook, under your wallet spend limits"}`,
|
|
404
559
|
...routing !== null ? [`${routing === "free" ? "! " : ""}Routing: ${ROUTING_LINE[routing]}`] : [],
|
|
@@ -425,7 +580,6 @@ async function runCodexDoctor(args, ctx, deps = {}) {
|
|
|
425
580
|
export {
|
|
426
581
|
CODEX_REFRESH_LINES,
|
|
427
582
|
alongsideCodexRefresh,
|
|
428
|
-
codexAtLeast,
|
|
429
583
|
codexHostsDir,
|
|
430
584
|
ownCodexRow,
|
|
431
585
|
refreshCodexPlugin,
|
|
@@ -433,4 +587,4 @@ export {
|
|
|
433
587
|
runCodexInstall,
|
|
434
588
|
runCodexUninstall
|
|
435
589
|
};
|
|
436
|
-
//# sourceMappingURL=codex-install-
|
|
590
|
+
//# sourceMappingURL=codex-install-HZV2DOAB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/router/codex-install.ts","../src/lib/codex-trust.ts"],"sourcesContent":["import { execFile } from 'node:child_process';\nimport { existsSync } from 'node:fs';\nimport { stat } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport pkg from '../../package.json';\nimport { persistRouterDefaults } from '../commands/config';\nimport { versionFreeEntry } from '../commands/update';\nimport type { WalletDeps, WalletOutcome } from '../commands/install-wallet';\nimport { autoUpdateLine } from '../lib/auto-update';\nimport { resolveCodex } from '../lib/codex-bin';\nimport { loadRawConfig } from '../lib/config';\nimport { CliError } from '../lib/errors';\nimport { atLeast } from '../lib/version-order';\nimport { runtimeDir, tilde } from '../lib/paths';\nimport { hasRuntime } from '../lib/runtime-layout';\nimport type { RuntimeSetup, setupRuntime } from '../lib/runtime';\nimport type { CommandContext, CommandResult } from '../context';\nimport {\n at,\n CODEX_MARKETPLACE,\n CODEX_PLUGIN,\n codexHookRows,\n codexVersion,\n listCodexHooks,\n readCodexConfig,\n type CodexHookRows,\n WEB_VERIFIED_VERSION,\n} from './codex-host';\nimport { resolveContextSettings } from '../lib/settings';\nimport {\n approveLimits,\n assertPluginInstallation,\n continuationCommand,\n requireRuntime,\n defaultRuntime,\n effectiveLimits,\n namedLimits,\n NOTHING_TO_REFRESH,\n runtimeData,\n runtimeLines,\n walletLines,\n CAPABILITY_LINES,\n DISCLOSURE,\n receiptTail,\n spendStepFor,\n type QuestionStep,\n type RouterInstallDeps,\n} from './install';\nimport { EVENT_LABEL, rowsOf, trustCodexHooks, type ListedHook } from '../lib/codex-trust';\nimport { readInstalledHosts, withNote } from './hosts';\nimport { captureNewInstall, reserveNewInstall } from './new-install';\nimport { CODEX_MCP_HOOKS_VERSION, renderCodexHooks } from './plugin-files';\nimport { shownLimits } from './spend-question';\nimport { fundStep, type FundingDeps } from './install-funding';\nimport { underAgentHarness } from '../lib/session';\nimport { SUGGESTED_FUND_USD } from './fee';\n\n/**\n * `tenjin install|uninstall|doctor` for Codex. Codex's own commands do\n * every plugin write: `codex plugin marketplace add` and `codex plugin add`\n * copy the plugin from Tenjin's runtime, `~/.tenjin/runtime/codex`, which\n * install sets up as the Claude install does, or from this package's\n * `dist/hosts/codex` where there is none. The plugin's own `PermissionRequest`\n * hook allows the request tool, so install writes no Codex config: the\n * wallet, the spend defaults and the plugin. User scope only.\n */\n\nexport interface CodexArgs {\n project?: boolean;\n yes?: boolean;\n noWallet?: boolean;\n /** `--max-auto-spend`: the non-negative per-call limit in USD. */\n maxAutoSpend?: string;\n /** `--session-budget`: the daily limit in USD, or none. */\n sessionBudget?: string;\n}\n\nexport interface CodexRun {\n code: number;\n stdout: string;\n stderr: string;\n}\n\nexport interface CodexSetupDeps\n extends\n WalletDeps,\n FundingDeps,\n Pick<RouterInstallDeps, 'promptLimits' | 'promptAmount' | 'newInstall'> {\n /** One `codex` command, recorded in tests. */\n run?: (args: string[]) => Promise<CodexRun>;\n /** Codex's merged config (`config/read`), or null when it could not be read. */\n config?: () => Promise<unknown>;\n /** Codex's hook list (`hooks/list`). */\n hooks?: () => Promise<unknown>;\n version?: () => Promise<string | null>;\n /** The marketplace folder without a runtime, by default this package's `dist/hosts/codex`. */\n hostsDir?: string | null;\n isInteractive?: boolean;\n homeDir?: string;\n /** Sets up Tenjin's runtime for this build; tests inject it, production runs `setupRuntime`. */\n runtime?: (o: Parameters<typeof setupRuntime>[0]) => Promise<RuntimeSetup>;\n /** Trusts the listed rows through Codex's app server; tests inject it. */\n trust?: typeof trustCodexHooks;\n}\n\nconst RUN_TIMEOUT_MS = 30_000;\n\nfunction runCodex(args: string[]): Promise<CodexRun> {\n const codex = resolveCodex();\n if (codex === null) {\n return Promise.resolve({ code: 127, stdout: '', stderr: 'codex was not found on PATH' });\n }\n return new Promise((resolve) => {\n execFile(\n codex.cmd,\n [...codex.prefix, ...args],\n { timeout: RUN_TIMEOUT_MS, maxBuffer: 4_000_000, windowsHide: true },\n (err, stdout, stderr) => {\n const code = err === null ? 0 : typeof err.code === 'number' ? err.code : 127;\n resolve({ code, stdout: String(stdout), stderr: String(stderr) });\n },\n );\n });\n}\n\n/** This package's `dist/hosts/codex`, by its version-free path under pnpm. */\nexport async function codexHostsDir(\n moduleDir: string = dirname(fileURLToPath(import.meta.url)),\n): Promise<string | null> {\n const catalog = join(moduleDir, 'hosts', 'codex', '.agents', 'plugins', 'marketplace.json');\n const stable = versionFreeEntry(catalog) ?? catalog;\n if ((await stat(stable).catch(() => null))?.isFile() !== true) return null;\n return dirname(dirname(dirname(stable)));\n}\n\nfunction failed(step: string, out: CodexRun): CliError {\n const detail = (out.stderr || out.stdout).trim().split('\\n')[0] ?? '';\n return new CliError('REFUSED', `\\`codex ${step}\\` failed${detail ? `: ${detail}` : ''}.`, {\n fix: 'Check that Codex CLI is installed and on PATH (`codex --version`), then re-run.',\n });\n}\n\n/**\n * The runtime's Codex marketplace, when the runtime has one: a `kept` older\n * runtime may predate it.\n */\nfunction runtimeHosts(rt: RuntimeSetup): string | null {\n if (rt.state !== 'active' && rt.state !== 'current' && rt.state !== 'kept') return null;\n const hosts = join(rt.root, 'codex');\n return existsSync(join(hosts, '.agents', 'plugins', 'marketplace.json')) ? hosts : null;\n}\n\n/**\n * `registered` is the folder Codex's config names for the `tenjin`\n * marketplace. Codex keeps one marketplace by that name, so one added from\n * another folder (the package's, before the runtime) is removed first.\n */\nasync function addPlugin(\n run: (args: string[]) => Promise<CodexRun>,\n hosts: string | null,\n registered: unknown,\n previousEnabled: boolean,\n restoreRuntime?: () => Promise<void>,\n): Promise<void> {\n let removed = false;\n let added = false;\n const moved =\n typeof registered === 'string' && hosts !== null && resolve(registered) !== resolve(hosts);\n try {\n if (hosts === null)\n throw new CliError('UPDATE_FAILED', 'The verified runtime carries no Codex plugin folder.');\n if (moved) {\n const old = await run(['plugin', 'marketplace', 'remove', CODEX_MARKETPLACE]);\n removed = old.code === 0;\n }\n const market = await run(['plugin', 'marketplace', 'add', hosts, '--json']);\n if (market.code !== 0) throw failed('plugin marketplace add', market);\n added = true;\n const plugin = await run(['plugin', 'add', CODEX_PLUGIN, '--json']);\n if (plugin.code !== 0) throw failed('plugin add', plugin);\n } catch (error) {\n try {\n await restoreRuntime?.();\n const restore = async (args: string[]): Promise<void> => {\n const out = await run(args);\n if (out.code !== 0) throw failed(args.join(' '), out);\n };\n if (added && (moved || typeof registered !== 'string')) {\n await restore(['plugin', 'marketplace', 'remove', CODEX_MARKETPLACE]);\n }\n if (moved && (removed || added) && typeof registered === 'string') {\n await restore(['plugin', 'marketplace', 'add', registered, '--json']);\n }\n if (previousEnabled && (removed || added)) {\n await restore(['plugin', 'add', CODEX_PLUGIN, '--json']);\n }\n } catch {\n throw new CliError(\n 'UPDATE_FAILED',\n 'Codex plugin registration failed and the previous registration could not be fully restored.',\n {\n fix: 'Run tenjin install --harness codex again. Your payment keys and funds were kept.',\n cause: error,\n },\n );\n }\n throw error;\n }\n}\n\nconst TRUST_STEP =\n 'Open Codex, run /hooks and trust the five Tenjin hooks, then start a new session.';\n/** What a person reads when this Codex cannot run the plugin's routing hooks. */\nconst CODEX_TOO_OLD = `Routing in Codex needs Codex ${CODEX_MCP_HOOKS_VERSION} or later, so Tenjin left its Codex plugin as it was. Ask your agent to update Codex.`;\n/** What a person reads when an install or update turned the hooks on itself. */\nconst NEW_SESSION_STEP = 'Start a new Codex session: Codex reads hooks when a session starts.';\n\n/**\n * ONE OF THE PLUGIN'S OWN HOOKS, as `hooks/list` lists it: our plugin's hooks\n * file, and at that event, group and position exactly the handler this build\n * renders (an `mcp_tool` leg into `router`/`hook`, the deny, or the allow).\n * Anything else in the list, another plugin's row or a row that moved, is not\n * ours to trust.\n */\nexport function ownCodexRow(row: ListedHook): boolean {\n if (row.pluginId !== CODEX_PLUGIN) return false;\n if (typeof row.sourcePath !== 'string' || !/[\\\\/]hooks[\\\\/]hooks\\.json$/.test(row.sourcePath)) {\n return false;\n }\n const at = /:([a-z_]+):(\\d+):(\\d+)$/.exec(typeof row.key === 'string' ? row.key : '');\n if (at === null) return false;\n const event = Object.keys(EVENT_LABEL).find((e) => EVENT_LABEL[e] === at[1]);\n const group = (renderCodexHooks().hooks[event ?? ''] as Record<string, unknown>[] | undefined)?.[\n Number(at[2])\n ] as { matcher?: string; hooks: Record<string, unknown>[] } | undefined;\n const want = group?.hooks[Number(at[3])];\n if (group === undefined || want === undefined) return false;\n if ((row.matcher ?? null) !== (group.matcher ?? null)) return false;\n return want.type === 'mcp_tool'\n ? row.handlerType === 'mcpTool' && row.server === want.server && row.tool === want.tool\n : row.handlerType === 'command' &&\n (row.command === want.command || row.command === want.commandWindows);\n}\n\n/**\n * TURNS THE PLUGIN'S HOOKS ON, as installing a Claude Code plugin does:\n * through `lib/codex-trust.ts`, which echoes back the `currentHash` Codex\n * reports for each of our rows and verifies them trusted. A row the person\n * turned off in `/hooks` (the allow hook's opt-out) stays off. False when\n * Codex lists none of our rows or any step fails: the person then reviews\n * them in `/hooks`.\n */\nasync function trustPlugin(deps: CodexSetupDeps): Promise<boolean> {\n const list = await (deps.hooks ?? (() => listCodexHooks(process.cwd(), 5_000)))();\n const ours = rowsOf(list).filter(ownCodexRow);\n if (ours.length === 0) return false;\n const keys = ours\n .filter(\n (r) => r.enabled !== false && r.trustStatus !== 'trusted' && r.trustStatus !== 'managed',\n )\n .map((r) => r.key as string);\n const result = await (deps.trust ?? trustCodexHooks)(\n deps.homeDir ?? homedir(),\n keys,\n ownCodexRow,\n );\n return result.ok;\n}\n\n/** What `tenjin update` says about Codex, in person-facing words with no command. */\nexport const CODEX_REFRESH_LINES = {\n done: \"Tenjin updated its Codex hooks. They run in Codex's next new session.\",\n review:\n \"Tenjin updated its Codex hooks but could not turn them on. Open /hooks in Codex and approve Tenjin's hooks so routing works.\",\n old: CODEX_TOO_OLD,\n failed:\n 'Tenjin could not update its Codex hooks. Ask your agent to run the Tenjin doctor for Codex.',\n} as const;\n\n/**\n * A bare `install --refresh` with the Codex refresh beside it: the Codex one\n * runs whatever Claude Code's did. Only Claude Code's \"nothing to refresh\"\n * (a Codex-only machine) gives way to a Codex line; any other Claude Code\n * failure stands, so `tenjin update` still reports it with its fix.\n */\nexport async function alongsideCodexRefresh(\n claude: () => Promise<CommandResult>,\n codex: () => Promise<string | undefined>,\n): Promise<CommandResult> {\n let out: CommandResult;\n try {\n out = await claude();\n } catch (err) {\n const line = await codex();\n const nothing = err instanceof CliError && err.message.startsWith(NOTHING_TO_REFRESH);\n if (line === undefined || !nothing) throw err;\n return { data: { notices: [line] }, humanLines: [line] };\n }\n return withNote(out, await codex());\n}\n\n/**\n * THE CODEX REFRESH `tenjin update` RUNS, in the new build (`install\n * --refresh`). Only where Codex already has the Tenjin plugin with the\n * command legs of an older build: it re-adds the plugin from the same folder,\n * which replaces Codex's copy, then turns the new hooks on (`trustPlugin`).\n * It never installs the plugin anywhere it was not, never asks, and never\n * throws: what happened is one line, or nothing.\n */\nexport async function refreshCodexPlugin(\n ctx: CommandContext,\n deps: CodexSetupDeps = {},\n): Promise<string | undefined> {\n try {\n const version = await (deps.version ?? codexVersion)();\n if (version === null) {\n const recorded = (await readInstalledHosts(ctx.dataDir))?.includes('codex') === true;\n return recorded ? CODEX_REFRESH_LINES.failed : undefined;\n }\n const rows = codexHookRows(\n await (deps.hooks ?? (() => listCodexHooks(process.cwd(), 5_000)))(),\n );\n if (rows.state === 'absent') return undefined;\n if (rows.state === 'unknown') return CODEX_REFRESH_LINES.failed;\n if (rows.routing !== 'free') return undefined;\n if (!atLeast(version, CODEX_MCP_HOOKS_VERSION)) return CODEX_REFRESH_LINES.old;\n const runtimeCodex = join(runtimeDir(ctx.dataDir), 'codex');\n const hosts = existsSync(join(runtimeCodex, '.agents', 'plugins', 'marketplace.json'))\n ? runtimeCodex\n : deps.hostsDir === undefined\n ? await codexHostsDir()\n : deps.hostsDir;\n const config = await (deps.config ?? (() => readCodexConfig(process.cwd(), 3_000)))();\n await addPlugin(\n deps.run ?? runCodex,\n hosts,\n at(config, 'marketplaces', CODEX_MARKETPLACE, 'source'),\n at(config, 'plugins', CODEX_PLUGIN, 'enabled') === true,\n );\n return (await trustPlugin(deps)) ? CODEX_REFRESH_LINES.done : CODEX_REFRESH_LINES.review;\n } catch {\n return CODEX_REFRESH_LINES.failed;\n }\n}\n\nfunction userScopeOnly(args: CodexArgs): void {\n if (args.project === true) {\n throw new CliError('USAGE', 'The Codex plugin installs for your user only; omit --project.');\n }\n}\n\nexport async function runCodexInstall(\n args: CodexArgs,\n ctx: CommandContext,\n deps: CodexSetupDeps = {},\n): Promise<CommandResult> {\n const newInstall = deps.newInstall ?? (await captureNewInstall(ctx.dataDir));\n userScopeOnly(args);\n const run = deps.run ?? runCodex;\n const home = deps.homeDir ?? homedir();\n assertPluginInstallation(ctx.dataDir, home, deps.env ?? process.env);\n const config = await loadRawConfig(ctx.dataDir);\n const named = namedLimits(args);\n const humanOutput = ctx.flags.json === true ? false : (deps.isInteractive ?? ctx.io.isTTY);\n const canPrompt = humanOutput && (deps.isInteractive ?? Boolean(process.stdin.isTTY));\n // The Claude install's spend model: `--yes` takes the defaults, the two\n // amount flags set the person's own, and a terminal asks once, before any\n // write, only when the file names neither limit. With no answer nothing is\n // written, the defaults hold, and the question goes to whoever ran it.\n const answered = args.yes === true || named.keys.length > 0;\n const unasked = config.maxAutoSpend === undefined && config.sessionBudget === undefined;\n const limits =\n named.keys.length > 0\n ? { ...shownLimits(config), ...named.limits }\n : args.yes === true\n ? shownLimits(config)\n : canPrompt && unasked\n ? await approveLimits(deps)\n : {};\n const initialCodexConfig = newInstall.absent\n ? await (deps.config ?? (() => readCodexConfig(process.cwd(), 3_000)))()\n : undefined;\n await reserveNewInstall(\n newInstall,\n !newInstall.absent ||\n (initialCodexConfig !== null &&\n typeof initialCodexConfig === 'object' &&\n !Array.isArray(initialCodexConfig) &&\n at(initialCodexConfig, 'plugins', CODEX_PLUGIN) === undefined &&\n at(initialCodexConfig, 'marketplaces', CODEX_MARKETPLACE) === undefined),\n );\n const rt = await (deps.runtime ?? defaultRuntime)({\n dataDir: ctx.dataDir,\n home,\n env: deps.env ?? process.env,\n version: pkg.version,\n moduleDir: dirname(fileURLToPath(import.meta.url)),\n refresh: false,\n });\n requireRuntime(rt);\n const { resolveWallet } = await import('../commands/install-wallet');\n const wallet: WalletOutcome = await resolveWallet(\n ctx,\n deps,\n args.noWallet === true ? 'flag' : undefined,\n false,\n );\n const spend = await persistRouterDefaults(ctx.dataDir, false, limits, named.keys);\n const fromRuntime = runtimeHosts(rt);\n const hosts =\n rt.state === 'skipped'\n ? deps.hostsDir === undefined\n ? await codexHostsDir()\n : deps.hostsDir\n : fromRuntime;\n // A Codex too old to run `mcp_tool` hooks keeps whatever copy it has: the\n // new hooks would be skipped, or the file refused. An unknown build installs.\n const version = await (deps.version ?? codexVersion)();\n const tooOld = version !== null && !atLeast(version, CODEX_MCP_HOOKS_VERSION);\n let next: string = CODEX_TOO_OLD;\n if (!tooOld) {\n const codexConfig =\n initialCodexConfig ??\n (await (deps.config ?? (() => readCodexConfig(process.cwd(), 3_000)))());\n await addPlugin(\n run,\n hosts,\n at(codexConfig, 'marketplaces', CODEX_MARKETPLACE, 'source'),\n at(codexConfig, 'plugins', CODEX_PLUGIN, 'enabled') === true,\n rt.restore,\n );\n next = (await trustPlugin(deps).catch(() => false)) ? NEW_SESSION_STEP : TRUST_STEP;\n }\n\n // Read back after the write, as the Claude install does.\n const settings = await resolveContextSettings(ctx);\n const { policy } = settings;\n const effective = effectiveLimits(policy);\n // Run again by the agent in Codex, a bare install finds Codex itself.\n const install = [\n `${continuationCommand(rt)} install`,\n ...(args.noWallet ? ['--no-wallet'] : []),\n ].join(' ');\n const spendAsk: QuestionStep | undefined =\n !canPrompt && !answered && unasked ? spendStepFor(install) : undefined;\n const asksAgent = !canPrompt && underAgentHarness(deps.env ?? process.env);\n const funding =\n !tooOld && (asksAgent || canPrompt) && spendAsk === undefined\n ? await (deps.funding ?? fundStep)(\n wallet,\n settings.rpcUrl,\n deps,\n `${continuationCommand(rt)} fund ${SUGGESTED_FUND_USD}`,\n )\n : undefined;\n const nextSteps = [\n ...(spendAsk !== undefined ? [spendAsk] : []),\n ...(funding?.step !== undefined ? [funding.step] : []),\n ];\n if (asksAgent && nextSteps.length > 0)\n next = `Follow the instructions in nextSteps, then ${next}`;\n newInstall.completed.push(!tooOld);\n newInstall.continueWith ??= install;\n return {\n data: {\n plugin: CODEX_PLUGIN,\n wallet,\n spend: { ...spend, effective },\n runtime: runtimeData(rt),\n nextSteps,\n disclosure: DISCLOSURE,\n ...(funding?.warning !== undefined ? { fundingWarning: funding.warning } : {}),\n next,\n },\n humanLines: [\n tooOld\n ? `Tenjin keeps its earlier Codex setup until Codex is updated (${version}).`\n : 'Tenjin is installed for Codex.',\n ...(tooOld ? [] : CAPABILITY_LINES.map((line) => ` ${line}`)),\n ...runtimeLines(ctx, rt, home, true),\n ...walletLines(ctx, wallet, 'Codex'),\n ...(funding?.warning !== undefined ? [funding.warning] : []),\n ...(spendAsk !== undefined\n ? [\n ` Ask the person in this session: ${spendAsk.question}`,\n ...spendAsk.options.map(\n (o) => ` ${o.label}${o.recommended ? ' (recommended)' : ''}: ${o.command}`,\n ),\n ]\n : []),\n ],\n humanTail: receiptTail(ctx, policy, next),\n };\n}\n\nexport async function runCodexUninstall(\n args: CodexArgs,\n _ctx: CommandContext,\n deps: CodexSetupDeps = {},\n): Promise<CommandResult> {\n userScopeOnly(args);\n const run = deps.run ?? runCodex;\n const removed = await run(['plugin', 'remove', CODEX_PLUGIN, '--json']);\n if (removed.code !== 0) throw failed('plugin remove', removed);\n // Absent already is the state uninstall wants.\n await run(['plugin', 'marketplace', 'remove', CODEX_MARKETPLACE]);\n return {\n data: { removed: CODEX_PLUGIN, marketplace: CODEX_MARKETPLACE },\n humanLines: [\n `Codex plugin ${CODEX_PLUGIN} and its marketplace removed. The wallet and Claude setup are kept.`,\n ],\n };\n}\n\nconst PLUGIN_LINE: Record<CodexHookRows['state'], string> = {\n trusted: 'installed, its hooks on and trusted',\n review: `installed, its hooks need review. ${TRUST_STEP}`,\n absent: 'not installed or turned off. Run `tenjin install --harness codex`',\n unknown: \"could not read Codex's hook list\",\n};\n\n/**\n * What the plugin's hooks and server run, from the folder Codex's config names\n * for the marketplace: information only. Nothing when Codex names none, or\n * names another folder on a machine with no runtime to move to.\n */\nfunction runsFrom(ctx: CommandContext, deps: CodexSetupDeps, source: unknown): string | null {\n if (typeof source !== 'string') return null;\n const home = deps.homeDir ?? homedir();\n const hosts = join(runtimeDir(ctx.dataDir), 'codex');\n if (resolve(source) === resolve(hosts)) return `Tenjin's runtime (${tilde(hosts, home)})`;\n if (!hasRuntime(ctx.dataDir, home)) return null;\n return \"`tenjin` from your PATH; run `tenjin install --harness codex` to move it to Tenjin's runtime\";\n}\n\nconst ROUTING_LINE: Record<CodexHookRows['routing'], string> = {\n paid: 'its routing hooks call the router MCP server, which pays the routing fee under your wallet spend limits',\n free: 'its routing hooks are commands from an older build, which cannot pay the routing fee, so they offer nothing. Run `tenjin update` or `tenjin install --harness codex` to replace them',\n unknown: \"could not read how Codex runs the plugin's routing hooks\",\n};\n\n/**\n * Reads Codex's view of the plugin and writes nothing. Routing compatibility\n * is read the same way, with nothing paid or sent: the legs must be `mcp_tool`\n * hooks into the plugin's server (`codexHookRows`), and the Codex build must\n * run them ({@link CODEX_MCP_HOOKS_VERSION}).\n */\nexport async function runCodexDoctor(\n args: CodexArgs,\n ctx: CommandContext,\n deps: CodexSetupDeps = {},\n): Promise<CommandResult> {\n userScopeOnly(args);\n const [list, config, version] = await Promise.all([\n (deps.hooks ?? (() => listCodexHooks(process.cwd(), 5_000)))(),\n (deps.config ?? (() => readCodexConfig(process.cwd(), 3_000)))(),\n (deps.version ?? codexVersion)(),\n ]);\n const hooks = codexHookRows(list);\n // With its allow hook off, `approval_policy = \"never\"` refuses the tool.\n const refused = hooks.allowOff && at(config, 'approval_policy') === 'never';\n // An unknown build is not failed on: only a known older one cannot run the legs.\n const tooOld = version !== null && !atLeast(version, CODEX_MCP_HOOKS_VERSION);\n const routing = hooks.state === 'absent' ? null : hooks.routing;\n // Command legs from an older build warn without failing: `tenjin update`\n // replaces them, and Codex still runs the rest of the plugin.\n const ok = hooks.state === 'trusted' && !refused && routing !== 'unknown' && !tooOld;\n const runs = runsFrom(ctx, deps, at(config, 'marketplaces', CODEX_MARKETPLACE, 'source'));\n const auto = hasRuntime(ctx.dataDir, deps.homeDir ?? homedir())\n ? autoUpdateLine(runtimeDir(ctx.dataDir))\n : null;\n const lines = [\n `Setup: ${ok && routing !== 'free' ? 'ready for Codex' : 'needs attention'}.`,\n 'Current Codex session: not verified by this check.',\n 'Paid routing: wallet and funds not checked.',\n '',\n `Codex plugin: ${PLUGIN_LINE[hooks.state]}`,\n `Request tool: ${refused ? 'refused: its allow hook is off in /hooks and approval_policy is never' : hooks.allowOff ? 'asks before each call (its allow hook is off in /hooks)' : 'allowed by its plugin hook, under your wallet spend limits'}`,\n ...(routing !== null\n ? [`${routing === 'free' ? '! ' : ''}Routing: ${ROUTING_LINE[routing]}`]\n : []),\n tooOld\n ? `Codex build: ${version}, which cannot run the plugin's routing hooks. Update Codex to ${CODEX_MCP_HOOKS_VERSION} or later`\n : `Codex build: ${version ?? 'unknown'} (web hooks last captured on ${WEB_VERIFIED_VERSION}; information only)`,\n ...(runs !== null ? [`Codex plugin runs: ${runs}`] : []),\n ...(auto !== null ? [auto] : []),\n ];\n const data = {\n plugin: CODEX_PLUGIN,\n hooks: hooks.state,\n allowOff: hooks.allowOff,\n routing,\n version,\n ok,\n };\n if (!ok) {\n throw new CliError('REFUSED', 'The Codex plugin is not ready.', {\n details: data,\n fix: lines.join('\\n'),\n });\n }\n return { data, humanLines: lines };\n}\n","import { withAppServer } from './codex-app-server';\nimport { isRecord } from './guards';\n\n/**\n * The one write that makes the hook handlers this CLI registered run: `install`\n * needs to move them from \"the file exists\" to \"the harness will run it\".\n *\n * Codex gates a handler on `[hooks.state]` in `$CODEX_HOME/config.toml`: a row keyed\n * `\"<source path>:<event_snake>:<group>:<handler>\"` carrying `enabled` and a\n * `trusted_hash`, and the handler runs only when it is enabled and that hash\n * still matches the one Codex recomputes from the file.\n *\n * TRUSTING IS PART OF INSTALLING, and it goes through Codex's own supported\n * path: read the rows and their `currentHash` from `hooks/list`, upsert those\n * keys through `config/batchWrite`, then list again and require them back\n * trusted. That is the same call the `/hooks` browser makes, and it matches\n * Claude Code's contract that installing a hook activates it, rather than\n * reporting success over a loop that cannot run.\n *\n * WHAT STAYS FORBIDDEN, and the distinction is the whole of the boundary:\n *\n * - COMPUTING a `trusted_hash`. The value is a normalized, TOML-projected,\n * canonical-JSON form private to Codex's build. We only ever echo back the\n * `currentHash` Codex itself just reported, so trust cannot outlive the\n * bytes Codex hashed. A hash of our own would be an assertion about a file\n * Codex has not read.\n * - Trusting a row we did not generate. Every key is matched against the\n * complete handler identity this install wrote: our source file, our\n * command, our event and index. Another tool's entry in the same file is\n * never touched.\n * - Reporting success on a partial result. Listing, writing and verifying all\n * have to land, or the install fails and says which step did not.\n */\n\n/** Codex's snake-case event labels, in the order its `hooks.state` keys use. */\nexport const EVENT_LABEL: Readonly<Record<string, string>> = {\n PreToolUse: 'pre_tool_use',\n PermissionRequest: 'permission_request',\n PostToolUse: 'post_tool_use',\n PreCompact: 'pre_compact',\n PostCompact: 'post_compact',\n SessionStart: 'session_start',\n SessionEnd: 'session_end',\n UserPromptSubmit: 'user_prompt_submit',\n SubagentStart: 'subagent_start',\n SubagentStop: 'subagent_stop',\n Stop: 'stop',\n Interrupt: 'interrupt',\n};\n\n/** One handler as `hooks/list` reports it; every field optional, since this is\n * another program's wire format and a missing one means \"cannot tell\". */\nexport interface ListedHook {\n [field: string]: unknown;\n key?: unknown;\n enabled?: unknown;\n trustStatus?: unknown;\n sourcePath?: unknown;\n currentHash?: unknown;\n command?: unknown;\n}\n\nexport interface TrustProbeOptions {\n env?: NodeJS.ProcessEnv;\n /** How long to wait for the app server. Past it the attempt fails at `list`. */\n timeoutMs?: number;\n /** Seam for tests: answer requests directly instead of spawning an app\n * server. `undefined` from it means the same as no reply. */\n connect?: (method: string, params: unknown) => Promise<unknown>;\n}\n\n/**\n * An install has a person waiting, so the app server gets a few seconds and no\n * more. A slow answer reads as \"could not ask\", never as a verdict.\n */\nconst PROBE_MS = 8_000;\n\n/** The handler rows out of a `hooks/list` result, flattened across its cwds. */\nexport function rowsOf(result: unknown): ListedHook[] {\n if (!isRecord(result) || !Array.isArray(result.data)) return [];\n const out: ListedHook[] = [];\n for (const group of result.data) {\n if (!isRecord(group) || !Array.isArray(group.hooks)) continue;\n for (const hook of group.hooks) if (isRecord(hook)) out.push(hook as ListedHook);\n }\n return out;\n}\n\n/** What one trust attempt did, in the terms `install` reports it. */\nexport interface TrustResult {\n ok: boolean;\n /** Keys Codex confirmed enabled and trusted on the verifying read. */\n trusted: string[];\n /** Which step did not complete, on a failure. */\n failedAt?: 'list' | 'write' | 'verify';\n /** One line naming what went wrong, for the operator. */\n reason?: string;\n}\n\n/**\n * Trust exactly the handlers this install wrote, and prove it.\n *\n * THREE ROUND TRIPS, ALL REQUIRED. List to learn the hashes Codex computed for\n * OUR rows; upsert only those keys; list again and require the same keys back\n * with the same hashes, enabled and trusted. The verifying read is the point:\n * a write that returned without error still has not been shown to have taken\n * effect, and an install that skipped this could report success over a loop\n * that will not run, which is the failure this whole change exists to end.\n *\n * `ownedBy` is the second half of \"only our rows\". The keys already come from\n * the file we wrote, but a key is a path and two indices; this also requires\n * the listed handler's command to be the one we generated, so a row that moved\n * under our key is left alone rather than trusted on its position.\n */\nexport async function trustCodexHooks(\n home: string,\n keys: readonly string[],\n ownedBy: (row: ListedHook) => boolean,\n opts: TrustProbeOptions = {},\n): Promise<TrustResult> {\n const env = opts.env ?? process.env;\n const timeoutMs = opts.timeoutMs ?? PROBE_MS;\n if (keys.length === 0) return { ok: true, trusted: [] };\n\n const run = async (\n request: (method: string, params: unknown) => Promise<unknown>,\n ): Promise<TrustResult> => {\n const before = await request('hooks/list', { cwds: [] });\n if (before === undefined) {\n return {\n ok: false,\n trusted: [],\n failedAt: 'list' as const,\n reason: 'hooks/list did not answer',\n };\n }\n const wanted = new Set(keys);\n const mine = rowsOf(before).filter(\n (r) => typeof r.key === 'string' && wanted.has(r.key) && ownedBy(r),\n );\n if (mine.length !== keys.length) {\n return {\n ok: false,\n trusted: [],\n failedAt: 'list' as const,\n reason: `Codex listed ${mine.length} of the ${keys.length} entries this install wrote`,\n };\n }\n // Only the rows we generated, each carrying the hash Codex just reported\n // for it. `upsert` leaves every other row in `hooks.state` untouched.\n const value: Record<string, { trusted_hash: string; enabled: true }> = {};\n for (const row of mine) {\n const hash = typeof row.currentHash === 'string' ? row.currentHash : null;\n if (hash === null) {\n return {\n ok: false,\n trusted: [],\n failedAt: 'list' as const,\n reason: 'Codex reported an entry with no currentHash',\n };\n }\n value[row.key as string] = { trusted_hash: hash, enabled: true };\n }\n const wrote = await request('config/batchWrite', {\n edits: [{ keyPath: 'hooks.state', value, mergeStrategy: 'upsert' }],\n reloadUserConfig: true,\n });\n if (wrote === undefined) {\n return {\n ok: false,\n trusted: [],\n failedAt: 'write' as const,\n reason: 'config/batchWrite was refused',\n };\n }\n\n // VERIFY. Same keys, same hashes, enabled and trusted, read back from the\n // binary rather than inferred from a write that did not error.\n const after = await request('hooks/list', { cwds: [] });\n if (after === undefined) {\n return {\n ok: false,\n trusted: [],\n failedAt: 'verify' as const,\n reason: 'the verifying hooks/list did not answer',\n };\n }\n const confirmed = rowsOf(after).filter(\n (r) =>\n typeof r.key === 'string' &&\n wanted.has(r.key) &&\n ownedBy(r) &&\n r.enabled !== false &&\n (r.trustStatus === 'trusted' || r.trustStatus === 'managed') &&\n r.currentHash === value[r.key]?.trusted_hash,\n );\n if (confirmed.length !== keys.length) {\n return {\n ok: false,\n trusted: confirmed.map((r) => r.key as string),\n failedAt: 'verify' as const,\n reason: `Codex confirmed ${confirmed.length} of ${keys.length} entries as trusted after the write`,\n };\n }\n return { ok: true, trusted: confirmed.map((r) => r.key as string) };\n };\n\n const outcome =\n opts.connect !== undefined\n ? await run(opts.connect)\n : await withAppServer(home, env, timeoutMs, run);\n\n return (\n outcome ?? {\n ok: false,\n trusted: [],\n failedAt: 'list',\n reason: 'the codex app server could not be reached',\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,SAAS,MAAM,eAAe;AACvC,SAAS,qBAAqB;;;AC8BvB,IAAM,cAAgD;AAAA,EAC3D,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,MAAM;AAAA,EACN,WAAW;AACb;AA2BA,IAAM,WAAW;AAGV,SAAS,OAAO,QAA+B;AACpD,MAAI,CAAC,SAAS,MAAM,KAAK,CAAC,MAAM,QAAQ,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