@ken-jo/agent-connector 0.4.79 → 0.4.92

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 (200) hide show
  1. package/README.md +302 -561
  2. package/dist/{action-OHGFVKMC.js → action-CVIEPX4U.js} +14 -14
  3. package/dist/{amazon-q-B52EY2SV.js → amazon-q-TIT7FIW3.js} +5 -5
  4. package/dist/{amp-UXABVUKC.js → amp-NF3OAAUG.js} +5 -5
  5. package/dist/{antigravity-RZHN53VB.js → antigravity-7LPK7QOY.js} +6 -6
  6. package/dist/antigravity-cli-MDEMPPAH.js +467 -0
  7. package/dist/antigravity-cli-MDEMPPAH.js.map +1 -0
  8. package/dist/{chunk-QKLJU4JX.js → chunk-2Y2MZRLP.js} +56 -2
  9. package/dist/chunk-2Y2MZRLP.js.map +1 -0
  10. package/dist/{chunk-UBB7T54N.js → chunk-3C5AASHM.js} +3 -3
  11. package/dist/{chunk-LKAVD4HP.js → chunk-447JWFZO.js} +12 -12
  12. package/dist/{chunk-HORHRHNG.js → chunk-4NHXLXSD.js} +2 -2
  13. package/dist/chunk-5Z36KVU2.js +590 -0
  14. package/dist/chunk-5Z36KVU2.js.map +1 -0
  15. package/dist/{chunk-AY3RGRTT.js → chunk-6TF7MHG5.js} +2 -2
  16. package/dist/{chunk-AMK2K6XZ.js → chunk-7UT6OB52.js} +2 -2
  17. package/dist/{chunk-PZHB5TVA.js → chunk-AY3VFNOH.js} +5 -5
  18. package/dist/{chunk-4HVQ7IUM.js → chunk-DI5S6TXJ.js} +17 -4
  19. package/dist/chunk-DI5S6TXJ.js.map +1 -0
  20. package/dist/{chunk-ZXX5DVSE.js → chunk-FBCBHEGB.js} +8 -8
  21. package/dist/{chunk-4NSU3KWX.js → chunk-FJCUKXGX.js} +2 -2
  22. package/dist/{chunk-S4E6QQEM.js → chunk-FO5CEXXN.js} +7 -2
  23. package/dist/chunk-FO5CEXXN.js.map +1 -0
  24. package/dist/{chunk-IXOQDZWC.js → chunk-GZGLCCEE.js} +5 -1
  25. package/dist/chunk-GZGLCCEE.js.map +1 -0
  26. package/dist/{chunk-UYZ53KWS.js → chunk-IBLYVAWH.js} +31 -9
  27. package/dist/chunk-IBLYVAWH.js.map +1 -0
  28. package/dist/{chunk-4FWETID5.js → chunk-IVAWP6HH.js} +2 -2
  29. package/dist/{chunk-NBUEL74R.js → chunk-JFXL4HYA.js} +3 -3
  30. package/dist/{chunk-VD4EG6SG.js → chunk-JO2IM2JL.js} +538 -226
  31. package/dist/chunk-JO2IM2JL.js.map +1 -0
  32. package/dist/{chunk-7NXEHZAK.js → chunk-JVO6NBTT.js} +3 -3
  33. package/dist/{chunk-X457NOFE.js → chunk-KA55FISM.js} +116 -36
  34. package/dist/chunk-KA55FISM.js.map +1 -0
  35. package/dist/{chunk-YJP3KGLM.js → chunk-L26PSQTY.js} +4 -4
  36. package/dist/{chunk-YYNXIUR2.js → chunk-M2H7JURF.js} +2 -2
  37. package/dist/{chunk-56R2ER7K.js → chunk-NBYKLUF6.js} +2 -2
  38. package/dist/{chunk-IRUYJD23.js → chunk-NLE2J5P4.js} +1 -1
  39. package/dist/{chunk-VVFDU4IX.js → chunk-WFEHWTLM.js} +12 -5
  40. package/dist/{chunk-VVFDU4IX.js.map → chunk-WFEHWTLM.js.map} +1 -1
  41. package/dist/{chunk-LN76OGNR.js → chunk-Z2MRSS2I.js} +2 -2
  42. package/dist/{claude-code-T6ZRCMA7.js → claude-code-7RS4YVGZ.js} +9 -9
  43. package/dist/cli/sdk.js +7 -7
  44. package/dist/cli.js +1 -1
  45. package/dist/{cline-NNMVCECA.js → cline-BZQAUYPC.js} +5 -5
  46. package/dist/codebuddy-G42IKGKB.js +643 -0
  47. package/dist/codebuddy-G42IKGKB.js.map +1 -0
  48. package/dist/{codebuff-RJIDSEU3.js → codebuff-5RLTLZAU.js} +5 -5
  49. package/dist/{codex-RHKQKNNG.js → codex-XHAMJILX.js} +14 -8
  50. package/dist/{codex-RHKQKNNG.js.map → codex-XHAMJILX.js.map} +1 -1
  51. package/dist/{continue-MNM7YVJY.js → continue-JLIB7R7X.js} +6 -6
  52. package/dist/{copilot-cli-SMTX5F65.js → copilot-cli-XZSUYNQZ.js} +5 -5
  53. package/dist/{crush-NYDBHIJE.js → crush-ESERLVLT.js} +5 -5
  54. package/dist/{cursor-AOELDNZU.js → cursor-FUDOV5VK.js} +6 -6
  55. package/dist/{detect-ALAKE54S.js → detect-Z5BDTY6B.js} +4 -4
  56. package/dist/devin-Y7PWKVHY.js +510 -0
  57. package/dist/devin-Y7PWKVHY.js.map +1 -0
  58. package/dist/{doctor-UNF7FCF4.js → doctor-GAP27PP2.js} +27 -23
  59. package/dist/doctor-GAP27PP2.js.map +1 -0
  60. package/dist/{droid-PTCH2K7Y.js → droid-DTO5POTK.js} +5 -5
  61. package/dist/{gemini-cli-QGLN2UMS.js → gemini-cli-RBIG6U2F.js} +5 -5
  62. package/dist/{goose-DQ6GSZ5O.js → goose-VGNOP5J2.js} +6 -6
  63. package/dist/grok-cli-2RFBK6J3.js +482 -0
  64. package/dist/grok-cli-2RFBK6J3.js.map +1 -0
  65. package/dist/{hermes-E47IG63A.js → hermes-NUKFWZI5.js} +6 -6
  66. package/dist/{hook-GM2IDA3C.js → hook-XPR3AHDI.js} +14 -14
  67. package/dist/index.d.ts +2 -2
  68. package/dist/index.js +5 -5
  69. package/dist/install-O32TDIZP.js +382 -0
  70. package/dist/install-O32TDIZP.js.map +1 -0
  71. package/dist/{introspect-5o5ick0_.d.ts → introspect-BkId4LGP.d.ts} +1 -1
  72. package/dist/{jetbrains-copilot-4IOT3I2Y.js → jetbrains-copilot-FXZ5AOTS.js} +31 -9
  73. package/dist/jetbrains-copilot-FXZ5AOTS.js.map +1 -0
  74. package/dist/junie-TSXIZSCE.js +227 -0
  75. package/dist/junie-TSXIZSCE.js.map +1 -0
  76. package/dist/{kilo-TAHOPT2Q.js → kilo-JLH3KVZJ.js} +8 -8
  77. package/dist/{kilo-cli-X4NPJWGX.js → kilo-cli-5W36VJQZ.js} +8 -8
  78. package/dist/{kimi-Z7L2LEEI.js → kimi-R62W7HKZ.js} +5 -5
  79. package/dist/{kiro-YZ4TTZGD.js → kiro-AUJMGIBL.js} +81 -6
  80. package/dist/kiro-AUJMGIBL.js.map +1 -0
  81. package/dist/{leaderboard-DVW4WYJ6.js → leaderboard-YWMOSJBC.js} +7 -7
  82. package/dist/{mimo-code-G2CBZ4M6.js → mimo-code-PGLFFVER.js} +5 -5
  83. package/dist/mistral-vibe-36CZVQNQ.js +300 -0
  84. package/dist/mistral-vibe-36CZVQNQ.js.map +1 -0
  85. package/dist/{mux-JNM3F2NW.js → mux-HWL4N5KH.js} +5 -5
  86. package/dist/{nemoclaw-SHA4IUML.js → nemoclaw-QPHETUXM.js} +6 -6
  87. package/dist/{omp-OOVUNXME.js → omp-3TFMTJ5U.js} +5 -5
  88. package/dist/open-interpreter-UTBKE2EH.js +264 -0
  89. package/dist/open-interpreter-UTBKE2EH.js.map +1 -0
  90. package/dist/openclaw-RYFO5TLY.js +17 -0
  91. package/dist/{opencode-W2RK4M7G.js → opencode-JX7GBE5Q.js} +5 -5
  92. package/dist/openhands-AZW4PXJ3.js +384 -0
  93. package/dist/openhands-AZW4PXJ3.js.map +1 -0
  94. package/dist/{package-H5V3AZHR.js → package-2KKUGZFS.js} +13 -13
  95. package/dist/{pi-I7BLL4EI.js → pi-MRI3EBWU.js} +143 -6
  96. package/dist/pi-MRI3EBWU.js.map +1 -0
  97. package/dist/{qwen-code-JG7AF442.js → qwen-code-ISR6BEET.js} +9 -9
  98. package/dist/{roo-code-L5F7S6QH.js → roo-code-6TSCME4R.js} +5 -5
  99. package/dist/runtime/index.d.ts +1 -1
  100. package/dist/runtime/index.js +12 -12
  101. package/dist/sdk/index.d.ts +3 -3
  102. package/dist/sdk/index.js +6 -6
  103. package/dist/sdk/test.d.ts +2 -2
  104. package/dist/sdk/test.js +10 -10
  105. package/dist/{serve-WMO2TUW3.js → serve-EPRN7F2X.js} +14 -14
  106. package/dist/{status-WRLBTBRE.js → status-B2PG6YKR.js} +11 -11
  107. package/dist/{statusline-EUD4DMIP.js → statusline-5ERFMYSM.js} +13 -13
  108. package/dist/{telemetry-U3LGMR3D.js → telemetry-ZMCAWBWB.js} +10 -10
  109. package/dist/{trae-Z7CQ2A2Q.js → trae-7KDCYIMN.js} +5 -5
  110. package/dist/{types-D6RWGXm1.d.ts → types-D0RqWxT8.d.ts} +53 -9
  111. package/dist/{uninstall-TWPUEJEC.js → uninstall-M76BHLTH.js} +37 -27
  112. package/dist/uninstall-M76BHLTH.js.map +1 -0
  113. package/dist/{upgrade-EM6Y7QLH.js → upgrade-JLSCNAQA.js} +25 -19
  114. package/dist/upgrade-JLSCNAQA.js.map +1 -0
  115. package/dist/{usage-3HQDTXGY.js → usage-5I72HWCR.js} +3 -3
  116. package/dist/{usage-event-DWIGKO7V.js → usage-event-HIX4ZI45.js} +13 -13
  117. package/dist/{vscode-copilot-LU5NC4ZS.js → vscode-copilot-LILHAPJI.js} +20 -5
  118. package/dist/vscode-copilot-LILHAPJI.js.map +1 -0
  119. package/dist/{warp-4PPG5LOM.js → warp-KJUCWEA3.js} +5 -5
  120. package/dist/{windsurf-3T3RVXKM.js → windsurf-5TGGQR5I.js} +5 -5
  121. package/dist/{zed-LLOAUXSA.js → zed-EL3JCZ25.js} +123 -7
  122. package/dist/zed-EL3JCZ25.js.map +1 -0
  123. package/package.json +1 -1
  124. package/dist/antigravity-cli-KODEKUTM.js +0 -87
  125. package/dist/antigravity-cli-KODEKUTM.js.map +0 -1
  126. package/dist/chunk-4HVQ7IUM.js.map +0 -1
  127. package/dist/chunk-IXOQDZWC.js.map +0 -1
  128. package/dist/chunk-QKLJU4JX.js.map +0 -1
  129. package/dist/chunk-S4E6QQEM.js.map +0 -1
  130. package/dist/chunk-UYZ53KWS.js.map +0 -1
  131. package/dist/chunk-VD4EG6SG.js.map +0 -1
  132. package/dist/chunk-VKRGQLY4.js +0 -201
  133. package/dist/chunk-VKRGQLY4.js.map +0 -1
  134. package/dist/chunk-X457NOFE.js.map +0 -1
  135. package/dist/doctor-UNF7FCF4.js.map +0 -1
  136. package/dist/install-7O4XWH7T.js +0 -96
  137. package/dist/install-7O4XWH7T.js.map +0 -1
  138. package/dist/jetbrains-copilot-4IOT3I2Y.js.map +0 -1
  139. package/dist/kiro-YZ4TTZGD.js.map +0 -1
  140. package/dist/openclaw-BD56E5MV.js +0 -17
  141. package/dist/pi-I7BLL4EI.js.map +0 -1
  142. package/dist/uninstall-TWPUEJEC.js.map +0 -1
  143. package/dist/upgrade-EM6Y7QLH.js.map +0 -1
  144. package/dist/vscode-copilot-LU5NC4ZS.js.map +0 -1
  145. package/dist/zed-LLOAUXSA.js.map +0 -1
  146. /package/dist/{action-OHGFVKMC.js.map → action-CVIEPX4U.js.map} +0 -0
  147. /package/dist/{amazon-q-B52EY2SV.js.map → amazon-q-TIT7FIW3.js.map} +0 -0
  148. /package/dist/{amp-UXABVUKC.js.map → amp-NF3OAAUG.js.map} +0 -0
  149. /package/dist/{antigravity-RZHN53VB.js.map → antigravity-7LPK7QOY.js.map} +0 -0
  150. /package/dist/{chunk-UBB7T54N.js.map → chunk-3C5AASHM.js.map} +0 -0
  151. /package/dist/{chunk-LKAVD4HP.js.map → chunk-447JWFZO.js.map} +0 -0
  152. /package/dist/{chunk-HORHRHNG.js.map → chunk-4NHXLXSD.js.map} +0 -0
  153. /package/dist/{chunk-AY3RGRTT.js.map → chunk-6TF7MHG5.js.map} +0 -0
  154. /package/dist/{chunk-AMK2K6XZ.js.map → chunk-7UT6OB52.js.map} +0 -0
  155. /package/dist/{chunk-PZHB5TVA.js.map → chunk-AY3VFNOH.js.map} +0 -0
  156. /package/dist/{chunk-ZXX5DVSE.js.map → chunk-FBCBHEGB.js.map} +0 -0
  157. /package/dist/{chunk-4NSU3KWX.js.map → chunk-FJCUKXGX.js.map} +0 -0
  158. /package/dist/{chunk-4FWETID5.js.map → chunk-IVAWP6HH.js.map} +0 -0
  159. /package/dist/{chunk-NBUEL74R.js.map → chunk-JFXL4HYA.js.map} +0 -0
  160. /package/dist/{chunk-7NXEHZAK.js.map → chunk-JVO6NBTT.js.map} +0 -0
  161. /package/dist/{chunk-YJP3KGLM.js.map → chunk-L26PSQTY.js.map} +0 -0
  162. /package/dist/{chunk-YYNXIUR2.js.map → chunk-M2H7JURF.js.map} +0 -0
  163. /package/dist/{chunk-56R2ER7K.js.map → chunk-NBYKLUF6.js.map} +0 -0
  164. /package/dist/{chunk-IRUYJD23.js.map → chunk-NLE2J5P4.js.map} +0 -0
  165. /package/dist/{chunk-LN76OGNR.js.map → chunk-Z2MRSS2I.js.map} +0 -0
  166. /package/dist/{claude-code-T6ZRCMA7.js.map → claude-code-7RS4YVGZ.js.map} +0 -0
  167. /package/dist/{cline-NNMVCECA.js.map → cline-BZQAUYPC.js.map} +0 -0
  168. /package/dist/{codebuff-RJIDSEU3.js.map → codebuff-5RLTLZAU.js.map} +0 -0
  169. /package/dist/{continue-MNM7YVJY.js.map → continue-JLIB7R7X.js.map} +0 -0
  170. /package/dist/{copilot-cli-SMTX5F65.js.map → copilot-cli-XZSUYNQZ.js.map} +0 -0
  171. /package/dist/{crush-NYDBHIJE.js.map → crush-ESERLVLT.js.map} +0 -0
  172. /package/dist/{cursor-AOELDNZU.js.map → cursor-FUDOV5VK.js.map} +0 -0
  173. /package/dist/{detect-ALAKE54S.js.map → detect-Z5BDTY6B.js.map} +0 -0
  174. /package/dist/{droid-PTCH2K7Y.js.map → droid-DTO5POTK.js.map} +0 -0
  175. /package/dist/{gemini-cli-QGLN2UMS.js.map → gemini-cli-RBIG6U2F.js.map} +0 -0
  176. /package/dist/{goose-DQ6GSZ5O.js.map → goose-VGNOP5J2.js.map} +0 -0
  177. /package/dist/{hermes-E47IG63A.js.map → hermes-NUKFWZI5.js.map} +0 -0
  178. /package/dist/{hook-GM2IDA3C.js.map → hook-XPR3AHDI.js.map} +0 -0
  179. /package/dist/{kilo-TAHOPT2Q.js.map → kilo-JLH3KVZJ.js.map} +0 -0
  180. /package/dist/{kilo-cli-X4NPJWGX.js.map → kilo-cli-5W36VJQZ.js.map} +0 -0
  181. /package/dist/{kimi-Z7L2LEEI.js.map → kimi-R62W7HKZ.js.map} +0 -0
  182. /package/dist/{leaderboard-DVW4WYJ6.js.map → leaderboard-YWMOSJBC.js.map} +0 -0
  183. /package/dist/{mimo-code-G2CBZ4M6.js.map → mimo-code-PGLFFVER.js.map} +0 -0
  184. /package/dist/{mux-JNM3F2NW.js.map → mux-HWL4N5KH.js.map} +0 -0
  185. /package/dist/{nemoclaw-SHA4IUML.js.map → nemoclaw-QPHETUXM.js.map} +0 -0
  186. /package/dist/{omp-OOVUNXME.js.map → omp-3TFMTJ5U.js.map} +0 -0
  187. /package/dist/{openclaw-BD56E5MV.js.map → openclaw-RYFO5TLY.js.map} +0 -0
  188. /package/dist/{opencode-W2RK4M7G.js.map → opencode-JX7GBE5Q.js.map} +0 -0
  189. /package/dist/{package-H5V3AZHR.js.map → package-2KKUGZFS.js.map} +0 -0
  190. /package/dist/{qwen-code-JG7AF442.js.map → qwen-code-ISR6BEET.js.map} +0 -0
  191. /package/dist/{roo-code-L5F7S6QH.js.map → roo-code-6TSCME4R.js.map} +0 -0
  192. /package/dist/{serve-WMO2TUW3.js.map → serve-EPRN7F2X.js.map} +0 -0
  193. /package/dist/{status-WRLBTBRE.js.map → status-B2PG6YKR.js.map} +0 -0
  194. /package/dist/{statusline-EUD4DMIP.js.map → statusline-5ERFMYSM.js.map} +0 -0
  195. /package/dist/{telemetry-U3LGMR3D.js.map → telemetry-ZMCAWBWB.js.map} +0 -0
  196. /package/dist/{trae-Z7CQ2A2Q.js.map → trae-7KDCYIMN.js.map} +0 -0
  197. /package/dist/{usage-3HQDTXGY.js.map → usage-5I72HWCR.js.map} +0 -0
  198. /package/dist/{usage-event-DWIGKO7V.js.map → usage-event-HIX4ZI45.js.map} +0 -0
  199. /package/dist/{warp-4PPG5LOM.js.map → warp-KJUCWEA3.js.map} +0 -0
  200. /package/dist/{windsurf-3T3RVXKM.js.map → windsurf-5TGGQR5I.js.map} +0 -0
@@ -9,14 +9,14 @@ import {
9
9
  import {
10
10
  BaseAdapter,
11
11
  renderSkillMd
12
- } from "./chunk-VVFDU4IX.js";
12
+ } from "./chunk-WFEHWTLM.js";
13
13
  import {
14
14
  buildHomeBinHookCommand,
15
15
  buildWrappedStdio,
16
16
  isHomeBinHookCommand
17
- } from "./chunk-HORHRHNG.js";
18
- import "./chunk-YYNXIUR2.js";
19
- import "./chunk-IXOQDZWC.js";
17
+ } from "./chunk-4NHXLXSD.js";
18
+ import "./chunk-M2H7JURF.js";
19
+ import "./chunk-GZGLCCEE.js";
20
20
 
21
21
  // src/adapters/crush/index.ts
22
22
  import { existsSync, statSync } from "fs";
@@ -495,4 +495,4 @@ export {
495
495
  adapter,
496
496
  crush_default as default
497
497
  };
498
- //# sourceMappingURL=crush-NYDBHIJE.js.map
498
+ //# sourceMappingURL=crush-ESERLVLT.js.map
@@ -5,13 +5,13 @@ import {
5
5
  CursorAdapter,
6
6
  adapter,
7
7
  cursor_default
8
- } from "./chunk-NBUEL74R.js";
8
+ } from "./chunk-JFXL4HYA.js";
9
9
  import "./chunk-H53QZQJI.js";
10
10
  import "./chunk-BEFVJ2OE.js";
11
- import "./chunk-VVFDU4IX.js";
12
- import "./chunk-HORHRHNG.js";
13
- import "./chunk-YYNXIUR2.js";
14
- import "./chunk-IXOQDZWC.js";
11
+ import "./chunk-WFEHWTLM.js";
12
+ import "./chunk-4NHXLXSD.js";
13
+ import "./chunk-M2H7JURF.js";
14
+ import "./chunk-GZGLCCEE.js";
15
15
  export {
16
16
  CURSOR_EVENT_MAP,
17
17
  CURSOR_HOOKS_VERSION,
@@ -19,4 +19,4 @@ export {
19
19
  adapter,
20
20
  cursor_default as default
21
21
  };
22
- //# sourceMappingURL=cursor-AOELDNZU.js.map
22
+ //# sourceMappingURL=cursor-FUDOV5VK.js.map
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  print
4
- } from "./chunk-VKRGQLY4.js";
4
+ } from "./chunk-5Z36KVU2.js";
5
5
  import {
6
6
  detectInstalledPlatforms
7
- } from "./chunk-S4E6QQEM.js";
8
- import "./chunk-X457NOFE.js";
7
+ } from "./chunk-FO5CEXXN.js";
8
+ import "./chunk-KA55FISM.js";
9
9
 
10
10
  // src/cli/commands/detect.ts
11
11
  import { parseArgs } from "util";
@@ -71,4 +71,4 @@ async function run(argv) {
71
71
  export {
72
72
  run
73
73
  };
74
- //# sourceMappingURL=detect-ALAKE54S.js.map
74
+ //# sourceMappingURL=detect-Z5BDTY6B.js.map
@@ -0,0 +1,510 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ normalizeSessionSource
4
+ } from "./chunk-H53QZQJI.js";
5
+ import {
6
+ rewriteEnvRefs
7
+ } from "./chunk-BEFVJ2OE.js";
8
+ import {
9
+ BaseAdapter
10
+ } from "./chunk-WFEHWTLM.js";
11
+ import {
12
+ buildWrappedStdio,
13
+ isHomeBinHookCommand
14
+ } from "./chunk-4NHXLXSD.js";
15
+ import "./chunk-M2H7JURF.js";
16
+ import "./chunk-GZGLCCEE.js";
17
+
18
+ // src/adapters/devin/index.ts
19
+ import { existsSync } from "fs";
20
+ import { homedir, platform as osPlatform } from "os";
21
+ import { join } from "path";
22
+ var HOST = "devin";
23
+ var MCP_ROOT_KEY = "mcpServers";
24
+ function devinUserConfigDir() {
25
+ if (osPlatform() === "win32") {
26
+ const appData = process.env.APPDATA ?? join(homedir(), "AppData", "Roaming");
27
+ return join(appData, "devin");
28
+ }
29
+ return join(homedir(), ".config", "devin");
30
+ }
31
+ var SUPPORTED_EVENTS = /* @__PURE__ */ new Set([
32
+ "PreToolUse",
33
+ "PostToolUse",
34
+ "PermissionRequest",
35
+ "UserPromptSubmit",
36
+ "Stop",
37
+ "PostCompact",
38
+ "SessionStart",
39
+ "SessionEnd"
40
+ ]);
41
+ var DEVIN_POSTCOMPACT = "PostCompaction";
42
+ var DevinAdapter = class extends BaseAdapter {
43
+ id = HOST;
44
+ name = "Devin CLI (Cognition)";
45
+ paradigm = "json-stdio";
46
+ capabilities = {
47
+ // Memory surface: AGENTS.md-first managed block — project <projectDir>/AGENTS.md
48
+ // via the base default; user scope → ~/.config/devin/AGENTS.md (override below).
49
+ // Devin reads AGENTS.md / AGENT.md / CLAUDE.md identically as always-on rules
50
+ // (docs.devin.ai/cli/extensibility/rules).
51
+ supportsMemory: true,
52
+ preToolUse: true,
53
+ postToolUse: true,
54
+ userPromptSubmit: true,
55
+ stop: true,
56
+ sessionStart: true,
57
+ sessionEnd: true,
58
+ // PermissionRequest is a documented Devin hook event (decision-capable).
59
+ permissionRequest: true,
60
+ // PostCompaction (canonical PostCompact) — observe-only post-compaction hook.
61
+ postCompact: true,
62
+ // Devin documents NO Notification / PreCompact / SubagentStart / SubagentStop /
63
+ // PostToolUseFailure event — those stay unset (install reports the skip-warn).
64
+ notification: false,
65
+ preCompact: false,
66
+ // Devin's PreToolUse/PermissionRequest can block/deny via the simple
67
+ // {decision} reply, but it documents no tool-arg/-output rewrite and no
68
+ // context-injection reply channel.
69
+ canModifyArgs: false,
70
+ canModifyOutput: false,
71
+ canInjectSessionContext: false,
72
+ // Devin registers stdio and remote MCP servers. Remote is Streamable HTTP
73
+ // ("http", the URL default) with a legacy "sse" fallback — both map to our
74
+ // remote-transport handling; advertise both.
75
+ transports: ["stdio", "http", "sse"],
76
+ // Devin natively interpolates ${env:VAR} / ${file:/path} in secret-bearing
77
+ // server fields, so the token survives into the host config (pass-through).
78
+ nativeServerEnvInterpolation: true,
79
+ // Content surfaces. Devin reads Agent Skills from its `.devin` config tree
80
+ // at <configDir>/skills/<name>/SKILL.md — the SKILL.md format + frontmatter
81
+ // are byte-confirmed (docs.devin.ai/cli/extensibility/skills/creating-skills),
82
+ // so skills IS wired.
83
+ supportsSkills: true
84
+ // Devin ALSO documents native slash commands (/cli/reference/commands) and
85
+ // subagents (/cli/subagents), but their exact on-disk dir names are NOT
86
+ // byte-confirmed from a first-party config reference — to avoid fabricating a
87
+ // path, commands/subagents stay unset (BaseAdapter skip-warn) in v1. See the
88
+ // module header CEILING note.
89
+ };
90
+ // ── Detection ────────────────────────────────────────────────────────────
91
+ detectInstalled(projectDir) {
92
+ const userDir = devinUserConfigDir();
93
+ const userCfg = join(userDir, "config.json");
94
+ const projDir = join(projectDir, ".devin");
95
+ const projCfg = join(projDir, "config.json");
96
+ const binMarker = join(homedir(), ".local", "bin", "devin");
97
+ const userInstalled = existsSync(userDir) || existsSync(userCfg) || existsSync(binMarker);
98
+ const projInstalled = existsSync(projDir) || existsSync(projCfg);
99
+ const installed = userInstalled || projInstalled;
100
+ const scope = projInstalled && !userInstalled ? "project" : "user";
101
+ const configPath = scope === "project" ? projCfg : userCfg;
102
+ return {
103
+ id: this.id,
104
+ name: this.name,
105
+ installed,
106
+ paradigm: this.paradigm,
107
+ capabilities: this.capabilities,
108
+ configPath,
109
+ scope,
110
+ reason: installed ? `found Devin CLI config (${scope}) at ${configPath}` : `no Devin CLI config at ${userDir} or ${projDir}`,
111
+ confidence: installed ? "high" : "low"
112
+ };
113
+ }
114
+ // ── Native paths ─────────────────────────────────────────────────────────
115
+ getConfigDir(ctx) {
116
+ return ctx.scope === "project" ? join(ctx.projectDir, ".devin") : devinUserConfigDir();
117
+ }
118
+ getServerConfigPath(ctx) {
119
+ return join(this.getConfigDir(ctx), "config.json");
120
+ }
121
+ /** Hooks live under the `"hooks"` key in the SAME config.json. */
122
+ getHookConfigPath(ctx) {
123
+ return this.getServerConfigPath(ctx);
124
+ }
125
+ // ── Memory surface: user-scope AGENTS.md ─────────────────────────────────
126
+ // Project scope rides on the AGENTS.md base default (project root). User scope
127
+ // targets ~/.config/devin/AGENTS.md (%APPDATA%\devin\AGENTS.md on Windows) —
128
+ // Devin's documented global-rules file (docs.devin.ai/cli/extensibility/rules).
129
+ memoryTargets(ctx) {
130
+ if (this.memoryOverride(ctx)?.path || ctx.scope !== "user") {
131
+ return super.memoryTargets(ctx);
132
+ }
133
+ return [
134
+ {
135
+ path: join(devinUserConfigDir(), "AGENTS.md"),
136
+ reason: "Devin CLI global rules file (~/.config/devin/AGENTS.md)"
137
+ }
138
+ ];
139
+ }
140
+ // ── MCP server install / uninstall ───────────────────────────────────────
141
+ installServer(ctx) {
142
+ const { connector } = ctx;
143
+ const override = connector.platforms[HOST]?.server;
144
+ if (!connector.server || override === false) {
145
+ return [
146
+ {
147
+ platform: this.id,
148
+ action: "skip",
149
+ detail: connector.server ? "server registration disabled for devin" : "connector declares no MCP server"
150
+ }
151
+ ];
152
+ }
153
+ const server = override && typeof override === "object" ? { ...connector.server, ...override } : connector.server;
154
+ const serverPath = this.getServerConfigPath(ctx);
155
+ const entry = this.renderServerEntry(ctx, server);
156
+ return [
157
+ this.upsertServerInJson(serverPath, MCP_ROOT_KEY, connector.id, entry, ctx.dryRun)
158
+ ];
159
+ }
160
+ uninstallServer(ctx) {
161
+ const serverPath = this.getServerConfigPath(ctx);
162
+ return [
163
+ this.removeServerFromJson(serverPath, MCP_ROOT_KEY, ctx.connector.id, ctx.dryRun)
164
+ ];
165
+ }
166
+ /** Render a normalized ServerDef into Devin's native mcpServers entry. */
167
+ renderServerEntry(ctx, server) {
168
+ const transport = server.transport;
169
+ if (transport === "stdio") {
170
+ let command = server.command ?? "";
171
+ let args = [...server.args ?? []];
172
+ ({ command, args } = buildWrappedStdio(ctx, server, this.id, command, args));
173
+ const entry2 = { command };
174
+ if (args.length > 0) entry2.args = args;
175
+ const env = this.renderEnv(server.env);
176
+ if (env) entry2.env = env;
177
+ return entry2;
178
+ }
179
+ const entry = {
180
+ url: rewriteEnvRefs(server.url ?? "", devinEnvToken)
181
+ };
182
+ if (transport === "sse") entry.transport = "sse";
183
+ const headers = this.renderEnv(server.headers);
184
+ if (headers) entry.headers = headers;
185
+ return entry;
186
+ }
187
+ /**
188
+ * Render env/header values. Devin interpolates ${env:VAR} natively, so each
189
+ * ${env:VAR} token is passed THROUGH (rewriteEnvRefs/devinEnvToken) rather
190
+ * than baked to a literal — secrets never land in the committed config.
191
+ */
192
+ renderEnv(env) {
193
+ if (!env || Object.keys(env).length === 0) return void 0;
194
+ const out = {};
195
+ for (const [k, v] of Object.entries(env)) {
196
+ out[k] = rewriteEnvRefs(v, devinEnvToken);
197
+ }
198
+ return out;
199
+ }
200
+ // ── Hook install / uninstall (config.json "hooks" key, nested-rule shape) ──
201
+ installHooks(ctx) {
202
+ const { connector } = ctx;
203
+ if (connector.platforms[HOST]?.hooks === false) {
204
+ return [{ platform: this.id, action: "skip", detail: "hooks disabled for devin" }];
205
+ }
206
+ if (connector.hookEvents.length === 0) {
207
+ return [{ platform: this.id, action: "skip", detail: "connector declares no hooks" }];
208
+ }
209
+ const pending = connector.hookEvents.map((event) => ({
210
+ event,
211
+ matcher: connector.hooks[event]?.matcher ?? ""
212
+ }));
213
+ return this.upsertHookEntries(
214
+ ctx,
215
+ this.getHookConfigPath(ctx),
216
+ pending,
217
+ this.hookDescriptor(ctx)
218
+ );
219
+ }
220
+ uninstallHooks(ctx) {
221
+ return this.removeHookEntries(ctx, this.getHookConfigPath(ctx), this.hookDescriptor(ctx));
222
+ }
223
+ /**
224
+ * Devin's hook-merge descriptor (NESTED shape `{ matcher, hooks: [...] }`).
225
+ * Bound to `ctx` because Devin's ownership is CONNECTOR-GENERIC (ANY of our
226
+ * commands in the entry's inner `hooks`):
227
+ * - mapEvent = drop events outside SUPPORTED_EVENTS; the canonical
228
+ * PostCompact is rewritten to Devin's on-wire "PostCompaction" key while
229
+ * all other supported events map 1:1.
230
+ * - entryOwnsCommand reuses isOurCommand over the inner commands.
231
+ * - uninstall = inner-strip ONLY (ownsEntryForRemove never-true).
232
+ */
233
+ hookDescriptor(ctx) {
234
+ return {
235
+ mapEvent: (e) => {
236
+ if (!SUPPORTED_EVENTS.has(e)) return void 0;
237
+ return e === "PostCompact" ? DEVIN_POSTCOMPACT : e;
238
+ },
239
+ unmappedWarnDetail: (e) => `${e} has no Devin hook equivalent \u2014 skipped`,
240
+ renderEntry: (_event, matcher, command) => ({
241
+ matcher,
242
+ hooks: [{ type: "command", command }]
243
+ }),
244
+ entryOwnsCommand: (entry, _command) => (entry.hooks ?? []).some((h) => this.isOurCommand(h.command, ctx)),
245
+ ownsEntryForRemove: () => () => false,
246
+ stripInner: (c) => (entry) => {
247
+ const innerBefore = entry.hooks?.length ?? 0;
248
+ const inner = (entry.hooks ?? []).filter((h) => !this.isOurCommand(h.command, c));
249
+ return {
250
+ next: inner.length > 0 ? { matcher: entry.matcher ?? "", hooks: inner } : null,
251
+ removed: innerBefore - inner.length
252
+ };
253
+ },
254
+ skipDetail: (event) => `hooks.${event} already registered`,
255
+ removeDetail: (event, removed) => `hooks.${event} (${removed})`,
256
+ absentDetail: "no hooks section present",
257
+ noMatchDetail: "no matching hook entries"
258
+ };
259
+ }
260
+ /** True when a hook command references our home binary AND this connector id
261
+ * (anchored so a shared-prefix id can't collide — see isHomeBinHookCommand). */
262
+ isOurCommand(command, ctx) {
263
+ return isHomeBinHookCommand(command, ctx.homeBinPath, ctx.connector.id);
264
+ }
265
+ // ── Content surfaces: skills ──────────────────────────────────────────────
266
+ // CEILING (v1): only the byte-confirmed SKILL.md layout is wired. Devin
267
+ // documents the SKILL.md format + frontmatter
268
+ // (docs.devin.ai/cli/extensibility/skills/creating-skills) under the `.devin`
269
+ // tree (<configDir>/skills/<name>/SKILL.md). Commands/subagents on-disk dir
270
+ // names are NOT byte-confirmed from a first-party config reference, so they
271
+ // stay on the BaseAdapter skip-warn rather than guessing a path.
272
+ /** Native skill dir: <configDir>/skills/<name>. */
273
+ skillDir(ctx, name) {
274
+ return join(this.getConfigDir(ctx), "skills", name);
275
+ }
276
+ installSkills(ctx) {
277
+ const { connector } = ctx;
278
+ if (connector.platforms[HOST]?.skills === false) {
279
+ return [{ platform: this.id, action: "skip", detail: "skills disabled for devin" }];
280
+ }
281
+ if (connector.skills.length === 0) {
282
+ return [{ platform: this.id, action: "skip", detail: "connector declares no skills" }];
283
+ }
284
+ const changes = [];
285
+ for (const skill of connector.skills) {
286
+ const dir = this.skillDir(ctx, skill.name);
287
+ changes.push(
288
+ this.writeContentFile(join(dir, "SKILL.md"), this.renderSkill(skill), ctx.dryRun)
289
+ );
290
+ for (const [rel, contents] of Object.entries(skill.resources ?? {})) {
291
+ const target = this.resolveWithin(dir, rel);
292
+ if (target === null) {
293
+ changes.push({
294
+ platform: this.id,
295
+ action: "warn",
296
+ detail: `skill resource "${rel}" escapes the skill dir; skipped`
297
+ });
298
+ continue;
299
+ }
300
+ changes.push(this.writeContentFile(target, contents, ctx.dryRun));
301
+ }
302
+ }
303
+ return changes;
304
+ }
305
+ uninstallSkills(ctx) {
306
+ const { connector } = ctx;
307
+ if (connector.skills.length === 0) {
308
+ return [{ platform: this.id, action: "skip", detail: "connector declares no skills" }];
309
+ }
310
+ const changes = [];
311
+ for (const skill of connector.skills) {
312
+ const dir = this.skillDir(ctx, skill.name);
313
+ changes.push(this.removeContentFile(join(dir, "SKILL.md"), ctx.dryRun));
314
+ for (const rel of Object.keys(skill.resources ?? {})) {
315
+ const target = this.resolveWithin(dir, rel);
316
+ if (target === null) continue;
317
+ changes.push(this.removeContentFile(target, ctx.dryRun));
318
+ }
319
+ changes.push(this.removeDirIfEmpty(dir, ctx.dryRun));
320
+ }
321
+ return changes;
322
+ }
323
+ /**
324
+ * Render a skill's SKILL.md: frontmatter (name, description) + body. Devin's
325
+ * SKILL.md frontmatter documents name/description; extra keys pass through
326
+ * verbatim. No model/allowed-tools skill field is emitted.
327
+ */
328
+ renderSkill(skill) {
329
+ const frontmatter = {
330
+ name: skill.name,
331
+ description: skill.description
332
+ };
333
+ if (skill.extra) Object.assign(frontmatter, skill.extra);
334
+ return this.renderFrontmatterMd(frontmatter, skill.body);
335
+ }
336
+ // ── Diagnostics ──────────────────────────────────────────────────────────
337
+ getHealthChecks(ctx) {
338
+ const cfgPath = this.getServerConfigPath(ctx);
339
+ const connectorId = ctx.connector.id;
340
+ const homeBin = ctx.homeBinPath;
341
+ const hookEvents = ctx.connector.hookEvents;
342
+ return [
343
+ {
344
+ name: `${this.name}: config.json present`,
345
+ check: () => existsSync(cfgPath) ? { status: "OK", detail: cfgPath } : { status: "FAIL", detail: `not found: ${cfgPath}` }
346
+ },
347
+ {
348
+ name: `${this.name}: server entry registered`,
349
+ check: () => {
350
+ if (!ctx.connector.server) {
351
+ return { status: "OK", detail: "no MCP server declared" };
352
+ }
353
+ const cfg = this.readJson(cfgPath);
354
+ const bucket = cfg?.[MCP_ROOT_KEY];
355
+ if (!cfg || !bucket) {
356
+ return { status: "FAIL", detail: `no ${MCP_ROOT_KEY} in ${cfgPath}` };
357
+ }
358
+ return connectorId in bucket ? { status: "OK", detail: `${MCP_ROOT_KEY}.${connectorId} present` } : {
359
+ status: "FAIL",
360
+ detail: `no ${MCP_ROOT_KEY}.${connectorId} in ${cfgPath}`
361
+ };
362
+ }
363
+ },
364
+ {
365
+ name: `${this.name}: hook command registered`,
366
+ check: () => {
367
+ if (hookEvents.length === 0) {
368
+ return { status: "OK", detail: "no hooks declared" };
369
+ }
370
+ const file = this.readJson(cfgPath);
371
+ if (!file) return { status: "FAIL", detail: `cannot read ${cfgPath}` };
372
+ const hooks = file.hooks ?? {};
373
+ const registered = Object.values(hooks).some(
374
+ (entries) => (entries ?? []).some(
375
+ (e) => (e.hooks ?? []).some(
376
+ (h) => isHomeBinHookCommand(h.command, homeBin, connectorId)
377
+ )
378
+ )
379
+ );
380
+ return registered ? { status: "OK", detail: "hook command present" } : { status: "FAIL", detail: `no hook for ${connectorId} in ${cfgPath}` };
381
+ }
382
+ }
383
+ ];
384
+ }
385
+ // ── Runtime: parse Devin stdin JSON → normalized event ─────────────────────
386
+ parseEvent(event, raw) {
387
+ const input = raw ?? {};
388
+ const connectorId = typeof input.connector === "string" ? input.connector : "";
389
+ const sessionId = typeof input.session_id === "string" ? input.session_id : "";
390
+ const projectDir = typeof input.cwd === "string" ? input.cwd : void 0;
391
+ const base = {
392
+ hostPlatform: HOST,
393
+ connectorId,
394
+ sessionId,
395
+ raw,
396
+ ...projectDir !== void 0 ? { projectDir } : {}
397
+ };
398
+ switch (event) {
399
+ case "PreToolUse": {
400
+ const ev = {
401
+ ...base,
402
+ toolName: input.tool_name ?? "",
403
+ toolInput: input.tool_input ?? {}
404
+ };
405
+ return ev;
406
+ }
407
+ case "PostToolUse": {
408
+ const ev = {
409
+ ...base,
410
+ toolName: input.tool_name ?? "",
411
+ toolInput: input.tool_input ?? {},
412
+ ...toolResponseToString(input.tool_response) !== void 0 ? { toolOutput: toolResponseToString(input.tool_response) } : {}
413
+ };
414
+ return ev;
415
+ }
416
+ case "PermissionRequest": {
417
+ const ev = {
418
+ ...base,
419
+ toolName: input.tool_name ?? "",
420
+ toolInput: input.tool_input ?? {}
421
+ };
422
+ return ev;
423
+ }
424
+ case "UserPromptSubmit": {
425
+ const ev = {
426
+ ...base,
427
+ prompt: typeof input.prompt === "string" ? input.prompt : ""
428
+ };
429
+ return ev;
430
+ }
431
+ case "Stop": {
432
+ const ev = {
433
+ ...base,
434
+ ...typeof input.stop_hook_active === "boolean" ? { stopHookActive: input.stop_hook_active } : {}
435
+ };
436
+ return ev;
437
+ }
438
+ case "PostCompact": {
439
+ const ev = { ...base };
440
+ return ev;
441
+ }
442
+ case "SessionStart": {
443
+ const ev = {
444
+ ...base,
445
+ source: normalizeSessionSource(input.source)
446
+ };
447
+ return ev;
448
+ }
449
+ case "SessionEnd": {
450
+ const ev = {
451
+ ...base,
452
+ ...typeof input.reason === "string" ? { reason: input.reason } : {}
453
+ };
454
+ return ev;
455
+ }
456
+ default: {
457
+ throw new Error(`unsupported devin hook event: ${String(event)}`);
458
+ }
459
+ }
460
+ }
461
+ // ── Runtime: normalized response → Devin native (simple {decision}) reply ──
462
+ formatReply(event, response) {
463
+ const decision = response.decision ?? "allow";
464
+ if (event === "PostCompact" || event === "SessionEnd") {
465
+ return { exitCode: 0 };
466
+ }
467
+ if (event === "PermissionRequest") {
468
+ if (decision === "deny") {
469
+ return this.stdout({
470
+ decision: "deny",
471
+ reason: response.reason ?? "Denied by hook"
472
+ });
473
+ }
474
+ if (decision === "allow") {
475
+ return this.stdout({ decision: "approve" });
476
+ }
477
+ return { exitCode: 0 };
478
+ }
479
+ if (decision === "deny") {
480
+ return this.stdout({
481
+ decision: "block",
482
+ reason: response.reason ?? "Blocked by hook"
483
+ });
484
+ }
485
+ return { exitCode: 0 };
486
+ }
487
+ stdout(payload) {
488
+ return { exitCode: 0, stdout: JSON.stringify(payload) };
489
+ }
490
+ };
491
+ function devinEnvToken(name, def) {
492
+ return def !== void 0 ? `\${env:${name}:-${def}}` : `\${env:${name}}`;
493
+ }
494
+ function toolResponseToString(value) {
495
+ if (value == null) return void 0;
496
+ if (typeof value === "string") return value;
497
+ try {
498
+ return JSON.stringify(value);
499
+ } catch {
500
+ return String(value);
501
+ }
502
+ }
503
+ var adapter = new DevinAdapter();
504
+ var devin_default = adapter;
505
+ export {
506
+ DevinAdapter,
507
+ adapter,
508
+ devin_default as default
509
+ };
510
+ //# sourceMappingURL=devin-Y7PWKVHY.js.map