tenjin-cli 0.1.0-alpha.34 → 0.1.0-alpha.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +30 -0
- package/README.md +20 -18
- package/dist/{_esm-MMYV66AX.js → _esm-2KST7HQ7.js} +4 -4
- package/dist/{alive-VOIL5W3I.js → alive-5TV22PNF.js} +13 -13
- package/dist/{auth-UHD3QFX4.js → auth-XI7BJFLW.js} +4 -4
- package/dist/balance-DFHC6XEU.js +71 -0
- package/dist/{ccip-CS7K5QRQ.js → ccip-HOW3DZYF.js} +3 -3
- package/dist/{chunk-RJ5HRPAZ.js → chunk-24XKUN2S.js} +68 -10
- package/dist/chunk-24XKUN2S.js.map +1 -0
- package/dist/chunk-2L7TDGLV.js +56 -0
- package/dist/chunk-2L7TDGLV.js.map +1 -0
- package/dist/{chunk-PZHBPGDE.js → chunk-34SAECKZ.js} +34 -10
- package/dist/chunk-34SAECKZ.js.map +1 -0
- package/dist/{chunk-EQZ2CCWC.js → chunk-3Y2EHT4F.js} +5 -2
- package/dist/chunk-3Y2EHT4F.js.map +1 -0
- package/dist/{chunk-FSYH7J75.js → chunk-3Y6BHIN6.js} +3 -3
- package/dist/{chunk-FZZWTDWP.js → chunk-3YPL6T3P.js} +6 -6
- package/dist/{chunk-JEZMWJEF.js → chunk-44MVIRZH.js} +4 -4
- package/dist/{chunk-27FIHFXF.js → chunk-45MMSBHA.js} +5 -5
- package/dist/{chunk-QXP3Z3JN.js → chunk-4MBCJFY4.js} +35 -3
- package/dist/chunk-4MBCJFY4.js.map +1 -0
- package/dist/chunk-4TPL54KW.js +227 -0
- package/dist/chunk-4TPL54KW.js.map +1 -0
- package/dist/{chunk-7JB6SYJX.js → chunk-54ELBTKE.js} +2 -2
- package/dist/{chunk-6J64MQFD.js → chunk-5F4OB5B3.js} +21 -15
- package/dist/chunk-5F4OB5B3.js.map +1 -0
- package/dist/{chunk-PYVQ74D5.js → chunk-5HN4KVQU.js} +189 -117
- package/dist/chunk-5HN4KVQU.js.map +1 -0
- package/dist/{chunk-VFKPIIV2.js → chunk-5J4E5GYI.js} +35 -32
- package/dist/chunk-5J4E5GYI.js.map +1 -0
- package/dist/chunk-5USBZ2MU.js +58 -0
- package/dist/chunk-5USBZ2MU.js.map +1 -0
- package/dist/chunk-64WOMNYR.js +183 -0
- package/dist/chunk-64WOMNYR.js.map +1 -0
- package/dist/{chunk-APWELUI7.js → chunk-65RS4LQS.js} +57 -43
- package/dist/chunk-65RS4LQS.js.map +1 -0
- package/dist/{chunk-HWZO6HYZ.js → chunk-6QMDUDF2.js} +3 -3
- package/dist/{chunk-FNBGRKS6.js → chunk-7V25UAQO.js} +2 -2
- package/dist/chunk-BGA4DO5M.js +719 -0
- package/dist/chunk-BGA4DO5M.js.map +1 -0
- package/dist/chunk-BVP7YK2J.js +706 -0
- package/dist/chunk-BVP7YK2J.js.map +1 -0
- package/dist/chunk-C265QIMJ.js +83 -0
- package/dist/chunk-C265QIMJ.js.map +1 -0
- package/dist/{chunk-MXN2ZEUB.js → chunk-D6M3ZK66.js} +2 -2
- package/dist/chunk-D6M3ZK66.js.map +1 -0
- package/dist/chunk-DJ36BM62.js +78 -0
- package/dist/chunk-DJ36BM62.js.map +1 -0
- package/dist/{chunk-JOKPBYXP.js → chunk-DTEWAVNE.js} +2 -2
- package/dist/chunk-F2KJAJ7T.js +13 -0
- package/dist/chunk-F2KJAJ7T.js.map +1 -0
- package/dist/{chunk-KAILF7QA.js → chunk-F43CV6UC.js} +2 -2
- package/dist/{chunk-ACO7ZCR2.js → chunk-FKVJKLPI.js} +2 -2
- package/dist/{chunk-43HLS2HM.js → chunk-FYFHH7V5.js} +54 -3
- package/dist/{chunk-43HLS2HM.js.map → chunk-FYFHH7V5.js.map} +1 -1
- package/dist/{chunk-2F5JUAHZ.js → chunk-GAJC4BQZ.js} +3 -3
- package/dist/{chunk-L7N73ZAW.js → chunk-HAZAN4UM.js} +2 -2
- package/dist/{chunk-6QJZA6EX.js → chunk-HI5XQOX2.js} +2 -2
- package/dist/{chunk-BOENA6XR.js → chunk-HKGUKAQW.js} +6 -6
- package/dist/{chunk-LJSCGIYH.js → chunk-HPRVFJPM.js} +2 -2
- package/dist/{chunk-OO6FIBL7.js → chunk-HZKANST2.js} +3 -6
- package/dist/chunk-HZKANST2.js.map +1 -0
- package/dist/{chunk-UVDJ5SSQ.js → chunk-I557SAOM.js} +8 -2
- package/dist/chunk-I557SAOM.js.map +1 -0
- package/dist/{chunk-SDUOJRSV.js → chunk-IGLWLH73.js} +3 -3
- package/dist/{chunk-3AKH7ODX.js → chunk-INSIW65E.js} +5 -5
- package/dist/{chunk-PNHNXUSL.js → chunk-IULCDMVG.js} +12 -1
- package/dist/chunk-IULCDMVG.js.map +1 -0
- package/dist/{chunk-JF4T4HCQ.js → chunk-IVNSUAVC.js} +10 -5
- package/dist/chunk-IVNSUAVC.js.map +1 -0
- package/dist/chunk-JDQZCREI.js +87 -0
- package/dist/chunk-JDQZCREI.js.map +1 -0
- package/dist/{chunk-2P3NJTHE.js → chunk-JHFFUVON.js} +23 -23
- package/dist/{chunk-7JVARP5R.js → chunk-JTILUN4W.js} +55 -29
- package/dist/{chunk-7JVARP5R.js.map → chunk-JTILUN4W.js.map} +1 -1
- package/dist/{chunk-2TO5F6CT.js → chunk-K5KNGC4I.js} +8 -8
- package/dist/{chunk-HUWTFKEM.js → chunk-KAQ4Q3TO.js} +3 -3
- package/dist/{chunk-E6VP6MQM.js → chunk-KGUE5AVX.js} +4 -4
- package/dist/chunk-KGUE5AVX.js.map +1 -0
- package/dist/{chunk-GS5RZF7U.js → chunk-KLDMLWXT.js} +2 -2
- package/dist/{chunk-HN2EN6P4.js → chunk-KNKDMTHU.js} +5 -5
- package/dist/chunk-LDA6TAYQ.js +95 -0
- package/dist/chunk-LDA6TAYQ.js.map +1 -0
- package/dist/chunk-LWSSIZOY.js +347 -0
- package/dist/chunk-LWSSIZOY.js.map +1 -0
- package/dist/{chunk-5VWQSCDO.js → chunk-MAHNZA6C.js} +89 -9
- package/dist/chunk-MAHNZA6C.js.map +1 -0
- package/dist/{chunk-46HAB26L.js → chunk-MEWZCIA6.js} +56 -9
- package/dist/chunk-MEWZCIA6.js.map +1 -0
- package/dist/{chunk-R2KMLONN.js → chunk-MJDO4EXD.js} +4 -4
- package/dist/{chunk-IHVUE3XF.js → chunk-NJA6NT3A.js} +3 -3
- package/dist/{chunk-TSIID2LV.js → chunk-ODRPASFP.js} +375 -1166
- package/dist/chunk-ODRPASFP.js.map +1 -0
- package/dist/{chunk-S3JKF3IK.js → chunk-OJJFANO6.js} +3 -3
- package/dist/{chunk-56SOPRM2.js → chunk-OQWPRFAC.js} +344 -4
- package/dist/chunk-OQWPRFAC.js.map +1 -0
- package/dist/{chunk-QEZZDIQT.js → chunk-P6YQWIT2.js} +4053 -4039
- package/dist/chunk-P6YQWIT2.js.map +1 -0
- package/dist/{chunk-GGGEGMWC.js → chunk-Q6RSJCXB.js} +9 -9
- package/dist/{chunk-OTIUEUIS.js → chunk-QKEUKBRK.js} +7 -7
- package/dist/{chunk-X52BVGCJ.js → chunk-QQDPRTLP.js} +5 -5
- package/dist/chunk-QQYCYAKI.js +79 -0
- package/dist/chunk-QQYCYAKI.js.map +1 -0
- package/dist/chunk-R4KDH477.js +1064 -0
- package/dist/chunk-R4KDH477.js.map +1 -0
- package/dist/{chunk-6AQSUBNR.js → chunk-RGCPELQN.js} +2 -2
- package/dist/{chunk-AXODGQ23.js → chunk-RGVCOG2S.js} +9 -2
- package/dist/{chunk-AXODGQ23.js.map → chunk-RGVCOG2S.js.map} +1 -1
- package/dist/chunk-SOLNJ3AZ.js +209 -0
- package/dist/chunk-SOLNJ3AZ.js.map +1 -0
- package/dist/{chunk-LQ33RLHL.js → chunk-TFT2X7SH.js} +3 -3
- package/dist/chunk-TVWCLUBI.js +293 -0
- package/dist/chunk-TVWCLUBI.js.map +1 -0
- package/dist/{chunk-VH7JMLTG.js → chunk-UIB33QQP.js} +25 -16
- package/dist/chunk-UIB33QQP.js.map +1 -0
- package/dist/chunk-V6GIVALQ.js +1889 -0
- package/dist/chunk-V6GIVALQ.js.map +1 -0
- package/dist/{chunk-IVHGQNIN.js → chunk-VHXCPXUS.js} +8 -8
- package/dist/{chunk-7DW7GAM6.js → chunk-VU6GMWF6.js} +2 -2
- package/dist/chunk-VWZYE3NC.js +8415 -0
- package/dist/chunk-VWZYE3NC.js.map +1 -0
- package/dist/{chunk-3X4GOMXT.js → chunk-W2GXIARJ.js} +12 -7
- package/dist/chunk-W2GXIARJ.js.map +1 -0
- package/dist/chunk-W4G3K3V7.js +288 -0
- package/dist/chunk-W4G3K3V7.js.map +1 -0
- package/dist/{chunk-FHXTEVO7.js → chunk-W74LJ5OT.js} +21 -28
- package/dist/chunk-W74LJ5OT.js.map +1 -0
- package/dist/{chunk-FOEPH67T.js → chunk-W7ELYLYK.js} +1 -74
- package/dist/chunk-W7ELYLYK.js.map +1 -0
- package/dist/{chunk-YU3DLVSQ.js → chunk-XSCGUO2U.js} +5 -5
- package/dist/{chunk-EPCIJLLU.js → chunk-XWROSMI5.js} +9 -9
- package/dist/{chunk-HMT6L65V.js → chunk-YJGEVBKZ.js} +4 -4
- package/dist/{chunk-7U3P4PB7.js → chunk-ZEYA2WWX.js} +4 -4
- package/dist/chunk-ZEYA2WWX.js.map +1 -0
- package/dist/chunk-ZRC7Z5X3.js +82 -0
- package/dist/chunk-ZRC7Z5X3.js.map +1 -0
- package/dist/{chunk-I47ARU5G.js → chunk-ZS7JIUJ3.js} +2 -2
- package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
- package/dist/claude-install-BAUSJMW3.js +64 -0
- package/dist/{cli-BFDKEX53.js → cli-QY4KKA3D.js} +116 -49
- package/dist/cli-QY4KKA3D.js.map +1 -0
- package/dist/{client-XMWEKXX7.js → client-3YQKORVK.js} +4 -4
- package/dist/{codex-host-B6NAUWL6.js → codex-host-ZON3S6HU.js} +5 -5
- package/dist/{codex-install-GTGO5FYN.js → codex-install-HZV2DOAB.js} +62 -47
- package/dist/codex-install-HZV2DOAB.js.map +1 -0
- package/dist/{config-THJANIU5.js → config-QZOBMTEL.js} +18 -18
- package/dist/{config-names-JU54HYWY.js → config-names-Z5NZD5R2.js} +18 -18
- package/dist/{config-rules-VNU23RL4.js → config-rules-YOYHS6YL.js} +19 -19
- package/dist/config-subagents-WQV2ZAD5.js +362 -0
- package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
- package/dist/{connect-HPWS7U63.js → connect-YDWTYU4B.js} +28 -27
- package/dist/{connect-HPWS7U63.js.map → connect-YDWTYU4B.js.map} +1 -1
- package/dist/core-0a66n3e7-TTP554XV.js +127 -0
- package/dist/core-0a66n3e7-TTP554XV.js.map +1 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js +10790 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js.map +1 -0
- package/dist/core-9je8ee1j-74DGHWPV.js +30 -0
- package/dist/core-9je8ee1j-74DGHWPV.js.map +1 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js +666 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js.map +1 -0
- package/dist/core-zg882d22-LKV5DZYW.js +37 -0
- package/dist/core-zg882d22-LKV5DZYW.js.map +1 -0
- package/dist/{decision-JIIHDTOF.js → decision-QSKHOGCO.js} +6 -6
- package/dist/{doctor-4MMHBRDU.js → doctor-ZWJXRD75.js} +67 -66
- package/dist/doctor-ZWJXRD75.js.map +1 -0
- package/dist/{explicit-AGENAX6E.js → explicit-ME2NRADQ.js} +45 -42
- package/dist/{explicit-AGENAX6E.js.map → explicit-ME2NRADQ.js.map} +1 -1
- package/dist/flush-stdio-NYIJ3QXT.js +18 -0
- package/dist/{fund-MLXUH24Q.js → fund-VF7TLDJH.js} +110 -34
- package/dist/fund-VF7TLDJH.js.map +1 -0
- package/dist/{hook-command-UB7FOEUL.js → hook-command-VZ27MGWO.js} +21 -20
- package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
- package/dist/hosts/claude/tenjin/hooks/hook-data.ts +152 -0
- package/dist/hosts/claude/tenjin/hooks/hooks.json +7 -0
- package/dist/hosts/claude/tenjin/hooks/model-viewer.tsx +2987 -0
- package/dist/hosts/claude/tenjin/hooks/register.tsx +265 -30
- package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
- package/dist/hosts/claude/tenjin/types/index.d.ts +133 -0
- package/dist/{hosts-WNQKYKP2.js → hosts-3EMTVM4H.js} +5 -3
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/{install-Q5SHHEDH.js → install-ZA7L2UF3.js} +34 -30
- package/dist/{install-funding-EGSW2KEP.js → install-funding-JDGYTF72.js} +9 -13
- package/dist/{install-identity-OID43B4D.js → install-identity-FFAYEFLX.js} +8 -8
- package/dist/{install-wallet-TZFWY5GK.js → install-wallet-2SFOVE3Q.js} +48 -33
- package/dist/{install-wallet-TZFWY5GK.js.map → install-wallet-2SFOVE3Q.js.map} +1 -1
- package/dist/mcp-36S6MK3C.js +67642 -0
- package/dist/mcp-36S6MK3C.js.map +1 -0
- package/dist/new-install-5L4GY3LN.js +51 -0
- package/dist/{package-NRHU7HBR.js → package-BONDXSV3.js} +2 -2
- package/dist/{passphrase-3JEVW5XG.js → passphrase-T4ULBN4M.js} +4 -4
- package/dist/{pay-I47AIUQR.js → pay-CMV5KL74.js} +37 -30
- package/dist/{payments-A5FNI5GN.js → payments-Z6UBZL4Z.js} +10 -10
- package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
- package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
- package/dist/{routing-quote-QQW2I5MH.js → routing-quote-AHLAREXR.js} +16 -18
- package/dist/{run-4SHEOBIU.js → run-JH7ELYAM.js} +41 -38
- package/dist/{runtime-BABJMHY7.js → runtime-2GX4ALJP.js} +12 -12
- package/dist/{runtime-activate-N6VLQI2C.js → runtime-activate-IDQ2NCSP.js} +9 -9
- package/dist/{runtime-launchers-GMAUICRW.js → runtime-launchers-YAPKCBHV.js} +7 -7
- package/dist/{runtime-place-DOEWFTF3.js → runtime-place-4POL4KK4.js} +3 -3
- package/dist/{send-ECXS6JEO.js → send-ELXFKEKY.js} +17 -17
- package/dist/{status-AHE5HSR7.js → status-FXUFWJDM.js} +89 -36
- package/dist/status-FXUFWJDM.js.map +1 -0
- package/dist/{status-line-63XFJAXR.js → status-line-IH5JBWBC.js} +11 -11
- package/dist/{streamableHttp-Z3YF6LTQ.js → streamableHttp-CP2ZQBIK.js} +4 -4
- package/dist/{uninstall-YGQPRCVY.js → uninstall-LJZUKM4D.js} +42 -38
- package/dist/{uninstall-YGQPRCVY.js.map → uninstall-LJZUKM4D.js.map} +1 -1
- package/dist/{update-GTLMLFA3.js → update-EUIX72IX.js} +34 -30
- package/dist/{usage-FCWP2CHO.js → usage-EKDC7LUC.js} +13 -13
- package/dist/{usdc-25RNBYYR.js → usdc-YIHK2OMC.js} +5 -5
- package/dist/{viemAdapter-By13KInL-3CG63XDX.js → viemAdapter-By13KInL-PRLSIESK.js} +2 -2
- package/dist/viemAdapter-By13KInL-PRLSIESK.js.map +1 -0
- package/dist/wallet-HSW757W6.js +80 -0
- package/dist/wallet-HSW757W6.js.map +1 -0
- package/docs/agent-permissions.md +19 -11
- package/docs/router-reference.md +21 -12
- package/docs/safety-model.md +4 -2
- package/docs/subagents-internals.md +97 -0
- package/docs/subagents.md +348 -0
- package/package.json +4 -1
- package/dist/balance-RQW5T5FB.js +0 -55
- package/dist/chunk-3X4GOMXT.js.map +0 -1
- package/dist/chunk-46HAB26L.js.map +0 -1
- package/dist/chunk-56SOPRM2.js.map +0 -1
- package/dist/chunk-5VWQSCDO.js.map +0 -1
- package/dist/chunk-6J64MQFD.js.map +0 -1
- package/dist/chunk-7U3P4PB7.js.map +0 -1
- package/dist/chunk-APWELUI7.js.map +0 -1
- package/dist/chunk-E6VP6MQM.js.map +0 -1
- package/dist/chunk-EQZ2CCWC.js.map +0 -1
- package/dist/chunk-FHXTEVO7.js.map +0 -1
- package/dist/chunk-FOEPH67T.js.map +0 -1
- package/dist/chunk-IVXPIIZJ.js +0 -91
- package/dist/chunk-IVXPIIZJ.js.map +0 -1
- package/dist/chunk-JF4T4HCQ.js.map +0 -1
- package/dist/chunk-LPQNZKSG.js +0 -269
- package/dist/chunk-LPQNZKSG.js.map +0 -1
- package/dist/chunk-MXN2ZEUB.js.map +0 -1
- package/dist/chunk-OO6FIBL7.js.map +0 -1
- package/dist/chunk-PNHNXUSL.js.map +0 -1
- package/dist/chunk-PYVQ74D5.js.map +0 -1
- package/dist/chunk-PZHBPGDE.js.map +0 -1
- package/dist/chunk-QEZZDIQT.js.map +0 -1
- package/dist/chunk-QXP3Z3JN.js.map +0 -1
- package/dist/chunk-RJ5HRPAZ.js.map +0 -1
- package/dist/chunk-TSIID2LV.js.map +0 -1
- package/dist/chunk-UVDJ5SSQ.js.map +0 -1
- package/dist/chunk-VFKPIIV2.js.map +0 -1
- package/dist/chunk-VH7JMLTG.js.map +0 -1
- package/dist/claude-install-7CVYQ73E.js +0 -60
- package/dist/cli-BFDKEX53.js.map +0 -1
- package/dist/codex-install-GTGO5FYN.js.map +0 -1
- package/dist/doctor-4MMHBRDU.js.map +0 -1
- package/dist/fund-MLXUH24Q.js.map +0 -1
- package/dist/mcp-CC3H7LFO.js +0 -3655
- package/dist/mcp-CC3H7LFO.js.map +0 -1
- package/dist/status-AHE5HSR7.js.map +0 -1
- package/dist/wallet-CJGEHP2Q.js +0 -64
- /package/dist/{_esm-MMYV66AX.js.map → _esm-2KST7HQ7.js.map} +0 -0
- /package/dist/{alive-VOIL5W3I.js.map → alive-5TV22PNF.js.map} +0 -0
- /package/dist/{auth-UHD3QFX4.js.map → auth-XI7BJFLW.js.map} +0 -0
- /package/dist/{balance-RQW5T5FB.js.map → balance-DFHC6XEU.js.map} +0 -0
- /package/dist/{ccip-CS7K5QRQ.js.map → ccip-HOW3DZYF.js.map} +0 -0
- /package/dist/{chunk-FSYH7J75.js.map → chunk-3Y6BHIN6.js.map} +0 -0
- /package/dist/{chunk-FZZWTDWP.js.map → chunk-3YPL6T3P.js.map} +0 -0
- /package/dist/{chunk-JEZMWJEF.js.map → chunk-44MVIRZH.js.map} +0 -0
- /package/dist/{chunk-27FIHFXF.js.map → chunk-45MMSBHA.js.map} +0 -0
- /package/dist/{chunk-7JB6SYJX.js.map → chunk-54ELBTKE.js.map} +0 -0
- /package/dist/{chunk-HWZO6HYZ.js.map → chunk-6QMDUDF2.js.map} +0 -0
- /package/dist/{chunk-FNBGRKS6.js.map → chunk-7V25UAQO.js.map} +0 -0
- /package/dist/{chunk-JOKPBYXP.js.map → chunk-DTEWAVNE.js.map} +0 -0
- /package/dist/{chunk-KAILF7QA.js.map → chunk-F43CV6UC.js.map} +0 -0
- /package/dist/{chunk-ACO7ZCR2.js.map → chunk-FKVJKLPI.js.map} +0 -0
- /package/dist/{chunk-2F5JUAHZ.js.map → chunk-GAJC4BQZ.js.map} +0 -0
- /package/dist/{chunk-L7N73ZAW.js.map → chunk-HAZAN4UM.js.map} +0 -0
- /package/dist/{chunk-6QJZA6EX.js.map → chunk-HI5XQOX2.js.map} +0 -0
- /package/dist/{chunk-BOENA6XR.js.map → chunk-HKGUKAQW.js.map} +0 -0
- /package/dist/{chunk-LJSCGIYH.js.map → chunk-HPRVFJPM.js.map} +0 -0
- /package/dist/{chunk-SDUOJRSV.js.map → chunk-IGLWLH73.js.map} +0 -0
- /package/dist/{chunk-3AKH7ODX.js.map → chunk-INSIW65E.js.map} +0 -0
- /package/dist/{chunk-2P3NJTHE.js.map → chunk-JHFFUVON.js.map} +0 -0
- /package/dist/{chunk-2TO5F6CT.js.map → chunk-K5KNGC4I.js.map} +0 -0
- /package/dist/{chunk-HUWTFKEM.js.map → chunk-KAQ4Q3TO.js.map} +0 -0
- /package/dist/{chunk-GS5RZF7U.js.map → chunk-KLDMLWXT.js.map} +0 -0
- /package/dist/{chunk-HN2EN6P4.js.map → chunk-KNKDMTHU.js.map} +0 -0
- /package/dist/{chunk-R2KMLONN.js.map → chunk-MJDO4EXD.js.map} +0 -0
- /package/dist/{chunk-IHVUE3XF.js.map → chunk-NJA6NT3A.js.map} +0 -0
- /package/dist/{chunk-S3JKF3IK.js.map → chunk-OJJFANO6.js.map} +0 -0
- /package/dist/{chunk-GGGEGMWC.js.map → chunk-Q6RSJCXB.js.map} +0 -0
- /package/dist/{chunk-OTIUEUIS.js.map → chunk-QKEUKBRK.js.map} +0 -0
- /package/dist/{chunk-X52BVGCJ.js.map → chunk-QQDPRTLP.js.map} +0 -0
- /package/dist/{chunk-6AQSUBNR.js.map → chunk-RGCPELQN.js.map} +0 -0
- /package/dist/{chunk-LQ33RLHL.js.map → chunk-TFT2X7SH.js.map} +0 -0
- /package/dist/{chunk-IVHGQNIN.js.map → chunk-VHXCPXUS.js.map} +0 -0
- /package/dist/{chunk-7DW7GAM6.js.map → chunk-VU6GMWF6.js.map} +0 -0
- /package/dist/{chunk-YU3DLVSQ.js.map → chunk-XSCGUO2U.js.map} +0 -0
- /package/dist/{chunk-EPCIJLLU.js.map → chunk-XWROSMI5.js.map} +0 -0
- /package/dist/{chunk-HMT6L65V.js.map → chunk-YJGEVBKZ.js.map} +0 -0
- /package/dist/{chunk-I47ARU5G.js.map → chunk-ZS7JIUJ3.js.map} +0 -0
- /package/dist/{claude-cli-2YKABJJZ.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
- /package/dist/{claude-install-7CVYQ73E.js.map → claude-install-BAUSJMW3.js.map} +0 -0
- /package/dist/{client-XMWEKXX7.js.map → client-3YQKORVK.js.map} +0 -0
- /package/dist/{codex-host-B6NAUWL6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
- /package/dist/{config-THJANIU5.js.map → config-QZOBMTEL.js.map} +0 -0
- /package/dist/{config-names-JU54HYWY.js.map → config-names-Z5NZD5R2.js.map} +0 -0
- /package/dist/{config-rules-VNU23RL4.js.map → config-rules-YOYHS6YL.js.map} +0 -0
- /package/dist/{decision-JIIHDTOF.js.map → decision-QSKHOGCO.js.map} +0 -0
- /package/dist/{hook-command-UB7FOEUL.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
- /package/dist/{hosts-WNQKYKP2.js.map → hook-command-VZ27MGWO.js.map} +0 -0
- /package/dist/{install-Q5SHHEDH.js.map → hosts-3EMTVM4H.js.map} +0 -0
- /package/dist/{install-funding-EGSW2KEP.js.map → install-ZA7L2UF3.js.map} +0 -0
- /package/dist/{install-identity-OID43B4D.js.map → install-funding-JDGYTF72.js.map} +0 -0
- /package/dist/{package-NRHU7HBR.js.map → install-identity-FFAYEFLX.js.map} +0 -0
- /package/dist/{passphrase-3JEVW5XG.js.map → new-install-5L4GY3LN.js.map} +0 -0
- /package/dist/{pay-I47AIUQR.js.map → package-BONDXSV3.js.map} +0 -0
- /package/dist/{routing-quote-QQW2I5MH.js.map → passphrase-T4ULBN4M.js.map} +0 -0
- /package/dist/{run-4SHEOBIU.js.map → pay-CMV5KL74.js.map} +0 -0
- /package/dist/{payments-A5FNI5GN.js.map → payments-Z6UBZL4Z.js.map} +0 -0
- /package/dist/{runtime-activate-N6VLQI2C.js.map → routing-quote-AHLAREXR.js.map} +0 -0
- /package/dist/{runtime-launchers-GMAUICRW.js.map → run-JH7ELYAM.js.map} +0 -0
- /package/dist/{runtime-BABJMHY7.js.map → runtime-2GX4ALJP.js.map} +0 -0
- /package/dist/{runtime-place-DOEWFTF3.js.map → runtime-activate-IDQ2NCSP.js.map} +0 -0
- /package/dist/{update-GTLMLFA3.js.map → runtime-launchers-YAPKCBHV.js.map} +0 -0
- /package/dist/{usdc-25RNBYYR.js.map → runtime-place-4POL4KK4.js.map} +0 -0
- /package/dist/{send-ECXS6JEO.js.map → send-ELXFKEKY.js.map} +0 -0
- /package/dist/{status-line-63XFJAXR.js.map → status-line-IH5JBWBC.js.map} +0 -0
- /package/dist/{streamableHttp-Z3YF6LTQ.js.map → streamableHttp-CP2ZQBIK.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-3CG63XDX.js.map → update-EUIX72IX.js.map} +0 -0
- /package/dist/{usage-FCWP2CHO.js.map → usage-EKDC7LUC.js.map} +0 -0
- /package/dist/{wallet-CJGEHP2Q.js.map → usdc-YIHK2OMC.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getObjectShape,
|
|
9
9
|
mergeCapabilities,
|
|
10
10
|
safeParse
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NJA6NT3A.js";
|
|
12
12
|
import {
|
|
13
13
|
CallToolResultSchema,
|
|
14
14
|
CompleteResultSchema,
|
|
@@ -34,9 +34,9 @@ import {
|
|
|
34
34
|
ResourceListChangedNotificationSchema,
|
|
35
35
|
SUPPORTED_PROTOCOL_VERSIONS,
|
|
36
36
|
ToolListChangedNotificationSchema
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-54ELBTKE.js";
|
|
38
38
|
import "./chunk-QKYUCITR.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-P6YQWIT2.js";
|
|
40
40
|
import "./chunk-ZXTAQYNA.js";
|
|
41
41
|
|
|
42
42
|
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.0_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js
|
|
@@ -707,4 +707,4 @@ export {
|
|
|
707
707
|
Client,
|
|
708
708
|
getSupportedElicitationModes
|
|
709
709
|
};
|
|
710
|
-
//# sourceMappingURL=client-
|
|
710
|
+
//# sourceMappingURL=client-3YQKORVK.js.map
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
codexVersion,
|
|
9
9
|
listCodexHooks,
|
|
10
10
|
readCodexConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-44MVIRZH.js";
|
|
12
12
|
import "./chunk-F3ED5WTR.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-34SAECKZ.js";
|
|
14
|
+
import "./chunk-I557SAOM.js";
|
|
15
|
+
import "./chunk-IULCDMVG.js";
|
|
16
16
|
import "./chunk-P4I7BFNJ.js";
|
|
17
17
|
import "./chunk-CRG54LEB.js";
|
|
18
18
|
import "./chunk-ZXTAQYNA.js";
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
listCodexHooks,
|
|
27
27
|
readCodexConfig
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=codex-host-
|
|
29
|
+
//# sourceMappingURL=codex-host-ZON3S6HU.js.map
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
CODEX_MARKETPLACE,
|
|
4
|
+
CODEX_PLUGIN,
|
|
5
|
+
WEB_VERIFIED_VERSION,
|
|
6
|
+
at,
|
|
7
|
+
codexHookRows,
|
|
8
|
+
codexVersion,
|
|
9
|
+
listCodexHooks,
|
|
10
|
+
readCodexConfig,
|
|
11
|
+
resolveCodex,
|
|
12
|
+
withAppServer
|
|
13
|
+
} from "./chunk-44MVIRZH.js";
|
|
14
|
+
import "./chunk-F3ED5WTR.js";
|
|
2
15
|
import {
|
|
3
16
|
readInstalledHosts,
|
|
4
17
|
withNote
|
|
5
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IVNSUAVC.js";
|
|
6
19
|
import {
|
|
7
20
|
CAPABILITY_LINES,
|
|
8
21
|
DISCLOSURE,
|
|
@@ -20,100 +33,94 @@ import {
|
|
|
20
33
|
spendStepFor,
|
|
21
34
|
versionFreeEntry,
|
|
22
35
|
walletLines
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-65RS4LQS.js";
|
|
37
|
+
import "./chunk-QKEUKBRK.js";
|
|
25
38
|
import "./chunk-Y2EXZ47H.js";
|
|
39
|
+
import "./chunk-F43CV6UC.js";
|
|
26
40
|
import "./chunk-HQR4BWKX.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import {
|
|
29
|
-
CODEX_MARKETPLACE,
|
|
30
|
-
CODEX_PLUGIN,
|
|
31
|
-
WEB_VERIFIED_VERSION,
|
|
32
|
-
at,
|
|
33
|
-
codexHookRows,
|
|
34
|
-
codexVersion,
|
|
35
|
-
listCodexHooks,
|
|
36
|
-
readCodexConfig,
|
|
37
|
-
resolveCodex,
|
|
38
|
-
withAppServer
|
|
39
|
-
} from "./chunk-JEZMWJEF.js";
|
|
40
|
-
import "./chunk-F3ED5WTR.js";
|
|
41
|
+
import "./chunk-OJJFANO6.js";
|
|
41
42
|
import {
|
|
42
43
|
CODEX_MCP_HOOKS_VERSION,
|
|
43
44
|
renderCodexHooks
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
45
|
+
} from "./chunk-34SAECKZ.js";
|
|
46
|
+
import "./chunk-I557SAOM.js";
|
|
47
|
+
import "./chunk-IULCDMVG.js";
|
|
47
48
|
import {
|
|
48
49
|
underAgentHarness
|
|
49
50
|
} from "./chunk-WXA3WTPF.js";
|
|
50
51
|
import {
|
|
51
52
|
fundStep
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-KAILF7QA.js";
|
|
53
|
+
} from "./chunk-QQDPRTLP.js";
|
|
54
54
|
import {
|
|
55
55
|
isRecord
|
|
56
56
|
} from "./chunk-P4I7BFNJ.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-4MBCJFY4.js";
|
|
58
|
+
import "./chunk-OC7K2DVZ.js";
|
|
59
|
+
import "./chunk-5F4OB5B3.js";
|
|
60
|
+
import "./chunk-ZS7JIUJ3.js";
|
|
59
61
|
import {
|
|
60
62
|
autoUpdateLine
|
|
61
63
|
} from "./chunk-F3QPGYOY.js";
|
|
62
64
|
import "./chunk-JWAK7JQB.js";
|
|
63
|
-
import
|
|
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";
|
|
64
72
|
import {
|
|
65
73
|
persistRouterDefaults
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
74
|
+
} from "./chunk-W74LJ5OT.js";
|
|
75
|
+
import "./chunk-KNKDMTHU.js";
|
|
76
|
+
import "./chunk-3Y6BHIN6.js";
|
|
69
77
|
import "./chunk-R62PKTAG.js";
|
|
70
|
-
import "./chunk-
|
|
78
|
+
import "./chunk-HAZAN4UM.js";
|
|
71
79
|
import {
|
|
72
80
|
shownLimits
|
|
73
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-KGUE5AVX.js";
|
|
74
82
|
import "./chunk-2W4DQQUU.js";
|
|
75
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-KLDMLWXT.js";
|
|
76
84
|
import {
|
|
77
85
|
SUGGESTED_FUND_USD
|
|
78
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-HZKANST2.js";
|
|
79
87
|
import "./chunk-MEZJ3I63.js";
|
|
80
88
|
import "./chunk-ILWCKCOI.js";
|
|
81
89
|
import "./chunk-RFZA7PSM.js";
|
|
82
90
|
import "./chunk-JUUBBBY5.js";
|
|
83
91
|
import "./chunk-GH5UKMZD.js";
|
|
84
|
-
import "./chunk-OC7K2DVZ.js";
|
|
85
92
|
import {
|
|
86
93
|
atLeast,
|
|
87
94
|
hasRuntime
|
|
88
95
|
} from "./chunk-5N4GGUBN.js";
|
|
89
|
-
import "./chunk-
|
|
90
|
-
import "./chunk-
|
|
96
|
+
import "./chunk-W2GXIARJ.js";
|
|
97
|
+
import "./chunk-TFT2X7SH.js";
|
|
91
98
|
import {
|
|
92
99
|
resolveContextSettings
|
|
93
|
-
} from "./chunk-
|
|
94
|
-
import "./chunk-7WEQQJLG.js";
|
|
100
|
+
} from "./chunk-DTEWAVNE.js";
|
|
95
101
|
import {
|
|
96
102
|
loadRawConfig
|
|
97
|
-
} from "./chunk-
|
|
98
|
-
import "./chunk-
|
|
103
|
+
} from "./chunk-UIB33QQP.js";
|
|
104
|
+
import "./chunk-7WEQQJLG.js";
|
|
99
105
|
import "./chunk-ZCT5DJ3G.js";
|
|
106
|
+
import "./chunk-3MZ7DYRO.js";
|
|
100
107
|
import {
|
|
101
108
|
runtimeDir,
|
|
102
109
|
tilde
|
|
103
110
|
} from "./chunk-JTX3BUDK.js";
|
|
104
|
-
import "./chunk-
|
|
111
|
+
import "./chunk-ZEYA2WWX.js";
|
|
105
112
|
import "./chunk-DIH2G3YG.js";
|
|
106
|
-
import "./chunk-
|
|
107
|
-
import "./chunk-
|
|
113
|
+
import "./chunk-D6M3ZK66.js";
|
|
114
|
+
import "./chunk-RGCPELQN.js";
|
|
108
115
|
import "./chunk-CRG54LEB.js";
|
|
109
116
|
import "./chunk-TUCKEEXE.js";
|
|
110
|
-
import "./chunk-
|
|
117
|
+
import "./chunk-P6YQWIT2.js";
|
|
111
118
|
import {
|
|
112
119
|
CliError
|
|
113
120
|
} from "./chunk-DI4QAGRZ.js";
|
|
114
121
|
import {
|
|
115
122
|
package_default
|
|
116
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-3Y2EHT4F.js";
|
|
117
124
|
import "./chunk-4CE6TMI5.js";
|
|
118
125
|
import "./chunk-ZXTAQYNA.js";
|
|
119
126
|
|
|
@@ -396,6 +403,7 @@ function userScopeOnly(args) {
|
|
|
396
403
|
}
|
|
397
404
|
}
|
|
398
405
|
async function runCodexInstall(args, ctx, deps = {}) {
|
|
406
|
+
const newInstall = deps.newInstall ?? await captureNewInstall(ctx.dataDir);
|
|
399
407
|
userScopeOnly(args);
|
|
400
408
|
const run = deps.run ?? runCodex;
|
|
401
409
|
const home = deps.homeDir ?? homedir();
|
|
@@ -407,6 +415,11 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
407
415
|
const answered = args.yes === true || named.keys.length > 0;
|
|
408
416
|
const unasked = config.maxAutoSpend === void 0 && config.sessionBudget === void 0;
|
|
409
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
|
+
);
|
|
410
423
|
const rt = await (deps.runtime ?? defaultRuntime)({
|
|
411
424
|
dataDir: ctx.dataDir,
|
|
412
425
|
home,
|
|
@@ -416,7 +429,7 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
416
429
|
refresh: false
|
|
417
430
|
});
|
|
418
431
|
requireRuntime(rt);
|
|
419
|
-
const { resolveWallet } = await import("./install-wallet-
|
|
432
|
+
const { resolveWallet } = await import("./install-wallet-2SFOVE3Q.js");
|
|
420
433
|
const wallet = await resolveWallet(
|
|
421
434
|
ctx,
|
|
422
435
|
deps,
|
|
@@ -430,7 +443,7 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
430
443
|
const tooOld = version !== null && !atLeast(version, CODEX_MCP_HOOKS_VERSION);
|
|
431
444
|
let next = CODEX_TOO_OLD;
|
|
432
445
|
if (!tooOld) {
|
|
433
|
-
const codexConfig = await (deps.config ?? (() => readCodexConfig(process.cwd(), 3e3)))();
|
|
446
|
+
const codexConfig = initialCodexConfig ?? await (deps.config ?? (() => readCodexConfig(process.cwd(), 3e3)))();
|
|
434
447
|
await addPlugin(
|
|
435
448
|
run,
|
|
436
449
|
hosts,
|
|
@@ -461,6 +474,8 @@ async function runCodexInstall(args, ctx, deps = {}) {
|
|
|
461
474
|
];
|
|
462
475
|
if (asksAgent && nextSteps.length > 0)
|
|
463
476
|
next = `Follow the instructions in nextSteps, then ${next}`;
|
|
477
|
+
newInstall.completed.push(!tooOld);
|
|
478
|
+
newInstall.continueWith ??= install;
|
|
464
479
|
return {
|
|
465
480
|
data: {
|
|
466
481
|
plugin: CODEX_PLUGIN,
|
|
@@ -572,4 +587,4 @@ export {
|
|
|
572
587
|
runCodexInstall,
|
|
573
588
|
runCodexUninstall
|
|
574
589
|
};
|
|
575
|
-
//# 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;A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["resolve","at"]}
|
|
@@ -9,38 +9,38 @@ import {
|
|
|
9
9
|
runConfigGet,
|
|
10
10
|
runConfigList,
|
|
11
11
|
runConfigSet
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-W74LJ5OT.js";
|
|
13
|
+
import "./chunk-KNKDMTHU.js";
|
|
14
|
+
import "./chunk-3Y6BHIN6.js";
|
|
15
15
|
import "./chunk-R62PKTAG.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-HAZAN4UM.js";
|
|
17
17
|
import {
|
|
18
18
|
ROUTER_DEFAULTS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KGUE5AVX.js";
|
|
20
20
|
import "./chunk-2W4DQQUU.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-KLDMLWXT.js";
|
|
22
|
+
import "./chunk-HZKANST2.js";
|
|
23
23
|
import "./chunk-MEZJ3I63.js";
|
|
24
24
|
import "./chunk-ILWCKCOI.js";
|
|
25
25
|
import "./chunk-RFZA7PSM.js";
|
|
26
26
|
import "./chunk-JUUBBBY5.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-W2GXIARJ.js";
|
|
28
|
+
import "./chunk-TFT2X7SH.js";
|
|
29
|
+
import "./chunk-DTEWAVNE.js";
|
|
30
|
+
import "./chunk-UIB33QQP.js";
|
|
30
31
|
import "./chunk-7WEQQJLG.js";
|
|
31
|
-
import "./chunk-VH7JMLTG.js";
|
|
32
|
-
import "./chunk-3MZ7DYRO.js";
|
|
33
32
|
import "./chunk-ZCT5DJ3G.js";
|
|
33
|
+
import "./chunk-3MZ7DYRO.js";
|
|
34
34
|
import "./chunk-JTX3BUDK.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-ZEYA2WWX.js";
|
|
36
36
|
import "./chunk-DIH2G3YG.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-D6M3ZK66.js";
|
|
38
|
+
import "./chunk-RGCPELQN.js";
|
|
39
39
|
import "./chunk-CRG54LEB.js";
|
|
40
40
|
import "./chunk-TUCKEEXE.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-P6YQWIT2.js";
|
|
42
42
|
import "./chunk-DI4QAGRZ.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-3Y2EHT4F.js";
|
|
44
44
|
import "./chunk-ZXTAQYNA.js";
|
|
45
45
|
export {
|
|
46
46
|
EXPERIMENTAL_BAZAAR_WARNING,
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
runConfigList,
|
|
55
55
|
runConfigSet
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=config-
|
|
57
|
+
//# sourceMappingURL=config-QZOBMTEL.js.map
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveFromContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W74LJ5OT.js";
|
|
5
5
|
import {
|
|
6
6
|
KIND_FLAG,
|
|
7
7
|
either
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KNKDMTHU.js";
|
|
9
9
|
import {
|
|
10
10
|
KIND_NOUN,
|
|
11
11
|
cachedIdentities,
|
|
12
12
|
entriesOf,
|
|
13
13
|
fetchIdentities
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3Y6BHIN6.js";
|
|
15
15
|
import {
|
|
16
16
|
SEARCH_CLOSENESS,
|
|
17
17
|
closenessTo,
|
|
18
18
|
closestNames
|
|
19
19
|
} from "./chunk-R62PKTAG.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-HAZAN4UM.js";
|
|
21
|
+
import "./chunk-KGUE5AVX.js";
|
|
22
22
|
import "./chunk-2W4DQQUU.js";
|
|
23
23
|
import {
|
|
24
24
|
paint,
|
|
25
25
|
sanitizeForTerminal
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-KLDMLWXT.js";
|
|
27
|
+
import "./chunk-HZKANST2.js";
|
|
28
28
|
import "./chunk-MEZJ3I63.js";
|
|
29
29
|
import "./chunk-ILWCKCOI.js";
|
|
30
30
|
import "./chunk-RFZA7PSM.js";
|
|
31
31
|
import "./chunk-JUUBBBY5.js";
|
|
32
32
|
import {
|
|
33
33
|
personalSettingsAt
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-W2GXIARJ.js";
|
|
35
|
+
import "./chunk-TFT2X7SH.js";
|
|
36
|
+
import "./chunk-DTEWAVNE.js";
|
|
37
|
+
import "./chunk-UIB33QQP.js";
|
|
37
38
|
import "./chunk-7WEQQJLG.js";
|
|
38
|
-
import "./chunk-VH7JMLTG.js";
|
|
39
|
-
import "./chunk-3MZ7DYRO.js";
|
|
40
39
|
import "./chunk-ZCT5DJ3G.js";
|
|
40
|
+
import "./chunk-3MZ7DYRO.js";
|
|
41
41
|
import "./chunk-JTX3BUDK.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-ZEYA2WWX.js";
|
|
43
43
|
import "./chunk-DIH2G3YG.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-D6M3ZK66.js";
|
|
45
|
+
import "./chunk-RGCPELQN.js";
|
|
46
46
|
import "./chunk-CRG54LEB.js";
|
|
47
47
|
import "./chunk-TUCKEEXE.js";
|
|
48
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-P6YQWIT2.js";
|
|
49
49
|
import {
|
|
50
50
|
CliError
|
|
51
51
|
} from "./chunk-DI4QAGRZ.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-3Y2EHT4F.js";
|
|
53
53
|
import "./chunk-ZXTAQYNA.js";
|
|
54
54
|
|
|
55
55
|
// src/commands/config-names.ts
|
|
@@ -221,4 +221,4 @@ function humanLines(ctx, groups, read, search, kind) {
|
|
|
221
221
|
export {
|
|
222
222
|
runConfigNames
|
|
223
223
|
};
|
|
224
|
-
//# sourceMappingURL=config-names-
|
|
224
|
+
//# sourceMappingURL=config-names-Z5NZD5R2.js.map
|
|
@@ -9,37 +9,37 @@ import {
|
|
|
9
9
|
runConfigReset,
|
|
10
10
|
runConfigSpeed,
|
|
11
11
|
runConfigUnblock
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-XWROSMI5.js";
|
|
13
|
+
import "./chunk-W74LJ5OT.js";
|
|
14
|
+
import "./chunk-KNKDMTHU.js";
|
|
15
|
+
import "./chunk-3Y6BHIN6.js";
|
|
16
16
|
import "./chunk-R62PKTAG.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-HAZAN4UM.js";
|
|
18
|
+
import "./chunk-KGUE5AVX.js";
|
|
19
19
|
import "./chunk-2W4DQQUU.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KLDMLWXT.js";
|
|
21
|
+
import "./chunk-HZKANST2.js";
|
|
22
22
|
import "./chunk-MEZJ3I63.js";
|
|
23
23
|
import "./chunk-ILWCKCOI.js";
|
|
24
24
|
import "./chunk-RFZA7PSM.js";
|
|
25
25
|
import "./chunk-JUUBBBY5.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-W2GXIARJ.js";
|
|
27
|
+
import "./chunk-TFT2X7SH.js";
|
|
28
|
+
import "./chunk-DTEWAVNE.js";
|
|
29
|
+
import "./chunk-UIB33QQP.js";
|
|
29
30
|
import "./chunk-7WEQQJLG.js";
|
|
30
|
-
import "./chunk-VH7JMLTG.js";
|
|
31
|
-
import "./chunk-3MZ7DYRO.js";
|
|
32
31
|
import "./chunk-ZCT5DJ3G.js";
|
|
32
|
+
import "./chunk-3MZ7DYRO.js";
|
|
33
33
|
import "./chunk-JTX3BUDK.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-ZEYA2WWX.js";
|
|
35
35
|
import "./chunk-DIH2G3YG.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-D6M3ZK66.js";
|
|
37
|
+
import "./chunk-RGCPELQN.js";
|
|
38
38
|
import "./chunk-CRG54LEB.js";
|
|
39
39
|
import "./chunk-TUCKEEXE.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-P6YQWIT2.js";
|
|
41
41
|
import "./chunk-DI4QAGRZ.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-3Y2EHT4F.js";
|
|
43
43
|
import "./chunk-ZXTAQYNA.js";
|
|
44
44
|
export {
|
|
45
45
|
answer,
|
|
@@ -52,4 +52,4 @@ export {
|
|
|
52
52
|
runConfigSpeed,
|
|
53
53
|
runConfigUnblock
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=config-rules-
|
|
55
|
+
//# sourceMappingURL=config-rules-YOYHS6YL.js.map
|