@ken-jo/agent-connector 0.4.7 → 0.4.26
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/README.md +36 -24
- package/dist/{action-YCU53FNE.js → action-AZRZ3V7E.js} +14 -14
- package/dist/amazon-q-BWSOHTW5.js +571 -0
- package/dist/amazon-q-BWSOHTW5.js.map +1 -0
- package/dist/{amp-TULUPXXL.js → amp-BQZOL5GR.js} +2 -2
- package/dist/{amp-JPBQJJVM.js → amp-TF5X6OGH.js} +18 -50
- package/dist/amp-TF5X6OGH.js.map +1 -0
- package/dist/antigravity-3XHBPXZK.js +19 -0
- package/dist/{antigravity-STHZWMP3.js → antigravity-EA4L225L.js} +2 -2
- package/dist/{antigravity-cli-P6HADOAO.js → antigravity-cli-B2HXZFYQ.js} +2 -2
- package/dist/{antigravity-cli-D4PCCUG2.js → antigravity-cli-TJGOBUPK.js} +8 -7
- package/dist/{antigravity-cli-D4PCCUG2.js.map → antigravity-cli-TJGOBUPK.js.map} +1 -1
- package/dist/{chunk-CYOAH23F.js → chunk-25BNMXPP.js} +18 -18
- package/dist/{chunk-NLFPH4S2.js → chunk-2RPHDVHW.js} +2 -2
- package/dist/{chunk-PFDUGDOA.js → chunk-3I7UG52L.js} +25 -6
- package/dist/chunk-3I7UG52L.js.map +1 -0
- package/dist/{chunk-F5RX62T7.js → chunk-7QRUZAUG.js} +2 -2
- package/dist/{chunk-BCHWFTV4.js → chunk-F4DSMVZ7.js} +2 -2
- package/dist/chunk-FBJQGRET.js +38 -0
- package/dist/chunk-FBJQGRET.js.map +1 -0
- package/dist/{chunk-WZA4CSGJ.js → chunk-H53QZQJI.js} +15 -2
- package/dist/chunk-H53QZQJI.js.map +1 -0
- package/dist/{chunk-2F5QH3D4.js → chunk-HU6DZZBG.js} +36 -36
- package/dist/{chunk-7ECYDK5T.js → chunk-HZDU3J4U.js} +10 -5
- package/dist/chunk-HZDU3J4U.js.map +1 -0
- package/dist/{chunk-7L6ITC4T.js → chunk-IEGR4TP3.js} +22 -6
- package/dist/chunk-IEGR4TP3.js.map +1 -0
- package/dist/{chunk-SCVBYSF7.js → chunk-IRUYJD23.js} +28 -28
- package/dist/{chunk-6RYPUR6O.js → chunk-IW46JIQM.js} +34 -44
- package/dist/chunk-IW46JIQM.js.map +1 -0
- package/dist/{chunk-WFXWJITA.js → chunk-JLMD3IGK.js} +2 -2
- package/dist/{chunk-TZQBASI7.js → chunk-KD4BE5MW.js} +13 -49
- package/dist/chunk-KD4BE5MW.js.map +1 -0
- package/dist/{chunk-FAHIMJRU.js → chunk-L7ESV37V.js} +2 -2
- package/dist/{chunk-JNM3TPLX.js → chunk-LETB5HCK.js} +2 -2
- package/dist/{chunk-G5CQHVQG.js → chunk-M3H7PQWT.js} +13 -16
- package/dist/chunk-M3H7PQWT.js.map +1 -0
- package/dist/{chunk-JWNT5KW7.js → chunk-O7SDRBVB.js} +3 -1
- package/dist/chunk-O7SDRBVB.js.map +1 -0
- package/dist/{chunk-YQLQJZ7S.js → chunk-OLI5SD6I.js} +8 -4
- package/dist/chunk-OLI5SD6I.js.map +1 -0
- package/dist/{chunk-SDPIT4HW.js → chunk-Q5HR4ADS.js} +2 -2
- package/dist/{chunk-TRQKHP7D.js → chunk-QY42WGBX.js} +23 -2
- package/dist/chunk-QY42WGBX.js.map +1 -0
- package/dist/{chunk-I5MLE6S7.js → chunk-TO57WYBB.js} +15 -1
- package/dist/chunk-TO57WYBB.js.map +1 -0
- package/dist/chunk-UM5S7DKK.js +33 -0
- package/dist/chunk-UM5S7DKK.js.map +1 -0
- package/dist/{chunk-MDNX7HTN.js → chunk-YEJCNOET.js} +4 -4
- package/dist/{chunk-HAIMYUEY.js → chunk-YKVNI44Y.js} +51 -28
- package/dist/chunk-YKVNI44Y.js.map +1 -0
- package/dist/{chunk-DT6Y7XBI.js → chunk-YRBFSZ2G.js} +17 -39
- package/dist/chunk-YRBFSZ2G.js.map +1 -0
- package/dist/{chunk-SPWFUHHK.js → chunk-ZVTPSV5Z.js} +11 -10
- package/dist/{chunk-SPWFUHHK.js.map → chunk-ZVTPSV5Z.js.map} +1 -1
- package/dist/{chunk-N6HH7K6P.js → chunk-ZY25RG4Y.js} +2 -2
- package/dist/{claude-code-ROSIILTM.js → claude-code-JLPFUZ4V.js} +18 -41
- package/dist/claude-code-JLPFUZ4V.js.map +1 -0
- package/dist/{claude-code-W74MNTAC.js → claude-code-NMRKTAP7.js} +2 -2
- package/dist/cli/sdk.js +7 -7
- package/dist/cli.js +1 -1
- package/dist/{cline-JUTO4V27.js → cline-GBP3EVSX.js} +17 -49
- package/dist/cline-GBP3EVSX.js.map +1 -0
- package/dist/{codebuff-3PMZJJHP.js → codebuff-ETYT5UBL.js} +2 -2
- package/dist/{codebuff-2QUHL6HO.js → codebuff-WMKFUVER.js} +11 -42
- package/dist/codebuff-WMKFUVER.js.map +1 -0
- package/dist/{codex-YBBTIDD4.js → codex-5CZR5XKX.js} +28 -64
- package/dist/codex-5CZR5XKX.js.map +1 -0
- package/dist/{codex-Q3ATRRX3.js → codex-YAORPCOD.js} +2 -2
- package/dist/{continue-W4TU4JSB.js → continue-3AGXWM5W.js} +12 -35
- package/dist/continue-3AGXWM5W.js.map +1 -0
- package/dist/{copilot-cli-Y74SOP5G.js → copilot-cli-IH4P3GRZ.js} +17 -66
- package/dist/copilot-cli-IH4P3GRZ.js.map +1 -0
- package/dist/{copilot-cli-SJGIXVSD.js → copilot-cli-MZTAWMPW.js} +2 -2
- package/dist/{crush-GMEWLXK5.js → crush-FDBL3JEK.js} +17 -44
- package/dist/crush-FDBL3JEK.js.map +1 -0
- package/dist/{crush-LN5QFFR2.js → crush-QBXLNN7T.js} +2 -2
- package/dist/{cursor-QZ6MTO74.js → cursor-DIW43TRZ.js} +2 -2
- package/dist/{cursor-JBS4B3Q4.js → cursor-R5QB4YR4.js} +15 -53
- package/dist/cursor-R5QB4YR4.js.map +1 -0
- package/dist/{detect-2NIXILMZ.js → detect-L5OZPVFO.js} +4 -4
- package/dist/{doctor-QWJBWALA.js → doctor-WDIQ2YFE.js} +16 -15
- package/dist/{doctor-QWJBWALA.js.map → doctor-WDIQ2YFE.js.map} +1 -1
- package/dist/{droid-W5WF5XEX.js → droid-U3ZBLQFO.js} +2 -2
- package/dist/{droid-TJMTNCQE.js → droid-X2QHQL7D.js} +19 -42
- package/dist/droid-X2QHQL7D.js.map +1 -0
- package/dist/{gemini-cli-RAONGZRG.js → gemini-cli-HCN7XKSX.js} +17 -65
- package/dist/gemini-cli-HCN7XKSX.js.map +1 -0
- package/dist/{gemini-cli-CIRW37TU.js → gemini-cli-NMVVBO3K.js} +2 -2
- package/dist/{goose-A3M5GODH.js → goose-64V46Y2W.js} +2 -2
- package/dist/{goose-G4KKM6YU.js → goose-ILMM76JP.js} +21 -57
- package/dist/goose-ILMM76JP.js.map +1 -0
- package/dist/{hermes-ZYLMOFLZ.js → hermes-F3EGTK6N.js} +2 -2
- package/dist/{hermes-PJDTJE6F.js → hermes-YX2ODUZL.js} +17 -55
- package/dist/hermes-YX2ODUZL.js.map +1 -0
- package/dist/{hook-FDGIQPRC.js → hook-JRDQ56BN.js} +14 -14
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/{install-TLG3QVP3.js → install-HRCVPRAQ.js} +16 -15
- package/dist/{install-TLG3QVP3.js.map → install-HRCVPRAQ.js.map} +1 -1
- package/dist/{introspect-Cn3MSA4_.d.ts → introspect-B164-hj3.d.ts} +1 -1
- package/dist/{jetbrains-copilot-DNXSLQE5.js → jetbrains-copilot-QESFUN6W.js} +12 -39
- package/dist/jetbrains-copilot-QESFUN6W.js.map +1 -0
- package/dist/{kilo-FERJ3X46.js → kilo-POTCYIRG.js} +28 -92
- package/dist/kilo-POTCYIRG.js.map +1 -0
- package/dist/{kilo-NSWAVP6P.js → kilo-SW7BH6EG.js} +2 -2
- package/dist/{kilo-cli-TDCONH5G.js → kilo-cli-MO6FSMH2.js} +19 -50
- package/dist/kilo-cli-MO6FSMH2.js.map +1 -0
- package/dist/{kilo-cli-EVBKUODA.js → kilo-cli-ZF272ZHN.js} +2 -2
- package/dist/{kimi-EI3UM3ZV.js → kimi-5FHEXGZD.js} +72 -13
- package/dist/kimi-5FHEXGZD.js.map +1 -0
- package/dist/{kimi-RIRD4J5J.js → kimi-RXS36OJP.js} +36 -50
- package/dist/kimi-RXS36OJP.js.map +1 -0
- package/dist/{kiro-X7JVLAN7.js → kiro-VTLX7CMF.js} +12 -33
- package/dist/kiro-VTLX7CMF.js.map +1 -0
- package/dist/{kiro-UCLSLBW2.js → kiro-WGOI5CGT.js} +2 -2
- package/dist/{leaderboard-MXGENYXN.js → leaderboard-ASGR3E2U.js} +6 -6
- package/dist/{mimo-code-RFLQ727H.js → mimo-code-F4BWMESO.js} +57 -91
- package/dist/mimo-code-F4BWMESO.js.map +1 -0
- package/dist/{mux-D77HBSBU.js → mux-2YFCYFM7.js} +11 -41
- package/dist/mux-2YFCYFM7.js.map +1 -0
- package/dist/{mux-ZMLVAXOO.js → mux-XM6AP35L.js} +2 -2
- package/dist/{nemoclaw-LXUTMR56.js → nemoclaw-QDB6O22A.js} +7 -7
- package/dist/{omp-CO7IXURG.js → omp-P2JNAEPN.js} +18 -50
- package/dist/omp-P2JNAEPN.js.map +1 -0
- package/dist/openclaw-3UMBSSZM.js +18 -0
- package/dist/{openclaw-IYA7ASL6.js → openclaw-5EQFGOWL.js} +2 -2
- package/dist/{opencode-QKZ5EIYU.js → opencode-Q6H4YT66.js} +24 -90
- package/dist/opencode-Q6H4YT66.js.map +1 -0
- package/dist/{opencode-HWT3RSMN.js → opencode-QGP4ALQY.js} +2 -2
- package/dist/{package-IA56LSC3.js → package-IXBSG7HD.js} +11 -11
- package/dist/{pi-UFX2OYFV.js → pi-GGDQREVG.js} +2 -2
- package/dist/{pi-YGBXYWY5.js → pi-GW25LPC3.js} +6 -6
- package/dist/{qwen-code-W7NUCDEN.js → qwen-code-GQILBJ5B.js} +2 -2
- package/dist/{qwen-code-E2MSEZK6.js → qwen-code-R6XXEEHJ.js} +13 -34
- package/dist/qwen-code-R6XXEEHJ.js.map +1 -0
- package/dist/{roo-code-AGGJ473T.js → roo-code-EZPNFC5V.js} +17 -54
- package/dist/roo-code-EZPNFC5V.js.map +1 -0
- package/dist/{roo-code-ZLKH4A7N.js → roo-code-SUWI4BBN.js} +2 -2
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +12 -12
- package/dist/sdk/index.d.ts +3 -3
- package/dist/sdk/index.js +6 -6
- package/dist/sdk/test.d.ts +2 -2
- package/dist/sdk/test.js +9 -9
- package/dist/{serve-RNUCK5F7.js → serve-CFBQYKRB.js} +14 -14
- package/dist/{status-JOX6RLJU.js → status-ASBFEFQQ.js} +11 -10
- package/dist/{status-JOX6RLJU.js.map → status-ASBFEFQQ.js.map} +1 -1
- package/dist/{statusline-ZVFI5DRT.js → statusline-WKLWSM7I.js} +13 -13
- package/dist/{synthetic-UKR6SMGS.js → synthetic-6FRA7P5Q.js} +2 -2
- package/dist/{telemetry-3FN6HDVU.js → telemetry-64GCGNIW.js} +10 -10
- package/dist/{trae-6L226ZDU.js → trae-6VQW2UVP.js} +12 -41
- package/dist/trae-6VQW2UVP.js.map +1 -0
- package/dist/{trae-PA26DPBW.js → trae-CPPYASR2.js} +2 -2
- package/dist/{types-_6arHbX9.d.ts → types-COSBYpKs.d.ts} +7 -5
- package/dist/{uninstall-SCKZYB4J.js → uninstall-KDJYE5ET.js} +16 -15
- package/dist/{uninstall-SCKZYB4J.js.map → uninstall-KDJYE5ET.js.map} +1 -1
- package/dist/{upgrade-WU3KZWR4.js → upgrade-YQRVYR5U.js} +16 -15
- package/dist/{upgrade-WU3KZWR4.js.map → upgrade-YQRVYR5U.js.map} +1 -1
- package/dist/{usage-G72SF7JG.js → usage-OV2BDZKF.js} +3 -3
- package/dist/{usage-event-DHSEBO5T.js → usage-event-KPI3NEX3.js} +13 -13
- package/dist/{vscode-copilot-6EOZDLXC.js → vscode-copilot-UOEEV4P3.js} +17 -67
- package/dist/vscode-copilot-UOEEV4P3.js.map +1 -0
- package/dist/{warp-N5YYN5BF.js → warp-LUK2BPCU.js} +9 -21
- package/dist/warp-LUK2BPCU.js.map +1 -0
- package/dist/{warp-JNQA7PBU.js → warp-NRBBJQR2.js} +2 -2
- package/dist/{windsurf-4TGSJIVV.js → windsurf-NZ3G42NQ.js} +8 -20
- package/dist/windsurf-NZ3G42NQ.js.map +1 -0
- package/dist/{zed-6P2UFWXU.js → zed-LGWGZ4EO.js} +13 -23
- package/dist/zed-LGWGZ4EO.js.map +1 -0
- package/dist/{zed-NNNX5MNT.js → zed-XJFOOKCO.js} +2 -2
- package/package.json +7 -2
- package/dist/amazon-q-W574ZX35.js +0 -276
- package/dist/amazon-q-W574ZX35.js.map +0 -1
- package/dist/amp-JPBQJJVM.js.map +0 -1
- package/dist/antigravity-VK2Y3FGV.js +0 -18
- package/dist/chunk-6RYPUR6O.js.map +0 -1
- package/dist/chunk-7ECYDK5T.js.map +0 -1
- package/dist/chunk-7L6ITC4T.js.map +0 -1
- package/dist/chunk-DT6Y7XBI.js.map +0 -1
- package/dist/chunk-G5CQHVQG.js.map +0 -1
- package/dist/chunk-HAIMYUEY.js.map +0 -1
- package/dist/chunk-I5MLE6S7.js.map +0 -1
- package/dist/chunk-JWNT5KW7.js.map +0 -1
- package/dist/chunk-PFDUGDOA.js.map +0 -1
- package/dist/chunk-TRQKHP7D.js.map +0 -1
- package/dist/chunk-TZQBASI7.js.map +0 -1
- package/dist/chunk-WZA4CSGJ.js.map +0 -1
- package/dist/chunk-YQLQJZ7S.js.map +0 -1
- package/dist/claude-code-ROSIILTM.js.map +0 -1
- package/dist/cline-JUTO4V27.js.map +0 -1
- package/dist/codebuff-2QUHL6HO.js.map +0 -1
- package/dist/codex-YBBTIDD4.js.map +0 -1
- package/dist/continue-W4TU4JSB.js.map +0 -1
- package/dist/copilot-cli-Y74SOP5G.js.map +0 -1
- package/dist/crush-GMEWLXK5.js.map +0 -1
- package/dist/cursor-JBS4B3Q4.js.map +0 -1
- package/dist/droid-TJMTNCQE.js.map +0 -1
- package/dist/gemini-cli-RAONGZRG.js.map +0 -1
- package/dist/goose-G4KKM6YU.js.map +0 -1
- package/dist/hermes-PJDTJE6F.js.map +0 -1
- package/dist/jetbrains-copilot-DNXSLQE5.js.map +0 -1
- package/dist/kilo-FERJ3X46.js.map +0 -1
- package/dist/kilo-cli-TDCONH5G.js.map +0 -1
- package/dist/kimi-EI3UM3ZV.js.map +0 -1
- package/dist/kimi-RIRD4J5J.js.map +0 -1
- package/dist/kiro-X7JVLAN7.js.map +0 -1
- package/dist/mimo-code-RFLQ727H.js.map +0 -1
- package/dist/mux-D77HBSBU.js.map +0 -1
- package/dist/omp-CO7IXURG.js.map +0 -1
- package/dist/openclaw-XWJLEW35.js +0 -18
- package/dist/opencode-QKZ5EIYU.js.map +0 -1
- package/dist/qwen-code-E2MSEZK6.js.map +0 -1
- package/dist/roo-code-AGGJ473T.js.map +0 -1
- package/dist/trae-6L226ZDU.js.map +0 -1
- package/dist/vscode-copilot-6EOZDLXC.js.map +0 -1
- package/dist/warp-N5YYN5BF.js.map +0 -1
- package/dist/windsurf-4TGSJIVV.js.map +0 -1
- package/dist/zed-6P2UFWXU.js.map +0 -1
- /package/dist/{action-YCU53FNE.js.map → action-AZRZ3V7E.js.map} +0 -0
- /package/dist/{amp-TULUPXXL.js.map → amp-BQZOL5GR.js.map} +0 -0
- /package/dist/{antigravity-VK2Y3FGV.js.map → antigravity-3XHBPXZK.js.map} +0 -0
- /package/dist/{antigravity-STHZWMP3.js.map → antigravity-EA4L225L.js.map} +0 -0
- /package/dist/{antigravity-cli-P6HADOAO.js.map → antigravity-cli-B2HXZFYQ.js.map} +0 -0
- /package/dist/{chunk-CYOAH23F.js.map → chunk-25BNMXPP.js.map} +0 -0
- /package/dist/{chunk-NLFPH4S2.js.map → chunk-2RPHDVHW.js.map} +0 -0
- /package/dist/{chunk-F5RX62T7.js.map → chunk-7QRUZAUG.js.map} +0 -0
- /package/dist/{chunk-BCHWFTV4.js.map → chunk-F4DSMVZ7.js.map} +0 -0
- /package/dist/{chunk-2F5QH3D4.js.map → chunk-HU6DZZBG.js.map} +0 -0
- /package/dist/{chunk-SCVBYSF7.js.map → chunk-IRUYJD23.js.map} +0 -0
- /package/dist/{chunk-WFXWJITA.js.map → chunk-JLMD3IGK.js.map} +0 -0
- /package/dist/{chunk-FAHIMJRU.js.map → chunk-L7ESV37V.js.map} +0 -0
- /package/dist/{chunk-JNM3TPLX.js.map → chunk-LETB5HCK.js.map} +0 -0
- /package/dist/{chunk-SDPIT4HW.js.map → chunk-Q5HR4ADS.js.map} +0 -0
- /package/dist/{chunk-MDNX7HTN.js.map → chunk-YEJCNOET.js.map} +0 -0
- /package/dist/{chunk-N6HH7K6P.js.map → chunk-ZY25RG4Y.js.map} +0 -0
- /package/dist/{claude-code-W74MNTAC.js.map → claude-code-NMRKTAP7.js.map} +0 -0
- /package/dist/{codebuff-3PMZJJHP.js.map → codebuff-ETYT5UBL.js.map} +0 -0
- /package/dist/{codex-Q3ATRRX3.js.map → codex-YAORPCOD.js.map} +0 -0
- /package/dist/{copilot-cli-SJGIXVSD.js.map → copilot-cli-MZTAWMPW.js.map} +0 -0
- /package/dist/{crush-LN5QFFR2.js.map → crush-QBXLNN7T.js.map} +0 -0
- /package/dist/{cursor-QZ6MTO74.js.map → cursor-DIW43TRZ.js.map} +0 -0
- /package/dist/{detect-2NIXILMZ.js.map → detect-L5OZPVFO.js.map} +0 -0
- /package/dist/{droid-W5WF5XEX.js.map → droid-U3ZBLQFO.js.map} +0 -0
- /package/dist/{gemini-cli-CIRW37TU.js.map → gemini-cli-NMVVBO3K.js.map} +0 -0
- /package/dist/{goose-A3M5GODH.js.map → goose-64V46Y2W.js.map} +0 -0
- /package/dist/{hermes-ZYLMOFLZ.js.map → hermes-F3EGTK6N.js.map} +0 -0
- /package/dist/{hook-FDGIQPRC.js.map → hook-JRDQ56BN.js.map} +0 -0
- /package/dist/{kilo-NSWAVP6P.js.map → kilo-SW7BH6EG.js.map} +0 -0
- /package/dist/{kilo-cli-EVBKUODA.js.map → kilo-cli-ZF272ZHN.js.map} +0 -0
- /package/dist/{kiro-UCLSLBW2.js.map → kiro-WGOI5CGT.js.map} +0 -0
- /package/dist/{leaderboard-MXGENYXN.js.map → leaderboard-ASGR3E2U.js.map} +0 -0
- /package/dist/{mux-ZMLVAXOO.js.map → mux-XM6AP35L.js.map} +0 -0
- /package/dist/{nemoclaw-LXUTMR56.js.map → nemoclaw-QDB6O22A.js.map} +0 -0
- /package/dist/{openclaw-XWJLEW35.js.map → openclaw-3UMBSSZM.js.map} +0 -0
- /package/dist/{openclaw-IYA7ASL6.js.map → openclaw-5EQFGOWL.js.map} +0 -0
- /package/dist/{opencode-HWT3RSMN.js.map → opencode-QGP4ALQY.js.map} +0 -0
- /package/dist/{package-IA56LSC3.js.map → package-IXBSG7HD.js.map} +0 -0
- /package/dist/{pi-UFX2OYFV.js.map → pi-GGDQREVG.js.map} +0 -0
- /package/dist/{pi-YGBXYWY5.js.map → pi-GW25LPC3.js.map} +0 -0
- /package/dist/{qwen-code-W7NUCDEN.js.map → qwen-code-GQILBJ5B.js.map} +0 -0
- /package/dist/{roo-code-ZLKH4A7N.js.map → roo-code-SUWI4BBN.js.map} +0 -0
- /package/dist/{serve-RNUCK5F7.js.map → serve-CFBQYKRB.js.map} +0 -0
- /package/dist/{statusline-ZVFI5DRT.js.map → statusline-WKLWSM7I.js.map} +0 -0
- /package/dist/{synthetic-UKR6SMGS.js.map → synthetic-6FRA7P5Q.js.map} +0 -0
- /package/dist/{telemetry-3FN6HDVU.js.map → telemetry-64GCGNIW.js.map} +0 -0
- /package/dist/{trae-PA26DPBW.js.map → trae-CPPYASR2.js.map} +0 -0
- /package/dist/{usage-G72SF7JG.js.map → usage-OV2BDZKF.js.map} +0 -0
- /package/dist/{usage-event-DHSEBO5T.js.map → usage-event-KPI3NEX3.js.map} +0 -0
- /package/dist/{warp-JNQA7PBU.js.map → warp-NRBBJQR2.js.map} +0 -0
- /package/dist/{zed-NNNX5MNT.js.map → zed-XJFOOKCO.js.map} +0 -0
|
@@ -4,14 +4,15 @@ import {
|
|
|
4
4
|
} from "./chunk-DBQMX75U.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseAdapter
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-7L6ITC4T.js";
|
|
7
|
+
} from "./chunk-3I7UG52L.js";
|
|
9
8
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
renderSkillMd
|
|
10
|
+
} from "./chunk-IEGR4TP3.js";
|
|
11
|
+
import {
|
|
12
|
+
buildWrappedStdio
|
|
13
|
+
} from "./chunk-TO57WYBB.js";
|
|
14
|
+
import "./chunk-ZY25RG4Y.js";
|
|
15
|
+
import "./chunk-QY42WGBX.js";
|
|
15
16
|
|
|
16
17
|
// src/adapters/codebuff/index.ts
|
|
17
18
|
import { existsSync } from "fs";
|
|
@@ -152,18 +153,7 @@ var CodebuffAdapter = class extends BaseAdapter {
|
|
|
152
153
|
if (transport === "stdio") {
|
|
153
154
|
let command = server.command ?? "";
|
|
154
155
|
let args = [...server.args ?? []];
|
|
155
|
-
|
|
156
|
-
const wrapped = buildServeWrapperCommand(
|
|
157
|
-
ctx.homeBinPath,
|
|
158
|
-
ctx.connector.id,
|
|
159
|
-
command,
|
|
160
|
-
args,
|
|
161
|
-
ctx.scope,
|
|
162
|
-
this.id
|
|
163
|
-
);
|
|
164
|
-
command = wrapped.command;
|
|
165
|
-
args = wrapped.args;
|
|
166
|
-
}
|
|
156
|
+
({ command, args } = buildWrappedStdio(ctx, server, this.id, command, args));
|
|
167
157
|
const entry2 = {
|
|
168
158
|
type: "stdio",
|
|
169
159
|
command: rewriteEnvRefsDeep(command)
|
|
@@ -216,7 +206,7 @@ var CodebuffAdapter = class extends BaseAdapter {
|
|
|
216
206
|
for (const skill of connector.skills) {
|
|
217
207
|
const dir = this.skillDir(ctx, skill.name);
|
|
218
208
|
changes.push(
|
|
219
|
-
this.writeContentFile(join(dir, "SKILL.md"),
|
|
209
|
+
this.writeContentFile(join(dir, "SKILL.md"), renderSkillMd(skill), ctx.dryRun)
|
|
220
210
|
);
|
|
221
211
|
for (const [rel, contents] of Object.entries(skill.resources ?? {})) {
|
|
222
212
|
const target = this.resolveWithin(dir, rel);
|
|
@@ -251,27 +241,6 @@ var CodebuffAdapter = class extends BaseAdapter {
|
|
|
251
241
|
}
|
|
252
242
|
return changes;
|
|
253
243
|
}
|
|
254
|
-
/**
|
|
255
|
-
* Render a skill's SKILL.md: frontmatter (name, description + optional model,
|
|
256
|
-
* allowed-tools, disable-model-invocation) + body. UNIFORM with every other
|
|
257
|
-
* skill-supporting platform — only the parent dir differs. Codebuff requires
|
|
258
|
-
* the frontmatter `name` to equal the dir name (load-skills.ts), which holds
|
|
259
|
-
* because skillDir uses skill.name for both.
|
|
260
|
-
*/
|
|
261
|
-
renderSkill(skill) {
|
|
262
|
-
const frontmatter = {
|
|
263
|
-
name: skill.name,
|
|
264
|
-
description: skill.description
|
|
265
|
-
};
|
|
266
|
-
if (skill.model !== void 0) frontmatter.model = skill.model;
|
|
267
|
-
const allow = skill.tools?.allow;
|
|
268
|
-
if (allow && allow.length > 0) frontmatter["allowed-tools"] = allow.join(", ");
|
|
269
|
-
if (skill.disableModelInvocation !== void 0) {
|
|
270
|
-
frontmatter["disable-model-invocation"] = skill.disableModelInvocation;
|
|
271
|
-
}
|
|
272
|
-
if (skill.extra) Object.assign(frontmatter, skill.extra);
|
|
273
|
-
return this.renderFrontmatterMd(frontmatter, skill.body);
|
|
274
|
-
}
|
|
275
244
|
// ── Content surfaces: subagents ───────────────────────────────────────────
|
|
276
245
|
// CONTENT-ONLY: pure native-file writers (no runtime dispatch, no home-bin
|
|
277
246
|
// pointer, no telemetry wrap). Idempotent via writeContentFile, reversible via
|
|
@@ -446,4 +415,4 @@ export {
|
|
|
446
415
|
adapter,
|
|
447
416
|
codebuff_default as default
|
|
448
417
|
};
|
|
449
|
-
//# sourceMappingURL=codebuff-
|
|
418
|
+
//# sourceMappingURL=codebuff-WMKFUVER.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/adapters/codebuff/index.ts"],"sourcesContent":["/**\n * adapters/codebuff — Codebuff platform adapter for agent-connector.\n *\n * Codebuff is an **mcp-only** host: it exposes no lifecycle hook system, and MCP\n * is its extensibility mechanism. This adapter therefore installs only the MCP\n * server and reports hooks as unavailable (mirrors the Warp reference path that\n * validates the `mcp-only` paradigm end-to-end).\n *\n * MCP config (SPEC):\n * - project scope (preferred) → <projectDir>/.agents/mcp.json\n * - user scope → ~/.agents/mcp.json\n * Both are JSON, root key \"mcpServers\". There is no separate hook file — the\n * hook \"config path\" is the same mcp.json so the generic doctor/backup behave\n * sensibly.\n *\n * A stdio server entry is the standard `{ type:\"stdio\", command, args, env }`\n * shape. Codebuff supports native `$VAR` interpolation, so `${env:VAR}` refs are\n * rewritten to Codebuff's native `$VAR` token (rewriteEnvRefs) rather than being\n * resolved to literals — secrets are never baked into the config file.\n */\n\nimport { existsSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\n\nimport { BaseAdapter } from \"../base.js\";\nimport type { Adapter, InstallContext } from \"../spi.js\";\nimport type {\n ChangeRecord,\n DetectedPlatform,\n HealthCheck,\n HookParadigm,\n PlatformCapabilities,\n PlatformId,\n ServerDef,\n SubagentDef,\n Transport,\n} from \"../../core/types.js\";\nimport { rewriteEnvRefs } from \"../../core/interpolate.js\";\nimport {\n buildWrappedStdio,\n} from \"../../core/spawn.js\";\nimport { renderSkillMd } from \"../claude-code/render.js\";\n\nconst HOST: PlatformId = \"codebuff\";\nconst MCP_ROOT_KEY = \"mcpServers\";\n\n/**\n * Render `${env:VAR}`/`${env:VAR:-default}` into Codebuff's native `$VAR` token.\n *\n * When the portable ref carried a default (`${env:VAR:-fallback}`), Codebuff's\n * native `$VAR` token cannot express it — so a bare native token would silently\n * DROP the default. Instead, resolve the default at install time: emit the live\n * value when VAR is set and non-empty, else the literal fallback. The native\n * token is only emitted when there is no default to preserve.\n */\nconst toNativeRef = (name: string, def?: string): string => {\n if (def !== undefined) {\n const v = process.env[name];\n return v != null && v !== \"\" ? v : def;\n }\n return `$${name}`;\n};\n\n/** Recursively rewrite every `${env:VAR}` ref in a JSON-ish value to `$VAR`. */\nfunction rewriteEnvRefsDeep<T>(value: T): T {\n if (typeof value === \"string\") {\n return rewriteEnvRefs(value, toNativeRef) as unknown as T;\n }\n if (Array.isArray(value)) {\n return value.map((v) => rewriteEnvRefsDeep(v)) as unknown as T;\n }\n if (value && typeof value === \"object\") {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value)) out[k] = rewriteEnvRefsDeep(v);\n return out as T;\n }\n return value;\n}\n\n/**\n * Render one AgentDefinition field as a ` key: value,` line for the emitted\n * `.agents/<id>.ts` module. The value is serialized with JSON.stringify (correct\n * string/array/object escaping); a known-identifier key is emitted unquoted, and\n * anything else (only reachable via `extra`) is quoted. Multi-line JSON (arrays /\n * nested objects) is reindented so it sits under the 2-space object body.\n */\nfunction renderAgentField(key: string, value: unknown): string {\n const k = /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key) ? key : JSON.stringify(key);\n const json = JSON.stringify(value, null, 2);\n const v = json.includes(\"\\n\") ? json.replace(/\\n/g, \"\\n \") : json;\n return ` ${k}: ${v},`;\n}\n\n/**\n * Native MCP server entry shapes Codebuff accepts under `mcpServers`.\n * A stdio entry is tagged with `type:\"stdio\"`; remote transports carry a `url`.\n */\ninterface CodebuffStdioServer {\n type: \"stdio\";\n command: string;\n args?: string[];\n env?: Record<string, string>;\n}\ninterface CodebuffHttpServer {\n type: \"http\";\n url: string;\n headers?: Record<string, string>;\n}\n\nexport class CodebuffAdapter extends BaseAdapter implements Adapter {\n readonly id: PlatformId = HOST;\n readonly name = \"Codebuff\";\n readonly paradigm: HookParadigm = \"mcp-only\";\n\n readonly capabilities: PlatformCapabilities = {\n // Memory surface: AGENTS.md-first managed block via the BaseAdapter default\n // (memoryTargets: project <projectDir>/AGENTS.md; user scope where documented).\n supportsMemory: true,\n // Codebuff has no lifecycle hook system — every hook capability is false.\n preToolUse: false,\n postToolUse: false,\n preCompact: false,\n sessionStart: false,\n sessionEnd: false,\n userPromptSubmit: false,\n stop: false,\n notification: false,\n canModifyArgs: false,\n canModifyOutput: false,\n canInjectSessionContext: false,\n // Codebuff registers stdio and Streamable HTTP MCP servers.\n transports: [\"stdio\", \"http\"],\n // Content surfaces: Codebuff reads AgentSkills from\n // <configDir>/skills/<name>/SKILL.md (configDir is .agents, so the path is\n // .agents/skills/<name>/SKILL.md). Verified against codebuff source\n // sdk/src/skills/load-skills.ts — the frontmatter `name` MUST equal the dir\n // name. Commands have no native Codebuff surface. Subagents ARE natively\n // supported — executable .agents/*.ts AgentDefinition modules (codebuff docs:\n // \"Create a new TypeScript file in .agents/\") — and are now WIRED:\n // installSubagents emits one `.agents/<id>.ts` AgentDefinition module per\n // declared subagent (PROJECT scope; see renderSubagent), each\n // default-exporting the AgentDefinition object WITHOUT the type-only\n // `agent-definition` import (erased at runtime; emitting it would only couple\n // the module to a generated types file that may not exist).\n supportsSkills: true,\n supportsSubagents: true,\n };\n\n // ── Detection ────────────────────────────────────────────────────────────\n\n detectInstalled(projectDir: string): DetectedPlatform {\n const userDir = join(homedir(), \".agents\");\n const userMcp = join(userDir, \"mcp.json\");\n const projDir = join(projectDir, \".agents\");\n const projMcp = join(projDir, \"mcp.json\");\n\n const userInstalled = existsSync(userDir) || existsSync(userMcp);\n const projInstalled = existsSync(projDir) || existsSync(projMcp);\n const installed = userInstalled || projInstalled;\n // Project is the preferred scope; fall back to user when only that matched.\n const scope = projInstalled && !userInstalled ? \"project\" : \"user\";\n const configPath = scope === \"project\" ? projMcp : userMcp;\n\n return {\n id: this.id,\n name: this.name,\n installed,\n paradigm: this.paradigm,\n capabilities: this.capabilities,\n configPath,\n scope,\n reason: installed\n ? `found Codebuff config (${scope})`\n : `no .agents config dir at ${userDir} or ${projDir}`,\n confidence: installed ? \"high\" : \"low\",\n };\n }\n\n // ── Native paths ─────────────────────────────────────────────────────────\n\n getConfigDir(ctx: InstallContext): string {\n return ctx.scope === \"project\"\n ? join(ctx.projectDir, \".agents\")\n : join(homedir(), \".agents\");\n }\n\n getServerConfigPath(ctx: InstallContext): string {\n return join(this.getConfigDir(ctx), \"mcp.json\");\n }\n\n /**\n * Codebuff has no hook file — hooks are not a thing here. The hook \"config\n * path\" is the same mcp.json so the generic doctor/backup behave sensibly.\n */\n getHookConfigPath(ctx: InstallContext): string {\n return this.getServerConfigPath(ctx);\n }\n\n // ── MCP server install / uninstall ───────────────────────────────────────\n\n installServer(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n const override = connector.platforms[HOST]?.server;\n if (!connector.server || override === false) {\n return [\n {\n platform: this.id,\n action: \"skip\",\n detail: connector.server\n ? \"server registration disabled for codebuff\"\n : \"connector declares no MCP server\",\n },\n ];\n }\n\n // Shallow-merge any per-platform server override into the base ServerDef.\n const server: ServerDef =\n override && typeof override === \"object\"\n ? { ...connector.server, ...override }\n : connector.server;\n\n const serverPath = this.getServerConfigPath(ctx);\n const entry = this.renderServerEntry(ctx, server);\n\n return [\n this.upsertServerInJson(serverPath, MCP_ROOT_KEY, connector.id, entry, ctx.dryRun),\n ];\n }\n\n uninstallServer(ctx: InstallContext): ChangeRecord[] {\n const serverPath = this.getServerConfigPath(ctx);\n return [\n this.removeServerFromJson(serverPath, MCP_ROOT_KEY, ctx.connector.id, ctx.dryRun),\n ];\n }\n\n /** Render a normalized ServerDef into Codebuff's native mcpServers entry. */\n private renderServerEntry(\n ctx: InstallContext,\n server: ServerDef,\n ): CodebuffStdioServer | CodebuffHttpServer {\n const transport: Transport = server.transport;\n\n if (transport === \"stdio\") {\n let command = server.command ?? \"\";\n let args = [...(server.args ?? [])];\n\n // Transparent telemetry wrapping: route the real command through\n // `<homeBin> serve --connector <id> -- <command> <args...>`.\n ({ command, args } = buildWrappedStdio(ctx, server, this.id, command, args));\n\n // Codebuff supports native `$VAR` interpolation, so rewrite every\n // ${env:VAR} ref to `$VAR` rather than baking literals into the config.\n const entry: CodebuffStdioServer = {\n type: \"stdio\",\n command: rewriteEnvRefsDeep(command),\n };\n if (args.length > 0) entry.args = rewriteEnvRefsDeep(args);\n const env = this.renderEnv(server.env);\n if (env) entry.env = env;\n return entry;\n }\n\n // http (and any other remote transport) — Codebuff registers a URL.\n const entry: CodebuffHttpServer = {\n type: \"http\",\n url: rewriteEnvRefsDeep(server.url ?? \"\"),\n };\n const headers = this.renderEnv(server.headers);\n if (headers) entry.headers = headers;\n return entry;\n }\n\n /**\n * Render env/header values. Codebuff supports native `$VAR` interpolation, so\n * rewrite `${env:VAR}` references to `$VAR` rather than resolving to literals.\n */\n private renderEnv(\n env: Record<string, string> | undefined,\n ): Record<string, string> | undefined {\n if (!env || Object.keys(env).length === 0) return undefined;\n return rewriteEnvRefsDeep({ ...env });\n }\n\n // ── Content surfaces: skills ──────────────────────────────────────────────\n // CONTENT-ONLY: pure native-file writers. No runtime dispatch, no home-bin\n // pointer, no telemetry wrap. Each method is idempotent (byte-identical →\n // skip) via writeContentFile and reversible via removeContentFile. Honors\n // platforms[\"codebuff\"].skills === false to skip. Both user and project scope\n // are supported (configDir resolves per scope).\n //\n // Native location:\n // skill → <configDir>/skills/<name>/SKILL.md (+ resources)\n // configDir is .agents, so .agents/skills/<name>/SKILL.md. Verified\n // against codebuff source sdk/src/skills/load-skills.ts — the\n // frontmatter `name` MUST equal the dir name.\n\n private skillDir(ctx: InstallContext, name: string): string {\n return join(this.getConfigDir(ctx), \"skills\", name);\n }\n\n override installSkills(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.platforms[HOST]?.skills === false) {\n return [{ platform: this.id, action: \"skip\", detail: \"skills disabled for codebuff\" }];\n }\n if (connector.skills.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no skills\" }];\n }\n const changes: ChangeRecord[] = [];\n for (const skill of connector.skills) {\n const dir = this.skillDir(ctx, skill.name);\n changes.push(\n this.writeContentFile(join(dir, \"SKILL.md\"), renderSkillMd(skill), ctx.dryRun),\n );\n // Bundle any resource files beside SKILL.md (relative path → contents).\n // Defense-in-depth: skip+warn on any key that escapes the skill dir\n // (config-time validation already rejects these, but never trust input).\n for (const [rel, contents] of Object.entries(skill.resources ?? {})) {\n const target = this.resolveWithin(dir, rel);\n if (target === null) {\n changes.push({\n platform: this.id,\n action: \"warn\",\n detail: `skill resource \"${rel}\" escapes the skill dir; skipped`,\n });\n continue;\n }\n changes.push(this.writeContentFile(target, contents, ctx.dryRun));\n }\n }\n return changes;\n }\n\n override uninstallSkills(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.skills.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no skills\" }];\n }\n const changes: ChangeRecord[] = [];\n for (const skill of connector.skills) {\n const dir = this.skillDir(ctx, skill.name);\n // Remove only the files we wrote (SKILL.md + declared resources), then the\n // skill dir itself when we own its full contents.\n changes.push(this.removeContentFile(join(dir, \"SKILL.md\"), ctx.dryRun));\n for (const rel of Object.keys(skill.resources ?? {})) {\n const target = this.resolveWithin(dir, rel);\n if (target === null) continue; // never delete outside the skill dir\n changes.push(this.removeContentFile(target, ctx.dryRun));\n }\n // Only remove the skill dir when WE own its full contents — never rm -rf a\n // dir that still holds user-added / sibling-tool / shared files.\n changes.push(this.removeDirIfEmpty(dir, ctx.dryRun));\n }\n return changes;\n }\n\n // ── Content surfaces: subagents ───────────────────────────────────────────\n // CONTENT-ONLY: pure native-file writers (no runtime dispatch, no home-bin\n // pointer, no telemetry wrap). Idempotent via writeContentFile, reversible via\n // removeContentFile. Honors platforms[\"codebuff\"].subagents === false.\n //\n // Native location: codebuff agents are executable TypeScript modules in the\n // PROJECT .agents/ dir — <projectDir>/.agents/<id>.ts (codebuff docs:\n // \"Create a new TypeScript file in .agents/\"). No user-scope agents dir is\n // documented, so user scope warn-skips (the warp/amp project-scoped precedent).\n\n /** Native subagent module path: <configDir>/<name>.ts (= .agents/<name>.ts). */\n private subagentPath(ctx: InstallContext, name: string): string {\n return join(this.getConfigDir(ctx), `${name}.ts`);\n }\n\n override installSubagents(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.platforms[HOST]?.subagents === false) {\n return [{ platform: this.id, action: \"skip\", detail: \"subagents disabled for codebuff\" }];\n }\n if (connector.subagents.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no subagents\" }];\n }\n // codebuff agents live in the PROJECT .agents/ dir; no user-scope agents dir\n // is documented, so user scope warn-skips (mirrors warp/amp project-scoped).\n if (ctx.scope !== \"project\") {\n return [\n {\n platform: this.id,\n action: \"warn\",\n detail:\n \"codebuff subagents are project-scoped only (.agents/*.ts; no documented \" +\n `user-scope agents dir); ${connector.subagents.length} skipped`,\n },\n ];\n }\n return connector.subagents.map((agent) =>\n this.writeContentFile(\n this.subagentPath(ctx, agent.name),\n this.renderSubagent(agent),\n ctx.dryRun,\n ),\n );\n }\n\n override uninstallSubagents(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.subagents.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no subagents\" }];\n }\n if (ctx.scope !== \"project\") {\n return [\n { platform: this.id, action: \"skip\", detail: \"codebuff subagents are project-scoped only\" },\n ];\n }\n return connector.subagents.map((agent) =>\n this.removeContentFile(this.subagentPath(ctx, agent.name), ctx.dryRun),\n );\n }\n\n /**\n * Render a subagent into a Codebuff `.agents/<id>.ts` AgentDefinition module:\n *\n * const definition = {\n * id: \"<name>\",\n * ...\n * };\n *\n * export default definition;\n *\n * Emitted WITHOUT the `import { AgentDefinition } from './types/agent-definition'`\n * line the docs show: that import is TYPE-ONLY (erased at runtime), so omitting\n * it avoids coupling the module to a generated types file that may not exist —\n * a bare object literal + default export is a complete, valid AgentDefinition.\n *\n * Field mapping (ONLY fields AC's SubagentDef can populate; nothing fabricated):\n * id ← name (already kebab-case → a valid codebuff id)\n * displayName ← name\n * spawnerPrompt ← description (the delegation hint)\n * model ← model (OMITTED when the connector declares none)\n * toolNames ← tools.allow (OMITTED when none declared)\n * instructionsPrompt ← prompt (the system prompt / instructions body)\n * SubagentDef.readonly is NOT mapped: Codebuff expresses tool access through the\n * `toolNames` allowlist and documents no read-only permission flag, and AC has no\n * verified read-only tool taxonomy to synthesize one — so a readonly hint is\n * carried only if the author restricts `tools.allow` themselves (or via `extra`).\n * `extra` is merged LAST as the documented escape hatch — the only way to reach\n * codebuff AgentDefinition fields AC does not model (version, outputMode,\n * spawnableAgents, inputSchema, …); its values come from the connector author,\n * never invented here.\n */\n private renderSubagent(agent: SubagentDef): string {\n const def: Record<string, unknown> = {\n id: agent.name,\n displayName: agent.name,\n spawnerPrompt: agent.description,\n };\n if (agent.model !== undefined) def.model = agent.model;\n const allow = agent.tools?.allow;\n if (allow && allow.length > 0) def.toolNames = [...allow];\n def.instructionsPrompt = agent.prompt;\n if (agent.extra) Object.assign(def, agent.extra);\n\n const body = Object.entries(def)\n .map(([k, v]) => renderAgentField(k, v))\n .join(\"\\n\");\n return `const definition = {\\n${body}\\n};\\n\\nexport default definition;\\n`;\n }\n\n // ── Hooks (unavailable — Codebuff is mcp-only) ────────────────────────────\n\n installHooks(_ctx: InstallContext): ChangeRecord[] {\n return [\n {\n platform: this.id,\n action: \"skip\",\n detail: \"hooks unavailable (Codebuff is mcp-only)\",\n },\n ];\n }\n\n uninstallHooks(_ctx: InstallContext): ChangeRecord[] {\n return [\n {\n platform: this.id,\n action: \"skip\",\n detail: \"hooks unavailable (Codebuff is mcp-only)\",\n },\n ];\n }\n\n // ── Diagnostics ──────────────────────────────────────────────────────────\n\n override getHealthChecks(ctx: InstallContext): readonly HealthCheck[] {\n const mcpPath = this.getServerConfigPath(ctx);\n const connectorId = ctx.connector.id;\n const checks: HealthCheck[] = [\n {\n name: `${this.name}: mcp.json present`,\n check: () =>\n existsSync(mcpPath)\n ? { status: \"OK\", detail: mcpPath }\n : { status: \"FAIL\", detail: `not found: ${mcpPath}` },\n },\n {\n name: `${this.name}: server entry registered`,\n check: () => {\n // Only assert what the connector declares: a server-less connector\n // never writes a server entry, so its absence is healthy.\n if (!ctx.connector.server) {\n return { status: \"OK\", detail: \"no MCP server declared\" };\n }\n const cfg = this.readJson<{ [k: string]: Record<string, unknown> }>(mcpPath);\n const bucket = cfg?.[MCP_ROOT_KEY];\n if (!cfg || !bucket) {\n return { status: \"FAIL\", detail: `no ${MCP_ROOT_KEY} in ${mcpPath}` };\n }\n return connectorId in bucket\n ? { status: \"OK\", detail: `${MCP_ROOT_KEY}.${connectorId} present` }\n : {\n status: \"FAIL\",\n detail: `no ${MCP_ROOT_KEY}.${connectorId} in ${mcpPath}`,\n };\n },\n },\n ];\n\n // Content-surface checks: assert presence only for the skills this connector\n // declares (a skill-less connector writes none, so absence is healthy).\n for (const skill of ctx.connector.skills) {\n const p = join(this.skillDir(ctx, skill.name), \"SKILL.md\");\n checks.push({\n name: `${this.name}: skill ${skill.name} present`,\n check: () =>\n existsSync(p) ? { status: \"OK\", detail: p } : { status: \"FAIL\", detail: `not found: ${p}` },\n });\n }\n // Subagent checks: codebuff agents are PROJECT-scoped .agents/*.ts modules,\n // so assert presence only at project scope (user scope warn-skips install).\n if (ctx.scope === \"project\") {\n for (const agent of ctx.connector.subagents) {\n const p = this.subagentPath(ctx, agent.name);\n checks.push({\n name: `${this.name}: subagent ${agent.name} present`,\n check: () =>\n existsSync(p) ? { status: \"OK\", detail: p } : { status: \"FAIL\", detail: `not found: ${p}` },\n });\n }\n }\n return checks;\n }\n}\n\nexport const adapter = new CodebuffAdapter();\nexport default adapter;\n"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,YAAY;AAqBrB,I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TomlString
|
|
4
7
|
} from "./chunk-OPXAP3AC.js";
|
|
8
|
+
import {
|
|
9
|
+
normalizeSessionSource
|
|
10
|
+
} from "./chunk-H53QZQJI.js";
|
|
5
11
|
import {
|
|
6
12
|
resolveEnvRefsDeep
|
|
7
13
|
} from "./chunk-DBQMX75U.js";
|
|
@@ -9,17 +15,19 @@ import {
|
|
|
9
15
|
BaseAdapter,
|
|
10
16
|
removeFromObjectMap,
|
|
11
17
|
upsertInObjectMap
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import
|
|
18
|
+
} from "./chunk-3I7UG52L.js";
|
|
19
|
+
import {
|
|
20
|
+
renderCommandMd,
|
|
21
|
+
renderSkillMd
|
|
22
|
+
} from "./chunk-IEGR4TP3.js";
|
|
14
23
|
import {
|
|
15
24
|
buildHomeBinHookCommand,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import "./chunk-N6HH7K6P.js";
|
|
25
|
+
buildWrappedStdio
|
|
26
|
+
} from "./chunk-TO57WYBB.js";
|
|
27
|
+
import "./chunk-ZY25RG4Y.js";
|
|
20
28
|
import {
|
|
21
29
|
ensureDir
|
|
22
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-QY42WGBX.js";
|
|
23
31
|
|
|
24
32
|
// src/adapters/codex/index.ts
|
|
25
33
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -140,16 +148,11 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
140
148
|
}
|
|
141
149
|
];
|
|
142
150
|
}
|
|
143
|
-
/** `$CODEX_HOME` || `~/.codex` for user
|
|
151
|
+
/** `$CODEX_HOME` (tilde-expanded, then resolved) || `~/.codex` for user
|
|
152
|
+
* scope. Shared with marketplace detection via `codexConfigHome` so the
|
|
153
|
+
* config writer and the install probe never target different dirs. */
|
|
144
154
|
userConfigDir() {
|
|
145
|
-
|
|
146
|
-
if (env && env.trim() !== "") {
|
|
147
|
-
if (env.startsWith("~")) {
|
|
148
|
-
return join(homedir(), env.replace(/^~[/\\]?/, ""));
|
|
149
|
-
}
|
|
150
|
-
return env;
|
|
151
|
-
}
|
|
152
|
-
return join(homedir(), ".codex");
|
|
155
|
+
return codexConfigHome();
|
|
153
156
|
}
|
|
154
157
|
// ── TOML config IO (override JSON helpers — config.toml is TOML) ─────────
|
|
155
158
|
readToml(path) {
|
|
@@ -365,7 +368,11 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
365
368
|
return [{ platform: this.id, action: "skip", detail: "connector declares no commands" }];
|
|
366
369
|
}
|
|
367
370
|
return connector.commands.map(
|
|
368
|
-
(cmd) => this.writeContentFile(
|
|
371
|
+
(cmd) => this.writeContentFile(
|
|
372
|
+
this.commandPath(cmd.name),
|
|
373
|
+
renderCommandMd(cmd, { includeToolsAndModel: false }),
|
|
374
|
+
ctx.dryRun
|
|
375
|
+
)
|
|
369
376
|
);
|
|
370
377
|
}
|
|
371
378
|
uninstallCommands(ctx) {
|
|
@@ -380,14 +387,6 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
380
387
|
(cmd) => this.removeContentFile(this.commandPath(cmd.name), ctx.dryRun)
|
|
381
388
|
);
|
|
382
389
|
}
|
|
383
|
-
/** Render a command to md+frontmatter (description, argument-hint). */
|
|
384
|
-
renderCommand(cmd) {
|
|
385
|
-
const frontmatter = {};
|
|
386
|
-
if (cmd.description !== void 0) frontmatter.description = cmd.description;
|
|
387
|
-
if (cmd.argumentHint !== void 0) frontmatter["argument-hint"] = cmd.argumentHint;
|
|
388
|
-
if (cmd.extra) Object.assign(frontmatter, cmd.extra);
|
|
389
|
-
return this.renderFrontmatterMd(frontmatter, cmd.prompt);
|
|
390
|
-
}
|
|
391
390
|
// ── Skills ───────────────────────────────────────────────────────────────
|
|
392
391
|
installSkills(ctx) {
|
|
393
392
|
const { connector } = ctx;
|
|
@@ -400,7 +399,7 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
400
399
|
const changes = [];
|
|
401
400
|
for (const skill of connector.skills) {
|
|
402
401
|
const dir = this.skillDir(ctx, skill.name);
|
|
403
|
-
const rendered =
|
|
402
|
+
const rendered = renderSkillMd(skill);
|
|
404
403
|
changes.push(this.writeContentFile(join(dir, "SKILL.md"), rendered, ctx.dryRun));
|
|
405
404
|
for (const [rel, contents] of Object.entries(skill.resources ?? {})) {
|
|
406
405
|
const target = this.resolveWithin(dir, rel);
|
|
@@ -459,25 +458,6 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
459
458
|
}
|
|
460
459
|
return changes;
|
|
461
460
|
}
|
|
462
|
-
/**
|
|
463
|
-
* Render a skill's SKILL.md: frontmatter (name, description + optional model,
|
|
464
|
-
* allowed-tools, disable-model-invocation) + body. UNIFORM with every other
|
|
465
|
-
* skill-supporting platform — only the parent dir differs.
|
|
466
|
-
*/
|
|
467
|
-
renderSkill(skill) {
|
|
468
|
-
const frontmatter = {
|
|
469
|
-
name: skill.name,
|
|
470
|
-
description: skill.description
|
|
471
|
-
};
|
|
472
|
-
if (skill.model !== void 0) frontmatter.model = skill.model;
|
|
473
|
-
const allow = skill.tools?.allow;
|
|
474
|
-
if (allow && allow.length > 0) frontmatter["allowed-tools"] = allow.join(", ");
|
|
475
|
-
if (skill.disableModelInvocation !== void 0) {
|
|
476
|
-
frontmatter["disable-model-invocation"] = skill.disableModelInvocation;
|
|
477
|
-
}
|
|
478
|
-
if (skill.extra) Object.assign(frontmatter, skill.extra);
|
|
479
|
-
return this.renderFrontmatterMd(frontmatter, skill.body);
|
|
480
|
-
}
|
|
481
461
|
// ── Subagents (TOML) ─────────────────────────────────────────────────────
|
|
482
462
|
installSubagents(ctx) {
|
|
483
463
|
const { connector } = ctx;
|
|
@@ -541,7 +521,7 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
541
521
|
isError: input.is_error ?? false
|
|
542
522
|
};
|
|
543
523
|
case "SessionStart":
|
|
544
|
-
return { ...base, source:
|
|
524
|
+
return { ...base, source: normalizeSessionSource(input.source) };
|
|
545
525
|
case "SessionEnd":
|
|
546
526
|
return { ...base, reason: input.message };
|
|
547
527
|
case "UserPromptSubmit":
|
|
@@ -708,11 +688,7 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
708
688
|
}
|
|
709
689
|
let command = server.command;
|
|
710
690
|
let args = [...server.args ?? []];
|
|
711
|
-
|
|
712
|
-
const wrapped = buildServeWrapperCommand(ctx.homeBinPath, ctx.connector.id, command, args, ctx.scope, this.id);
|
|
713
|
-
command = wrapped.command;
|
|
714
|
-
args = wrapped.args;
|
|
715
|
-
}
|
|
691
|
+
({ command, args } = buildWrappedStdio(ctx, server, this.id, command, args));
|
|
716
692
|
command = resolveEnvRefsDeep(command);
|
|
717
693
|
args = resolveEnvRefsDeep(args);
|
|
718
694
|
const entry = { command };
|
|
@@ -738,18 +714,6 @@ var CodexAdapter = class extends BaseAdapter {
|
|
|
738
714
|
const needle = ours.replace(/\\/g, "/");
|
|
739
715
|
return entry.hooks.some((h) => (h.command ?? "").replace(/\\/g, "/") === needle);
|
|
740
716
|
}
|
|
741
|
-
normalizeSource(raw) {
|
|
742
|
-
switch (raw) {
|
|
743
|
-
case "compact":
|
|
744
|
-
return "compact";
|
|
745
|
-
case "resume":
|
|
746
|
-
return "resume";
|
|
747
|
-
case "clear":
|
|
748
|
-
return "clear";
|
|
749
|
-
default:
|
|
750
|
-
return "startup";
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
717
|
};
|
|
754
718
|
var adapter = new CodexAdapter();
|
|
755
719
|
var codex_default = adapter;
|
|
@@ -758,4 +722,4 @@ export {
|
|
|
758
722
|
adapter,
|
|
759
723
|
codex_default as default
|
|
760
724
|
};
|
|
761
|
-
//# sourceMappingURL=codex-
|
|
725
|
+
//# sourceMappingURL=codex-5CZR5XKX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/adapters/codex/index.ts"],"sourcesContent":["/**\n * adapters/codex — Codex CLI platform adapter for agent-connector.\n *\n * Codex CLI hook paradigm is \"json-stdio\": the host pipes a JSON payload to a\n * command on stdin and reads JSON/exit-code back — the same wire protocol as\n * Claude Code (PascalCase fields, `hookSpecificOutput` reply wrapper).\n *\n * Two native config files live under the Codex config dir\n * (`$CODEX_HOME` || `~/.codex`, mirrored to `<projectDir>/.codex` for project\n * scope):\n * - config.toml → `[mcp_servers.<id>]` MCP registration (TOML, NO native\n * interpolation, so env-refs are resolved to literals at install time).\n * - hooks.json → Claude-compatible hook registration ({ matcher, hooks }).\n *\n * Grounded in context-mode's proven Codex adapter (configs/codex/{config.toml,\n * hooks.json}, src/adapters/codex/*) — exact TOML MCP shape + hook JSON schema.\n *\n * Known Codex limitations (upstream): PreToolUse deny works but updatedInput is\n * not yet honored (openai/codex#18491); PostToolUse updatedMCPToolOutput is\n * parsed-but-unsupported — hence canModifyArgs / canModifyOutput are false.\n *\n * E1 extension events (verified against developers.openai.com/codex/hooks):\n * - PermissionRequest — native, decision-capable via the nested\n * hookSpecificOutput.decision{behavior:\"allow\"|\"deny\", message?} envelope.\n * Codex docs: updatedInput / updatedPermissions / interrupt FAIL CLOSED on\n * this event, so they are never emitted here.\n * - SubagentStart — native; hookSpecificOutput.additionalContext is injected\n * as developer context for the subagent (not blockable).\n * - SubagentStop — native; the documented continuation shape is the TOP-LEVEL\n * {\"decision\":\"block\",\"reason\"} (Stop semantics: keeps the subagent going).\n * - PostToolUseFailure — NO Codex analog (PostToolUse only); declared hooks\n * for it warn-skip at install and the capability flag stays unset.\n * - PostCompact — native (Codex's hook system fires both PreCompact and\n * PostCompact); observe-only, normalizing the `trigger` (manual|auto)\n * exactly like PreCompact, with a passthrough formatReply.\n */\n\nimport { existsSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\n\nimport TOML from \"@iarna/toml\";\n\nimport type {\n ChangeRecord,\n DetectedPlatform,\n HealthCheck,\n HookEventName,\n HookParadigm,\n HookResponse,\n PlatformCapabilities,\n PlatformId,\n ServerDef,\n SkillDef,\n SubagentDef,\n} from \"../../core/types.js\";\nimport { ensureDir } from \"../../core/paths.js\";\nimport { codexConfigHome } from \"../../core/host-paths.js\";\nimport { resolveEnvRefsDeep } from \"../../core/interpolate.js\";\nimport {\n removeFromObjectMap,\n upsertInObjectMap,\n type ObjectMapCodec,\n} from \"../../core/object-map.js\";\nimport { writeTomlString } from \"../../core/toml.js\";\nimport {\n buildHomeBinHookCommand,\n buildWrappedStdio,\n} from \"../../core/spawn.js\";\nimport { renderCommandMd, renderSkillMd } from \"../claude-code/render.js\";\nimport { normalizeSessionSource } from \"../claude-code/wire.js\";\nimport { BaseAdapter, type HookMergeDescriptor } from \"../base.js\";\nimport type {\n HookReply,\n InstallContext,\n MemoryTarget,\n NormalizedEvent,\n} from \"../spi.js\";\n\n// ─────────────────────────────────────────────────────────────────────────\n// Native shapes\n// ─────────────────────────────────────────────────────────────────────────\n\n/** Raw Codex hook payload (PascalCase event, snake_case fields — Claude-style). */\ninterface CodexHookInput {\n tool_name?: string;\n tool_input?: Record<string, unknown>;\n tool_response?: string;\n session_id?: string;\n cwd?: string;\n hook_event_name?: string;\n source?: string;\n prompt?: string;\n is_error?: boolean;\n stop_hook_active?: boolean;\n trigger?: string;\n message?: string;\n // PostToolUseFailure-style failure field. Codex has NO failure event today;\n // parsed defensively only (the Claude-compatible wire would carry it).\n error?: string;\n // SubagentStart / SubagentStop (agent_type is the matcher subject).\n agent_id?: string;\n agent_type?: string;\n // SubagentStop only — the subagent's own transcript + final message.\n agent_transcript_path?: string;\n last_assistant_message?: string;\n}\n\n/** One hook entry inside hooks.json (Claude-compatible). */\ninterface CodexHookEntry {\n matcher?: string;\n hooks: Array<{ type: \"command\"; command: string }>;\n}\n\n/** Rendered `[mcp_servers.<id>]` table — string env table, no interpolation. */\ninterface CodexMcpEntry {\n // stdio transport\n command?: string;\n args?: string[];\n env?: Record<string, string>;\n // streamable HTTP transport (remote): codex infers the transport from `url`\n // (no explicit transport key). Verified against codex-cli 0.139.0.\n url?: string;\n bearer_token_env_var?: string;\n http_headers?: Record<string, string>;\n}\n\n/**\n * Codex hook events agent-connector registers, in the canonical → native order.\n * Codex uses the same PascalCase event names as Claude Code; the home-binary\n * hook command receives the lowercased event token.\n */\nconst CODEX_HOOK_EVENTS = [\n \"SessionStart\",\n \"PreToolUse\",\n \"PostToolUse\",\n \"PreCompact\",\n \"UserPromptSubmit\",\n \"Stop\",\n \"PermissionRequest\",\n \"SubagentStart\",\n \"SubagentStop\",\n \"PostCompact\",\n] as const;\n\ntype CodexHookEventName = (typeof CODEX_HOOK_EVENTS)[number];\n\n/**\n * Newer canonical events with NO Codex analog: Codex ships PostToolUse only —\n * there is no failure event on the live hooks page. Declared hooks for these\n * warn-skip at install so the degradation is reported, never silent. (The\n * legacy SessionEnd / Notification silent filter predates this convention and\n * is deliberately left untouched.)\n */\nconst WARN_SKIP_EVENTS: ReadonlySet<HookEventName> = new Set([\"PostToolUseFailure\"]);\n\n/**\n * PreToolUse matcher — canonical Codex tool names + bare MCP tool names +\n * external MCP catch-all literal. Charset-clean ([A-Za-z0-9_|] only) so Codex's\n * Rust `regex` exact-matcher short-circuits (no look-around, which Codex\n * rejects at boot). Copied from context-mode's proven matcher.\n */\nconst PRE_TOOL_USE_MATCHER =\n \"local_shell|shell|shell_command|exec_command|Bash|Shell|apply_patch|Edit|Write|grep_files|mcp__\";\n\n// ─────────────────────────────────────────────────────────────────────────\n// Adapter\n// ─────────────────────────────────────────────────────────────────────────\n\nexport class CodexAdapter extends BaseAdapter {\n readonly id: PlatformId = \"codex\";\n readonly name = \"Codex CLI\";\n readonly paradigm: HookParadigm = \"json-stdio\";\n\n readonly capabilities: PlatformCapabilities = {\n // Memory surface: AGENTS.md-first managed block. memoryTargets below probes\n // AGENTS.override.md first (it shadows AGENTS.md per directory on codex).\n supportsMemory: true,\n preToolUse: true,\n postToolUse: true,\n preCompact: true,\n sessionStart: true,\n sessionEnd: false,\n userPromptSubmit: true,\n stop: true,\n notification: false,\n // E1 events: PermissionRequest (decision-capable) + SubagentStart/Stop are\n // Codex-native. postToolUseFailure stays unset — Codex has no failure event,\n // so a declared hook for it warn-skips at install.\n permissionRequest: true,\n subagentStart: true,\n subagentStop: true,\n // PostCompact: Codex's hook system fires both PreCompact and PostCompact\n // (developers.openai.com/codex/hooks). Observational only — the reply\n // contract mirrors PreCompact (cannot block/modify a completed compaction).\n postCompact: true,\n canModifyArgs: false,\n canModifyOutput: false,\n canInjectSessionContext: true,\n transports: [\"stdio\", \"http\"],\n // Content surfaces: Codex implements all three.\n // command → ~/.codex/prompts/<name>.md (md+frontmatter, USER SCOPE ONLY)\n // skill → project: .codex/skills/<name>/SKILL.md · user: ~/.agents/skills/<name>/SKILL.md\n // subagent → <codexDir>/agents/<name>.toml (TOML)\n supportsCommands: true,\n supportsSkills: true,\n supportsSubagents: true,\n };\n\n // ── Detection ──────────────────────────────────────────────────────────\n\n detectInstalled(projectDir: string): DetectedPlatform {\n const userDir = this.userConfigDir();\n const projDir = join(projectDir, \".codex\");\n const userCfg = join(userDir, \"config.toml\");\n const projCfg = join(projDir, \"config.toml\");\n\n const userInstalled = existsSync(userDir) || existsSync(userCfg);\n const projInstalled = existsSync(projDir) || existsSync(projCfg);\n const installed = userInstalled || projInstalled;\n const scope = projInstalled && !userInstalled ? \"project\" : \"user\";\n const configPath = scope === \"project\" ? projCfg : userCfg;\n\n return {\n id: this.id,\n name: this.name,\n installed,\n paradigm: this.paradigm,\n capabilities: this.capabilities,\n configPath,\n scope,\n reason: installed\n ? `Found Codex config dir (${scope})`\n : `No .codex config dir at ${userDir} or ${projDir}`,\n confidence: installed ? \"high\" : \"low\",\n };\n }\n\n // ── Native paths ───────────────────────────────────────────────────────\n\n override getConfigDir(ctx: InstallContext): string {\n if (ctx.scope === \"project\") return join(ctx.projectDir, \".codex\");\n return this.userConfigDir();\n }\n\n override getServerConfigPath(ctx: InstallContext): string {\n return join(this.getConfigDir(ctx), \"config.toml\");\n }\n\n override getHookConfigPath(ctx: InstallContext): string {\n return join(this.getConfigDir(ctx), \"hooks.json\");\n }\n\n // ── Memory surface: AGENTS.override.md probe + 32 KiB doc-cap budget ─────\n // Codex reads AGENTS.override.md > AGENTS.md per directory (one file per\n // directory), so when the override file exists OUR block must live there or\n // it is never loaded. Combined project docs are capped at 32 KiB\n // (`project_doc_max_bytes`), hence the ~28 KiB per-file budget warn.\n protected override memoryTargets(ctx: InstallContext): MemoryTarget[] {\n // An explicit path override keeps the base resolution (escape hatch wins).\n if (this.memoryOverride(ctx)?.path) return super.memoryTargets(ctx);\n if (ctx.scope !== \"project\" && ctx.scope !== \"user\") return [];\n const budgetBytes = 28 * 1024;\n const dir = ctx.scope === \"project\" ? ctx.projectDir : this.userConfigDir();\n const overrideMd = join(dir, \"AGENTS.override.md\");\n if (existsSync(overrideMd)) {\n return [\n {\n path: overrideMd,\n reason: \"AGENTS.override.md shadows AGENTS.md on codex (one doc per directory)\",\n budgetBytes,\n },\n ];\n }\n return [\n {\n path: join(dir, \"AGENTS.md\"),\n reason:\n ctx.scope === \"project\"\n ? \"AGENTS.md standard (project root; codex is the format's originator)\"\n : \"codex global guidance ($CODEX_HOME/AGENTS.md)\",\n budgetBytes,\n },\n ];\n }\n\n /** `$CODEX_HOME` (tilde-expanded, then resolved) || `~/.codex` for user\n * scope. Shared with marketplace detection via `codexConfigHome` so the\n * config writer and the install probe never target different dirs. */\n private userConfigDir(): string {\n return codexConfigHome();\n }\n\n // ── TOML config IO (override JSON helpers — config.toml is TOML) ─────────\n\n private readToml(path: string): Record<string, unknown> {\n if (!existsSync(path)) return {};\n try {\n return TOML.parse(readFileSync(path, \"utf8\")) as Record<string, unknown>;\n } catch {\n return {};\n }\n }\n\n private writeToml(path: string, data: Record<string, unknown>, dryRun: boolean): void {\n if (dryRun) return;\n ensureDir(dirname(path));\n // @iarna/toml's stringify type wants its JsonMap; our object is structurally compatible.\n writeFileSync(path, TOML.stringify(data as never), \"utf8\");\n }\n\n /** An ObjectMapCodec over config.toml for the core/object-map engine.\n * `isPresentButUnparseable` is `() => false`: readToml fail-softs to {} and the\n * server path has historically coerced/overwritten rather than warn-skip on an\n * unparseable file — preserved here for byte-identical behavior. */\n private tomlObjectMapCodec(): ObjectMapCodec {\n return {\n parse: (path) => this.readToml(path),\n serialize: (path, data, dryRun) => this.writeToml(path, data, dryRun),\n isPresentButUnparseable: () => false,\n };\n }\n\n // ── Install server (config.toml → [mcp_servers.<id>]) ───────────────────\n\n override installServer(ctx: InstallContext): ChangeRecord[] {\n const { connector, dryRun } = ctx;\n const server = this.effectiveServer(ctx);\n const path = this.getServerConfigPath(ctx);\n\n if (!server) {\n return [{ platform: this.id, action: \"skip\", path, detail: \"no server declared\" }];\n }\n const isStdio = server.transport === \"stdio\" && !!server.command;\n const isHttp = server.transport === \"http\" && !!server.url;\n if (!isStdio && !isHttp) {\n // Codex config.toml [mcp_servers] supports stdio (command) + streamable\n // HTTP (url). Other remote transports (sse/ws) have no codex analog.\n return [\n {\n platform: this.id,\n action: \"skip\",\n path,\n detail: `transport \"${server.transport}\" not registrable in config.toml (stdio + streamable-http only)`,\n },\n ];\n }\n\n const entry = this.renderMcpEntry(ctx, server);\n\n return [\n upsertInObjectMap({\n codec: this.tomlObjectMapCodec(),\n rootKey: \"mcp_servers\",\n policy: \"coerce\",\n platform: this.id,\n configPath: path,\n entryId: connector.id,\n entry,\n dryRun,\n }),\n ];\n }\n\n override uninstallServer(ctx: InstallContext): ChangeRecord[] {\n const { connector, dryRun } = ctx;\n const path = this.getServerConfigPath(ctx);\n return [\n removeFromObjectMap({\n codec: this.tomlObjectMapCodec(),\n rootKey: \"mcp_servers\",\n policy: \"coerce\",\n platform: this.id,\n configPath: path,\n entryId: connector.id,\n dryRun,\n }),\n ];\n }\n\n // ── Install hooks (hooks.json) ──────────────────────────────────────────\n\n override installHooks(ctx: InstallContext): ChangeRecord[] {\n const path = this.getHookConfigPath(ctx);\n const events = this.effectiveHookEvents(ctx);\n const dropped = this.warnSkipHookEvents(ctx);\n\n if (events.length === 0 && dropped.length === 0) {\n return [{ platform: this.id, action: \"skip\", path, detail: \"no hooks declared\" }];\n }\n\n // HOST-ORDERED pending: warn-skip events (mapEvent → undefined → warn) FIRST,\n // then the supported events in CODEX_HOOK_EVENTS order. Events neither\n // supported nor in WARN_SKIP_EVENTS are never enqueued → silently dropped, as\n // before. matcher is \"\" for every item; renderEntry derives the real matcher\n // from the event (PreToolUse/PermissionRequest), never from this field.\n const pending = [\n ...dropped.map((event) => ({ event: event as string, matcher: \"\" })),\n ...events.map((event) => ({ event: event as string, matcher: \"\" })),\n ];\n return this.upsertHookEntries(ctx, path, pending, this.hookDescriptor(ctx));\n }\n\n override uninstallHooks(ctx: InstallContext): ChangeRecord[] {\n return this.removeHookEntries(ctx, this.getHookConfigPath(ctx), this.hookDescriptor(ctx));\n }\n\n /**\n * Codex hook-merge policy for the shared object-map engine. EVENT-SPECIFIC by\n * construction: every observable (coerce root + bucket, the path-normalized\n * per-event ownership find, the event-derived matcher with `hooks`-then-\n * `matcher` key order, the BARE `hooks.<event>` skip/remove details with NO\n * count, the warn wording, and the absent/no-match skips) is carried here so\n * the engine reproduces the prior in-adapter loop byte-for-byte.\n */\n private hookDescriptor(ctx: InstallContext): HookMergeDescriptor<CodexHookEntry> {\n return {\n // Codex's server path coerces a malformed root; the hook path matches it.\n malformedPolicy: \"coerce\",\n // Supported event → identity; a WARN_SKIP event (PostToolUseFailure, which\n // is the only thing `dropped` ever contains) → undefined → warn.\n mapEvent: (e) =>\n (CODEX_HOOK_EVENTS as readonly string[]).includes(e) ? e : undefined,\n unmappedWarnDetail: (e) => `${e} has no Codex hook equivalent — skipped`,\n renderEntry: (event, _matcher, command) => {\n const entry: CodexHookEntry = { hooks: [{ type: \"command\", command }] };\n // KEY ORDER: hooks THEN matcher. Matcher is EVENT-derived, not from the\n // connector's declared matcher: PermissionRequest matches tool names like\n // PreToolUse (charset-clean), everything else registers \"\" (all).\n entry.matcher =\n event === \"PreToolUse\" || event === \"PermissionRequest\" ? PRE_TOOL_USE_MATCHER : \"\";\n return entry;\n },\n // Idempotency find for the CANONICAL event the engine built `command` from —\n // path-normalized, exact-command, the body of isOurEntry's command check.\n entryOwnsCommand: (entry, command) =>\n Array.isArray(entry.hooks) &&\n entry.hooks.some(\n (h) => (h.command ?? \"\").replace(/\\\\/g, \"/\") === command.replace(/\\\\/g, \"/\"),\n ),\n // FLAT whole-entry removal, EVENT-SPECIFIC: isOurEntry rebuilds our command\n // from the event key being stripped, so a SubagentStop entry is never matched\n // while iterating the PreToolUse bucket.\n ownsEntryForRemove: (c, event) => (entry) =>\n this.isOurEntry(c, event as CodexHookEventName, entry),\n skipDetail: (e) => `hooks.${e}`,\n removeDetail: (e, _n) => `hooks.${e}`,\n absentDetail: \"no hooks.json\",\n noMatchDetail: \"no agent-connector hooks present\",\n // Uninstall scans EXACTLY codex's fixed event set (not Object.keys), so a\n // home-bin command hand-placed under a foreign event key is left untouched —\n // byte-identical to the prior `for (const event of CODEX_HOOK_EVENTS)` loop.\n removeEventKeys: CODEX_HOOK_EVENTS,\n };\n }\n\n // ── Health checks (default doctor renders these) ────────────────────────\n\n override getHealthChecks(ctx: InstallContext): readonly HealthCheck[] {\n const path = this.getServerConfigPath(ctx);\n const id = ctx.connector.id;\n const checks: HealthCheck[] = [\n {\n name: `${this.name}: config.toml exists`,\n check: () =>\n existsSync(path)\n ? { status: \"OK\", detail: path }\n : { status: \"FAIL\", detail: `not found: ${path}` },\n },\n {\n name: `${this.name}: mcp_servers.${id} registered`,\n check: () => {\n // Only assert what the connector declares (same rule as the\n // content-surface checks below): a server-less connector — e.g. a\n // catalog-only bundle of agents/skills/commands — never writes an\n // [mcp_servers.<id>] table, so its absence is healthy.\n if (!ctx.connector.server) {\n return { status: \"OK\", detail: \"no MCP server declared\" };\n }\n const cfg = this.readToml(path);\n const bucket = cfg[\"mcp_servers\"];\n const present =\n typeof bucket === \"object\" &&\n bucket !== null &&\n id in (bucket as Record<string, unknown>);\n return present\n ? { status: \"OK\", detail: `mcp_servers.${id}` }\n : { status: \"FAIL\", detail: `mcp_servers.${id} not found in ${path}` };\n },\n },\n ];\n\n // Content-surface checks: assert presence only for surfaces this connector\n // declares. Codex commands are user-scope only, so a project-scope install\n // won't have written them — only check command files in user scope.\n if (ctx.scope !== \"project\") {\n for (const cmd of ctx.connector.commands) {\n const p = this.commandPath(cmd.name);\n checks.push({\n name: `${this.name}: command ${cmd.name} present`,\n check: () =>\n existsSync(p) ? { status: \"OK\", detail: p } : { status: \"FAIL\", detail: `not found: ${p}` },\n });\n }\n }\n for (const skill of ctx.connector.skills) {\n const p = join(this.skillDir(ctx, skill.name), \"SKILL.md\");\n checks.push({\n name: `${this.name}: skill ${skill.name} present`,\n check: () =>\n existsSync(p) ? { status: \"OK\", detail: p } : { status: \"FAIL\", detail: `not found: ${p}` },\n });\n }\n for (const agent of ctx.connector.subagents) {\n const p = this.subagentPath(ctx, agent.name);\n checks.push({\n name: `${this.name}: subagent ${agent.name} present`,\n check: () =>\n existsSync(p) ? { status: \"OK\", detail: p } : { status: \"FAIL\", detail: `not found: ${p}` },\n });\n }\n return checks;\n }\n\n // ── Content surfaces: commands / skills / subagents ──────────────────────\n // CONTENT-ONLY: pure native-file writers. No runtime dispatch, no home-bin\n // pointer, no telemetry wrap. Each method is idempotent (byte-identical →\n // skip) via writeContentFile and reversible via removeContentFile. Honors\n // platforms[\"codex\"] per-surface false to skip.\n //\n // Native locations:\n // command → ~/.codex/prompts/<name>.md md+frontmatter(description,argument-hint)\n // USER SCOPE ONLY — project scope yields a single \"warn\".\n // skill → project: <projectDir>/.codex/skills/<name>/SKILL.md (+ resources)\n // user: ~/.agents/skills/<name>/SKILL.md (~/.codex/skills is deprecated)\n // subagent → <codexDir>/agents/<name>.toml TOML via writeTomlString\n\n /** Command files always live under the USER codex dir: ~/.codex/prompts. */\n private commandPath(name: string): string {\n return join(this.userConfigDir(), \"prompts\", `${name}.md`);\n }\n private skillDir(ctx: InstallContext, name: string): string {\n // Project scope: <projectDir>/.codex/skills/<name> — the Project config-layer\n // skills root (codex-rs/core-skills/src/loader.rs, ConfigLayerSource::Project),\n // NOT deprecated. User scope: $HOME/.agents/skills/<name> — codex's CURRENT\n // user skills root. The older $CODEX_HOME/skills (~/.codex/skills) is still\n // read but the loader labels it a \"Deprecated user skills location, kept for\n // backward compatibility\". .agents is anchored to the OS home (home_dir), NOT\n // $CODEX_HOME — so use homedir() here, never userConfigDir() (which honors\n // CODEX_HOME).\n if (ctx.scope === \"project\") return join(this.getConfigDir(ctx), \"skills\", name);\n return join(homedir(), \".agents\", \"skills\", name);\n }\n private subagentPath(ctx: InstallContext, name: string): string {\n return join(this.getConfigDir(ctx), \"agents\", `${name}.toml`);\n }\n\n // ── Commands (USER SCOPE ONLY) ───────────────────────────────────────────\n\n override installCommands(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.platforms[this.id]?.commands === false) {\n return [{ platform: this.id, action: \"skip\", detail: \"commands disabled for codex\" }];\n }\n if (ctx.scope === \"project\") {\n return [{ platform: this.id, action: \"warn\", detail: \"codex commands are user-scope only\" }];\n }\n if (connector.commands.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no commands\" }];\n }\n return connector.commands.map((cmd) =>\n this.writeContentFile(\n this.commandPath(cmd.name),\n renderCommandMd(cmd, { includeToolsAndModel: false }),\n ctx.dryRun,\n ),\n );\n }\n\n override uninstallCommands(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (ctx.scope === \"project\") {\n return [{ platform: this.id, action: \"warn\", detail: \"codex commands are user-scope only\" }];\n }\n if (connector.commands.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no commands\" }];\n }\n return connector.commands.map((cmd) =>\n this.removeContentFile(this.commandPath(cmd.name), ctx.dryRun),\n );\n }\n\n // ── Skills ───────────────────────────────────────────────────────────────\n\n override installSkills(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.platforms[this.id]?.skills === false) {\n return [{ platform: this.id, action: \"skip\", detail: \"skills disabled for codex\" }];\n }\n if (connector.skills.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no skills\" }];\n }\n const changes: ChangeRecord[] = [];\n for (const skill of connector.skills) {\n const dir = this.skillDir(ctx, skill.name);\n const rendered = renderSkillMd(skill);\n changes.push(this.writeContentFile(join(dir, \"SKILL.md\"), rendered, ctx.dryRun));\n // Bundle any resource files beside SKILL.md (relative path → contents).\n // Defense-in-depth: skip+warn on any key that escapes the skill dir\n // (config-time validation already rejects these, but never trust input).\n for (const [rel, contents] of Object.entries(skill.resources ?? {})) {\n const target = this.resolveWithin(dir, rel);\n if (target === null) {\n changes.push({\n platform: this.id,\n action: \"warn\",\n detail: `skill resource \"${rel}\" escapes the skill dir; skipped`,\n });\n continue;\n }\n changes.push(this.writeContentFile(target, contents, ctx.dryRun));\n }\n // Migrate away an AC-owned copy at the deprecated user skills root so the\n // skill is not double-registered after the move to ~/.agents/skills.\n changes.push(...this.migrateDeprecatedUserSkill(ctx, skill, rendered));\n }\n return changes;\n }\n\n /**\n * One-time, opt-out-safe migration: prior AC versions wrote user-scope skills\n * to the now-deprecated $CODEX_HOME/skills/<name> root, which codex STILL reads\n * (kept for backward compatibility). Once we write the same skill to the current\n * ~/.agents/skills root, codex would register it TWICE (same frontmatter name,\n * two User-scope roots). If a SKILL.md exists at the deprecated path AND is\n * byte-identical to what we render — i.e. AC-owned, not hand-authored — remove\n * it (and its now-empty dir). The content-equality guard guarantees we never\n * delete a skill a user placed there by hand. No-op for project scope (where\n * .codex/skills is the valid, non-deprecated Project config-layer path) and when\n * a custom CODEX_HOME would make the deprecated path coincide with the new one.\n */\n private migrateDeprecatedUserSkill(\n ctx: InstallContext,\n skill: SkillDef,\n rendered: string,\n ): ChangeRecord[] {\n if (ctx.scope === \"project\") return [];\n const deprecated = join(this.userConfigDir(), \"skills\", skill.name, \"SKILL.md\");\n // Never touch the file we just wrote (pathological CODEX_HOME === ~/.agents).\n if (deprecated === join(this.skillDir(ctx, skill.name), \"SKILL.md\")) return [];\n if (!existsSync(deprecated)) return [];\n if (readFileSync(deprecated, \"utf8\") !== rendered) return []; // hand-authored — leave it\n return [\n this.removeContentFile(deprecated, ctx.dryRun),\n this.removeDirIfEmpty(dirname(deprecated), ctx.dryRun),\n ];\n }\n\n override uninstallSkills(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.skills.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no skills\" }];\n }\n const changes: ChangeRecord[] = [];\n for (const skill of connector.skills) {\n const dir = this.skillDir(ctx, skill.name);\n // Remove only the files we wrote (SKILL.md + declared resources), then the\n // skill dir itself when we own its full contents.\n changes.push(this.removeContentFile(join(dir, \"SKILL.md\"), ctx.dryRun));\n for (const rel of Object.keys(skill.resources ?? {})) {\n const target = this.resolveWithin(dir, rel);\n if (target === null) continue; // never delete outside the skill dir\n changes.push(this.removeContentFile(target, ctx.dryRun));\n }\n // Only remove the skill dir when WE own its full contents — never rm -rf a\n // dir that still holds user-added / sibling-tool / shared files.\n changes.push(this.removeDirIfEmpty(dir, ctx.dryRun));\n }\n return changes;\n }\n\n // ── Subagents (TOML) ─────────────────────────────────────────────────────\n\n override installSubagents(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.platforms[this.id]?.subagents === false) {\n return [{ platform: this.id, action: \"skip\", detail: \"subagents disabled for codex\" }];\n }\n if (connector.subagents.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no subagents\" }];\n }\n return connector.subagents.map((agent) =>\n this.writeContentFile(this.subagentPath(ctx, agent.name), this.renderSubagent(agent), ctx.dryRun),\n );\n }\n\n override uninstallSubagents(ctx: InstallContext): ChangeRecord[] {\n const { connector } = ctx;\n if (connector.subagents.length === 0) {\n return [{ platform: this.id, action: \"skip\", detail: \"connector declares no subagents\" }];\n }\n return connector.subagents.map((agent) =>\n this.removeContentFile(this.subagentPath(ctx, agent.name), ctx.dryRun),\n );\n }\n\n /**\n * Render a subagent to a Codex agent TOML file:\n * { name, description, developer_instructions: prompt, model }.\n * model is omitted when undefined so Codex applies its default.\n */\n private renderSubagent(agent: SubagentDef): string {\n const table: Record<string, unknown> = {\n name: agent.name,\n description: agent.description,\n developer_instructions: agent.prompt,\n };\n if (agent.model !== undefined) table.model = agent.model;\n if (agent.extra) Object.assign(table, agent.extra);\n return writeTomlString(table);\n }\n\n // ── Runtime dispatch ────────────────────────────────────────────────────\n\n parseEvent(event: HookEventName, raw: unknown): NormalizedEvent {\n const input = (raw ?? {}) as CodexHookInput;\n const base = {\n hostPlatform: this.id,\n connectorId: \"\",\n sessionId: input.session_id ?? `pid-${process.ppid}`,\n projectDir: input.cwd ?? process.env.CODEX_PROJECT_DIR ?? process.cwd(),\n raw,\n };\n\n switch (event) {\n case \"PreToolUse\":\n return {\n ...base,\n toolName: input.tool_name ?? \"\",\n toolInput: input.tool_input ?? {},\n };\n case \"PostToolUse\":\n return {\n ...base,\n toolName: input.tool_name ?? \"\",\n toolInput: input.tool_input ?? {},\n toolOutput: input.tool_response,\n isError: input.is_error ?? false,\n };\n case \"SessionStart\":\n return { ...base, source: normalizeSessionSource(input.source) };\n case \"SessionEnd\":\n return { ...base, reason: input.message };\n case \"UserPromptSubmit\":\n return { ...base, prompt: input.prompt ?? \"\" };\n case \"PreCompact\":\n return { ...base, trigger: input.trigger === \"manual\" ? \"manual\" : \"auto\" };\n case \"PostCompact\":\n // Post-compaction sibling of PreCompact — same `trigger` normalization\n // (manual|auto), observe-only. Codex's PostCompact payload mirrors\n // PreCompact's; everything else rides on `raw`.\n return { ...base, trigger: input.trigger === \"manual\" ? \"manual\" : \"auto\" };\n case \"Stop\":\n return { ...base, stopHookActive: input.stop_hook_active ?? false };\n case \"Notification\":\n return { ...base, message: input.message ?? \"\" };\n case \"PermissionRequest\":\n // Codex documents tool_name/tool_input (+tool_input.description); it has\n // no permission_suggestions field, so the normalized optional stays unset.\n return {\n ...base,\n toolName: input.tool_name ?? \"\",\n toolInput: input.tool_input ?? {},\n };\n case \"PostToolUseFailure\":\n // No Codex analog — never fired natively. Parsed defensively (Claude-\n // compatible wire) so a manual `hook codex PostToolUseFailure` invocation\n // still normalizes instead of throwing.\n return {\n ...base,\n toolName: input.tool_name ?? \"\",\n toolInput: input.tool_input ?? {},\n error: input.error ?? \"\",\n };\n case \"SubagentStart\":\n return {\n ...base,\n ...(typeof input.agent_id === \"string\" ? { agentId: input.agent_id } : {}),\n ...(typeof input.agent_type === \"string\" ? { agentType: input.agent_type } : {}),\n };\n case \"SubagentStop\":\n // agent_id/agent_type stay optional — never depend on hosts populating\n // them on stop (the Claude-family SDK quirk).\n return {\n ...base,\n ...(typeof input.agent_id === \"string\" ? { agentId: input.agent_id } : {}),\n ...(typeof input.agent_type === \"string\" ? { agentType: input.agent_type } : {}),\n ...(typeof input.agent_transcript_path === \"string\"\n ? { agentTranscriptPath: input.agent_transcript_path }\n : {}),\n ...(typeof input.last_assistant_message === \"string\"\n ? { lastAssistantMessage: input.last_assistant_message }\n : {}),\n ...(typeof input.stop_hook_active === \"boolean\"\n ? { stopHookActive: input.stop_hook_active }\n : {}),\n };\n }\n }\n\n formatReply(event: HookEventName, response: HookResponse): HookReply {\n // Codex (like Claude Code) reads a `hookSpecificOutput` JSON wrapper from\n // stdout; exit code 0 = allow. Fields the host cannot honor are dropped.\n\n // PermissionRequest uses Codex's nested decision{behavior} envelope and is\n // the ONE event where an EXPLICIT \"allow\" is an ACTIVE grant (suppresses the\n // approval prompt). ask/context/void → NO decision output: fall through to\n // the normal approval flow (the prompt IS the ask). Codex docs: updatedInput\n // / updatedPermissions / interrupt FAIL CLOSED on this event, so \"modify\"\n // also falls through — emitting a bare allow would grant the ORIGINAL input\n // the handler wanted rewritten.\n if (event === \"PermissionRequest\") {\n if (response.decision === \"deny\") {\n return {\n exitCode: 0,\n stdout: JSON.stringify({\n hookSpecificOutput: {\n hookEventName: \"PermissionRequest\",\n decision: {\n behavior: \"deny\",\n message: response.reason ?? \"Blocked by hook\",\n },\n },\n }),\n };\n }\n if (response.decision === \"allow\") {\n return {\n exitCode: 0,\n stdout: JSON.stringify({\n hookSpecificOutput: {\n hookEventName: \"PermissionRequest\",\n decision: { behavior: \"allow\" },\n },\n }),\n };\n }\n return { exitCode: 0 };\n }\n\n // SubagentStart is observe/context-only on Codex (continue:false is parsed\n // but does not stop the subagent): \"context\" injects additionalContext as\n // developer context for the SUBAGENT, and a \"deny\" DEGRADES to the same\n // shape carrying the reason.\n if (event === \"SubagentStart\") {\n const context =\n response.decision === \"context\"\n ? response.additionalContext\n : response.decision === \"deny\"\n ? response.reason ?? response.additionalContext\n : undefined;\n if (context) {\n return {\n exitCode: 0,\n stdout: JSON.stringify({\n hookSpecificOutput: {\n hookEventName: \"SubagentStart\",\n additionalContext: context,\n },\n }),\n };\n }\n return { exitCode: 0 };\n }\n\n if (response.decision === \"deny\") {\n // PreToolUse deny is honored; other events fail-open to allow.\n if (event === \"PreToolUse\") {\n return {\n exitCode: 0,\n stdout: JSON.stringify({\n hookSpecificOutput: {\n hookEventName: \"PreToolUse\",\n permissionDecision: \"deny\",\n permissionDecisionReason: response.reason ?? \"Blocked by hook\",\n },\n }),\n };\n }\n // SubagentStop deny = Stop semantics: the documented continuation shape is\n // the TOP-LEVEL {\"decision\":\"block\",\"reason\"} (keeps the subagent going\n // with `reason` as its next instruction).\n if (event === \"SubagentStop\") {\n return {\n exitCode: 0,\n stdout: JSON.stringify({\n decision: \"block\",\n reason: response.reason ?? \"Blocked by hook\",\n }),\n };\n }\n return { exitCode: 0 };\n }\n\n // Context injection: honored on SessionStart and PostToolUse (additionalContext).\n // (SubagentStop accepts only the common output fields — no additionalContext.)\n if (response.additionalContext && (event === \"SessionStart\" || event === \"PostToolUse\")) {\n return {\n exitCode: 0,\n stdout: JSON.stringify({\n hookSpecificOutput: {\n hookEventName: event,\n additionalContext: response.additionalContext,\n },\n }),\n };\n }\n\n // \"allow\" / unsupported-on-Codex (modify, ask) → passthrough.\n return { exitCode: 0 };\n }\n\n // ── Internal helpers ────────────────────────────────────────────────────\n\n /** Resolve the per-platform server override into an effective ServerDef. */\n private effectiveServer(ctx: InstallContext): ServerDef | undefined {\n const override = ctx.connector.platforms[this.id]?.server;\n if (override === false) return undefined;\n const base = ctx.connector.server;\n if (!base) return undefined;\n return override ? { ...base, ...override } : base;\n }\n\n /** Which canonical hook events to register for Codex, honoring overrides. */\n private effectiveHookEvents(ctx: InstallContext): CodexHookEventName[] {\n const override = ctx.connector.platforms[this.id]?.hooks;\n if (override === false) return [];\n return CODEX_HOOK_EVENTS.filter((e) => ctx.connector.hookEvents.includes(e));\n }\n\n /** Declared events Codex has no analog for — install reports a warn-skip. */\n private warnSkipHookEvents(ctx: InstallContext): HookEventName[] {\n const override = ctx.connector.platforms[this.id]?.hooks;\n if (override === false) return [];\n return ctx.connector.hookEvents.filter((e) => WARN_SKIP_EVENTS.has(e));\n }\n\n /**\n * Render the `[mcp_servers.<id>]` table. TOML has NO interpolation, so every\n * `${env:VAR}` is resolved to a literal at install time. The env table is a\n * plain string→string map. Honors the telemetry serve-wrapper.\n */\n private renderMcpEntry(ctx: InstallContext, server: ServerDef): CodexMcpEntry {\n // Streamable HTTP server: codex infers the transport from `url` (no explicit\n // transport key). VERIFIED against codex-cli 0.139.0 — `codex mcp add <id>\n // --url <U> --bearer-token-env-var <E>` writes:\n // [mcp_servers.<id>]\n // url = \"…\"\n // bearer_token_env_var = \"…\" (only with bearerEnv auth)\n // Telemetry serve-wrapping is stdio-only (remote cannot be intercepted).\n // installServer's guard only lets stdio+command or http+url reach here, so\n // this branch is exactly the streamable-HTTP case (lock-step with the guard).\n if (server.transport === \"http\") {\n const remote: CodexMcpEntry = { url: resolveEnvRefsDeep(server.url ?? \"\") };\n if (server.auth?.type === \"bearerEnv\" && server.auth.bearerEnvVar) {\n remote.bearer_token_env_var = server.auth.bearerEnvVar;\n }\n if (server.headers && Object.keys(server.headers).length > 0) {\n const headers: Record<string, string> = {};\n for (const [k, v] of Object.entries(resolveEnvRefsDeep(server.headers))) {\n headers[k] = String(v);\n }\n remote.http_headers = headers;\n }\n return remote;\n }\n let command = server.command as string;\n let args = [...(server.args ?? [])];\n\n ({ command, args } = buildWrappedStdio(ctx, server, this.id, command, args));\n\n // Resolve env-refs to literals (TOML cannot interpolate).\n command = resolveEnvRefsDeep(command);\n args = resolveEnvRefsDeep(args);\n\n const entry: CodexMcpEntry = { command };\n if (args.length > 0) entry.args = args;\n\n if (server.env && Object.keys(server.env).length > 0) {\n const env: Record<string, string> = {};\n for (const [k, v] of Object.entries(resolveEnvRefsDeep(server.env))) {\n env[k] = String(v);\n }\n entry.env = env;\n }\n return entry;\n }\n\n /**\n * Does this hooks.json entry belong to this connector for `event`? EVENT-\n * SPECIFIC + path-normalized exact-command match. The engine binds this per\n * event in the uninstall (whole-entry FLAT removal) and the install idempotency\n * find reuses its command body via the descriptor's entryOwnsCommand.\n */\n private isOurEntry(ctx: InstallContext, event: CodexHookEventName, entry: CodexHookEntry): boolean {\n if (!entry || typeof entry !== \"object\" || !Array.isArray(entry.hooks)) return false;\n const ours = buildHomeBinHookCommand(ctx.homeBinPath, \"codex\", event, ctx.connector.id);\n const needle = ours.replace(/\\\\/g, \"/\");\n return entry.hooks.some((h) => (h.command ?? \"\").replace(/\\\\/g, \"/\") === needle);\n }\n}\n\nexport const adapter = new CodexAdapter();\nexport default adapter;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,YAAY,cAAc,qBAAqB;AACxD,SAAS,eAAe;AACxB,SAAS,SAAS,YAAY;AAE9B,OAAO,UAAU;AA2FjB,IAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAWA,IAAM,mBAA+C,oBAAI,IAAI,CAAC,oBAAoB,CAAC;AAQnF,IAAM,uBACJ;AAMK,IAAM,eAAN,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,kBAAkB,KAAK,QAAQ,KAAK,IAAI,SAAS,IAAI;AAG1E,cAAU,mBAAmB,OAAO;AACpC,WAAO,mBAAmB,IAAI;AAE9B,UAAM,QAAuB,EAAE,QAAQ;AACvC,QAAI,KAAK,SAAS,EAAG,OAAM,OAAO;AAElC,QAAI,OAAO,OAAO,OAAO,KAAK,OAAO,GAAG,EAAE,SAAS,GAAG;AACpD,YAAM,MAA8B,CAAC;AACrC,iBAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,mBAAmB,OAAO,GAAG,CAAC,GAAG;AACnE,YAAI,CAAC,IAAI,OAAO,CAAC;AAAA,MACnB;AACA,YAAM,MAAM;AAAA,IACd;AACA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQQ,WAAW,KAAqB,OAA2B,OAAgC;AACjG,QAAI,CAAC,SAAS,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM,KAAK,EAAG,QAAO;AAC/E,UAAM,OAAO,wBAAwB,IAAI,aAAa,SAAS,OAAO,IAAI,UAAU,EAAE;AACtF,UAAM,SAAS,KAAK,QAAQ,OAAO,GAAG;AACtC,WAAO,MAAM,MAAM,KAAK,CAAC,OAAO,EAAE,WAAW,IAAI,QAAQ,OAAO,GAAG,MAAM,MAAM;AAAA,EACjF;AACF;AAEO,IAAM,UAAU,IAAI,aAAa;AACxC,IAAO,gBAAQ;","names":[]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
firstExistingRoot,
|
|
8
8
|
walkFiles
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-O7SDRBVB.js";
|
|
10
10
|
import {
|
|
11
11
|
emptyTokens,
|
|
12
12
|
inferProvider,
|
|
@@ -361,4 +361,4 @@ var codex_default = codexReader;
|
|
|
361
361
|
export {
|
|
362
362
|
codex_default as default
|
|
363
363
|
};
|
|
364
|
-
//# sourceMappingURL=codex-
|
|
364
|
+
//# sourceMappingURL=codex-YAORPCOD.js.map
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readYaml,
|
|
4
4
|
writeYaml
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2RPHDVHW.js";
|
|
6
6
|
import {
|
|
7
7
|
extractSessionId,
|
|
8
|
+
normalizeSessionSource,
|
|
8
9
|
toolResponseToString
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H53QZQJI.js";
|
|
10
11
|
import {
|
|
11
12
|
resolveEnvRefsDeep
|
|
12
13
|
} from "./chunk-DBQMX75U.js";
|
|
13
14
|
import {
|
|
14
15
|
BaseAdapter
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-3I7UG52L.js";
|
|
17
|
+
import "./chunk-IEGR4TP3.js";
|
|
17
18
|
import {
|
|
18
19
|
buildHomeBinHookCommand,
|
|
19
|
-
|
|
20
|
-
isHomeBinHookCommand
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-TRQKHP7D.js";
|
|
20
|
+
buildWrappedStdio,
|
|
21
|
+
isHomeBinHookCommand
|
|
22
|
+
} from "./chunk-TO57WYBB.js";
|
|
23
|
+
import "./chunk-ZY25RG4Y.js";
|
|
24
|
+
import "./chunk-QY42WGBX.js";
|
|
25
25
|
|
|
26
26
|
// src/adapters/continue/index.ts
|
|
27
27
|
import { existsSync, statSync } from "fs";
|
|
@@ -298,18 +298,7 @@ var ContinueAdapter = class extends BaseAdapter {
|
|
|
298
298
|
if (transport === "stdio") {
|
|
299
299
|
let command = server.command ?? "";
|
|
300
300
|
let args = [...server.args ?? []];
|
|
301
|
-
|
|
302
|
-
const wrapped = buildServeWrapperCommand(
|
|
303
|
-
ctx.homeBinPath,
|
|
304
|
-
ctx.connector.id,
|
|
305
|
-
command,
|
|
306
|
-
args,
|
|
307
|
-
ctx.scope,
|
|
308
|
-
this.id
|
|
309
|
-
);
|
|
310
|
-
command = wrapped.command;
|
|
311
|
-
args = wrapped.args;
|
|
312
|
-
}
|
|
301
|
+
({ command, args } = buildWrappedStdio(ctx, server, this.id, command, args));
|
|
313
302
|
command = resolveEnvRefsDeep(command);
|
|
314
303
|
args = resolveEnvRefsDeep(args);
|
|
315
304
|
const entry = {
|
|
@@ -770,18 +759,6 @@ var ContinueAdapter = class extends BaseAdapter {
|
|
|
770
759
|
return override && typeof override === "object" ? { ...base, ...override } : base;
|
|
771
760
|
}
|
|
772
761
|
};
|
|
773
|
-
function normalizeSessionSource(source) {
|
|
774
|
-
switch (source) {
|
|
775
|
-
case "compact":
|
|
776
|
-
return "compact";
|
|
777
|
-
case "resume":
|
|
778
|
-
return "resume";
|
|
779
|
-
case "clear":
|
|
780
|
-
return "clear";
|
|
781
|
-
default:
|
|
782
|
-
return "startup";
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
762
|
var adapter = new ContinueAdapter();
|
|
786
763
|
var continue_default = adapter;
|
|
787
764
|
export {
|
|
@@ -789,4 +766,4 @@ export {
|
|
|
789
766
|
adapter,
|
|
790
767
|
continue_default as default
|
|
791
768
|
};
|
|
792
|
-
//# sourceMappingURL=continue-
|
|
769
|
+
//# sourceMappingURL=continue-3AGXWM5W.js.map
|