@ken-jo/agent-connector 0.4.95 → 0.4.97

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.
Files changed (378) hide show
  1. package/LICENSE +202 -202
  2. package/NOTICE +6 -6
  3. package/README.md +605 -599
  4. package/dist/{action-Q7GGO4PA.js → action-IPFDPOZU.js} +16 -16
  5. package/dist/action-IPFDPOZU.js.map +1 -0
  6. package/dist/{amazon-q-ETMAGY3D.js → amazon-q-IT44LEWV.js} +6 -6
  7. package/dist/amazon-q-IT44LEWV.js.map +1 -0
  8. package/dist/{amp-BQZOL5GR.js → amp-CEWOSWQO.js} +4 -4
  9. package/dist/amp-CEWOSWQO.js.map +1 -0
  10. package/dist/{amp-67BZONGF.js → amp-P35FRU2Z.js} +7 -7
  11. package/dist/amp-P35FRU2Z.js.map +1 -0
  12. package/dist/{antigravity-EA4L225L.js → antigravity-LHFEFNMC.js} +5 -5
  13. package/dist/antigravity-LHFEFNMC.js.map +1 -0
  14. package/dist/antigravity-TWIWXTQH.js +18 -0
  15. package/dist/{antigravity-cli-B2HXZFYQ.js → antigravity-cli-MOKFSWOU.js} +5 -5
  16. package/dist/antigravity-cli-MOKFSWOU.js.map +1 -0
  17. package/dist/{antigravity-cli-OM6SC3PE.js → antigravity-cli-MPE27LPI.js} +9 -9
  18. package/dist/antigravity-cli-MPE27LPI.js.map +1 -0
  19. package/dist/audit-3E5JAOP2.js +311 -0
  20. package/dist/audit-3E5JAOP2.js.map +1 -0
  21. package/dist/{chunk-PW42ZXCB.js → chunk-3EP5V2F4.js} +3 -3
  22. package/dist/chunk-3EP5V2F4.js.map +1 -0
  23. package/dist/{chunk-MGTDQLJJ.js → chunk-3FINQ2ZF.js} +4 -4
  24. package/dist/chunk-3FINQ2ZF.js.map +1 -0
  25. package/dist/{chunk-KHO5WNTP.js → chunk-4GH2KA7V.js} +1 -1
  26. package/dist/chunk-4GH2KA7V.js.map +1 -0
  27. package/dist/{chunk-2Y2MZRLP.js → chunk-7C2IPIIB.js} +3 -3
  28. package/dist/chunk-7C2IPIIB.js.map +1 -0
  29. package/dist/{chunk-NLE2J5P4.js → chunk-7HHW23AC.js} +29 -29
  30. package/dist/chunk-7HHW23AC.js.map +1 -0
  31. package/dist/{chunk-XD7MY6HB.js → chunk-7PSNXUFK.js} +1 -1
  32. package/dist/chunk-7PSNXUFK.js.map +1 -0
  33. package/dist/{chunk-5IOTP7LQ.js → chunk-7ZFK2WEO.js} +7 -5
  34. package/dist/chunk-7ZFK2WEO.js.map +1 -0
  35. package/dist/{chunk-XC5SJ35F.js → chunk-C63AAXK7.js} +5 -5
  36. package/dist/chunk-C63AAXK7.js.map +1 -0
  37. package/dist/{chunk-UM5S7DKK.js → chunk-C747DYNT.js} +1 -1
  38. package/dist/chunk-C747DYNT.js.map +1 -0
  39. package/dist/{chunk-YPAXJ7EW.js → chunk-FHYR5Q5T.js} +13 -13
  40. package/dist/chunk-FHYR5Q5T.js.map +1 -0
  41. package/dist/{chunk-I5UXHIDT.js → chunk-GCPEPUD7.js} +8 -8
  42. package/dist/chunk-GCPEPUD7.js.map +1 -0
  43. package/dist/{chunk-ISEJWBFF.js → chunk-GZZCHJDP.js} +2 -2
  44. package/dist/chunk-GZZCHJDP.js.map +1 -0
  45. package/dist/{chunk-UMQ6NBQR.js → chunk-ILWHLGIC.js} +2 -2
  46. package/dist/chunk-ILWHLGIC.js.map +1 -0
  47. package/dist/{chunk-IVAWP6HH.js → chunk-IOJDZJ72.js} +2 -2
  48. package/dist/chunk-IOJDZJ72.js.map +1 -0
  49. package/dist/{chunk-NBYKLUF6.js → chunk-KFPSJRHR.js} +2 -2
  50. package/dist/chunk-KFPSJRHR.js.map +1 -0
  51. package/dist/{chunk-O7SDRBVB.js → chunk-KM2YXO6V.js} +1 -1
  52. package/dist/chunk-KM2YXO6V.js.map +1 -0
  53. package/dist/{chunk-7F5KHLEP.js → chunk-L2C5UMKW.js} +4 -4
  54. package/dist/chunk-L2C5UMKW.js.map +1 -0
  55. package/dist/{chunk-OP4KBXUO.js → chunk-LFWYYWLV.js} +1 -1
  56. package/dist/chunk-LFWYYWLV.js.map +1 -0
  57. package/dist/{chunk-APZDTY76.js → chunk-LQ55E7QI.js} +7 -7
  58. package/dist/chunk-LQ55E7QI.js.map +1 -0
  59. package/dist/{chunk-PAPMUAR5.js → chunk-MLU7NDAZ.js} +12 -12
  60. package/dist/chunk-MLU7NDAZ.js.map +1 -0
  61. package/dist/{chunk-H33M77DD.js → chunk-N4ENLZEU.js} +22 -19
  62. package/dist/chunk-N4ENLZEU.js.map +1 -0
  63. package/dist/{chunk-D4ELPBB5.js → chunk-NDMNMAKP.js} +43 -43
  64. package/dist/chunk-NDMNMAKP.js.map +1 -0
  65. package/dist/{chunk-H53QZQJI.js → chunk-PSGTHJQU.js} +1 -1
  66. package/dist/chunk-PSGTHJQU.js.map +1 -0
  67. package/dist/{chunk-FBJQGRET.js → chunk-Q4ISQHUQ.js} +1 -1
  68. package/dist/chunk-Q4ISQHUQ.js.map +1 -0
  69. package/dist/{chunk-6TF7MHG5.js → chunk-Q7PR2WGT.js} +2 -2
  70. package/dist/chunk-Q7PR2WGT.js.map +1 -0
  71. package/dist/{chunk-GZGLCCEE.js → chunk-QYOUQCC6.js} +1 -1
  72. package/dist/chunk-QYOUQCC6.js.map +1 -0
  73. package/dist/{chunk-Z2MRSS2I.js → chunk-SLJI5BOM.js} +2 -2
  74. package/dist/chunk-SLJI5BOM.js.map +1 -0
  75. package/dist/{chunk-JKKU2WKG.js → chunk-TGZFDXNH.js} +4 -4
  76. package/dist/chunk-TGZFDXNH.js.map +1 -0
  77. package/dist/{chunk-FJCUKXGX.js → chunk-THI4PI4H.js} +2 -2
  78. package/dist/chunk-THI4PI4H.js.map +1 -0
  79. package/dist/{chunk-MQPNU2CY.js → chunk-UZZTWWGG.js} +1 -1
  80. package/dist/chunk-UZZTWWGG.js.map +1 -0
  81. package/dist/{chunk-3NH2ARIS.js → chunk-WPTNMYYM.js} +2 -2
  82. package/dist/chunk-WPTNMYYM.js.map +1 -0
  83. package/dist/{chunk-OPXAP3AC.js → chunk-XN7S44U4.js} +1 -1
  84. package/dist/chunk-XN7S44U4.js.map +1 -0
  85. package/dist/{chunk-6WZODR3Z.js → chunk-XVEJAFKW.js} +5 -5
  86. package/dist/chunk-XVEJAFKW.js.map +1 -0
  87. package/dist/{chunk-BEFVJ2OE.js → chunk-XXLCMSD3.js} +1 -1
  88. package/dist/chunk-XXLCMSD3.js.map +1 -0
  89. package/dist/{chunk-YT43MUSJ.js → chunk-XZWMJLIT.js} +1 -1
  90. package/dist/chunk-XZWMJLIT.js.map +1 -0
  91. package/dist/{chunk-4NHXLXSD.js → chunk-Y3K6KJMS.js} +2 -2
  92. package/dist/chunk-Y3K6KJMS.js.map +1 -0
  93. package/dist/{chunk-RK6VBLXP.js → chunk-ZSOS2KOR.js} +1 -1
  94. package/dist/chunk-ZSOS2KOR.js.map +1 -0
  95. package/dist/{claude-code-NMRKTAP7.js → claude-code-FS42PXZO.js} +4 -4
  96. package/dist/claude-code-FS42PXZO.js.map +1 -0
  97. package/dist/{claude-code-GRWO6XBZ.js → claude-code-QBWDT5RT.js} +11 -11
  98. package/dist/claude-code-QBWDT5RT.js.map +1 -0
  99. package/dist/cli/sdk.js +9 -8
  100. package/dist/cli/sdk.js.map +1 -1
  101. package/dist/cli.js +1 -1
  102. package/dist/cli.js.map +1 -1
  103. package/dist/{cline-25KW25IN.js → cline-JKEAYWVR.js} +6 -6
  104. package/dist/cline-JKEAYWVR.js.map +1 -0
  105. package/dist/{codebuddy-ZNYQACMF.js → codebuddy-EB6EYPC3.js} +7 -7
  106. package/dist/codebuddy-EB6EYPC3.js.map +1 -0
  107. package/dist/{codebuff-VR6JUDIY.js → codebuff-5RSXFU6G.js} +6 -6
  108. package/dist/codebuff-5RSXFU6G.js.map +1 -0
  109. package/dist/{codebuff-ETYT5UBL.js → codebuff-6KWBW6CT.js} +4 -4
  110. package/dist/codebuff-6KWBW6CT.js.map +1 -0
  111. package/dist/{codex-CPNKTXG3.js → codex-ART46CDD.js} +9 -9
  112. package/dist/codex-ART46CDD.js.map +1 -0
  113. package/dist/{codex-YAORPCOD.js → codex-DKBAAUCO.js} +4 -4
  114. package/dist/codex-DKBAAUCO.js.map +1 -0
  115. package/dist/{continue-WU2IB5KS.js → continue-JHZCMSPH.js} +8 -8
  116. package/dist/continue-JHZCMSPH.js.map +1 -0
  117. package/dist/{copilot-cli-MZTAWMPW.js → copilot-cli-CLBJACQ5.js} +4 -4
  118. package/dist/copilot-cli-CLBJACQ5.js.map +1 -0
  119. package/dist/{copilot-cli-PAP377OM.js → copilot-cli-QVAU5CFM.js} +7 -7
  120. package/dist/copilot-cli-QVAU5CFM.js.map +1 -0
  121. package/dist/{crush-3AVQA4YU.js → crush-7TORBYUL.js} +7 -7
  122. package/dist/crush-7TORBYUL.js.map +1 -0
  123. package/dist/{crush-QBXLNN7T.js → crush-A5C5USRL.js} +4 -4
  124. package/dist/crush-A5C5USRL.js.map +1 -0
  125. package/dist/{cursor-DIW43TRZ.js → cursor-D5SWDVSW.js} +3 -3
  126. package/dist/cursor-D5SWDVSW.js.map +1 -0
  127. package/dist/cursor-W7I4QUFO.js +22 -0
  128. package/dist/{detect-6V4LC3MA.js → detect-JHSA3G3U.js} +4 -4
  129. package/dist/detect-JHSA3G3U.js.map +1 -0
  130. package/dist/{devin-QMEM3OFA.js → devin-SSR7S4WX.js} +7 -7
  131. package/dist/devin-SSR7S4WX.js.map +1 -0
  132. package/dist/{doctor-2YDUVSAU.js → doctor-CQJ7TZPA.js} +26 -26
  133. package/dist/doctor-CQJ7TZPA.js.map +1 -0
  134. package/dist/{droid-MOKV53J4.js → droid-45PJ7JGF.js} +7 -7
  135. package/dist/droid-45PJ7JGF.js.map +1 -0
  136. package/dist/{droid-U3ZBLQFO.js → droid-PFQ2PZSF.js} +4 -4
  137. package/dist/droid-PFQ2PZSF.js.map +1 -0
  138. package/dist/{gemini-cli-47ZHCOZR.js → gemini-cli-24PFDK7D.js} +8 -8
  139. package/dist/gemini-cli-24PFDK7D.js.map +1 -0
  140. package/dist/{gemini-cli-NMVVBO3K.js → gemini-cli-Y6RJMU24.js} +4 -4
  141. package/dist/gemini-cli-Y6RJMU24.js.map +1 -0
  142. package/dist/{goose-64V46Y2W.js → goose-K2HKUTBK.js} +4 -4
  143. package/dist/goose-K2HKUTBK.js.map +1 -0
  144. package/dist/{goose-4EI5MYTI.js → goose-U5D3LCPC.js} +9 -9
  145. package/dist/goose-U5D3LCPC.js.map +1 -0
  146. package/dist/{grok-cli-QYQPDSVB.js → grok-cli-L2MHAPBY.js} +7 -7
  147. package/dist/grok-cli-L2MHAPBY.js.map +1 -0
  148. package/dist/{hermes-F75OSK3Y.js → hermes-2S5JUTTJ.js} +7 -7
  149. package/dist/hermes-2S5JUTTJ.js.map +1 -0
  150. package/dist/{hermes-F3EGTK6N.js → hermes-MF3NX4ZY.js} +4 -4
  151. package/dist/hermes-MF3NX4ZY.js.map +1 -0
  152. package/dist/{hook-OEVRDMXD.js → hook-VHICXHXL.js} +16 -16
  153. package/dist/hook-VHICXHXL.js.map +1 -0
  154. package/dist/index.js +5 -5
  155. package/dist/{install-5NMCUDG5.js → install-WLENR4KF.js} +192 -28
  156. package/dist/install-WLENR4KF.js.map +1 -0
  157. package/dist/{jetbrains-copilot-ZGIWI6YV.js → jetbrains-copilot-Z4FC3RM3.js} +6 -6
  158. package/dist/jetbrains-copilot-Z4FC3RM3.js.map +1 -0
  159. package/dist/{junie-DIFN2P22.js → junie-ULGJJIHB.js} +6 -6
  160. package/dist/junie-ULGJJIHB.js.map +1 -0
  161. package/dist/{kilo-SW7BH6EG.js → kilo-SMHPOHJ5.js} +4 -4
  162. package/dist/kilo-SMHPOHJ5.js.map +1 -0
  163. package/dist/{kilo-EMZJBEBB.js → kilo-WWIJOVWD.js} +8 -8
  164. package/dist/kilo-WWIJOVWD.js.map +1 -0
  165. package/dist/{kilo-cli-S3GXBPAE.js → kilo-cli-QKE2EQLS.js} +8 -8
  166. package/dist/kilo-cli-QKE2EQLS.js.map +1 -0
  167. package/dist/{kilo-cli-ZF272ZHN.js → kilo-cli-T2SRRRJS.js} +5 -5
  168. package/dist/kilo-cli-T2SRRRJS.js.map +1 -0
  169. package/dist/{kimi-IQJOIY6B.js → kimi-JMUFTVSF.js} +7 -7
  170. package/dist/kimi-JMUFTVSF.js.map +1 -0
  171. package/dist/{kimi-5FHEXGZD.js → kimi-MSIDEMCI.js} +4 -4
  172. package/dist/kimi-MSIDEMCI.js.map +1 -0
  173. package/dist/{kiro-WGOI5CGT.js → kiro-NYRRBIKW.js} +4 -4
  174. package/dist/kiro-NYRRBIKW.js.map +1 -0
  175. package/dist/{kiro-BYX4HEAJ.js → kiro-UWUCRKR3.js} +7 -7
  176. package/dist/kiro-UWUCRKR3.js.map +1 -0
  177. package/dist/{leaderboard-XEKS7B3H.js → leaderboard-NJWKGMXP.js} +7 -7
  178. package/dist/leaderboard-NJWKGMXP.js.map +1 -0
  179. package/dist/{mimo-code-7R53QDHB.js → mimo-code-BPNYYIVM.js} +7 -7
  180. package/dist/mimo-code-BPNYYIVM.js.map +1 -0
  181. package/dist/{mistral-vibe-LHJ55FSB.js → mistral-vibe-LT3DAJ3L.js} +6 -6
  182. package/dist/mistral-vibe-LT3DAJ3L.js.map +1 -0
  183. package/dist/{mux-XM6AP35L.js → mux-7PIJ7HUQ.js} +4 -4
  184. package/dist/mux-7PIJ7HUQ.js.map +1 -0
  185. package/dist/{mux-NYCNGL43.js → mux-AHNUAY5Z.js} +6 -6
  186. package/dist/mux-AHNUAY5Z.js.map +1 -0
  187. package/dist/{nemoclaw-WSIPSE7U.js → nemoclaw-RE5RZASZ.js} +7 -7
  188. package/dist/nemoclaw-RE5RZASZ.js.map +1 -0
  189. package/dist/{omp-562NK5BJ.js → omp-D2EXEPH7.js} +7 -7
  190. package/dist/omp-D2EXEPH7.js.map +1 -0
  191. package/dist/{open-interpreter-I2CNOEXY.js → open-interpreter-SSGBEUKX.js} +6 -6
  192. package/dist/open-interpreter-SSGBEUKX.js.map +1 -0
  193. package/dist/openclaw-IJ33K45M.js +17 -0
  194. package/dist/{openclaw-5EQFGOWL.js → openclaw-KAFTNLR2.js} +4 -4
  195. package/dist/openclaw-KAFTNLR2.js.map +1 -0
  196. package/dist/{opencode-YS4WX2E2.js → opencode-YKUKZY3J.js} +7 -7
  197. package/dist/opencode-YKUKZY3J.js.map +1 -0
  198. package/dist/{opencode-QGP4ALQY.js → opencode-Z65JYILL.js} +4 -4
  199. package/dist/opencode-Z65JYILL.js.map +1 -0
  200. package/dist/{openhands-QMYIKNOS.js → openhands-SEZMCUC3.js} +7 -7
  201. package/dist/openhands-SEZMCUC3.js.map +1 -0
  202. package/dist/{package-G25GVTH2.js → package-JECVQEFT.js} +15 -15
  203. package/dist/package-JECVQEFT.js.map +1 -0
  204. package/dist/{pi-GGDQREVG.js → pi-DLKCPOJE.js} +4 -4
  205. package/dist/pi-DLKCPOJE.js.map +1 -0
  206. package/dist/{pi-644FIN3A.js → pi-YPYV2ULH.js} +6 -6
  207. package/dist/pi-YPYV2ULH.js.map +1 -0
  208. package/dist/{qwen-code-GQILBJ5B.js → qwen-code-26CSFDX6.js} +4 -4
  209. package/dist/qwen-code-26CSFDX6.js.map +1 -0
  210. package/dist/{qwen-code-STDMX7EM.js → qwen-code-ZHCLCYMC.js} +9 -9
  211. package/dist/qwen-code-ZHCLCYMC.js.map +1 -0
  212. package/dist/{roo-code-DLPIHHQ6.js → roo-code-7F4HYB34.js} +6 -6
  213. package/dist/roo-code-7F4HYB34.js.map +1 -0
  214. package/dist/{roo-code-SUWI4BBN.js → roo-code-HSAE2CJU.js} +4 -4
  215. package/dist/roo-code-HSAE2CJU.js.map +1 -0
  216. package/dist/runtime/index.js +14 -14
  217. package/dist/sdk/index.js +6 -6
  218. package/dist/sdk/index.js.map +1 -1
  219. package/dist/sdk/test.js +11 -11
  220. package/dist/{serve-XTMIUHKK.js → serve-LYSBH43G.js} +16 -16
  221. package/dist/serve-LYSBH43G.js.map +1 -0
  222. package/dist/{status-VJAGO4Z7.js → status-PHKKGEW5.js} +11 -11
  223. package/dist/status-PHKKGEW5.js.map +1 -0
  224. package/dist/{statusline-EY2E2UGF.js → statusline-ZDD4OZ4F.js} +15 -15
  225. package/dist/statusline-ZDD4OZ4F.js.map +1 -0
  226. package/dist/{synthetic-6FRA7P5Q.js → synthetic-LUT6V6SD.js} +4 -4
  227. package/dist/synthetic-LUT6V6SD.js.map +1 -0
  228. package/dist/{telemetry-OLZQBADT.js → telemetry-HDGMI2BK.js} +10 -10
  229. package/dist/telemetry-HDGMI2BK.js.map +1 -0
  230. package/dist/{trae-CPPYASR2.js → trae-SIQI3C66.js} +4 -4
  231. package/dist/trae-SIQI3C66.js.map +1 -0
  232. package/dist/{trae-UOYD6JZZ.js → trae-Y67HSDOW.js} +6 -6
  233. package/dist/trae-Y67HSDOW.js.map +1 -0
  234. package/dist/{uninstall-AZEUPAND.js → uninstall-RWO2GM2I.js} +21 -21
  235. package/dist/uninstall-RWO2GM2I.js.map +1 -0
  236. package/dist/{upgrade-CAUUHSSC.js → upgrade-YJCXNUEE.js} +21 -21
  237. package/dist/upgrade-YJCXNUEE.js.map +1 -0
  238. package/dist/{usage-3KHZ4RYZ.js → usage-IWO4RQN6.js} +4 -4
  239. package/dist/usage-IWO4RQN6.js.map +1 -0
  240. package/dist/{usage-event-TZWOZPRJ.js → usage-event-AFFKCLHE.js} +15 -15
  241. package/dist/usage-event-AFFKCLHE.js.map +1 -0
  242. package/dist/{vscode-copilot-NIMH2DGU.js → vscode-copilot-5CI5B3X6.js} +7 -7
  243. package/dist/vscode-copilot-5CI5B3X6.js.map +1 -0
  244. package/dist/{warp-NRBBJQR2.js → warp-5YBSP7FP.js} +4 -4
  245. package/dist/warp-5YBSP7FP.js.map +1 -0
  246. package/dist/{warp-QYJGKURM.js → warp-INAKVGBV.js} +6 -6
  247. package/dist/warp-INAKVGBV.js.map +1 -0
  248. package/dist/{windsurf-75LLZ37C.js → windsurf-4HM57QAY.js} +6 -6
  249. package/dist/windsurf-4HM57QAY.js.map +1 -0
  250. package/dist/{zed-XJFOOKCO.js → zed-XXCNYOIN.js} +4 -4
  251. package/dist/zed-XXCNYOIN.js.map +1 -0
  252. package/dist/{zed-HKAZXEJW.js → zed-YN5X37PQ.js} +7 -7
  253. package/dist/zed-YN5X37PQ.js.map +1 -0
  254. package/package.json +92 -88
  255. package/dist/action-Q7GGO4PA.js.map +0 -1
  256. package/dist/amazon-q-ETMAGY3D.js.map +0 -1
  257. package/dist/amp-67BZONGF.js.map +0 -1
  258. package/dist/amp-BQZOL5GR.js.map +0 -1
  259. package/dist/antigravity-EA4L225L.js.map +0 -1
  260. package/dist/antigravity-VXLDLTO7.js +0 -18
  261. package/dist/antigravity-cli-B2HXZFYQ.js.map +0 -1
  262. package/dist/antigravity-cli-OM6SC3PE.js.map +0 -1
  263. package/dist/chunk-2Y2MZRLP.js.map +0 -1
  264. package/dist/chunk-3NH2ARIS.js.map +0 -1
  265. package/dist/chunk-4NHXLXSD.js.map +0 -1
  266. package/dist/chunk-5IOTP7LQ.js.map +0 -1
  267. package/dist/chunk-6TF7MHG5.js.map +0 -1
  268. package/dist/chunk-6WZODR3Z.js.map +0 -1
  269. package/dist/chunk-7F5KHLEP.js.map +0 -1
  270. package/dist/chunk-APZDTY76.js.map +0 -1
  271. package/dist/chunk-BEFVJ2OE.js.map +0 -1
  272. package/dist/chunk-D4ELPBB5.js.map +0 -1
  273. package/dist/chunk-FBJQGRET.js.map +0 -1
  274. package/dist/chunk-FJCUKXGX.js.map +0 -1
  275. package/dist/chunk-GZGLCCEE.js.map +0 -1
  276. package/dist/chunk-H33M77DD.js.map +0 -1
  277. package/dist/chunk-H53QZQJI.js.map +0 -1
  278. package/dist/chunk-I5UXHIDT.js.map +0 -1
  279. package/dist/chunk-ISEJWBFF.js.map +0 -1
  280. package/dist/chunk-IVAWP6HH.js.map +0 -1
  281. package/dist/chunk-JKKU2WKG.js.map +0 -1
  282. package/dist/chunk-KHO5WNTP.js.map +0 -1
  283. package/dist/chunk-MGTDQLJJ.js.map +0 -1
  284. package/dist/chunk-MQPNU2CY.js.map +0 -1
  285. package/dist/chunk-NBYKLUF6.js.map +0 -1
  286. package/dist/chunk-NLE2J5P4.js.map +0 -1
  287. package/dist/chunk-O7SDRBVB.js.map +0 -1
  288. package/dist/chunk-OP4KBXUO.js.map +0 -1
  289. package/dist/chunk-OPXAP3AC.js.map +0 -1
  290. package/dist/chunk-PAPMUAR5.js.map +0 -1
  291. package/dist/chunk-PW42ZXCB.js.map +0 -1
  292. package/dist/chunk-RK6VBLXP.js.map +0 -1
  293. package/dist/chunk-UM5S7DKK.js.map +0 -1
  294. package/dist/chunk-UMQ6NBQR.js.map +0 -1
  295. package/dist/chunk-XC5SJ35F.js.map +0 -1
  296. package/dist/chunk-XD7MY6HB.js.map +0 -1
  297. package/dist/chunk-YPAXJ7EW.js.map +0 -1
  298. package/dist/chunk-YT43MUSJ.js.map +0 -1
  299. package/dist/chunk-Z2MRSS2I.js.map +0 -1
  300. package/dist/claude-code-GRWO6XBZ.js.map +0 -1
  301. package/dist/claude-code-NMRKTAP7.js.map +0 -1
  302. package/dist/cline-25KW25IN.js.map +0 -1
  303. package/dist/codebuddy-ZNYQACMF.js.map +0 -1
  304. package/dist/codebuff-ETYT5UBL.js.map +0 -1
  305. package/dist/codebuff-VR6JUDIY.js.map +0 -1
  306. package/dist/codex-CPNKTXG3.js.map +0 -1
  307. package/dist/codex-YAORPCOD.js.map +0 -1
  308. package/dist/continue-WU2IB5KS.js.map +0 -1
  309. package/dist/copilot-cli-MZTAWMPW.js.map +0 -1
  310. package/dist/copilot-cli-PAP377OM.js.map +0 -1
  311. package/dist/crush-3AVQA4YU.js.map +0 -1
  312. package/dist/crush-QBXLNN7T.js.map +0 -1
  313. package/dist/cursor-DIW43TRZ.js.map +0 -1
  314. package/dist/cursor-GSLUET3V.js +0 -22
  315. package/dist/detect-6V4LC3MA.js.map +0 -1
  316. package/dist/devin-QMEM3OFA.js.map +0 -1
  317. package/dist/doctor-2YDUVSAU.js.map +0 -1
  318. package/dist/droid-MOKV53J4.js.map +0 -1
  319. package/dist/droid-U3ZBLQFO.js.map +0 -1
  320. package/dist/gemini-cli-47ZHCOZR.js.map +0 -1
  321. package/dist/gemini-cli-NMVVBO3K.js.map +0 -1
  322. package/dist/goose-4EI5MYTI.js.map +0 -1
  323. package/dist/goose-64V46Y2W.js.map +0 -1
  324. package/dist/grok-cli-QYQPDSVB.js.map +0 -1
  325. package/dist/hermes-F3EGTK6N.js.map +0 -1
  326. package/dist/hermes-F75OSK3Y.js.map +0 -1
  327. package/dist/hook-OEVRDMXD.js.map +0 -1
  328. package/dist/install-5NMCUDG5.js.map +0 -1
  329. package/dist/jetbrains-copilot-ZGIWI6YV.js.map +0 -1
  330. package/dist/junie-DIFN2P22.js.map +0 -1
  331. package/dist/kilo-EMZJBEBB.js.map +0 -1
  332. package/dist/kilo-SW7BH6EG.js.map +0 -1
  333. package/dist/kilo-cli-S3GXBPAE.js.map +0 -1
  334. package/dist/kilo-cli-ZF272ZHN.js.map +0 -1
  335. package/dist/kimi-5FHEXGZD.js.map +0 -1
  336. package/dist/kimi-IQJOIY6B.js.map +0 -1
  337. package/dist/kiro-BYX4HEAJ.js.map +0 -1
  338. package/dist/kiro-WGOI5CGT.js.map +0 -1
  339. package/dist/leaderboard-XEKS7B3H.js.map +0 -1
  340. package/dist/mimo-code-7R53QDHB.js.map +0 -1
  341. package/dist/mistral-vibe-LHJ55FSB.js.map +0 -1
  342. package/dist/mux-NYCNGL43.js.map +0 -1
  343. package/dist/mux-XM6AP35L.js.map +0 -1
  344. package/dist/nemoclaw-WSIPSE7U.js.map +0 -1
  345. package/dist/omp-562NK5BJ.js.map +0 -1
  346. package/dist/open-interpreter-I2CNOEXY.js.map +0 -1
  347. package/dist/openclaw-5EQFGOWL.js.map +0 -1
  348. package/dist/openclaw-7EYBQS4R.js +0 -17
  349. package/dist/opencode-QGP4ALQY.js.map +0 -1
  350. package/dist/opencode-YS4WX2E2.js.map +0 -1
  351. package/dist/openhands-QMYIKNOS.js.map +0 -1
  352. package/dist/package-G25GVTH2.js.map +0 -1
  353. package/dist/pi-644FIN3A.js.map +0 -1
  354. package/dist/pi-GGDQREVG.js.map +0 -1
  355. package/dist/qwen-code-GQILBJ5B.js.map +0 -1
  356. package/dist/qwen-code-STDMX7EM.js.map +0 -1
  357. package/dist/roo-code-DLPIHHQ6.js.map +0 -1
  358. package/dist/roo-code-SUWI4BBN.js.map +0 -1
  359. package/dist/serve-XTMIUHKK.js.map +0 -1
  360. package/dist/status-VJAGO4Z7.js.map +0 -1
  361. package/dist/statusline-EY2E2UGF.js.map +0 -1
  362. package/dist/synthetic-6FRA7P5Q.js.map +0 -1
  363. package/dist/telemetry-OLZQBADT.js.map +0 -1
  364. package/dist/trae-CPPYASR2.js.map +0 -1
  365. package/dist/trae-UOYD6JZZ.js.map +0 -1
  366. package/dist/uninstall-AZEUPAND.js.map +0 -1
  367. package/dist/upgrade-CAUUHSSC.js.map +0 -1
  368. package/dist/usage-3KHZ4RYZ.js.map +0 -1
  369. package/dist/usage-event-TZWOZPRJ.js.map +0 -1
  370. package/dist/vscode-copilot-NIMH2DGU.js.map +0 -1
  371. package/dist/warp-NRBBJQR2.js.map +0 -1
  372. package/dist/warp-QYJGKURM.js.map +0 -1
  373. package/dist/windsurf-75LLZ37C.js.map +0 -1
  374. package/dist/zed-HKAZXEJW.js.map +0 -1
  375. package/dist/zed-XJFOOKCO.js.map +0 -1
  376. /package/dist/{antigravity-VXLDLTO7.js.map → antigravity-TWIWXTQH.js.map} +0 -0
  377. /package/dist/{cursor-GSLUET3V.js.map → cursor-W7I4QUFO.js.map} +0 -0
  378. /package/dist/{openclaw-7EYBQS4R.js.map → openclaw-IJ33K45M.js.map} +0 -0
package/README.md CHANGED
@@ -1,611 +1,617 @@
1
- <p align="center">
2
- <img src="site/public/mascot.png" alt="agent-connector mascot — a pixel-art lobster worker in a tool belt" width="160" />
3
- </p>
4
-
5
- # agent-connector
6
-
7
- ### Deploy one MCP to every agent CLI.
8
-
9
- Write your server + hooks once with `defineConnector()`, then `install` it into
10
- the native config — or `package` it as a real plugin — across every detected agent CLI
11
- (Claude Code, Codex, Cursor, Copilot, Gemini, OpenCode, Warp, Zed…).
12
-
13
- [![npm](https://img.shields.io/npm/v/@ken-jo/agent-connector?color=cb3837&logo=npm)](https://www.npmjs.com/package/@ken-jo/agent-connector)
14
- [![license](https://img.shields.io/npm/l/@ken-jo/agent-connector?color=22c55e)](LICENSE)
15
- [![platform coverage](https://img.shields.io/badge/platform%20coverage-see%20%2Fcoverage-2563eb)](https://agent-connector.ai/coverage)
16
- ![surfaces](https://img.shields.io/badge/surfaces-MCP%20%7C%20hooks%20%7C%20commands%20%7C%20tools%20%7C%20memory%20%7C%20status%20line-2563eb)
17
- ![hook paradigms](https://img.shields.io/badge/hook%20paradigms-3-2563eb)
18
- [![install verified](https://img.shields.io/badge/install%20verified-registry%20harness-22c55e)](https://agent-connector.ai/coverage)
19
- [![headless runtime](https://img.shields.io/badge/headless%20runtime-verified%20matrix-22c55e)](https://agent-connector.ai/coverage)
20
- ![marketplace](https://img.shields.io/badge/package-10%20marketplace%20formats-2563eb)
21
- ![tests](https://img.shields.io/badge/tests-passing-22c55e)
22
-
23
- **Two audiences:** connector developers start at [Quick start](#quick-start);
24
- if you already run an agent CLI and just want token totals, jump straight to
25
- [`usage`](#token-telemetry--usage).
26
-
27
- - [Quick start](#quick-start) — depend on the SDK, declare a connector, install it
28
- - [Ship it](#ship-it-direct-install-or-a-marketplace-plugin) — direct install or a marketplace plugin
29
- - [What you define once](#what-you-define-once) — server, hooks, and the other surfaces
30
- - [How it works](#how-it-works) — single home binary, per-project data, hook paradigms
31
- - [CLI](#cli) — every command at a glance
32
- - [Token telemetry & usage](#token-telemetry--usage) — per-tool telemetry vs. connector-free `usage`
33
- - [Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem) — emit the official MCP standard artifacts
34
- - [Verification](#verification) — how the platform coverage contract is proven
35
-
36
- <p align="center">
37
- <a href="examples/showcase-demo/">
38
- <img src="examples/showcase-demo/demo.gif" width="820"
39
- alt="agent-connector showcase: define a connector once, ship it as your own branded CLI, install it via each host's native marketplace, and drive every CLI with one command." />
40
- </a>
41
- </p>
42
-
43
- <p align="center"><sub>
44
- Define once → ship it as your own branded CLI → users install via their host's native marketplace → one command drives every CLI.
45
- <a href="examples/showcase-demo/">Regenerate this demo.</a>
46
- </sub></p>
47
-
48
- ## Quick start
49
-
50
- agent-connector is an **SDK connector developers depend on**. Add it to the
51
- package that holds your connector, declare the connector once, then ship a
52
- branded MCP package/bin such as `npx @acme/acme-db-mcp install` — it deploys to
53
- every detected agent CLI in that host's own native config. Installing
54
- `@ken-jo/agent-connector` globally is not the branded MCP lifecycle path; reserve
55
- the global CLI guidance for connector-free token usage reports. Framework
56
- artifact tooling stays developer-facing and normally runs through
57
- `npx @ken-jo/agent-connector ... --connector`. The linear path is:
58
- **get a server → declare it → install through your branded package**.
59
-
60
- **0. You need an MCP server file first.** The config below points at
61
- `./my-mcp-server.mjs`, so that file must exist before you install. Don't have an
62
- MCP server yet? Copy
63
- [`examples/acme-db/acme-db-mcp-server.mjs`](examples/acme-db/acme-db-mcp-server.mjs)
64
- (a self-contained ~35-line stub) as `./my-mcp-server.mjs`, or follow the
65
- [official MCP SDK quickstart](https://modelcontextprotocol.io/quickstart/server).
66
-
67
- ```bash
68
- # 1. add agent-connector as a DEPENDENCY of your connector package
69
- npm install @ken-jo/agent-connector
70
- ```
71
-
72
- ```jsonc
73
- // 2. package.json — this is the user-facing package identity
74
- {
75
- "name": "@acme/acme-db-mcp",
76
- "mcpName": "io.github.acme/acme-db",
77
- "bin": { "acme-db": "./bin.mjs" },
78
- "dependencies": { "@ken-jo/agent-connector": "^0.4.94" }
79
- }
80
- ```
81
-
82
- ```js
83
- // 3. agent-connector.config.mjs — declare your server + hooks once
84
- import { fileURLToPath } from "node:url";
85
- import { defineConnector } from "@ken-jo/agent-connector/sdk";
86
-
87
- const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
88
-
89
- export default defineConnector({
90
- // package.json / npm metadata is the source of truth. The host alias/runtime
91
- // id and connector version are derived from name/mcpName/bin/version unless
92
- // you need a legacy or multi-instance alias. Host-native ids are generated
93
- // during install, so do not copy them back into defineConnector({ id }).
94
- server: {
95
- transport: "stdio",
96
- command: "node",
97
- args: [serverPath],
98
- },
99
- // hooks, telemetry, and more surfaces — see "What you define once" below
100
- });
101
- ```
102
-
103
- The wiring contract is:
104
-
105
- 1. `package.json` defines the public product identity (`name`, `mcpName`, `bin`,
106
- `version`).
107
- 2. `bin.mjs` calls `createConnectorCli({ packageJson, connector })` so every
108
- install/doctor/upgrade/uninstall command runs under the developer's brand.
109
- 3. `agent-connector.config.*` uses `defineConnector({ server, ...surfaces })` to
110
- describe the real MCP launch shape or remote endpoint.
111
- 4. `install` renders that single declaration into each detected host's native
112
- MCP config. For stdio processes, the host points at the stable
113
- agent-connector home binary, which launches the real command and can measure
114
- per-tool traffic. For remote HTTP servers, the host receives the URL where
115
- supported; there is no stdio process to wrap.
116
-
117
- ### Command boundary
118
-
119
- Keep the two command layers separate:
120
-
121
- | Layer | Who runs it | Examples | Purpose |
122
- | --- | --- | --- | --- |
123
- | Branded MCP lifecycle | Users of your MCP package | `npx @acme/acme-db-mcp install`, `acme-db doctor --probe`, `acme-db upgrade`, `acme-db uninstall`, `acme-db telemetry report --by tool` | Install, verify, update, remove, and inspect telemetry for **your MCP**. |
124
- | Framework tooling | MCP package developers | `npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs` | Emit host plugin bundles and MCP distribution artifacts from a connector config. |
125
- | Connector-free user telemetry | Agent-CLI users with no MCP package | `npx @ken-jo/agent-connector usage report --by platform` | Read host CLI logs read-only for whole-conversation token totals. |
126
-
127
- If a command operates the MCP after it is authored, prefer the branded package/bin.
128
- If a command builds framework distribution artifacts, use the framework CLI.
129
-
130
- ### MCP server launch examples
131
-
132
- Pick the `server` shape that matches the MCP you are building. The wrapper
133
- package identity still comes from `package.json`; these examples only describe
134
- how to start or connect to the actual MCP server.
135
-
136
- | Shape | Use when | Minimal launch |
137
- | --- | --- | --- |
138
- | Package-runner MCP | The MCP is published as a package. | `npx -y @acme/acme-db-mcp` |
139
- | Local server-process MCP | The MCP server ships inside your package. | `node ./my-mcp-server.mjs` |
140
- | Python MCP | The MCP server is Python and should resolve runtime deps at launch. | `uv run --with mcp ./my_mcp_server.py` |
141
- | CLI-based MCP | An existing executable exposes an MCP serving mode. | `local-tools mcp serve` |
142
- | Remote server MCP | The MCP is hosted behind an HTTP endpoint. | `https://mcp.example.com/mcp` |
143
-
144
- Each snippet below is the `server` field for `defineConnector({ ... })`; only
145
- the local server-process example needs the `serverPath` helper shown inline.
146
-
147
- **Package-runner MCP** — a published package that should be launched with `npx`:
148
-
149
- ```js
150
- server: {
151
- transport: "stdio",
152
- command: "npx",
153
- args: ["-y", "@acme/acme-db-mcp"],
154
- }
155
- ```
156
-
157
- **Local server-process MCP** — a bundled server file or binary:
158
-
159
- ```js
160
- import { fileURLToPath } from "node:url";
161
-
162
- const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
163
-
164
- server: {
165
- transport: "stdio",
166
- command: "node",
167
- args: [serverPath],
168
- }
169
- ```
170
-
171
- **Python MCP** — usually run through `uv` so dependencies are resolved with the
172
- server:
173
-
174
- ```js
175
- server: {
176
- transport: "stdio",
177
- command: "uv",
178
- args: ["run", "--with", "mcp", "./my_mcp_server.py"],
179
- }
180
- ```
181
-
182
- Use direct `python ./my_mcp_server.py` only when the runtime environment is
183
- already managed by your package or deployment wrapper.
184
-
185
- **CLI-based MCP** — an existing executable exposes an MCP mode:
186
-
187
- ```js
188
- server: {
189
- transport: "stdio",
190
- command: "local-tools",
191
- args: ["mcp", "serve"],
192
- }
193
- ```
194
-
195
- **Remote server MCP** — a hosted MCP endpoint:
196
-
197
- ```js
198
- server: {
199
- transport: "http",
200
- url: "https://mcp.example.com/mcp",
201
- }
202
- ```
203
-
204
- ```bash
1
+ <p align="center">
2
+ <img src="site/public/mascot.png" alt="agent-connector mascot — a pixel-art lobster worker in a tool belt" width="160" />
3
+ </p>
4
+
5
+ # agent-connector
6
+
7
+ ### Deploy one MCP to every agent CLI.
8
+
9
+ Write your server + hooks once with `defineConnector()`, then `install` it into
10
+ the native config — or `package` it as a real plugin — across every detected agent CLI
11
+ (Claude Code, Codex, Cursor, Copilot, Gemini, OpenCode, Warp, Zed…).
12
+
13
+ [![npm](https://img.shields.io/npm/v/@ken-jo/agent-connector?color=cb3837&logo=npm)](https://www.npmjs.com/package/@ken-jo/agent-connector)
14
+ [![license](https://img.shields.io/npm/l/@ken-jo/agent-connector?color=22c55e)](LICENSE)
15
+ [![platform coverage](https://img.shields.io/badge/platform%20coverage-see%20%2Fcoverage-2563eb)](https://agent-connector.ai/coverage)
16
+ ![surfaces](https://img.shields.io/badge/surfaces-MCP%20%7C%20hooks%20%7C%20commands%20%7C%20tools%20%7C%20memory%20%7C%20status%20line-2563eb)
17
+ ![hook paradigms](https://img.shields.io/badge/hook%20paradigms-3-2563eb)
18
+ [![install verified](https://img.shields.io/badge/install%20verified-registry%20harness-22c55e)](https://agent-connector.ai/coverage)
19
+ [![headless runtime](https://img.shields.io/badge/headless%20runtime-verified%20matrix-22c55e)](https://agent-connector.ai/coverage)
20
+ ![marketplace](https://img.shields.io/badge/package-10%20marketplace%20formats-2563eb)
21
+ ![tests](https://img.shields.io/badge/tests-passing-22c55e)
22
+
23
+ **Two audiences:** connector developers start at [Quick start](#quick-start);
24
+ if you already run an agent CLI and just want token totals, jump straight to
25
+ [`usage`](#token-telemetry--usage).
26
+
27
+ - [Quick start](#quick-start) — depend on the SDK, declare a connector, install it
28
+ - [Ship it](#ship-it-direct-install-or-a-marketplace-plugin) — direct install or a marketplace plugin
29
+ - [What you define once](#what-you-define-once) — server, hooks, and the other surfaces
30
+ - [How it works](#how-it-works) — single home binary, per-project data, hook paradigms
31
+ - [CLI](#cli) — every command at a glance
32
+ - [Token telemetry & usage](#token-telemetry--usage) — per-tool telemetry vs. connector-free `usage`
33
+ - [Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem) — emit the official MCP standard artifacts
34
+ - [Verification](#verification) — how the platform coverage contract is proven
35
+
36
+ <p align="center">
37
+ <a href="examples/showcase-demo/">
38
+ <img src="examples/showcase-demo/demo.gif" width="820"
39
+ alt="agent-connector showcase: define a connector once, ship it as your own branded CLI, install it via each host's native marketplace, and drive every CLI with one command." />
40
+ </a>
41
+ </p>
42
+
43
+ <p align="center"><sub>
44
+ Define once → ship it as your own branded CLI → users install via their host's native marketplace → one command drives every CLI.
45
+ <a href="examples/showcase-demo/">Regenerate this demo.</a>
46
+ </sub></p>
47
+
48
+ ## Quick start
49
+
50
+ agent-connector is an **SDK connector developers depend on**. Add it to the
51
+ package that holds your connector, declare the connector once, then ship a
52
+ branded MCP package/bin such as `npx @acme/acme-db-mcp install` — it deploys to
53
+ every detected agent CLI in that host's own native config. Installing
54
+ `@ken-jo/agent-connector` globally is not the branded MCP lifecycle path; reserve
55
+ the global CLI guidance for connector-free token usage reports. Framework
56
+ artifact tooling stays developer-facing and normally runs through
57
+ `npx @ken-jo/agent-connector ... --connector`. The linear path is:
58
+ **get a server → declare it → install through your branded package**.
59
+
60
+ **0. You need an MCP server file first.** The config below points at
61
+ `./my-mcp-server.mjs`, so that file must exist before you install. Don't have an
62
+ MCP server yet? Copy
63
+ [`examples/acme-db/acme-db-mcp-server.mjs`](examples/acme-db/acme-db-mcp-server.mjs)
64
+ (a self-contained ~35-line stub) as `./my-mcp-server.mjs`, or follow the
65
+ [official MCP SDK quickstart](https://modelcontextprotocol.io/quickstart/server).
66
+
67
+ ```bash
68
+ # 1. add agent-connector as a DEPENDENCY of your connector package
69
+ npm install @ken-jo/agent-connector
70
+ ```
71
+
72
+ ```jsonc
73
+ // 2. package.json — this is the user-facing package identity
74
+ {
75
+ "name": "@acme/acme-db-mcp",
76
+ "mcpName": "io.github.acme/acme-db",
77
+ "bin": { "acme-db": "./bin.mjs" },
78
+ "dependencies": { "@ken-jo/agent-connector": "^0.4.97" }
79
+ }
80
+ ```
81
+
82
+ ```js
83
+ // 3. agent-connector.config.mjs — declare your server + hooks once
84
+ import { fileURLToPath } from "node:url";
85
+ import { defineConnector } from "@ken-jo/agent-connector/sdk";
86
+
87
+ const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
88
+
89
+ export default defineConnector({
90
+ // package.json / npm metadata is the source of truth. The host alias/runtime
91
+ // id and connector version are derived from name/mcpName/bin/version unless
92
+ // you need a legacy or multi-instance alias. Host-native ids are generated
93
+ // during install, so do not copy them back into defineConnector({ id }).
94
+ server: {
95
+ transport: "stdio",
96
+ command: "node",
97
+ args: [serverPath],
98
+ },
99
+ // hooks, telemetry, and more surfaces — see "What you define once" below
100
+ });
101
+ ```
102
+
103
+ The wiring contract is:
104
+
105
+ 1. `package.json` defines the public product identity (`name`, `mcpName`, `bin`,
106
+ `version`).
107
+ 2. `bin.mjs` calls `createConnectorCli({ packageJson, connector })` so every
108
+ install/doctor/upgrade/uninstall command runs under the developer's brand.
109
+ 3. `agent-connector.config.*` uses `defineConnector({ server, ...surfaces })` to
110
+ describe the real MCP launch shape or remote endpoint.
111
+ 4. `install` renders that single declaration into each detected host's native
112
+ MCP config. For stdio processes, the host points at the stable
113
+ agent-connector home binary, which launches the real command and can measure
114
+ per-tool traffic. For remote HTTP servers, the host receives the URL where
115
+ supported; there is no stdio process to wrap.
116
+
117
+ ### Command boundary
118
+
119
+ Keep the two command layers separate:
120
+
121
+ | Layer | Who runs it | Examples | Purpose |
122
+ | --- | --- | --- | --- |
123
+ | Branded MCP lifecycle | Users of your MCP package | `npx @acme/acme-db-mcp install`, `acme-db doctor --probe`, `acme-db upgrade`, `acme-db uninstall`, `acme-db telemetry report --by tool` | Install, verify, update, remove, and inspect telemetry for **your MCP**. |
124
+ | Framework tooling | MCP package developers | `npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs` | Emit host plugin bundles and MCP distribution artifacts from a connector config. |
125
+ | Connector-free user telemetry | Agent-CLI users with no MCP package | `npx @ken-jo/agent-connector usage report --by platform` | Read host CLI logs read-only for whole-conversation token totals. |
126
+
127
+ If a command operates the MCP after it is authored, prefer the branded package/bin.
128
+ If a command builds framework distribution artifacts, use the framework CLI.
129
+
130
+ ### MCP server launch examples
131
+
132
+ Pick the `server` shape that matches the MCP you are building. The wrapper
133
+ package identity still comes from `package.json`; these examples only describe
134
+ how to start or connect to the actual MCP server.
135
+
136
+ | Shape | Use when | Minimal launch |
137
+ | --- | --- | --- |
138
+ | Package-runner MCP | The MCP is published as a package. | `npx -y @acme/acme-db-mcp` |
139
+ | Local server-process MCP | The MCP server ships inside your package. | `node ./my-mcp-server.mjs` |
140
+ | Python MCP | The MCP server is Python and should resolve runtime deps at launch. | `uv run --with mcp ./my_mcp_server.py` |
141
+ | CLI-based MCP | An existing executable exposes an MCP serving mode. | `local-tools mcp serve` |
142
+ | Remote server MCP | The MCP is hosted behind an HTTP endpoint. | `https://mcp.example.com/mcp` |
143
+
144
+ Each snippet below is the `server` field for `defineConnector({ ... })`; only
145
+ the local server-process example needs the `serverPath` helper shown inline.
146
+
147
+ **Package-runner MCP** — a published package that should be launched with `npx`:
148
+
149
+ ```js
150
+ server: {
151
+ transport: "stdio",
152
+ command: "npx",
153
+ args: ["-y", "@acme/acme-db-mcp"],
154
+ }
155
+ ```
156
+
157
+ **Local server-process MCP** — a bundled server file or binary:
158
+
159
+ ```js
160
+ import { fileURLToPath } from "node:url";
161
+
162
+ const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
163
+
164
+ server: {
165
+ transport: "stdio",
166
+ command: "node",
167
+ args: [serverPath],
168
+ }
169
+ ```
170
+
171
+ **Python MCP** — usually run through `uv` so dependencies are resolved with the
172
+ server:
173
+
174
+ ```js
175
+ server: {
176
+ transport: "stdio",
177
+ command: "uv",
178
+ args: ["run", "--with", "mcp", "./my_mcp_server.py"],
179
+ }
180
+ ```
181
+
182
+ Use direct `python ./my_mcp_server.py` only when the runtime environment is
183
+ already managed by your package or deployment wrapper.
184
+
185
+ **CLI-based MCP** — an existing executable exposes an MCP mode:
186
+
187
+ ```js
188
+ server: {
189
+ transport: "stdio",
190
+ command: "local-tools",
191
+ args: ["mcp", "serve"],
192
+ }
193
+ ```
194
+
195
+ **Remote server MCP** — a hosted MCP endpoint:
196
+
197
+ ```js
198
+ server: {
199
+ transport: "http",
200
+ url: "https://mcp.example.com/mcp",
201
+ }
202
+ ```
203
+
204
+ ```bash
205
205
  # 4. deploy under your branded MCP package/bin
206
206
  npx @acme/acme-db-mcp detect # which platforms are installed here?
207
+ npx @acme/acme-db-mcp audit # catch package/bin/connector identity drift
207
208
  npx @acme/acme-db-mcp install --dry-run # preview every change first
208
209
  npx @acme/acme-db-mcp install # write native config in each host
209
- ```
210
-
211
- > `install` targets only the hosts actually **detected** on this machine (or an
212
- > explicit `--targets` / `connector.targets` list), intersected with the
213
- > current adapter registry shown on [`/coverage`](https://agent-connector.ai/coverage)
214
- > — there is no "install to every host unconditionally" path.
215
- > `@ken-jo/agent-connector` is the framework dependency underneath; use it
216
- > directly for framework packaging/debugging or connector-free token telemetry,
217
- > not as the foreground install brand for your users.
218
-
219
- ## Ship it: direct install or a marketplace plugin
220
-
221
- Same one definition, your choice of distribution.
222
-
210
+ ```
211
+
212
+ > `install` targets only the hosts actually **detected** on this machine (or an
213
+ > explicit `--targets` / `connector.targets` list), intersected with the
214
+ > current adapter registry shown on [`/coverage`](https://agent-connector.ai/coverage)
215
+ > — there is no "install to every host unconditionally" path.
216
+ > `@ken-jo/agent-connector` is the framework dependency underneath; use it
217
+ > directly for framework packaging/debugging or connector-free token telemetry,
218
+ > not as the foreground install brand for your users.
219
+
220
+ ## Ship it: direct install or a marketplace plugin
221
+
222
+ Same one definition, your choice of distribution.
223
+
223
224
  **Direct install** — your branded command (`acme-db install`,
224
225
  `npx @acme/acme-db-mcp install`) writes each host's native MCP + hook +
225
226
  content-surface config in place, with no per-platform marketplace submission or
226
227
  review. This is the Quick start path above.
227
228
 
228
- **Marketplace plugin** the framework `package` command turns the connector
229
- into a real plugin/extension bundle (manifest + bundled commands, agents,
230
- skills, hooks, MCP) from one definition. This is framework tooling, so run it
231
- with `npx @ken-jo/agent-connector package --connector ...`. If you already keep
232
- the framework CLI installed globally, `agent-connector package --connector ...`
233
- is only the shorter equivalent. Hooks + MCP keep the
234
- telemetry serve-wrapper, so a marketplace-installed connector still reports
235
- per-tool tokens for its stdio server. `--format all` emits **10 host formats**:
236
-
237
- | Format | Hosts |
238
- |---|---|
239
- | `claude-plugin` | Claude Code · Codex · VS Code Copilot · OpenClaw · OMP |
240
- | `codex-plugin` | Codex (`.codex-plugin/` manifest variant) |
241
- | `copilot-plugin` | GitHub Copilot CLI |
242
- | `factory-plugin` | Droid |
243
- | `gemini-extension` | Gemini CLI |
244
- | `qwen-extension` | Qwen Code |
245
- | `agy-plugin` | Antigravity (CLI + IDE) |
246
- | `cursor-plugin` | Cursor |
247
- | `kimi-plugin` | Kimi CLI |
248
- | `npm-plugin` | OpenCode · Kilo CLI · Pi |
249
-
250
- Two official **MCP standard artifacts** are opt-in (they need a `publish` block,
251
- so they're excluded from `--format all`) — `mcp-server-json` (an MCP Registry
252
- `server.json`) and `mcpb` (a one-click MCPB bundle); see
253
- [Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem).
254
-
255
- ```bash
256
- # emit every host format (mcp-server-json + mcpb are opt-in by name)
257
- npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
258
- npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format gemini-extension --out ./ext # or just one
259
-
260
- # if you already keep the framework CLI globally installed, the same command is:
261
- agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
262
-
263
- # e.g. Claude Code: /plugin marketplace add ./dist-plugin/claude-plugin
264
- # /plugin install <connector-id>@agent-connector
265
- # e.g. Gemini CLI: gemini extensions install ./dist-plugin/gemini-extension/<id>
266
- ```
267
-
268
- > **Embedded-path caveat.** Most host bundles bake in the absolute home-bin
269
- > launcher path of the machine that ran `package`, so they're valid for a
270
- > **local install on that same machine/home**. For shared distribution use
271
- > `npm-plugin` or the MCP standard artifacts, or re-run `package` per machine.
272
-
273
- **Let your branded MCP package drive the host's own install flow** with
274
- `install --method marketplace`:
275
-
276
- ```bash
277
- acme-db install --method marketplace
278
-
279
- # framework fallback for local framework development/debugging only
280
- npx @ken-jo/agent-connector install --method marketplace --connector ./agent-connector.config.mjs
281
- ```
282
-
283
- - **What it does** — stages the bundle, registers a local marketplace where the
284
- host has one, then runs the host's plugin-install verb (or, for npm-plugin
285
- hosts, writes a local `file://` entry); headless and idempotent. Other
286
- marketplace-format hosts print the exact manual commands.
287
- - **Host coverage** — live-verified for Claude Code, Codex, OpenCode, Kilo
288
- (CLI + ext), and Antigravity (CLI + IDE) on Linux, Windows, and macOS; Droid
289
- and Qwen Code have the driver shipped but pending a live host; Gemini CLI is
290
- legacy (sunsetting toward Antigravity driver kept for existing installs).
291
- - **Safety + reversal** — a guard refuses installing the same connector by BOTH
292
- methods, `uninstall --method auto` reverses whichever method is installed, and
293
- `doctor` checks registration drift.
294
-
295
- ### Ship a branded CLI
296
-
297
- A connector developer can ship their **own** bin instead of having users type
298
- `agent-connector`. `createConnectorCli({ packageJson, connector })` (from the
299
- `@ken-jo/agent-connector/cli` export) derives the bin name/version from
300
- `package.json` and exposes **every** subcommand under your brand, fully
301
- delegated and **auto-scoped** to your connector — so your users do not need a
302
- framework global install or `--connector` for branded MCP install/doctor/uninstall. See
303
- [`examples/branded-cli`](examples/branded-cli) for the full, runnable package.
304
-
305
- ```js
306
- #!/usr/bin/env node
307
- // bin.mjs every agent-connector subcommand, branded as `acme-db`
308
- import { createConnectorCli } from "@ken-jo/agent-connector/cli";
309
-
310
- // run() resolves to the exit code and never calls process.exit
311
- process.exitCode = await createConnectorCli({
312
- // packageJson supplies public identity: name, mcpName, bin, version.
313
- packageJson: new URL("./package.json", import.meta.url),
314
- // connector supplies behavior: server, hooks, skills, telemetry.
315
- // These are two layers, not duplicate id/display-name inputs.
316
- connector: new URL("./agent-connector.config.mjs", import.meta.url),
317
- }).run();
318
- ```
319
-
320
- After a consumer installs **your** package, the `acme-db` bin is on their PATH
321
- and every command is scoped to your connector (`acme-db install` ≈
322
- `agent-connector install --connector ./agent-connector.config.mjs`). Auto-scoping
323
- is pure argument injection over the SAME single home binary; `serve` and `hook`
324
- still route through the one `~/.agent-connector` home binary every host config
325
- points back to. An explicit `--connector` / `--connector-id` always overrides
326
- the injected default.
327
-
328
- ## What you define once
329
-
330
- A single `defineConnector({...})` declares your MCP **server** + lifecycle
331
- **hooks**, and optionally the additional surfaces — **commands**, **skills**,
332
- **subagents**, **memory**, **statusline**, **actions**, plus host-native escape
333
- hatches. agent-connector renders each surface into every detected host's native
334
- format, or *skip-warns* (never silently drops) where a host can't support it.
335
-
336
- ```ts
337
- import { fileURLToPath } from "node:url";
338
- import { defineConnector } from "@ken-jo/agent-connector/sdk";
339
-
340
- // Resolve your server to an absolute path — host CLIs spawn it from their own CWD.
341
- const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
342
-
343
- export default defineConnector({
344
- server: {
345
- transport: "stdio",
346
- command: "node", // or "npx", "python", etc. — whatever starts your server
347
- args: [serverPath], // replace with your real server entrypoint
348
- env: { ACME_DB_DSN: "${env:ACME_DB_DSN}" },
349
- },
350
- hooks: {
351
- PreToolUse: {
352
- matcher: "acme_write",
353
- async handler(evt) {
354
- return evt.toolName === "acme_write"
355
- ? { decision: "ask", reason: "Confirm write" }
356
- : { decision: "allow" };
357
- },
358
- },
359
- },
360
- // telemetry is on by default
361
- });
362
- ```
363
-
364
- `npx @acme/acme-db-mcp install` turns that into, e.g.:
365
-
366
- | Host | What gets written |
367
- |---|---|
368
- | **Claude Code** | `~/.claude.json` → `mcpServers.acme-db` (+ hooks in `~/.claude/settings.json`) |
369
- | **Codex CLI** | `~/.codex/config.toml` → `[mcp_servers.acme-db]` (+ `~/.codex/hooks.json`) |
370
- | **Cursor** | `~/.cursor/mcp.json` → `mcpServers.acme-db` (+ `~/.cursor/hooks.json`) |
371
-
372
- …each pointing hooks at a **single stable home binary**, so one update propagates
373
- everywhere.
374
-
375
- **Secret env-refs (`${env:VAR}`).** Write `"${env:VAR}"` (or `"${env:VAR:-default}"`) anywhere in `command` / `args` / `env` / `url` / `headers` to reference an environment variable.
376
-
377
- <details>
378
- <summary>Native interpolation vs. literal-at-install resolution</summary>
379
-
380
- > On hosts with **native** interpolation (Claude Code, Cursor, VS Code Copilot,
381
- > amp, codebuff) the token is written through to the host config and resolved at
382
- > runtime. Every other host has **no** native interpolation, so the value is
383
- > resolved to a **literal at install time**; an unset variable with no default
384
- > resolves to an **empty string**, and `install` emits a `warn` for it on a
385
- > literal-resolving host.
386
-
387
- </details>
388
-
389
- **Native hooks escape hatch.** The normalized `hooks` API covers the 13 cross-platform events; for host-only events (Claude Code alone ships 30) declare `platforms: { "claude-code": { nativeHooks: { TaskCompleted: { handler } } } }`.
390
-
391
- <details>
392
- <summary>Raw-payload semantics and the ~14 passthrough hosts</summary>
393
-
394
- > The handler receives the host's **raw** payload and whatever it returns is the
395
- > **verbatim** JSON reply (exit 0 only — exit-2 blocking isn't modeled). Hosts
396
- > supporting host-native passthrough: `amp`, `claude-code`, `continue`,
397
- > `copilot-cli`, `cursor`, `gemini-cli`, `hermes`, `jetbrains-copilot`, `kimi`,
398
- > `nemoclaw`, `omp`, `openclaw`, `opencode`, `qwen-code`. Others skip-warn.
399
-
400
- </details>
401
-
402
- **Host-config key patches.** For host-exclusive *settings keys* no other surface reaches, declare `platforms: { "claude-code": { configPatch: [{ key, value, reason }] } }` (Claude Code only for now; other hosts skip-warn with the exact manual edit).
403
-
404
- <details>
405
- <summary>Set-if-absent + refcount + denylist semantics</summary>
406
-
407
- > Semantics are fixed: **set-if-absent + skip-warn on any conflict** never
408
- > overwrite, never deep-merge. Ownership is refcounted in a persisted ledger;
409
- > security-relevant keys and keys agent-connector models as first-class surfaces
410
- > are hard-refused.
411
-
412
- </details>
413
-
414
- ### Memory, statusline, actions, and the SDK
415
-
416
- - **`memory`** (aligned with the [AGENTS.md](https://agents.md) standard) — ship
417
- standing guidance into the memory/rules file each host actually reads.
418
- AGENTS.md adopters get the standard file; host-specific exceptions such as
419
- Claude Code `CLAUDE.md` and Gemini CLI → `GEMINI.md` are wired per their own
420
- official docs. Writes are surgical marker-fenced, hash-stamped managed blocks
421
- multiple connectors coexist, bytes outside your markers are never touched,
422
- and uninstall excises exactly your blocks.
423
- - **`statusline`** (`defineStatusline`) a live HUD render function the host
424
- calls on every status refresh. v1 registers Claude Code's `settings.json.statusLine`
425
- or Qwen Code's `settings.json.ui.statusLine` (set-if-absent, refcounted,
426
- reversible); other hosts skip-warn. The runtime is **fail-safe**: any error
427
- exits 0 with empty stdout so a HUD never wedges the host.
428
- - **`actions`** (`defineAction`) — named, user-invocable operations dispatched by
429
- the universal verb `agent-connector action <platform> <id> --connector <id>`.
430
- `install` emits host-side affordances on `droid`, `hermes`, `nemoclaw`, `omp`,
431
- `openclaw`, and `warp`; other hosts skip-warn. Error semantics are
432
- user-triggered (unknown id or throw exits 1).
433
- - **The Connector SDK** (`@ken-jo/agent-connector/sdk`, `/sdk/test`) — the
434
- consolidated authoring surface re-exports `defineConnector`, the full `define*`
435
- family (`defineHook`, `defineCommand`, `defineSkill`, `defineSubagent`,
436
- `defineMemory`, `defineStatusline`, `defineAction`, `defineConfigPatch`,
437
- `defineNativeHook`), introspection helpers (`hostsSupporting`,
438
- `capabilitiesOf`, `surfaceSupport`), and an **offline harness**
439
- (`simulate`, `explain`, `explainHooks`) that runs the real adapter
440
- parse→handler→format chain to answer *"does my handler actually work on host
441
- X?"* before you touch a real host. Agent-facing guidance is intentionally
442
- split into a small router skill plus focused references under
443
- [`skills/agent-connector/references`](skills/agent-connector/references). See
444
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
445
-
446
- ## How it works
447
-
448
- - **Home-dir, single binary.** The runtime installs once under
449
- `~/.agent-connector` (override `AGENT_CONNECTOR_DATA_DIR`). Every host config we
450
- write is a thin pointer back to that one binary. Updates are
451
- **explicit/managed** (`agent-connector upgrade`), never silent auto-update.
452
- - **Per-project data, kept.** Telemetry/state is keyed by a stable project
453
- identity (git remote or normalized path), partitioned per project, stored under
454
- the home data-root surviving `git clean`, shared across hosts opening the same
455
- project.
456
- - **Native config stays native.** We never relocate a host's own settings files;
457
- only framework-owned state lives under the data-root.
458
- - **Windows-first correctness.** No symlinks, no POSIX-only assumptions.
459
-
460
- **Three hook paradigms**, all install-verified across the registered platform
461
- set (see [`/coverage`](https://agent-connector.ai/coverage) and
462
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)):
463
-
464
- | Paradigm | Platforms |
465
- |---|---|
466
- | `json-stdio` (full hook dispatch) | CodeBuddy · Claude Code · Codex CLI · Cursor · VS Code Copilot · JetBrains Copilot · GitHub Copilot CLI · Gemini CLI · Qwen CLI · Kiro · Kimi CLI · Crush · Goose · Hermes · Droid (Factory) · OpenHands · Antigravity · Antigravity CLI · Continue · Amazon Q · Grok CLI · Devin CLI |
467
- | `mcp-only` (MCP registration only) | Warp · Roo Code · Cline · Trae · Zed · Codebuff · Mux · Pi · Windsurf · Open Interpreter · Junie · Mistral Vibe |
468
- | `ts-plugin` (generated bridge module) | OpenCode · MiMoCode · Kilo CLI · Kilo · OMP · NemoClaw · OpenClaw · Amp |
469
-
470
- Adding a platform = **one registry entry + one adapter**.
471
-
472
- ## CLI
473
-
474
- | Command | Purpose |
475
- |---|---|
476
- | `detect` | List installed platforms, scopes, capabilities, hook paradigm. |
477
- | `install [--scope …] [--targets …] [--method …] [--dry-run] [--force]` | Render + write MCP + hooks + content surfaces across targets. |
478
- | `uninstall [--targets …] [--purge] [--method …]` | Full inverse — removes everything we wrote; `--purge` also clears framework state. |
479
- | `upgrade [--channel …]` | Re-render host config + heal stale pointers + refresh the home binary (alias: `update`, `sync`); never a silent self-update. |
480
- | `doctor [--probe] [--explain]` | Per-platform health checks with fixes; `--probe` runs a live MCP handshake, `--explain` prints the per-`(host, event)` hook honor matrix. |
229
+ Framework fallback can also install a connector source directly when you are
230
+ testing distribution intake: `github:owner/repo`, `npm:@scope/package@version`,
231
+ or an `archive:` / direct `.tgz` source. Every fetched source is cached under
232
+ `~/.agent-connector/sources/` and must contain `agent-connector.config.*`.
233
+
234
+ **Marketplace plugin** the framework `package` command turns the connector
235
+ into a real plugin/extension bundle (manifest + bundled commands, agents,
236
+ skills, hooks, MCP) from one definition. This is framework tooling, so run it
237
+ with `npx @ken-jo/agent-connector package --connector ...`. If you already keep
238
+ the framework CLI installed globally, `agent-connector package --connector ...`
239
+ is only the shorter equivalent. Hooks + MCP keep the
240
+ telemetry serve-wrapper, so a marketplace-installed connector still reports
241
+ per-tool tokens for its stdio server. `--format all` emits **10 host formats**:
242
+
243
+ | Format | Hosts |
244
+ |---|---|
245
+ | `claude-plugin` | Claude Code · Codex · VS Code Copilot · OpenClaw · OMP |
246
+ | `codex-plugin` | Codex (`.codex-plugin/` manifest variant) |
247
+ | `copilot-plugin` | GitHub Copilot CLI |
248
+ | `factory-plugin` | Droid |
249
+ | `gemini-extension` | Gemini CLI |
250
+ | `qwen-extension` | Qwen Code |
251
+ | `agy-plugin` | Antigravity (CLI + IDE) |
252
+ | `cursor-plugin` | Cursor |
253
+ | `kimi-plugin` | Kimi CLI |
254
+ | `npm-plugin` | OpenCode · Kilo CLI · Pi |
255
+
256
+ Two official **MCP standard artifacts** are opt-in (they need a `publish` block,
257
+ so they're excluded from `--format all`) — `mcp-server-json` (an MCP Registry
258
+ `server.json`) and `mcpb` (a one-click MCPB bundle); see
259
+ [Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem).
260
+
261
+ ```bash
262
+ # emit every host format (mcp-server-json + mcpb are opt-in by name)
263
+ npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
264
+ npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format gemini-extension --out ./ext # or just one
265
+
266
+ # if you already keep the framework CLI globally installed, the same command is:
267
+ agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
268
+
269
+ # e.g. Claude Code: /plugin marketplace add ./dist-plugin/claude-plugin
270
+ # /plugin install <connector-id>@agent-connector
271
+ # e.g. Gemini CLI: gemini extensions install ./dist-plugin/gemini-extension/<id>
272
+ ```
273
+
274
+ > **Embedded-path caveat.** Most host bundles bake in the absolute home-bin
275
+ > launcher path of the machine that ran `package`, so they're valid for a
276
+ > **local install on that same machine/home**. For shared distribution use
277
+ > `npm-plugin` or the MCP standard artifacts, or re-run `package` per machine.
278
+
279
+ **Let your branded MCP package drive the host's own install flow** with
280
+ `install --method marketplace`:
281
+
282
+ ```bash
283
+ acme-db install --method marketplace
284
+
285
+ # framework fallback for local framework development/debugging only
286
+ npx @ken-jo/agent-connector install --method marketplace --connector ./agent-connector.config.mjs
287
+ ```
288
+
289
+ - **What it does** stages the bundle, registers a local marketplace where the
290
+ host has one, then runs the host's plugin-install verb (or, for npm-plugin
291
+ hosts, writes a local `file://` entry); headless and idempotent. Other
292
+ marketplace-format hosts print the exact manual commands.
293
+ - **Host coverage** live-verified for Claude Code, Codex, OpenCode, Kilo
294
+ (CLI + ext), and Antigravity (CLI + IDE) on Linux, Windows, and macOS; Droid
295
+ and Qwen Code have the driver shipped but pending a live host; Gemini CLI is
296
+ legacy (sunsetting toward Antigravity — driver kept for existing installs).
297
+ - **Safety + reversal** — a guard refuses installing the same connector by BOTH
298
+ methods, `uninstall --method auto` reverses whichever method is installed, and
299
+ `doctor` checks registration drift.
300
+
301
+ ### Ship a branded CLI
302
+
303
+ A connector developer can ship their **own** bin instead of having users type
304
+ `agent-connector`. `createConnectorCli({ packageJson, connector })` (from the
305
+ `@ken-jo/agent-connector/cli` export) derives the bin name/version from
306
+ `package.json` and exposes **every** subcommand under your brand, fully
307
+ delegated and **auto-scoped** to your connector — so your users do not need a
308
+ framework global install or `--connector` for branded MCP install/doctor/uninstall. See
309
+ [`examples/branded-cli`](examples/branded-cli) for the full, runnable package.
310
+
311
+ ```js
312
+ #!/usr/bin/env node
313
+ // bin.mjs every agent-connector subcommand, branded as `acme-db`
314
+ import { createConnectorCli } from "@ken-jo/agent-connector/cli";
315
+
316
+ // run() resolves to the exit code and never calls process.exit
317
+ process.exitCode = await createConnectorCli({
318
+ // packageJson supplies public identity: name, mcpName, bin, version.
319
+ packageJson: new URL("./package.json", import.meta.url),
320
+ // connector supplies behavior: server, hooks, skills, telemetry.
321
+ // These are two layers, not duplicate id/display-name inputs.
322
+ connector: new URL("./agent-connector.config.mjs", import.meta.url),
323
+ }).run();
324
+ ```
325
+
326
+ After a consumer installs **your** package, the `acme-db` bin is on their PATH
327
+ and every command is scoped to your connector (`acme-db install` ≈
328
+ `agent-connector install --connector ./agent-connector.config.mjs`). Auto-scoping
329
+ is pure argument injection over the SAME single home binary; `serve` and `hook`
330
+ still route through the one `~/.agent-connector` home binary every host config
331
+ points back to. An explicit `--connector` / `--connector-id` always overrides
332
+ the injected default.
333
+
334
+ ## What you define once
335
+
336
+ A single `defineConnector({...})` declares your MCP **server** + lifecycle
337
+ **hooks**, and optionally the additional surfaces — **commands**, **skills**,
338
+ **subagents**, **memory**, **statusline**, **actions**, plus host-native escape
339
+ hatches. agent-connector renders each surface into every detected host's native
340
+ format, or *skip-warns* (never silently drops) where a host can't support it.
341
+
342
+ ```ts
343
+ import { fileURLToPath } from "node:url";
344
+ import { defineConnector } from "@ken-jo/agent-connector/sdk";
345
+
346
+ // Resolve your server to an absolute path — host CLIs spawn it from their own CWD.
347
+ const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
348
+
349
+ export default defineConnector({
350
+ server: {
351
+ transport: "stdio",
352
+ command: "node", // or "npx", "python", etc. — whatever starts your server
353
+ args: [serverPath], // replace with your real server entrypoint
354
+ env: { ACME_DB_DSN: "${env:ACME_DB_DSN}" },
355
+ },
356
+ hooks: {
357
+ PreToolUse: {
358
+ matcher: "acme_write",
359
+ async handler(evt) {
360
+ return evt.toolName === "acme_write"
361
+ ? { decision: "ask", reason: "Confirm write" }
362
+ : { decision: "allow" };
363
+ },
364
+ },
365
+ },
366
+ // telemetry is on by default
367
+ });
368
+ ```
369
+
370
+ `npx @acme/acme-db-mcp install` turns that into, e.g.:
371
+
372
+ | Host | What gets written |
373
+ |---|---|
374
+ | **Claude Code** | `~/.claude.json` → `mcpServers.acme-db` (+ hooks in `~/.claude/settings.json`) |
375
+ | **Codex CLI** | `~/.codex/config.toml` → `[mcp_servers.acme-db]` (+ `~/.codex/hooks.json`) |
376
+ | **Cursor** | `~/.cursor/mcp.json` `mcpServers.acme-db` (+ `~/.cursor/hooks.json`) |
377
+
378
+ …each pointing hooks at a **single stable home binary**, so one update propagates
379
+ everywhere.
380
+
381
+ **Secret env-refs (`${env:VAR}`).** Write `"${env:VAR}"` (or `"${env:VAR:-default}"`) anywhere in `command` / `args` / `env` / `url` / `headers` to reference an environment variable.
382
+
383
+ <details>
384
+ <summary>Native interpolation vs. literal-at-install resolution</summary>
385
+
386
+ > On hosts with **native** interpolation (Claude Code, Cursor, VS Code Copilot,
387
+ > amp, codebuff) the token is written through to the host config and resolved at
388
+ > runtime. Every other host has **no** native interpolation, so the value is
389
+ > resolved to a **literal at install time**; an unset variable with no default
390
+ > resolves to an **empty string**, and `install` emits a `warn` for it on a
391
+ > literal-resolving host.
392
+
393
+ </details>
394
+
395
+ **Native hooks escape hatch.** The normalized `hooks` API covers the 13 cross-platform events; for host-only events (Claude Code alone ships 30) declare `platforms: { "claude-code": { nativeHooks: { TaskCompleted: { handler } } } }`.
396
+
397
+ <details>
398
+ <summary>Raw-payload semantics and the ~14 passthrough hosts</summary>
399
+
400
+ > The handler receives the host's **raw** payload and whatever it returns is the
401
+ > **verbatim** JSON reply (exit 0 only — exit-2 blocking isn't modeled). Hosts
402
+ > supporting host-native passthrough: `amp`, `claude-code`, `continue`,
403
+ > `copilot-cli`, `cursor`, `gemini-cli`, `hermes`, `jetbrains-copilot`, `kimi`,
404
+ > `nemoclaw`, `omp`, `openclaw`, `opencode`, `qwen-code`. Others skip-warn.
405
+
406
+ </details>
407
+
408
+ **Host-config key patches.** For host-exclusive *settings keys* no other surface reaches, declare `platforms: { "claude-code": { configPatch: [{ key, value, reason }] } }` (Claude Code only for now; other hosts skip-warn with the exact manual edit).
409
+
410
+ <details>
411
+ <summary>Set-if-absent + refcount + denylist semantics</summary>
412
+
413
+ > Semantics are fixed: **set-if-absent + skip-warn on any conflict** — never
414
+ > overwrite, never deep-merge. Ownership is refcounted in a persisted ledger;
415
+ > security-relevant keys and keys agent-connector models as first-class surfaces
416
+ > are hard-refused.
417
+
418
+ </details>
419
+
420
+ ### Memory, statusline, actions, and the SDK
421
+
422
+ - **`memory`** (aligned with the [AGENTS.md](https://agents.md) standard) ship
423
+ standing guidance into the memory/rules file each host actually reads.
424
+ AGENTS.md adopters get the standard file; host-specific exceptions such as
425
+ Claude Code `CLAUDE.md` and Gemini CLI `GEMINI.md` are wired per their own
426
+ official docs. Writes are surgical marker-fenced, hash-stamped managed blocks
427
+ multiple connectors coexist, bytes outside your markers are never touched,
428
+ and uninstall excises exactly your blocks.
429
+ - **`statusline`** (`defineStatusline`) — a live HUD render function the host
430
+ calls on every status refresh. v1 registers Claude Code's `settings.json.statusLine`
431
+ or Qwen Code's `settings.json.ui.statusLine` (set-if-absent, refcounted,
432
+ reversible); other hosts skip-warn. The runtime is **fail-safe**: any error
433
+ exits 0 with empty stdout so a HUD never wedges the host.
434
+ - **`actions`** (`defineAction`) — named, user-invocable operations dispatched by
435
+ the universal verb `agent-connector action <platform> <id> --connector <id>`.
436
+ `install` emits host-side affordances on `droid`, `hermes`, `nemoclaw`, `omp`,
437
+ `openclaw`, and `warp`; other hosts skip-warn. Error semantics are
438
+ user-triggered (unknown id or throw exits 1).
439
+ - **The Connector SDK** (`@ken-jo/agent-connector/sdk`, `/sdk/test`) the
440
+ consolidated authoring surface re-exports `defineConnector`, the full `define*`
441
+ family (`defineHook`, `defineCommand`, `defineSkill`, `defineSubagent`,
442
+ `defineMemory`, `defineStatusline`, `defineAction`, `defineConfigPatch`,
443
+ `defineNativeHook`), introspection helpers (`hostsSupporting`,
444
+ `capabilitiesOf`, `surfaceSupport`), and an **offline harness**
445
+ (`simulate`, `explain`, `explainHooks`) that runs the real adapter
446
+ parse→handler→format chain to answer *"does my handler actually work on host
447
+ X?"* before you touch a real host. Agent-facing guidance is intentionally
448
+ split into a small router skill plus focused references under
449
+ [`skills/agent-connector/references`](skills/agent-connector/references). See
450
+ [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
451
+
452
+ ## How it works
453
+
454
+ - **Home-dir, single binary.** The runtime installs once under
455
+ `~/.agent-connector` (override `AGENT_CONNECTOR_DATA_DIR`). Every host config we
456
+ write is a thin pointer back to that one binary. Updates are
457
+ **explicit/managed** (`agent-connector upgrade`), never silent auto-update.
458
+ - **Per-project data, kept.** Telemetry/state is keyed by a stable project
459
+ identity (git remote or normalized path), partitioned per project, stored under
460
+ the home data-root — surviving `git clean`, shared across hosts opening the same
461
+ project.
462
+ - **Native config stays native.** We never relocate a host's own settings files;
463
+ only framework-owned state lives under the data-root.
464
+ - **Windows-first correctness.** No symlinks, no POSIX-only assumptions.
465
+
466
+ **Three hook paradigms**, all install-verified across the registered platform
467
+ set (see [`/coverage`](https://agent-connector.ai/coverage) and
468
+ [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)):
469
+
470
+ | Paradigm | Platforms |
471
+ |---|---|
472
+ | `json-stdio` (full hook dispatch) | CodeBuddy · Claude Code · Codex CLI · Cursor · VS Code Copilot · JetBrains Copilot · GitHub Copilot CLI · Gemini CLI · Qwen CLI · Kiro · Kimi CLI · Crush · Goose · Hermes · Droid (Factory) · OpenHands · Antigravity · Antigravity CLI · Continue · Amazon Q · Grok CLI · Devin CLI |
473
+ | `mcp-only` (MCP registration only) | Warp · Roo Code · Cline · Trae · Zed · Codebuff · Mux · Pi · Windsurf · Open Interpreter · Junie · Mistral Vibe |
474
+ | `ts-plugin` (generated bridge module) | OpenCode · MiMoCode · Kilo CLI · Kilo · OMP · NemoClaw · OpenClaw · Amp |
475
+
476
+ Adding a platform = **one registry entry + one adapter**.
477
+
478
+ ## CLI
479
+
480
+ | Command | Purpose |
481
+ |---|---|
482
+ | `detect` | List installed platforms, scopes, capabilities, hook paradigm. |
483
+ | `install [<source>] [--scope …] [--targets …] [--method …] [--dry-run] [--force]` | Render + write MCP + hooks + content surfaces. `<source>` may be local, GitHub/git, `npm:<package>[@version]`, or `.tgz`/`archive:`. |
484
+ | `uninstall [--targets …] [--purge] [--method …]` | Full inverse — removes everything we wrote; `--purge` also clears framework state. |
485
+ | `upgrade [--channel …]` | Re-render host config + heal stale pointers + refresh the home binary (alias: `update`, `sync`); never a silent self-update. |
486
+ | `doctor [--probe] [--explain]` | Per-platform health checks with fixes; `--probe` runs a live MCP handshake, `--explain` prints the per-`(host, event)` hook honor matrix. |
481
487
  | `status` | Light install-state: which connectors are present on which hosts (always exits 0). |
482
488
  | `package [--format <fmt>\|all]` | Emit a host plugin bundle, or an OFFICIAL standard artifact: `mcp-server-json` (registry) · `mcpb` (one-click bundle). |
489
+ | `audit [--strict]` | Pre-install package identity lint: package name/version/bin, runtime dependency, connector id/version drift, and publish `files` coverage. |
483
490
  | `action <platform> <id> [--connector <id>]` | Run a declared action from the shell. |
484
- | `telemetry report [--by …] [--since …] [--connector <id>]` | Per-tool token footprint of **your connector's own wrapped server**. Stdio servers only. |
485
- | `telemetry export [--format …] [--connector <id>]` | Raw aggregate records for your wrapped server. |
486
- | `usage report\|export\|leaderboard [--by …]` | **No connector needed.** Host-native whole-conversation token totals parsed read-only from each agent CLI's own logs. Does NOT break down by individual MCP or tool. |
487
- | `leaderboard [--since …] [--connector <id>] [--scope …]` | Three origin-labeled boards with **different prerequisites** (🔌 MCP/plugin · 🛰️ host-native turns · 🖥️ host/user); counts are never summed across them. |
488
-
489
- > `hook` and `serve` also exist — internal entrypoints the written host configs
490
- > point at; you never run them by hand. Full flag-level reference: the
491
- > [docs site `/docs/dev/cli`](https://agent-connector.ai/docs/dev/cli) · `llms-full.txt` §3 (canonical, drift-guarded by tests).
492
-
493
- ## Token telemetry & usage
494
-
495
- Two independent, never-summed views of token cost:
496
-
497
- - **Per-tool telemetry for *your own* server** (the MCP-developer path). No host
498
- reports per-tool usage back to an MCP server, so agent-connector measures your
499
- server's *own* bytes (args in, results out, tool schemas) and tokenizes them
500
- locally — **aggregate counts only, stored locally, zero egress by default.**
501
- Per-tool telemetry is automatic for **stdio** servers; remote (`http`/`sse`/`ws`)
502
- servers are registered but not wrapped (the proxy can't intercept remote
503
- transports). Read it with `agent-connector telemetry report --by tool`.
504
- - **Connector-free usage** (`agent-connector usage`). Already run Claude Code /
505
- Codex / Cursor and just want totals? `usage` reads your local agent-CLI session
506
- logs **read-only** and never writes any host config — no connector, no install:
507
-
508
- ```bash
509
- npx @ken-jo/agent-connector usage report --by platform # CLI/model/project/session/day
510
- npx @ken-jo/agent-connector usage leaderboard --by platform # or --by model
511
- npx @ken-jo/agent-connector usage export --format csv --out usage.csv
512
- ```
513
-
514
- It reports **whole-conversation totals** per agent CLI / model / project /
515
- session / day. It does **not** itemize cost by individual MCP server or tool —
516
- agent CLIs don't log per-tool attribution.
517
-
518
- **Privacy & tokenizer.** Default tokenizer is `gpt-tokenizer` (pure-JS, no native
519
- build) — `o200k_base` for OpenAI/Codex-family, a documented approximation for
520
- Anthropic; falls back to a `chars/4` heuristic if it can't load. Every record
521
- carries a confidence tag. Raw tool arguments and results are never stored or
522
- transmitted. Off switch: `AGENT_CONNECTOR_TELEMETRY=0`, or
523
- `telemetry: { enabled: false }`.
524
-
525
- ## Publish to the MCP ecosystem
526
-
527
- Where the MCP standard already covers your server's functionality,
528
- agent-connector **emits the standard exactly** so your already-standard work is
529
- portable:
530
-
531
- - **`package --format mcp-server-json`** → an official **MCP Registry**
532
- `server.json` (schema `2025-12-11`). It describes your **real upstream server**
533
- (what a registry installer runs), not our telemetry wrapper. Publish it with
534
- the official `mcp-publisher` CLI.
535
- - **`package --format mcpb`** → an official **MCPB** (`.mcpb`, formerly DXT)
536
- bundle `manifest.json` (`manifest_version 0.3`) for one-click local install in
537
- Claude Desktop and any MCPB host, with secrets routed through the host keychain
538
- (`user_config`).
539
-
540
- Both read a `publish` block on your connector (the namespace you own + your
541
- published package + author):
542
-
543
- ```ts
544
- defineConnector({
545
- server: { transport: "stdio", command: "npx", args: ["-y", "@acme/acme-db-mcp"] },
546
- publish: {
547
- registryNamespace: "io.github.acme", // a namespace YOU proved ownership of
548
- packageName: "@acme/acme-db-mcp", // your REAL published package
549
- author: { name: "Acme Inc" },
550
- },
551
- });
552
- ```
553
-
554
- > **Config we write is the standard.** `install` writes each host's native MCP
555
- > config in the de-facto canonical `mcpServers` shape — `{ command, args, env }`
556
- > for stdio, `{ url, headers }` for remote. The spec transport slug for
557
- > streamable HTTP is `streamable-http` (registry `server.json`); host configs
558
- > canonically use `http`. WebSocket (`ws`) is **not** an MCP spec transport and
559
- > the standard artifacts reject it.
560
-
561
- > **Forward-compatible by transport.** The `serve` proxy is **byte-transparent**:
562
- > it forwards every JSON-RPC message verbatim and only tees a copy to count
563
- > `tools/call` round-trips. So newer MCP features ride through untouched —
564
- > **MCP Apps** (the official `io.modelcontextprotocol/ui` extension) and **any
565
- > reverse-DNS extension** negotiated at `initialize`. A connector whose server
566
- > already speaks these deploys across every host and keeps its telemetry today,
567
- > no agent-connector change required.
568
-
569
- ## Verification
570
-
571
- The full single-API contract is **install-verified across the current platform
572
- registry** by a committed registry-driven install-roundtrip harness that, for
573
- every adapter, drives the real install → uninstall into an isolated HOME and
574
- asserts on-disk placement + zero residue. A separate committed
575
- `scripts/verify-host.mjs` driver installs real host CLIs from the verification
576
- matrix and checks install → placement → clean-uninstall; live hook dispatch +
577
- telemetry are proven end-to-end where the host can run headlessly. IDE
578
- extensions / GUI editors with no headless CLI stay covered by the
579
- install-roundtrip harness.
580
-
581
- **Dogfood result:** porting the real multi-host context-mode plugin to
582
- `defineConnector` collapsed **~20,322 lines of hand-maintained per-host code down
583
- to ~76 lines** (a 99.63% reduction). See the reports under
584
- [`docs/research/`](docs/research/) and [`CHANGELOG.md`](CHANGELOG.md).
585
-
586
- ## Development
587
-
588
- ```bash
589
- npm install
590
- npm run typecheck
591
- npm run build
592
- npm run dev -- detect # run the CLI from source via tsx
593
-
594
- # Tests: scope + single-fork (NOT bare `npm test` — it OOMs low-RAM machines).
595
- npx vitest run --pool=forks --poolOptions.forks.singleFork=true --poolOptions.forks.maxForks=1 \
596
- tests/adapters/<host>.test.ts
597
- ```
598
-
599
- ## Contributing
600
-
601
- PRs welcome especially new host adapters and fixes verified against a host's
602
- primary source. See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the dev workflow,
603
- the single-fork test discipline, the **verify-first** rule for adapters, and the
604
- new-host checklist. Want a new agent CLI supported? Open a
605
- [host adapter request](https://github.com/ken-jo/agent-connector/issues/new?template=host_adapter_request.yml).
606
-
607
- Security reports: see [SECURITY.md](SECURITY.md).
608
-
609
- ## License
610
-
611
- Apache-2.0 © 2026 KenJo
491
+ | `telemetry report [--by …] [--since …] [--connector <id>]` | Per-tool token footprint of **your connector's own wrapped server**. Stdio servers only. |
492
+ | `telemetry export [--format …] [--connector <id>]` | Raw aggregate records for your wrapped server. |
493
+ | `usage report\|export\|leaderboard [--by …]` | **No connector needed.** Host-native whole-conversation token totals parsed read-only from each agent CLI's own logs. Does NOT break down by individual MCP or tool. |
494
+ | `leaderboard [--since …] [--connector <id>] [--scope …]` | Three origin-labeled boards with **different prerequisites** (🔌 MCP/plugin · 🛰️ host-native turns · 🖥️ host/user); counts are never summed across them. |
495
+
496
+ > `hook` and `serve` also exist — internal entrypoints the written host configs
497
+ > point at; you never run them by hand. Full flag-level reference: the
498
+ > [docs site `/docs/dev/cli`](https://agent-connector.ai/docs/dev/cli) · `llms-full.txt` §3 (canonical, drift-guarded by tests).
499
+
500
+ ## Token telemetry & usage
501
+
502
+ Two independent, never-summed views of token cost:
503
+
504
+ - **Per-tool telemetry for *your own* server** (the MCP-developer path). No host
505
+ reports per-tool usage back to an MCP server, so agent-connector measures your
506
+ server's *own* bytes (args in, results out, tool schemas) and tokenizes them
507
+ locally — **aggregate counts only, stored locally, zero egress by default.**
508
+ Per-tool telemetry is automatic for **stdio** servers; remote (`http`/`sse`/`ws`)
509
+ servers are registered but not wrapped (the proxy can't intercept remote
510
+ transports). Read it with `agent-connector telemetry report --by tool`.
511
+ - **Connector-free usage** (`agent-connector usage`). Already run Claude Code /
512
+ Codex / Cursor and just want totals? `usage` reads your local agent-CLI session
513
+ logs **read-only** and never writes any host config — no connector, no install:
514
+
515
+ ```bash
516
+ npx @ken-jo/agent-connector usage report --by platform # CLI/model/project/session/day
517
+ npx @ken-jo/agent-connector usage leaderboard --by platform # or --by model
518
+ npx @ken-jo/agent-connector usage export --format csv --out usage.csv
519
+ ```
520
+
521
+ It reports **whole-conversation totals** per agent CLI / model / project /
522
+ session / day. It does **not** itemize cost by individual MCP server or tool —
523
+ agent CLIs don't log per-tool attribution.
524
+
525
+ **Privacy & tokenizer.** Default tokenizer is `gpt-tokenizer` (pure-JS, no native
526
+ build) — `o200k_base` for OpenAI/Codex-family, a documented approximation for
527
+ Anthropic; falls back to a `chars/4` heuristic if it can't load. Every record
528
+ carries a confidence tag. Raw tool arguments and results are never stored or
529
+ transmitted. Off switch: `AGENT_CONNECTOR_TELEMETRY=0`, or
530
+ `telemetry: { enabled: false }`.
531
+
532
+ ## Publish to the MCP ecosystem
533
+
534
+ Where the MCP standard already covers your server's functionality,
535
+ agent-connector **emits the standard exactly** so your already-standard work is
536
+ portable:
537
+
538
+ - **`package --format mcp-server-json`** → an official **MCP Registry**
539
+ `server.json` (schema `2025-12-11`). It describes your **real upstream server**
540
+ (what a registry installer runs), not our telemetry wrapper. Publish it with
541
+ the official `mcp-publisher` CLI.
542
+ - **`package --format mcpb`** → an official **MCPB** (`.mcpb`, formerly DXT)
543
+ bundle `manifest.json` (`manifest_version 0.3`) for one-click local install in
544
+ Claude Desktop and any MCPB host, with secrets routed through the host keychain
545
+ (`user_config`).
546
+
547
+ Both read a `publish` block on your connector (the namespace you own + your
548
+ published package + author):
549
+
550
+ ```ts
551
+ defineConnector({
552
+ server: { transport: "stdio", command: "npx", args: ["-y", "@acme/acme-db-mcp"] },
553
+ publish: {
554
+ registryNamespace: "io.github.acme", // a namespace YOU proved ownership of
555
+ packageName: "@acme/acme-db-mcp", // your REAL published package
556
+ author: { name: "Acme Inc" },
557
+ },
558
+ });
559
+ ```
560
+
561
+ > **Config we write is the standard.** `install` writes each host's native MCP
562
+ > config in the de-facto canonical `mcpServers` shape — `{ command, args, env }`
563
+ > for stdio, `{ url, headers }` for remote. The spec transport slug for
564
+ > streamable HTTP is `streamable-http` (registry `server.json`); host configs
565
+ > canonically use `http`. WebSocket (`ws`) is **not** an MCP spec transport and
566
+ > the standard artifacts reject it.
567
+
568
+ > **Forward-compatible by transport.** The `serve` proxy is **byte-transparent**:
569
+ > it forwards every JSON-RPC message verbatim and only tees a copy to count
570
+ > `tools/call` round-trips. So newer MCP features ride through untouched —
571
+ > **MCP Apps** (the official `io.modelcontextprotocol/ui` extension) and **any
572
+ > reverse-DNS extension** negotiated at `initialize`. A connector whose server
573
+ > already speaks these deploys across every host and keeps its telemetry today,
574
+ > no agent-connector change required.
575
+
576
+ ## Verification
577
+
578
+ The full single-API contract is **install-verified across the current platform
579
+ registry** by a committed registry-driven install-roundtrip harness that, for
580
+ every adapter, drives the real install → uninstall into an isolated HOME and
581
+ asserts on-disk placement + zero residue. A separate committed
582
+ `scripts/verify-host.mjs` driver installs real host CLIs from the verification
583
+ matrix and checks install → placement → clean-uninstall; live hook dispatch +
584
+ telemetry are proven end-to-end where the host can run headlessly. IDE
585
+ extensions / GUI editors with no headless CLI stay covered by the
586
+ install-roundtrip harness.
587
+
588
+ **Dogfood result:** porting the real multi-host context-mode plugin to
589
+ `defineConnector` collapsed **~20,322 lines of hand-maintained per-host code down
590
+ to ~76 lines** (a 99.63% reduction). See the reports under
591
+ [`docs/research/`](docs/research/) and [`CHANGELOG.md`](CHANGELOG.md).
592
+
593
+ ## Development
594
+
595
+ ```bash
596
+ npm install
597
+ npm run typecheck
598
+ npm run build
599
+ npm run dev -- detect # run the CLI from source via tsx
600
+
601
+ # Tests: scope + single-fork (useful on low-RAM machines).
602
+ npm run test:single -- tests/adapters/<host>.test.ts
603
+ ```
604
+
605
+ ## Contributing
606
+
607
+ PRs welcome — especially new host adapters and fixes verified against a host's
608
+ primary source. See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the dev workflow,
609
+ the single-fork test discipline, the **verify-first** rule for adapters, and the
610
+ new-host checklist. Want a new agent CLI supported? Open a
611
+ [host adapter request](https://github.com/ken-jo/agent-connector/issues/new?template=host_adapter_request.yml).
612
+
613
+ Security reports: see [SECURITY.md](SECURITY.md).
614
+
615
+ ## License
616
+
617
+ Apache-2.0 © 2026 KenJo