@openacp/cli 0.6.10 → 2026.326.2

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 (256) hide show
  1. package/dist/{action-detect-P7ZE4NEM.js → action-detect-QPA775HB.js} +2 -2
  2. package/dist/adapter-6ANPBSVU.js +16 -0
  3. package/dist/{discord-OMC52Y54.js → adapter-77ZCVABT.js} +520 -365
  4. package/dist/adapter-77ZCVABT.js.map +1 -0
  5. package/dist/{adapter-ZOANORGM.js → adapter-PQGHVG4K.js} +300 -93
  6. package/dist/adapter-PQGHVG4K.js.map +1 -0
  7. package/dist/{admin-6SYB6XCZ.js → admin-GBPZFFAU.js} +3 -3
  8. package/dist/agent-catalog-YHBFERYO.js +11 -0
  9. package/dist/{agent-dependencies-4OWBMZWZ.js → agent-dependencies-WS7Z2DFW.js} +2 -2
  10. package/dist/agent-registry-5LZT7CUB.js +9 -0
  11. package/dist/agent-store-VSHNY5GT.js +9 -0
  12. package/dist/{agents-QO7DKARJ.js → agents-BWU4MRRD.js} +3 -3
  13. package/dist/{api-client-CFQT5U7D.js → api-client-AQPNKXI2.js} +2 -2
  14. package/dist/api-server-3PYLRBCN.js +8 -0
  15. package/dist/api-server-CHVSUDBX.js +11 -0
  16. package/dist/{autostart-X33OGMX6.js → autostart-6JS565RY.js} +3 -3
  17. package/dist/chunk-2CX4IEEC.js +124 -0
  18. package/dist/chunk-2CX4IEEC.js.map +1 -0
  19. package/dist/{chunk-O7CPGUAI.js → chunk-4KGLKKQK.js} +4 -4
  20. package/dist/chunk-4KGLKKQK.js.map +1 -0
  21. package/dist/{chunk-W3EYKZNQ.js → chunk-4WXALZA3.js} +2 -2
  22. package/dist/chunk-4WXALZA3.js.map +1 -0
  23. package/dist/chunk-5OCGO27U.js +125 -0
  24. package/dist/chunk-5OCGO27U.js.map +1 -0
  25. package/dist/{chunk-OWP7RZ62.js → chunk-5ZOFBTOR.js} +118 -262
  26. package/dist/chunk-5ZOFBTOR.js.map +1 -0
  27. package/dist/chunk-6RXVEXF3.js +23 -0
  28. package/dist/chunk-6RXVEXF3.js.map +1 -0
  29. package/dist/{chunk-34M4OS5P.js → chunk-A6Y4GZM3.js} +3 -3
  30. package/dist/chunk-A6Y4GZM3.js.map +1 -0
  31. package/dist/chunk-AD3X6DGK.js +166 -0
  32. package/dist/chunk-AD3X6DGK.js.map +1 -0
  33. package/dist/{chunk-7QJS2XBD.js → chunk-AFKX424Q.js} +2 -2
  34. package/dist/chunk-AFKX424Q.js.map +1 -0
  35. package/dist/chunk-APS6UEFU.js +259 -0
  36. package/dist/chunk-APS6UEFU.js.map +1 -0
  37. package/dist/chunk-BLQUXO7S.js +113 -0
  38. package/dist/chunk-BLQUXO7S.js.map +1 -0
  39. package/dist/{chunk-WTZDAYZX.js → chunk-BQ6FR32N.js} +3 -3
  40. package/dist/chunk-BQ6FR32N.js.map +1 -0
  41. package/dist/chunk-FNRSWA2K.js +1 -0
  42. package/dist/chunk-FQEBWOZR.js +3557 -0
  43. package/dist/chunk-FQEBWOZR.js.map +1 -0
  44. package/dist/{chunk-4CTX774K.js → chunk-GJOY37U7.js} +4 -4
  45. package/dist/chunk-GJOY37U7.js.map +1 -0
  46. package/dist/{chunk-I7WC6E5S.js → chunk-HVBNCPAY.js} +2 -2
  47. package/dist/chunk-HVBNCPAY.js.map +1 -0
  48. package/dist/{chunk-2HMQOC7N.js → chunk-I3CGU5W7.js} +4 -4
  49. package/dist/chunk-I3CGU5W7.js.map +1 -0
  50. package/dist/{chunk-NVPG6JCL.js → chunk-L7YNNBI5.js} +3 -3
  51. package/dist/chunk-L7YNNBI5.js.map +1 -0
  52. package/dist/chunk-LGFWH3AE.js +26 -0
  53. package/dist/chunk-LGFWH3AE.js.map +1 -0
  54. package/dist/chunk-MLF4W5R6.js +101 -0
  55. package/dist/chunk-MLF4W5R6.js.map +1 -0
  56. package/dist/{chunk-KIRH7TUJ.js → chunk-MTSDOSXS.js} +3 -3
  57. package/dist/chunk-MTSDOSXS.js.map +1 -0
  58. package/dist/{chunk-J4SJTKIK.js → chunk-NAM4ERUW.js} +3 -3
  59. package/dist/chunk-NAM4ERUW.js.map +1 -0
  60. package/dist/{chunk-MKHUZLII.js → chunk-NBFIBGAT.js} +39 -25
  61. package/dist/chunk-NBFIBGAT.js.map +1 -0
  62. package/dist/{chunk-BNLGTZ34.js → chunk-O5RG4YZY.js} +3 -3
  63. package/dist/chunk-O5RG4YZY.js.map +1 -0
  64. package/dist/{chunk-JHYXKVV2.js → chunk-ODUM3D6X.js} +2 -2
  65. package/dist/chunk-ODUM3D6X.js.map +1 -0
  66. package/dist/chunk-OYSAN7UX.js +15 -0
  67. package/dist/chunk-OYSAN7UX.js.map +1 -0
  68. package/dist/chunk-P4SNGQNI.js +158 -0
  69. package/dist/chunk-P4SNGQNI.js.map +1 -0
  70. package/dist/{chunk-2CJ46J3C.js → chunk-PPSMUECX.js} +3 -3
  71. package/dist/chunk-PPSMUECX.js.map +1 -0
  72. package/dist/chunk-Q6ZXJTZB.js +56 -0
  73. package/dist/chunk-Q6ZXJTZB.js.map +1 -0
  74. package/dist/{chunk-XANPHG7W.js → chunk-QSDZDHNS.js} +7 -7
  75. package/dist/chunk-QSDZDHNS.js.map +1 -0
  76. package/dist/{chunk-33RP6K2O.js → chunk-QVMEF6FB.js} +6 -6
  77. package/dist/chunk-QVMEF6FB.js.map +1 -0
  78. package/dist/chunk-QWP76EBW.js +536 -0
  79. package/dist/chunk-QWP76EBW.js.map +1 -0
  80. package/dist/{chunk-V5GZQEIY.js → chunk-RBYBSSGO.js} +4 -4
  81. package/dist/chunk-RBYBSSGO.js.map +1 -0
  82. package/dist/{chunk-CS3KCJ5D.js → chunk-RKB2ZK6S.js} +555 -383
  83. package/dist/chunk-RKB2ZK6S.js.map +1 -0
  84. package/dist/{chunk-UKT3G5IA.js → chunk-SHTGQGAU.js} +7 -7
  85. package/dist/chunk-SHTGQGAU.js.map +1 -0
  86. package/dist/chunk-SNPYTMPR.js +51 -0
  87. package/dist/chunk-SNPYTMPR.js.map +1 -0
  88. package/dist/chunk-UB2QB6DE.js +124 -0
  89. package/dist/chunk-UB2QB6DE.js.map +1 -0
  90. package/dist/chunk-UNJUWWQO.js +1108 -0
  91. package/dist/chunk-UNJUWWQO.js.map +1 -0
  92. package/dist/chunk-V2M243KZ.js +445 -0
  93. package/dist/chunk-V2M243KZ.js.map +1 -0
  94. package/dist/chunk-V5JT5TPD.js +97 -0
  95. package/dist/chunk-V5JT5TPD.js.map +1 -0
  96. package/dist/chunk-W26AUH5B.js +61 -0
  97. package/dist/chunk-W26AUH5B.js.map +1 -0
  98. package/dist/chunk-WAAD23KY.js +222 -0
  99. package/dist/chunk-WAAD23KY.js.map +1 -0
  100. package/dist/chunk-WIIZNPCR.js +150 -0
  101. package/dist/chunk-WIIZNPCR.js.map +1 -0
  102. package/dist/chunk-WQCJTU2C.js +84 -0
  103. package/dist/chunk-WQCJTU2C.js.map +1 -0
  104. package/dist/chunk-WVLDNYOJ.js +150 -0
  105. package/dist/chunk-WVLDNYOJ.js.map +1 -0
  106. package/dist/chunk-WXVT3AOY.js +22 -0
  107. package/dist/chunk-WXVT3AOY.js.map +1 -0
  108. package/dist/{chunk-GAK6PIBW.js → chunk-XMMAGAT4.js} +2 -2
  109. package/dist/chunk-XMMAGAT4.js.map +1 -0
  110. package/dist/chunk-Y64XWMJ4.js +212 -0
  111. package/dist/chunk-Y64XWMJ4.js.map +1 -0
  112. package/dist/chunk-YEULD3SG.js +62 -0
  113. package/dist/chunk-YEULD3SG.js.map +1 -0
  114. package/dist/chunk-ZHGPZBS4.js +49 -0
  115. package/dist/chunk-ZHGPZBS4.js.map +1 -0
  116. package/dist/{chunk-JKBFUAJK.js → chunk-ZSLHHQPQ.js} +2 -2
  117. package/dist/chunk-ZSLHHQPQ.js.map +1 -0
  118. package/dist/cli.js +496 -150
  119. package/dist/cli.js.map +1 -1
  120. package/dist/{config-6S355X75.js → config-I4FMCJGZ.js} +3 -3
  121. package/dist/config-editor-HNEKXRLQ.js +11 -0
  122. package/dist/{config-registry-AHYI4MYL.js → config-registry-CUMNXFGK.js} +2 -2
  123. package/dist/context-XM6E22LM.js +10 -0
  124. package/dist/core-plugins-VEUNFTMB.js +27 -0
  125. package/dist/{daemon-4CS6HMB5.js → daemon-PXO5QPCR.js} +4 -4
  126. package/dist/dev-loader-RDC5E2CW.js +50 -0
  127. package/dist/dev-loader-RDC5E2CW.js.map +1 -0
  128. package/dist/discord-NOJQ5PZO.js +8 -0
  129. package/dist/doctor-H72BZOPA.js +10 -0
  130. package/dist/{doctor-OLYBO3V3.js → doctor-RF6BHMCC.js} +5 -5
  131. package/dist/file-service-EUODJAIT.js +9 -0
  132. package/dist/file-service-EUODJAIT.js.map +1 -0
  133. package/dist/index.d.ts +1293 -188
  134. package/dist/index.js +387 -48
  135. package/dist/index.js.map +1 -1
  136. package/dist/{install-cloudflared-Z7VCGOVG.js → install-cloudflared-AN24L4DP.js} +5 -5
  137. package/dist/install-cloudflared-AN24L4DP.js.map +1 -0
  138. package/dist/install-context-XPWTFT3J.js +78 -0
  139. package/dist/install-context-XPWTFT3J.js.map +1 -0
  140. package/dist/{install-jq-HUYSQWKR.js → install-jq-CRVDJGF3.js} +5 -5
  141. package/dist/install-jq-CRVDJGF3.js.map +1 -0
  142. package/dist/{integrate-PNEHRY2I.js → integrate-5C6KSU6D.js} +2 -2
  143. package/dist/integrate-5C6KSU6D.js.map +1 -0
  144. package/dist/{log-NXABYJTT.js → log-LZ7FTRKG.js} +2 -2
  145. package/dist/log-LZ7FTRKG.js.map +1 -0
  146. package/dist/main-T5WVCCFN.js +715 -0
  147. package/dist/main-T5WVCCFN.js.map +1 -0
  148. package/dist/{menu-YY5MKHEK.js → menu-YDQ2LWAR.js} +2 -2
  149. package/dist/menu-YDQ2LWAR.js.map +1 -0
  150. package/dist/{new-session-FEO4J4VU.js → new-session-AVQCNXRG.js} +5 -5
  151. package/dist/new-session-AVQCNXRG.js.map +1 -0
  152. package/dist/notifications-D5BRDNSU.js +9 -0
  153. package/dist/notifications-D5BRDNSU.js.map +1 -0
  154. package/dist/plugin-create-JVCVUG6V.js +331 -0
  155. package/dist/plugin-create-JVCVUG6V.js.map +1 -0
  156. package/dist/plugin-registry-WB3DR67H.js +8 -0
  157. package/dist/plugin-registry-WB3DR67H.js.map +1 -0
  158. package/dist/{post-upgrade-CJG5I7M2.js → post-upgrade-XLHZ6ZB7.js} +8 -8
  159. package/dist/post-upgrade-XLHZ6ZB7.js.map +1 -0
  160. package/dist/read-text-file-IRZM3QLM.js +8 -0
  161. package/dist/read-text-file-IRZM3QLM.js.map +1 -0
  162. package/dist/security-YNRBW6S7.js +9 -0
  163. package/dist/security-YNRBW6S7.js.map +1 -0
  164. package/dist/{session-IUSI7P5S.js → session-KZFA6Z26.js} +4 -4
  165. package/dist/session-KZFA6Z26.js.map +1 -0
  166. package/dist/{settings-RQPAM4KC.js → settings-MFYM7CZO.js} +4 -4
  167. package/dist/settings-MFYM7CZO.js.map +1 -0
  168. package/dist/settings-manager-MD2U4ZV2.js +8 -0
  169. package/dist/settings-manager-MD2U4ZV2.js.map +1 -0
  170. package/dist/{chunk-LCRLAV4G.js → setup-BAI2F24H.js} +154 -492
  171. package/dist/setup-BAI2F24H.js.map +1 -0
  172. package/dist/slack-KH7E3VBS.js +8 -0
  173. package/dist/slack-KH7E3VBS.js.map +1 -0
  174. package/dist/speech-2GHQNRIO.js +9 -0
  175. package/dist/speech-2GHQNRIO.js.map +1 -0
  176. package/dist/telegram-ZDC3JQF2.js +8 -0
  177. package/dist/telegram-ZDC3JQF2.js.map +1 -0
  178. package/dist/tunnel-M47I7H4B.js +8 -0
  179. package/dist/tunnel-M47I7H4B.js.map +1 -0
  180. package/dist/{tunnel-service-CJLUH6SZ.js → tunnel-service-WADYHREX.js} +17 -17
  181. package/dist/tunnel-service-WADYHREX.js.map +1 -0
  182. package/dist/usage-WYNK6ZC5.js +10 -0
  183. package/dist/usage-WYNK6ZC5.js.map +1 -0
  184. package/dist/validators-6CLEZUBD.js +8 -0
  185. package/dist/validators-6CLEZUBD.js.map +1 -0
  186. package/dist/validators-WSTBNKRW.js +12 -0
  187. package/dist/validators-WSTBNKRW.js.map +1 -0
  188. package/package.json +1 -1
  189. package/dist/adapter-ZOANORGM.js.map +0 -1
  190. package/dist/agent-catalog-FC3HGDEQ.js +0 -11
  191. package/dist/agent-registry-WT4NXPYG.js +0 -9
  192. package/dist/agent-store-VZLFPTZU.js +0 -9
  193. package/dist/chunk-2CJ46J3C.js.map +0 -1
  194. package/dist/chunk-2HMQOC7N.js.map +0 -1
  195. package/dist/chunk-33RP6K2O.js.map +0 -1
  196. package/dist/chunk-34M4OS5P.js.map +0 -1
  197. package/dist/chunk-4CTX774K.js.map +0 -1
  198. package/dist/chunk-7QJS2XBD.js.map +0 -1
  199. package/dist/chunk-BNLGTZ34.js.map +0 -1
  200. package/dist/chunk-CS3KCJ5D.js.map +0 -1
  201. package/dist/chunk-GAK6PIBW.js.map +0 -1
  202. package/dist/chunk-I7WC6E5S.js.map +0 -1
  203. package/dist/chunk-J4SJTKIK.js.map +0 -1
  204. package/dist/chunk-JHYXKVV2.js.map +0 -1
  205. package/dist/chunk-JKBFUAJK.js.map +0 -1
  206. package/dist/chunk-KIRH7TUJ.js.map +0 -1
  207. package/dist/chunk-LBIKITQT.js +0 -22
  208. package/dist/chunk-LBIKITQT.js.map +0 -1
  209. package/dist/chunk-LCRLAV4G.js.map +0 -1
  210. package/dist/chunk-LGP2YGRL.js +0 -4880
  211. package/dist/chunk-LGP2YGRL.js.map +0 -1
  212. package/dist/chunk-MKHUZLII.js.map +0 -1
  213. package/dist/chunk-NAMYZIS5.js +0 -1
  214. package/dist/chunk-NVPG6JCL.js.map +0 -1
  215. package/dist/chunk-O7CPGUAI.js.map +0 -1
  216. package/dist/chunk-OWP7RZ62.js.map +0 -1
  217. package/dist/chunk-UKT3G5IA.js.map +0 -1
  218. package/dist/chunk-V5GZQEIY.js.map +0 -1
  219. package/dist/chunk-VOIJ6OY4.js +0 -63
  220. package/dist/chunk-VOIJ6OY4.js.map +0 -1
  221. package/dist/chunk-W3EYKZNQ.js.map +0 -1
  222. package/dist/chunk-WTZDAYZX.js.map +0 -1
  223. package/dist/chunk-XANPHG7W.js.map +0 -1
  224. package/dist/config-editor-QQTZMWGD.js +0 -13
  225. package/dist/discord-OMC52Y54.js.map +0 -1
  226. package/dist/doctor-HZZ5BSHB.js +0 -10
  227. package/dist/install-cloudflared-Z7VCGOVG.js.map +0 -1
  228. package/dist/install-jq-HUYSQWKR.js.map +0 -1
  229. package/dist/integrate-PNEHRY2I.js.map +0 -1
  230. package/dist/main-XOZCLFUK.js +0 -238
  231. package/dist/main-XOZCLFUK.js.map +0 -1
  232. package/dist/post-upgrade-CJG5I7M2.js.map +0 -1
  233. package/dist/setup-XHS4OMPM.js +0 -37
  234. package/dist/tunnel-service-CJLUH6SZ.js.map +0 -1
  235. /package/dist/{action-detect-P7ZE4NEM.js.map → action-detect-QPA775HB.js.map} +0 -0
  236. /package/dist/{admin-6SYB6XCZ.js.map → adapter-6ANPBSVU.js.map} +0 -0
  237. /package/dist/{agent-catalog-FC3HGDEQ.js.map → admin-GBPZFFAU.js.map} +0 -0
  238. /package/dist/{agent-dependencies-4OWBMZWZ.js.map → agent-catalog-YHBFERYO.js.map} +0 -0
  239. /package/dist/{agent-registry-WT4NXPYG.js.map → agent-dependencies-WS7Z2DFW.js.map} +0 -0
  240. /package/dist/{agent-store-VZLFPTZU.js.map → agent-registry-5LZT7CUB.js.map} +0 -0
  241. /package/dist/{agents-QO7DKARJ.js.map → agent-store-VSHNY5GT.js.map} +0 -0
  242. /package/dist/{api-client-CFQT5U7D.js.map → agents-BWU4MRRD.js.map} +0 -0
  243. /package/dist/{autostart-X33OGMX6.js.map → api-client-AQPNKXI2.js.map} +0 -0
  244. /package/dist/{chunk-NAMYZIS5.js.map → api-server-3PYLRBCN.js.map} +0 -0
  245. /package/dist/{config-6S355X75.js.map → api-server-CHVSUDBX.js.map} +0 -0
  246. /package/dist/{config-editor-QQTZMWGD.js.map → autostart-6JS565RY.js.map} +0 -0
  247. /package/dist/{config-registry-AHYI4MYL.js.map → chunk-FNRSWA2K.js.map} +0 -0
  248. /package/dist/{daemon-4CS6HMB5.js.map → config-I4FMCJGZ.js.map} +0 -0
  249. /package/dist/{doctor-HZZ5BSHB.js.map → config-editor-HNEKXRLQ.js.map} +0 -0
  250. /package/dist/{doctor-OLYBO3V3.js.map → config-registry-CUMNXFGK.js.map} +0 -0
  251. /package/dist/{log-NXABYJTT.js.map → context-XM6E22LM.js.map} +0 -0
  252. /package/dist/{menu-YY5MKHEK.js.map → core-plugins-VEUNFTMB.js.map} +0 -0
  253. /package/dist/{new-session-FEO4J4VU.js.map → daemon-PXO5QPCR.js.map} +0 -0
  254. /package/dist/{session-IUSI7P5S.js.map → discord-NOJQ5PZO.js.map} +0 -0
  255. /package/dist/{settings-RQPAM4KC.js.map → doctor-H72BZOPA.js.map} +0 -0
  256. /package/dist/{setup-XHS4OMPM.js.map → doctor-RF6BHMCC.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -1,16 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- installPlugin,
4
- listPlugins,
5
- uninstallPlugin
6
- } from "./chunk-VOIJ6OY4.js";
7
- import "./chunk-33RP6K2O.js";
8
- import "./chunk-GAK6PIBW.js";
9
2
  import {
10
3
  apiCall,
11
4
  readApiPort,
12
5
  removeStalePortFile
13
- } from "./chunk-W3EYKZNQ.js";
6
+ } from "./chunk-4WXALZA3.js";
14
7
  import {
15
8
  checkAndPromptUpdate,
16
9
  compareVersions,
@@ -18,15 +11,16 @@ import {
18
11
  getLatestVersion,
19
12
  runUpdate
20
13
  } from "./chunk-S64CB6J3.js";
14
+ import {
15
+ PLUGINS_DIR
16
+ } from "./chunk-QVMEF6FB.js";
17
+ import "./chunk-XMMAGAT4.js";
21
18
  import "./chunk-VUNV25KB.js";
22
19
 
23
20
  // src/cli.ts
24
21
  import { setDefaultAutoSelectFamily } from "net";
25
22
 
26
- // src/cli/commands.ts
27
- function wantsHelp(args2) {
28
- return args2.includes("--help") || args2.includes("-h");
29
- }
23
+ // src/cli/commands/help.ts
30
24
  function printHelp() {
31
25
  console.log(`
32
26
  \x1B[1mOpenACP\x1B[0m \u2014 Self-hosted bridge for AI coding agents
@@ -70,6 +64,12 @@ Connect messaging platforms (Telegram, Discord) to 28+ AI coding agents via ACP
70
64
  openacp install <package> Install adapter plugin
71
65
  openacp uninstall <package> Remove adapter
72
66
  openacp plugins List installed plugins
67
+ openacp plugin create Scaffold a new plugin project
68
+
69
+ \x1B[1mDevelopment:\x1B[0m
70
+ openacp dev <plugin-path> Run with local plugin (hot-reload)
71
+ openacp dev <path> --no-watch Run without file watching
72
+ openacp dev <path> --verbose Run with verbose logging
73
73
 
74
74
  \x1B[1mSession Transfer:\x1B[0m
75
75
  openacp integrate <agent> Install handoff integration
@@ -97,10 +97,35 @@ Connect messaging platforms (Telegram, Discord) to 28+ AI coding agents via ACP
97
97
  \x1B[2mMore info: https://github.com/Open-ACP/OpenACP\x1B[0m
98
98
  `);
99
99
  }
100
+
101
+ // src/cli/commands/version.ts
100
102
  async function cmdVersion() {
101
103
  const { getCurrentVersion: getCurrentVersion2 } = await import("./version-NQZBM5M7.js");
102
104
  console.log(`openacp v${getCurrentVersion2()}`);
103
105
  }
106
+
107
+ // src/cli/commands/install.ts
108
+ import { execSync } from "child_process";
109
+ import * as fs from "fs";
110
+ import * as path from "path";
111
+
112
+ // src/cli/commands/helpers.ts
113
+ function wantsHelp(args2) {
114
+ return args2.includes("--help") || args2.includes("-h");
115
+ }
116
+ function buildNestedUpdateFromPath(dotPath, value) {
117
+ const parts = dotPath.split(".");
118
+ const result = {};
119
+ let target = result;
120
+ for (let i = 0; i < parts.length - 1; i++) {
121
+ target[parts[i]] = {};
122
+ target = target[parts[i]];
123
+ }
124
+ target[parts[parts.length - 1]] = value;
125
+ return result;
126
+ }
127
+
128
+ // src/cli/commands/install.ts
104
129
  async function cmdInstall(args2) {
105
130
  if (wantsHelp(args2)) {
106
131
  console.log(`
@@ -124,8 +149,20 @@ Installs the plugin to ~/.openacp/plugins/.
124
149
  console.error("Usage: openacp install <package>");
125
150
  process.exit(1);
126
151
  }
127
- installPlugin(pkg);
152
+ fs.mkdirSync(PLUGINS_DIR, { recursive: true });
153
+ const pkgPath = path.join(PLUGINS_DIR, "package.json");
154
+ if (!fs.existsSync(pkgPath)) {
155
+ fs.writeFileSync(pkgPath, JSON.stringify({ name: "openacp-plugins", private: true, dependencies: {} }, null, 2));
156
+ }
157
+ console.log(`Installing ${pkg}...`);
158
+ execSync(`npm install ${pkg} --prefix "${PLUGINS_DIR}"`, { stdio: "inherit" });
159
+ console.log(`Plugin ${pkg} installed successfully.`);
128
160
  }
161
+
162
+ // src/cli/commands/uninstall.ts
163
+ import { execSync as execSync2 } from "child_process";
164
+ import * as fs2 from "fs";
165
+ import * as path2 from "path";
129
166
  async function cmdUninstall(args2) {
130
167
  if (wantsHelp(args2)) {
131
168
  console.log(`
@@ -147,8 +184,17 @@ async function cmdUninstall(args2) {
147
184
  console.error("Usage: openacp uninstall <package>");
148
185
  process.exit(1);
149
186
  }
150
- uninstallPlugin(pkg);
187
+ fs2.mkdirSync(PLUGINS_DIR, { recursive: true });
188
+ const pkgPath = path2.join(PLUGINS_DIR, "package.json");
189
+ if (!fs2.existsSync(pkgPath)) {
190
+ fs2.writeFileSync(pkgPath, JSON.stringify({ name: "openacp-plugins", private: true, dependencies: {} }, null, 2));
191
+ }
192
+ console.log(`Uninstalling ${pkg}...`);
193
+ execSync2(`npm uninstall ${pkg} --prefix "${PLUGINS_DIR}"`, { stdio: "inherit" });
194
+ console.log(`Plugin ${pkg} uninstalled.`);
151
195
  }
196
+
197
+ // src/cli/commands/plugins.ts
152
198
  async function cmdPlugins(args2 = []) {
153
199
  if (wantsHelp(args2)) {
154
200
  console.log(`
@@ -157,21 +203,227 @@ async function cmdPlugins(args2 = []) {
157
203
  \x1B[1mUsage:\x1B[0m
158
204
  openacp plugins
159
205
 
160
- Shows all plugins installed in ~/.openacp/plugins/.
206
+ Shows all plugins registered in the plugin registry.
161
207
  `);
162
208
  return;
163
209
  }
164
- const plugins = listPlugins();
165
- const entries = Object.entries(plugins);
166
- if (entries.length === 0) {
210
+ const os = await import("os");
211
+ const path4 = await import("path");
212
+ const { PluginRegistry } = await import("./plugin-registry-WB3DR67H.js");
213
+ const registryPath = path4.join(os.homedir(), ".openacp", "plugins.json");
214
+ const registry = new PluginRegistry(registryPath);
215
+ await registry.load();
216
+ const plugins = registry.list();
217
+ if (plugins.size === 0) {
167
218
  console.log("No plugins installed.");
168
219
  } else {
169
220
  console.log("Installed plugins:");
170
- for (const [name, version] of entries) {
171
- console.log(` ${name}@${version}`);
221
+ for (const [name, entry] of plugins) {
222
+ const status = entry.enabled ? "" : " (disabled)";
223
+ console.log(` ${name}@${entry.version}${status}`);
224
+ }
225
+ }
226
+ }
227
+ async function cmdPlugin(args2 = []) {
228
+ const subcommand = args2[1];
229
+ if (wantsHelp(args2) || !subcommand) {
230
+ console.log(`
231
+ \x1B[1mopenacp plugin\x1B[0m \u2014 Plugin management
232
+
233
+ \x1B[1mUsage:\x1B[0m
234
+ openacp plugin list List all plugins with status
235
+ openacp plugin add <package> Install a plugin package
236
+ openacp plugin install <package> Alias for add
237
+ openacp plugin remove <package> Remove a plugin package
238
+ openacp plugin uninstall <package> Alias for remove (--purge to delete data)
239
+ openacp plugin enable <name> Enable a plugin
240
+ openacp plugin disable <name> Disable a plugin
241
+ openacp plugin configure <name> Run interactive configuration
242
+ openacp plugin create Scaffold a new plugin project
243
+
244
+ \x1B[1mExamples:\x1B[0m
245
+ openacp plugin list
246
+ openacp plugin add @openacp/adapter-discord
247
+ openacp plugin enable @openacp/adapter-discord
248
+ openacp plugin configure @openacp/adapter-discord
249
+ openacp plugin remove @openacp/adapter-discord --purge
250
+ `);
251
+ return;
252
+ }
253
+ switch (subcommand) {
254
+ case "list":
255
+ return cmdPlugins(args2.slice(1));
256
+ case "add":
257
+ case "install": {
258
+ const pkg = args2[2];
259
+ if (!pkg) {
260
+ console.error("Error: missing package name. Usage: openacp plugin add <package>");
261
+ process.exit(1);
262
+ }
263
+ await installPlugin(pkg);
264
+ return;
265
+ }
266
+ case "remove":
267
+ case "uninstall": {
268
+ const pkg = args2[2];
269
+ if (!pkg) {
270
+ console.error("Error: missing package name. Usage: openacp plugin remove <package> [--purge]");
271
+ process.exit(1);
272
+ }
273
+ const purge = args2.includes("--purge");
274
+ await uninstallPlugin(pkg, purge);
275
+ return;
276
+ }
277
+ case "enable": {
278
+ const name = args2[2];
279
+ if (!name) {
280
+ console.error("Error: missing plugin name. Usage: openacp plugin enable <name>");
281
+ process.exit(1);
282
+ }
283
+ await setPluginEnabled(name, true);
284
+ return;
172
285
  }
286
+ case "disable": {
287
+ const name = args2[2];
288
+ if (!name) {
289
+ console.error("Error: missing plugin name. Usage: openacp plugin disable <name>");
290
+ process.exit(1);
291
+ }
292
+ await setPluginEnabled(name, false);
293
+ return;
294
+ }
295
+ case "configure": {
296
+ const name = args2[2];
297
+ if (!name) {
298
+ console.error("Error: missing plugin name. Usage: openacp plugin configure <name>");
299
+ process.exit(1);
300
+ }
301
+ await configurePlugin(name);
302
+ return;
303
+ }
304
+ case "create": {
305
+ const { cmdPluginCreate } = await import("./plugin-create-JVCVUG6V.js");
306
+ await cmdPluginCreate();
307
+ return;
308
+ }
309
+ default:
310
+ console.error(`Unknown subcommand: ${subcommand}`);
311
+ console.error('Run "openacp plugin --help" for usage.');
312
+ process.exit(1);
313
+ }
314
+ }
315
+ async function setPluginEnabled(name, enabled) {
316
+ const os = await import("os");
317
+ const path4 = await import("path");
318
+ const { PluginRegistry } = await import("./plugin-registry-WB3DR67H.js");
319
+ const registryPath = path4.join(os.homedir(), ".openacp", "plugins.json");
320
+ const registry = new PluginRegistry(registryPath);
321
+ await registry.load();
322
+ const entry = registry.get(name);
323
+ if (!entry) {
324
+ console.error(`Plugin "${name}" not found. Run "openacp plugin list" to see installed plugins.`);
325
+ process.exit(1);
173
326
  }
327
+ registry.setEnabled(name, enabled);
328
+ await registry.save();
329
+ console.log(`Plugin ${name} ${enabled ? "enabled" : "disabled"}. Restart to apply.`);
174
330
  }
331
+ async function configurePlugin(name) {
332
+ const os = await import("os");
333
+ const path4 = await import("path");
334
+ const { corePlugins } = await import("./core-plugins-VEUNFTMB.js");
335
+ const { SettingsManager } = await import("./settings-manager-MD2U4ZV2.js");
336
+ const { createInstallContext } = await import("./install-context-XPWTFT3J.js");
337
+ const plugin = corePlugins.find((p) => p.name === name);
338
+ if (!plugin) {
339
+ console.error(`Plugin "${name}" not found.`);
340
+ process.exit(1);
341
+ }
342
+ const basePath = path4.join(os.homedir(), ".openacp", "plugins");
343
+ const settingsManager = new SettingsManager(basePath);
344
+ const ctx = createInstallContext({ pluginName: name, settingsManager, basePath });
345
+ if (plugin.configure) {
346
+ await plugin.configure(ctx);
347
+ } else if (plugin.install) {
348
+ await plugin.install(ctx);
349
+ } else {
350
+ console.log(`Plugin ${name} has no configure or install hook.`);
351
+ }
352
+ }
353
+ async function installPlugin(pkg) {
354
+ console.log(`Installing ${pkg}...`);
355
+ const { corePlugins } = await import("./core-plugins-VEUNFTMB.js");
356
+ const plugin = corePlugins.find((p) => p.name === pkg);
357
+ if (!plugin) {
358
+ console.error(`Plugin "${pkg}" not found. Community plugin install coming soon.`);
359
+ return;
360
+ }
361
+ if (plugin.install) {
362
+ const os = await import("os");
363
+ const path4 = await import("path");
364
+ const { SettingsManager } = await import("./settings-manager-MD2U4ZV2.js");
365
+ const { createInstallContext } = await import("./install-context-XPWTFT3J.js");
366
+ const { PluginRegistry } = await import("./plugin-registry-WB3DR67H.js");
367
+ const basePath = path4.join(os.homedir(), ".openacp", "plugins");
368
+ const settingsManager = new SettingsManager(basePath);
369
+ const registryPath = path4.join(os.homedir(), ".openacp", "plugins.json");
370
+ const registry = new PluginRegistry(registryPath);
371
+ await registry.load();
372
+ const ctx = createInstallContext({ pluginName: plugin.name, settingsManager, basePath });
373
+ await plugin.install(ctx);
374
+ registry.register(plugin.name, {
375
+ version: plugin.version,
376
+ source: "builtin",
377
+ enabled: true,
378
+ settingsPath: settingsManager.getSettingsPath(plugin.name),
379
+ description: plugin.description
380
+ });
381
+ await registry.save();
382
+ console.log(`Plugin ${plugin.name} installed! Restart to activate.`);
383
+ } else {
384
+ console.log(`Plugin ${plugin.name} has no install hook. Nothing to do.`);
385
+ }
386
+ }
387
+ async function uninstallPlugin(name, purge) {
388
+ const os = await import("os");
389
+ const path4 = await import("path");
390
+ const fs4 = await import("fs");
391
+ const { PluginRegistry } = await import("./plugin-registry-WB3DR67H.js");
392
+ const registryPath = path4.join(os.homedir(), ".openacp", "plugins.json");
393
+ const registry = new PluginRegistry(registryPath);
394
+ await registry.load();
395
+ const entry = registry.get(name);
396
+ if (!entry) {
397
+ console.error(`Plugin "${name}" not installed.`);
398
+ process.exit(1);
399
+ }
400
+ if (entry.source === "builtin") {
401
+ console.error(`Cannot uninstall built-in plugin. Use "openacp plugin disable ${name}" instead.`);
402
+ process.exit(1);
403
+ }
404
+ try {
405
+ const { corePlugins } = await import("./core-plugins-VEUNFTMB.js");
406
+ const plugin = corePlugins.find((p) => p.name === name);
407
+ if (plugin?.uninstall) {
408
+ const { SettingsManager } = await import("./settings-manager-MD2U4ZV2.js");
409
+ const { createInstallContext } = await import("./install-context-XPWTFT3J.js");
410
+ const basePath = path4.join(os.homedir(), ".openacp", "plugins");
411
+ const settingsManager = new SettingsManager(basePath);
412
+ const ctx = createInstallContext({ pluginName: name, settingsManager, basePath });
413
+ await plugin.uninstall(ctx, { purge });
414
+ }
415
+ } catch {
416
+ }
417
+ if (purge) {
418
+ const pluginDir = path4.join(os.homedir(), ".openacp", "plugins", name);
419
+ fs4.rmSync(pluginDir, { recursive: true, force: true });
420
+ }
421
+ registry.remove(name);
422
+ await registry.save();
423
+ console.log(`Plugin ${name} uninstalled${purge ? " (purged)" : ""}.`);
424
+ }
425
+
426
+ // src/cli/commands/api.ts
175
427
  function printApiHelp() {
176
428
  console.log(`
177
429
  \x1B[1mopenacp api\x1B[0m \u2014 Interact with the running OpenACP daemon
@@ -755,6 +1007,8 @@ Shows the version of the currently running daemon process.
755
1007
  throw err;
756
1008
  }
757
1009
  }
1010
+
1011
+ // src/cli/commands/start.ts
758
1012
  async function cmdStart(args2 = []) {
759
1013
  if (wantsHelp(args2)) {
760
1014
  console.log(`
@@ -774,8 +1028,8 @@ Requires an existing config \u2014 run 'openacp' first to set up.
774
1028
  return;
775
1029
  }
776
1030
  await checkAndPromptUpdate();
777
- const { startDaemon, getPidPath } = await import("./daemon-4CS6HMB5.js");
778
- const { ConfigManager } = await import("./config-6S355X75.js");
1031
+ const { startDaemon, getPidPath } = await import("./daemon-PXO5QPCR.js");
1032
+ const { ConfigManager } = await import("./config-I4FMCJGZ.js");
779
1033
  const cm = new ConfigManager();
780
1034
  if (await cm.exists()) {
781
1035
  await cm.load();
@@ -791,6 +1045,8 @@ Requires an existing config \u2014 run 'openacp' first to set up.
791
1045
  process.exit(1);
792
1046
  }
793
1047
  }
1048
+
1049
+ // src/cli/commands/stop.ts
794
1050
  async function cmdStop(args2 = []) {
795
1051
  if (wantsHelp(args2)) {
796
1052
  console.log(`
@@ -803,7 +1059,7 @@ Sends a stop signal to the running OpenACP daemon process.
803
1059
  `);
804
1060
  return;
805
1061
  }
806
- const { stopDaemon } = await import("./daemon-4CS6HMB5.js");
1062
+ const { stopDaemon } = await import("./daemon-PXO5QPCR.js");
807
1063
  const result = await stopDaemon();
808
1064
  if (result.stopped) {
809
1065
  console.log(`OpenACP daemon stopped (was PID ${result.pid})`);
@@ -812,6 +1068,8 @@ Sends a stop signal to the running OpenACP daemon process.
812
1068
  process.exit(1);
813
1069
  }
814
1070
  }
1071
+
1072
+ // src/cli/commands/status.ts
815
1073
  async function cmdStatus(args2 = []) {
816
1074
  if (wantsHelp(args2)) {
817
1075
  console.log(`
@@ -824,7 +1082,7 @@ Shows whether the OpenACP daemon is running and its PID.
824
1082
  `);
825
1083
  return;
826
1084
  }
827
- const { getStatus } = await import("./daemon-4CS6HMB5.js");
1085
+ const { getStatus } = await import("./daemon-PXO5QPCR.js");
828
1086
  const status = getStatus();
829
1087
  if (status.running) {
830
1088
  console.log(`OpenACP is running (PID ${status.pid})`);
@@ -832,6 +1090,8 @@ Shows whether the OpenACP daemon is running and its PID.
832
1090
  console.log("OpenACP is not running");
833
1091
  }
834
1092
  }
1093
+
1094
+ // src/cli/commands/logs.ts
835
1095
  async function cmdLogs(args2 = []) {
836
1096
  if (wantsHelp(args2)) {
837
1097
  console.log(`
@@ -848,7 +1108,7 @@ Log file location is configured in config (default: ~/.openacp/logs/).
848
1108
  return;
849
1109
  }
850
1110
  const { spawn } = await import("child_process");
851
- const { ConfigManager, expandHome } = await import("./config-6S355X75.js");
1111
+ const { ConfigManager, expandHome } = await import("./config-I4FMCJGZ.js");
852
1112
  const pathMod = await import("path");
853
1113
  const cm = new ConfigManager();
854
1114
  let logDir = "~/.openacp/logs";
@@ -863,6 +1123,8 @@ Log file location is configured in config (default: ~/.openacp/logs/).
863
1123
  process.exit(1);
864
1124
  });
865
1125
  }
1126
+
1127
+ // src/cli/commands/config.ts
866
1128
  async function cmdConfig(args2 = []) {
867
1129
  const subCmd = args2[1];
868
1130
  if (wantsHelp(args2) && subCmd === "set") {
@@ -918,7 +1180,7 @@ the API for live updates. When stopped, edits config file directly.
918
1180
  console.error("Usage: openacp config set <path> <value>");
919
1181
  process.exit(1);
920
1182
  }
921
- const { ConfigSchema } = await import("./config-6S355X75.js");
1183
+ const { ConfigSchema } = await import("./config-I4FMCJGZ.js");
922
1184
  const topLevelKey = configPath.split(".")[0];
923
1185
  const validConfigKeys = Object.keys(ConfigSchema.shape);
924
1186
  if (!validConfigKeys.includes(topLevelKey)) {
@@ -950,7 +1212,7 @@ the API for live updates. When stopped, edits config file directly.
950
1212
  console.log("Note: restart required for this change to take effect.");
951
1213
  }
952
1214
  } else {
953
- const { ConfigManager: ConfigManager2 } = await import("./config-6S355X75.js");
1215
+ const { ConfigManager: ConfigManager2 } = await import("./config-I4FMCJGZ.js");
954
1216
  const cm2 = new ConfigManager2();
955
1217
  if (!await cm2.exists()) {
956
1218
  console.error('No config found. Run "openacp" first to set up.');
@@ -963,8 +1225,8 @@ the API for live updates. When stopped, edits config file directly.
963
1225
  }
964
1226
  return;
965
1227
  }
966
- const { runConfigEditor } = await import("./config-editor-QQTZMWGD.js");
967
- const { ConfigManager } = await import("./config-6S355X75.js");
1228
+ const { runConfigEditor } = await import("./config-editor-HNEKXRLQ.js");
1229
+ const { ConfigManager } = await import("./config-I4FMCJGZ.js");
968
1230
  const cm = new ConfigManager();
969
1231
  if (!await cm.exists()) {
970
1232
  console.error('No config found. Run "openacp" first to set up.');
@@ -977,17 +1239,8 @@ the API for live updates. When stopped, edits config file directly.
977
1239
  await runConfigEditor(cm, "file");
978
1240
  }
979
1241
  }
980
- function buildNestedUpdateFromPath(dotPath, value) {
981
- const parts = dotPath.split(".");
982
- const result = {};
983
- let target = result;
984
- for (let i = 0; i < parts.length - 1; i++) {
985
- target[parts[i]] = {};
986
- target = target[parts[i]];
987
- }
988
- target[parts[parts.length - 1]] = value;
989
- return result;
990
- }
1242
+
1243
+ // src/cli/commands/reset.ts
991
1244
  async function cmdReset(args2 = []) {
992
1245
  if (wantsHelp(args2)) {
993
1246
  console.log(`
@@ -1003,7 +1256,7 @@ start fresh with the setup wizard. The daemon must be stopped first.
1003
1256
  `);
1004
1257
  return;
1005
1258
  }
1006
- const { getStatus } = await import("./daemon-4CS6HMB5.js");
1259
+ const { getStatus } = await import("./daemon-PXO5QPCR.js");
1007
1260
  const status = getStatus();
1008
1261
  if (status.running) {
1009
1262
  console.error("OpenACP is running. Stop it first: openacp stop");
@@ -1018,15 +1271,17 @@ start fresh with the setup wizard. The daemon must be stopped first.
1018
1271
  console.log("Aborted.");
1019
1272
  return;
1020
1273
  }
1021
- const { uninstallAutoStart } = await import("./autostart-X33OGMX6.js");
1274
+ const { uninstallAutoStart } = await import("./autostart-6JS565RY.js");
1022
1275
  uninstallAutoStart();
1023
- const fs = await import("fs");
1276
+ const fs4 = await import("fs");
1024
1277
  const os = await import("os");
1025
- const path = await import("path");
1026
- const openacpDir = path.join(os.homedir(), ".openacp");
1027
- fs.rmSync(openacpDir, { recursive: true, force: true });
1278
+ const path4 = await import("path");
1279
+ const openacpDir = path4.join(os.homedir(), ".openacp");
1280
+ fs4.rmSync(openacpDir, { recursive: true, force: true });
1028
1281
  console.log("Reset complete. Run `openacp` to set up again.");
1029
1282
  }
1283
+
1284
+ // src/cli/commands/update.ts
1030
1285
  async function cmdUpdate(args2 = []) {
1031
1286
  if (wantsHelp(args2)) {
1032
1287
  console.log(`
@@ -1059,6 +1314,8 @@ installs it globally if an update is available.
1059
1314
  process.exit(1);
1060
1315
  }
1061
1316
  }
1317
+
1318
+ // src/cli/commands/adopt.ts
1062
1319
  async function cmdAdopt(args2) {
1063
1320
  if (wantsHelp(args2)) {
1064
1321
  console.log(`
@@ -1103,7 +1360,7 @@ as a messaging thread. Requires a running daemon.
1103
1360
  process.exit(1);
1104
1361
  }
1105
1362
  try {
1106
- const { apiCall: apiCall2 } = await import("./api-client-CFQT5U7D.js");
1363
+ const { apiCall: apiCall2 } = await import("./api-client-AQPNKXI2.js");
1107
1364
  const res = await apiCall2(port, "/api/sessions/adopt", {
1108
1365
  method: "POST",
1109
1366
  headers: { "Content-Type": "application/json" },
@@ -1127,6 +1384,8 @@ as a messaging thread. Requires a running daemon.
1127
1384
  process.exit(1);
1128
1385
  }
1129
1386
  }
1387
+
1388
+ // src/cli/commands/integrate.ts
1130
1389
  async function cmdIntegrate(args2) {
1131
1390
  if (wantsHelp(args2)) {
1132
1391
  console.log(`
@@ -1153,7 +1412,7 @@ a "Handoff" slash command to Claude Code.
1153
1412
  `);
1154
1413
  return;
1155
1414
  }
1156
- const { getIntegration, listIntegrations } = await import("./integrate-PNEHRY2I.js");
1415
+ const { getIntegration, listIntegrations } = await import("./integrate-5C6KSU6D.js");
1157
1416
  const agent = args2[1];
1158
1417
  const uninstall = args2.includes("--uninstall");
1159
1418
  if (!agent) {
@@ -1195,6 +1454,8 @@ a "Handoff" slash command to Claude Code.
1195
1454
  }
1196
1455
  }
1197
1456
  }
1457
+
1458
+ // src/cli/commands/doctor.ts
1198
1459
  async function cmdDoctor(args2) {
1199
1460
  if (wantsHelp(args2)) {
1200
1461
  console.log(`
@@ -1227,7 +1488,7 @@ Fixable issues can be auto-repaired when not using --dry-run.
1227
1488
  process.exit(1);
1228
1489
  }
1229
1490
  const dryRun = args2.includes("--dry-run");
1230
- const { DoctorEngine } = await import("./doctor-HZZ5BSHB.js");
1491
+ const { DoctorEngine } = await import("./doctor-H72BZOPA.js");
1231
1492
  const engine = new DoctorEngine({ dryRun });
1232
1493
  console.log("\n\u{1FA7A} OpenACP Doctor\n");
1233
1494
  const report = await engine.runAll();
@@ -1270,87 +1531,8 @@ Fixable issues can be auto-repaired when not using --dry-run.
1270
1531
  process.exit(1);
1271
1532
  }
1272
1533
  }
1273
- async function cmdTunnel(args2) {
1274
- const subCmd = args2[1];
1275
- const port = readApiPort();
1276
- if (port === null) {
1277
- console.error("OpenACP is not running. Start with `openacp start`");
1278
- process.exit(1);
1279
- }
1280
- try {
1281
- if (subCmd === "add") {
1282
- const tunnelPort = args2[2];
1283
- if (!tunnelPort) {
1284
- console.error("Usage: openacp tunnel add <port> [--label name] [--session id]");
1285
- process.exit(1);
1286
- }
1287
- const labelIdx = args2.indexOf("--label");
1288
- const label = labelIdx !== -1 ? args2[labelIdx + 1] : void 0;
1289
- const sessionIdx = args2.indexOf("--session");
1290
- const sessionId = sessionIdx !== -1 ? args2[sessionIdx + 1] : void 0;
1291
- const body = { port: parseInt(tunnelPort, 10) };
1292
- if (label) body.label = label;
1293
- if (sessionId) body.sessionId = sessionId;
1294
- const res = await apiCall(port, "/api/tunnel", {
1295
- method: "POST",
1296
- headers: { "Content-Type": "application/json" },
1297
- body: JSON.stringify(body)
1298
- });
1299
- const data = await res.json();
1300
- if (!res.ok) {
1301
- console.error(`Error: ${data.error}`);
1302
- process.exit(1);
1303
- }
1304
- console.log(`Tunnel active: port ${data.port} \u2192 ${data.publicUrl}`);
1305
- } else if (subCmd === "list") {
1306
- const res = await apiCall(port, "/api/tunnel/list");
1307
- const data = await res.json();
1308
- if (data.length === 0) {
1309
- console.log("No active tunnels.");
1310
- return;
1311
- }
1312
- console.log("Active tunnels:\n");
1313
- for (const t of data) {
1314
- const label = t.label ? ` (${t.label})` : "";
1315
- const status = t.status === "active" ? "\u2705" : t.status === "starting" ? "\u23F3" : "\u274C";
1316
- console.log(` ${status} Port ${t.port}${label}`);
1317
- if (t.publicUrl) console.log(` \u2192 ${t.publicUrl}`);
1318
- }
1319
- } else if (subCmd === "stop") {
1320
- const tunnelPort = args2[2];
1321
- if (!tunnelPort) {
1322
- console.error("Usage: openacp tunnel stop <port>");
1323
- process.exit(1);
1324
- }
1325
- const res = await apiCall(port, `/api/tunnel/${tunnelPort}`, { method: "DELETE" });
1326
- if (!res.ok) {
1327
- const data = await res.json();
1328
- console.error(`Error: ${data.error}`);
1329
- process.exit(1);
1330
- }
1331
- console.log(`Tunnel stopped: port ${tunnelPort}`);
1332
- } else if (subCmd === "stop-all") {
1333
- const res = await apiCall(port, "/api/tunnel", { method: "DELETE" });
1334
- if (!res.ok) {
1335
- const data = await res.json();
1336
- console.error(`Error: ${data.error}`);
1337
- process.exit(1);
1338
- }
1339
- console.log("All user tunnels stopped.");
1340
- } else {
1341
- console.log(`
1342
- Tunnel Management:
1343
- openacp tunnel add <port> [--label name] [--session id]
1344
- openacp tunnel list
1345
- openacp tunnel stop <port>
1346
- openacp tunnel stop-all
1347
- `);
1348
- }
1349
- } catch (err) {
1350
- console.error(`Failed to connect to daemon: ${err.message}`);
1351
- process.exit(1);
1352
- }
1353
- }
1534
+
1535
+ // src/cli/commands/agents.ts
1354
1536
  async function cmdAgents(args2) {
1355
1537
  const subcommand = args2[1];
1356
1538
  if (wantsHelp(args2) && (!subcommand || subcommand === "--help" || subcommand === "-h")) {
@@ -1416,7 +1598,7 @@ Run 'openacp agents' to see available agents.`);
1416
1598
  }
1417
1599
  }
1418
1600
  async function agentsList() {
1419
- const { AgentCatalog } = await import("./agent-catalog-FC3HGDEQ.js");
1601
+ const { AgentCatalog } = await import("./agent-catalog-YHBFERYO.js");
1420
1602
  const catalog = new AgentCatalog();
1421
1603
  catalog.load();
1422
1604
  await catalog.refreshRegistryIfStale();
@@ -1479,7 +1661,7 @@ Run 'openacp agents' to see available agents.
1479
1661
  `);
1480
1662
  return;
1481
1663
  }
1482
- const { AgentCatalog } = await import("./agent-catalog-FC3HGDEQ.js");
1664
+ const { AgentCatalog } = await import("./agent-catalog-YHBFERYO.js");
1483
1665
  const catalog = new AgentCatalog();
1484
1666
  catalog.load();
1485
1667
  await catalog.refreshRegistryIfStale();
@@ -1521,10 +1703,10 @@ Run 'openacp agents' to see available agents.
1521
1703
  }
1522
1704
  process.exit(1);
1523
1705
  }
1524
- const { getAgentCapabilities } = await import("./agent-dependencies-4OWBMZWZ.js");
1706
+ const { getAgentCapabilities } = await import("./agent-dependencies-WS7Z2DFW.js");
1525
1707
  const caps = getAgentCapabilities(result.agentKey);
1526
1708
  if (caps.integration) {
1527
- const { installIntegration } = await import("./integrate-PNEHRY2I.js");
1709
+ const { installIntegration } = await import("./integrate-5C6KSU6D.js");
1528
1710
  const intResult = await installIntegration(result.agentKey, caps.integration);
1529
1711
  if (intResult.success) {
1530
1712
  console.log(` \x1B[32m\u2713\x1B[0m Handoff integration installed for ${result.agentKey}`);
@@ -1558,15 +1740,15 @@ async function agentsUninstall(name, help = false) {
1558
1740
  `);
1559
1741
  return;
1560
1742
  }
1561
- const { AgentCatalog } = await import("./agent-catalog-FC3HGDEQ.js");
1743
+ const { AgentCatalog } = await import("./agent-catalog-YHBFERYO.js");
1562
1744
  const catalog = new AgentCatalog();
1563
1745
  catalog.load();
1564
1746
  const result = await catalog.uninstall(name);
1565
1747
  if (result.ok) {
1566
- const { getAgentCapabilities } = await import("./agent-dependencies-4OWBMZWZ.js");
1748
+ const { getAgentCapabilities } = await import("./agent-dependencies-WS7Z2DFW.js");
1567
1749
  const caps = getAgentCapabilities(name);
1568
1750
  if (caps.integration) {
1569
- const { uninstallIntegration } = await import("./integrate-PNEHRY2I.js");
1751
+ const { uninstallIntegration } = await import("./integrate-5C6KSU6D.js");
1570
1752
  await uninstallIntegration(name, caps.integration);
1571
1753
  console.log(` \x1B[32m\u2713\x1B[0m Handoff integration removed for ${name}`);
1572
1754
  }
@@ -1586,7 +1768,7 @@ async function agentsUninstall(name, help = false) {
1586
1768
  }
1587
1769
  }
1588
1770
  async function agentsRefresh() {
1589
- const { AgentCatalog } = await import("./agent-catalog-FC3HGDEQ.js");
1771
+ const { AgentCatalog } = await import("./agent-catalog-YHBFERYO.js");
1590
1772
  const catalog = new AgentCatalog();
1591
1773
  catalog.load();
1592
1774
  console.log("\n Updating agent list...");
@@ -1613,10 +1795,10 @@ whether the agent is installed or available from the registry.
1613
1795
  `);
1614
1796
  return;
1615
1797
  }
1616
- const { AgentCatalog } = await import("./agent-catalog-FC3HGDEQ.js");
1798
+ const { AgentCatalog } = await import("./agent-catalog-YHBFERYO.js");
1617
1799
  const catalog = new AgentCatalog();
1618
1800
  catalog.load();
1619
- const { getAgentSetup } = await import("./agent-dependencies-4OWBMZWZ.js");
1801
+ const { getAgentSetup } = await import("./agent-dependencies-WS7Z2DFW.js");
1620
1802
  const installed = catalog.getInstalledAgent(nameOrId);
1621
1803
  if (installed) {
1622
1804
  console.log(`
@@ -1694,7 +1876,7 @@ ACP-specific flags are automatically stripped.
1694
1876
  `);
1695
1877
  return;
1696
1878
  }
1697
- const { AgentCatalog } = await import("./agent-catalog-FC3HGDEQ.js");
1879
+ const { AgentCatalog } = await import("./agent-catalog-YHBFERYO.js");
1698
1880
  const catalog = new AgentCatalog();
1699
1881
  catalog.load();
1700
1882
  const installed = catalog.getInstalledAgent(nameOrId);
@@ -1742,17 +1924,104 @@ ACP-specific flags are automatically stripped.
1742
1924
  process.exit(result.status);
1743
1925
  }
1744
1926
  }
1927
+
1928
+ // src/cli/commands/tunnel.ts
1929
+ async function cmdTunnel(args2) {
1930
+ const subCmd = args2[1];
1931
+ const port = readApiPort();
1932
+ if (port === null) {
1933
+ console.error("OpenACP is not running. Start with `openacp start`");
1934
+ process.exit(1);
1935
+ }
1936
+ try {
1937
+ if (subCmd === "add") {
1938
+ const tunnelPort = args2[2];
1939
+ if (!tunnelPort) {
1940
+ console.error("Usage: openacp tunnel add <port> [--label name] [--session id]");
1941
+ process.exit(1);
1942
+ }
1943
+ const labelIdx = args2.indexOf("--label");
1944
+ const label = labelIdx !== -1 ? args2[labelIdx + 1] : void 0;
1945
+ const sessionIdx = args2.indexOf("--session");
1946
+ const sessionId = sessionIdx !== -1 ? args2[sessionIdx + 1] : void 0;
1947
+ const body = { port: parseInt(tunnelPort, 10) };
1948
+ if (label) body.label = label;
1949
+ if (sessionId) body.sessionId = sessionId;
1950
+ const res = await apiCall(port, "/api/tunnel", {
1951
+ method: "POST",
1952
+ headers: { "Content-Type": "application/json" },
1953
+ body: JSON.stringify(body)
1954
+ });
1955
+ const data = await res.json();
1956
+ if (!res.ok) {
1957
+ console.error(`Error: ${data.error}`);
1958
+ process.exit(1);
1959
+ }
1960
+ console.log(`Tunnel active: port ${data.port} \u2192 ${data.publicUrl}`);
1961
+ } else if (subCmd === "list") {
1962
+ const res = await apiCall(port, "/api/tunnel/list");
1963
+ const data = await res.json();
1964
+ if (data.length === 0) {
1965
+ console.log("No active tunnels.");
1966
+ return;
1967
+ }
1968
+ console.log("Active tunnels:\n");
1969
+ for (const t of data) {
1970
+ const label = t.label ? ` (${t.label})` : "";
1971
+ const status = t.status === "active" ? "\u2705" : t.status === "starting" ? "\u23F3" : "\u274C";
1972
+ console.log(` ${status} Port ${t.port}${label}`);
1973
+ if (t.publicUrl) console.log(` \u2192 ${t.publicUrl}`);
1974
+ }
1975
+ } else if (subCmd === "stop") {
1976
+ const tunnelPort = args2[2];
1977
+ if (!tunnelPort) {
1978
+ console.error("Usage: openacp tunnel stop <port>");
1979
+ process.exit(1);
1980
+ }
1981
+ const res = await apiCall(port, `/api/tunnel/${tunnelPort}`, { method: "DELETE" });
1982
+ if (!res.ok) {
1983
+ const data = await res.json();
1984
+ console.error(`Error: ${data.error}`);
1985
+ process.exit(1);
1986
+ }
1987
+ console.log(`Tunnel stopped: port ${tunnelPort}`);
1988
+ } else if (subCmd === "stop-all") {
1989
+ const res = await apiCall(port, "/api/tunnel", { method: "DELETE" });
1990
+ if (!res.ok) {
1991
+ const data = await res.json();
1992
+ console.error(`Error: ${data.error}`);
1993
+ process.exit(1);
1994
+ }
1995
+ console.log("All user tunnels stopped.");
1996
+ } else {
1997
+ console.log(`
1998
+ Tunnel Management:
1999
+ openacp tunnel add <port> [--label name] [--session id]
2000
+ openacp tunnel list
2001
+ openacp tunnel stop <port>
2002
+ openacp tunnel stop-all
2003
+ `);
2004
+ }
2005
+ } catch (err) {
2006
+ console.error(`Failed to connect to daemon: ${err.message}`);
2007
+ process.exit(1);
2008
+ }
2009
+ }
2010
+
2011
+ // src/cli/commands/onboard.ts
1745
2012
  async function cmdOnboard() {
1746
- const { ConfigManager } = await import("./config-6S355X75.js");
2013
+ const { ConfigManager } = await import("./config-I4FMCJGZ.js");
1747
2014
  const cm = new ConfigManager();
1748
2015
  if (await cm.exists()) {
1749
- const { runReconfigure } = await import("./setup-XHS4OMPM.js");
2016
+ const { runReconfigure } = await import("./setup-BAI2F24H.js");
1750
2017
  await runReconfigure(cm);
1751
2018
  } else {
1752
- const { runSetup } = await import("./setup-XHS4OMPM.js");
2019
+ const { runSetup } = await import("./setup-BAI2F24H.js");
1753
2020
  await runSetup(cm, { skipRunMode: true });
1754
2021
  }
1755
2022
  }
2023
+
2024
+ // src/cli/commands/default.ts
1756
2025
  async function cmdDefault(command2) {
1757
2026
  const forceForeground = command2 === "--foreground";
1758
2027
  if (command2 && !command2.startsWith("-")) {
@@ -1768,6 +2037,7 @@ async function cmdDefault(command2) {
1768
2037
  "install",
1769
2038
  "uninstall",
1770
2039
  "plugins",
2040
+ "plugin",
1771
2041
  "api",
1772
2042
  "adopt",
1773
2043
  "integrate",
@@ -1782,17 +2052,17 @@ async function cmdDefault(command2) {
1782
2052
  process.exit(1);
1783
2053
  }
1784
2054
  await checkAndPromptUpdate();
1785
- const { ConfigManager } = await import("./config-6S355X75.js");
2055
+ const { ConfigManager } = await import("./config-I4FMCJGZ.js");
1786
2056
  const cm = new ConfigManager();
1787
2057
  if (!await cm.exists()) {
1788
- const { runSetup } = await import("./setup-XHS4OMPM.js");
2058
+ const { runSetup } = await import("./setup-BAI2F24H.js");
1789
2059
  const shouldStart = await runSetup(cm);
1790
2060
  if (!shouldStart) process.exit(0);
1791
2061
  }
1792
2062
  await cm.load();
1793
2063
  const config = cm.get();
1794
2064
  if (!forceForeground && config.runMode === "daemon") {
1795
- const { startDaemon, getPidPath } = await import("./daemon-4CS6HMB5.js");
2065
+ const { startDaemon, getPidPath } = await import("./daemon-PXO5QPCR.js");
1796
2066
  const result = startDaemon(getPidPath(), config.logging.logDir);
1797
2067
  if ("error" in result) {
1798
2068
  console.error(result.error);
@@ -1801,12 +2071,86 @@ async function cmdDefault(command2) {
1801
2071
  console.log(`OpenACP daemon started (PID ${result.pid})`);
1802
2072
  return;
1803
2073
  }
1804
- const { markRunning } = await import("./daemon-4CS6HMB5.js");
2074
+ const { markRunning } = await import("./daemon-PXO5QPCR.js");
1805
2075
  markRunning();
1806
- const { startServer } = await import("./main-XOZCLFUK.js");
2076
+ const { startServer } = await import("./main-T5WVCCFN.js");
1807
2077
  await startServer();
1808
2078
  }
1809
2079
 
2080
+ // src/cli/commands/dev.ts
2081
+ import fs3 from "fs";
2082
+ import path3 from "path";
2083
+ async function cmdDev(args2 = []) {
2084
+ if (wantsHelp(args2)) {
2085
+ console.log(`
2086
+ \x1B[1mopenacp dev\x1B[0m \u2014 Run OpenACP with a local plugin in development mode
2087
+
2088
+ \x1B[1mUsage:\x1B[0m
2089
+ openacp dev <plugin-path> [options]
2090
+
2091
+ \x1B[1mOptions:\x1B[0m
2092
+ --no-watch Disable file watching (no hot-reload)
2093
+ --verbose Enable verbose logging
2094
+
2095
+ \x1B[1mExamples:\x1B[0m
2096
+ openacp dev ./my-plugin
2097
+ openacp dev ../adapter-matrix --no-watch
2098
+ openacp dev ./my-plugin --verbose
2099
+ `);
2100
+ return;
2101
+ }
2102
+ const pluginPathArg = args2.slice(1).find((a) => !a.startsWith("--"));
2103
+ const noWatch = args2.includes("--no-watch");
2104
+ const verbose = args2.includes("--verbose");
2105
+ if (!pluginPathArg) {
2106
+ console.error("Error: missing plugin path. Usage: openacp dev <plugin-path>");
2107
+ process.exit(1);
2108
+ }
2109
+ const pluginPath = path3.resolve(pluginPathArg);
2110
+ if (!fs3.existsSync(pluginPath)) {
2111
+ console.error(`Error: plugin path does not exist: ${pluginPath}`);
2112
+ process.exit(1);
2113
+ }
2114
+ const tsconfigPath = path3.join(pluginPath, "tsconfig.json");
2115
+ const hasTsconfig = fs3.existsSync(tsconfigPath);
2116
+ if (hasTsconfig) {
2117
+ console.log("Compiling plugin TypeScript...");
2118
+ const { execSync: execSync3 } = await import("child_process");
2119
+ try {
2120
+ execSync3("npx tsc", { cwd: pluginPath, stdio: "inherit" });
2121
+ console.log("Compilation complete.");
2122
+ } catch {
2123
+ console.error("TypeScript compilation failed. Fix errors and try again.");
2124
+ process.exit(1);
2125
+ }
2126
+ if (!noWatch) {
2127
+ const { spawn } = await import("child_process");
2128
+ const tscWatch = spawn("npx", ["tsc", "--watch", "--preserveWatchOutput"], {
2129
+ cwd: pluginPath,
2130
+ stdio: verbose ? "inherit" : "ignore"
2131
+ });
2132
+ tscWatch.unref();
2133
+ process.on("exit", () => {
2134
+ try {
2135
+ tscWatch.kill();
2136
+ } catch {
2137
+ }
2138
+ });
2139
+ if (verbose) {
2140
+ console.log("Started tsc --watch for plugin");
2141
+ }
2142
+ }
2143
+ }
2144
+ process.env.OPENACP_DEV_PLUGIN_PATH = pluginPath;
2145
+ process.env.OPENACP_DEV_NO_WATCH = noWatch ? "1" : "";
2146
+ if (verbose) {
2147
+ process.env.OPENACP_DEBUG = "1";
2148
+ }
2149
+ process.env.OPENACP_DEV_LOOP = "1";
2150
+ const { startServer } = await import("./main-T5WVCCFN.js");
2151
+ await startServer({ devPluginPath: pluginPath, noWatch });
2152
+ }
2153
+
1810
2154
  // src/cli.ts
1811
2155
  setDefaultAutoSelectFamily(false);
1812
2156
  var args = process.argv.slice(2);
@@ -1819,6 +2163,7 @@ var commands = {
1819
2163
  "install": () => cmdInstall(args),
1820
2164
  "uninstall": () => cmdUninstall(args),
1821
2165
  "plugins": () => cmdPlugins(args),
2166
+ "plugin": () => cmdPlugin(args),
1822
2167
  "api": () => cmdApi(args),
1823
2168
  "start": () => cmdStart(args),
1824
2169
  "stop": () => cmdStop(args),
@@ -1833,8 +2178,9 @@ var commands = {
1833
2178
  "agents": () => cmdAgents(args),
1834
2179
  "tunnel": () => cmdTunnel(args),
1835
2180
  "onboard": () => cmdOnboard(),
2181
+ "dev": () => cmdDev(args),
1836
2182
  "--daemon-child": async () => {
1837
- const { startServer } = await import("./main-XOZCLFUK.js");
2183
+ const { startServer } = await import("./main-T5WVCCFN.js");
1838
2184
  await startServer();
1839
2185
  }
1840
2186
  };