@ken-jo/agent-connector 0.4.91 → 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 (192) hide show
  1. package/README.md +301 -560
  2. package/dist/{action-L44DXFHT.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-JO6GUTV7.js → antigravity-cli-MDEMPPAH.js} +47 -16
  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-BLTVZACS.js → chunk-447JWFZO.js} +9 -9
  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-R6LML2YS.js → chunk-7UT6OB52.js} +2 -2
  17. package/dist/{chunk-G4CEELKO.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-LAIITCMW.js → chunk-FBCBHEGB.js} +5 -5
  21. package/dist/{chunk-4NSU3KWX.js → chunk-FJCUKXGX.js} +2 -2
  22. package/dist/{chunk-ZMLVR4J7.js → chunk-FO5CEXXN.js} +2 -2
  23. package/dist/{chunk-IXOQDZWC.js → chunk-GZGLCCEE.js} +5 -1
  24. package/dist/chunk-GZGLCCEE.js.map +1 -0
  25. package/dist/{chunk-LF76VPGQ.js → chunk-IBLYVAWH.js} +28 -6
  26. package/dist/chunk-IBLYVAWH.js.map +1 -0
  27. package/dist/{chunk-4FWETID5.js → chunk-IVAWP6HH.js} +2 -2
  28. package/dist/{chunk-NBUEL74R.js → chunk-JFXL4HYA.js} +3 -3
  29. package/dist/{chunk-KIRCPLM4.js → chunk-JO2IM2JL.js} +538 -226
  30. package/dist/chunk-JO2IM2JL.js.map +1 -0
  31. package/dist/{chunk-NWLRJNXM.js → chunk-JVO6NBTT.js} +3 -3
  32. package/dist/{chunk-25CPWJA7.js → chunk-KA55FISM.js} +43 -43
  33. package/dist/{chunk-QARPXSIV.js → chunk-L26PSQTY.js} +4 -4
  34. package/dist/{chunk-YYNXIUR2.js → chunk-M2H7JURF.js} +2 -2
  35. package/dist/{chunk-56R2ER7K.js → chunk-NBYKLUF6.js} +2 -2
  36. package/dist/{chunk-VVFDU4IX.js → chunk-WFEHWTLM.js} +12 -5
  37. package/dist/{chunk-VVFDU4IX.js.map → chunk-WFEHWTLM.js.map} +1 -1
  38. package/dist/{chunk-LN76OGNR.js → chunk-Z2MRSS2I.js} +2 -2
  39. package/dist/{claude-code-WS4NAGZT.js → claude-code-7RS4YVGZ.js} +9 -9
  40. package/dist/cli/sdk.js +7 -7
  41. package/dist/cli.js +1 -1
  42. package/dist/{cline-NNMVCECA.js → cline-BZQAUYPC.js} +5 -5
  43. package/dist/{codebuddy-RBEZGXBG.js → codebuddy-G42IKGKB.js} +5 -5
  44. package/dist/{codebuff-RJIDSEU3.js → codebuff-5RLTLZAU.js} +5 -5
  45. package/dist/{codex-ZZ434GYR.js → codex-XHAMJILX.js} +11 -5
  46. package/dist/{codex-ZZ434GYR.js.map → codex-XHAMJILX.js.map} +1 -1
  47. package/dist/{continue-MNM7YVJY.js → continue-JLIB7R7X.js} +6 -6
  48. package/dist/{copilot-cli-SMTX5F65.js → copilot-cli-XZSUYNQZ.js} +5 -5
  49. package/dist/{crush-NYDBHIJE.js → crush-ESERLVLT.js} +5 -5
  50. package/dist/{cursor-AOELDNZU.js → cursor-FUDOV5VK.js} +6 -6
  51. package/dist/{detect-3S46RUMK.js → detect-Z5BDTY6B.js} +4 -4
  52. package/dist/{devin-PRJY2TTD.js → devin-Y7PWKVHY.js} +5 -5
  53. package/dist/{doctor-3CUBPQKU.js → doctor-GAP27PP2.js} +25 -21
  54. package/dist/doctor-GAP27PP2.js.map +1 -0
  55. package/dist/{droid-PTCH2K7Y.js → droid-DTO5POTK.js} +5 -5
  56. package/dist/{gemini-cli-QGLN2UMS.js → gemini-cli-RBIG6U2F.js} +5 -5
  57. package/dist/{goose-DQ6GSZ5O.js → goose-VGNOP5J2.js} +6 -6
  58. package/dist/{grok-cli-5QD235UB.js → grok-cli-2RFBK6J3.js} +5 -5
  59. package/dist/{hermes-E47IG63A.js → hermes-NUKFWZI5.js} +6 -6
  60. package/dist/{hook-P6EKDINW.js → hook-XPR3AHDI.js} +14 -14
  61. package/dist/index.d.ts +2 -2
  62. package/dist/index.js +5 -5
  63. package/dist/install-O32TDIZP.js +382 -0
  64. package/dist/install-O32TDIZP.js.map +1 -0
  65. package/dist/{introspect-DYOIX8Ov.d.ts → introspect-BkId4LGP.d.ts} +1 -1
  66. package/dist/{jetbrains-copilot-T2EPKROP.js → jetbrains-copilot-FXZ5AOTS.js} +23 -7
  67. package/dist/jetbrains-copilot-FXZ5AOTS.js.map +1 -0
  68. package/dist/{junie-SQ4SDLGK.js → junie-TSXIZSCE.js} +5 -5
  69. package/dist/{kilo-OU2ZLZKB.js → kilo-JLH3KVZJ.js} +5 -5
  70. package/dist/{kilo-cli-NMWGYF4F.js → kilo-cli-5W36VJQZ.js} +5 -5
  71. package/dist/{kimi-Z7L2LEEI.js → kimi-R62W7HKZ.js} +5 -5
  72. package/dist/{kiro-4IN5IH46.js → kiro-AUJMGIBL.js} +5 -5
  73. package/dist/{leaderboard-LF5SP6X2.js → leaderboard-YWMOSJBC.js} +5 -5
  74. package/dist/{mimo-code-G2CBZ4M6.js → mimo-code-PGLFFVER.js} +5 -5
  75. package/dist/{mistral-vibe-TRQDHAWV.js → mistral-vibe-36CZVQNQ.js} +5 -5
  76. package/dist/{mux-JNM3F2NW.js → mux-HWL4N5KH.js} +5 -5
  77. package/dist/{nemoclaw-SHA4IUML.js → nemoclaw-QPHETUXM.js} +6 -6
  78. package/dist/{omp-OOVUNXME.js → omp-3TFMTJ5U.js} +5 -5
  79. package/dist/{open-interpreter-4PKL56AA.js → open-interpreter-UTBKE2EH.js} +5 -5
  80. package/dist/openclaw-RYFO5TLY.js +17 -0
  81. package/dist/{opencode-W2RK4M7G.js → opencode-JX7GBE5Q.js} +5 -5
  82. package/dist/{openhands-5LNH3BKB.js → openhands-AZW4PXJ3.js} +5 -5
  83. package/dist/{package-2EAIYSJ4.js → package-2KKUGZFS.js} +12 -12
  84. package/dist/{pi-BUADR5MJ.js → pi-MRI3EBWU.js} +5 -5
  85. package/dist/{qwen-code-TUJNHKNI.js → qwen-code-ISR6BEET.js} +6 -6
  86. package/dist/{roo-code-L5F7S6QH.js → roo-code-6TSCME4R.js} +5 -5
  87. package/dist/runtime/index.d.ts +1 -1
  88. package/dist/runtime/index.js +12 -12
  89. package/dist/sdk/index.d.ts +3 -3
  90. package/dist/sdk/index.js +6 -6
  91. package/dist/sdk/test.d.ts +2 -2
  92. package/dist/sdk/test.js +10 -10
  93. package/dist/{serve-K62FW3V7.js → serve-EPRN7F2X.js} +14 -14
  94. package/dist/{status-E5MCFZM6.js → status-B2PG6YKR.js} +10 -10
  95. package/dist/{statusline-LIPF2KVP.js → statusline-5ERFMYSM.js} +13 -13
  96. package/dist/{telemetry-4OC56NTM.js → telemetry-ZMCAWBWB.js} +10 -10
  97. package/dist/{trae-Z7CQ2A2Q.js → trae-7KDCYIMN.js} +5 -5
  98. package/dist/{types-C4qMgbJn.d.ts → types-D0RqWxT8.d.ts} +43 -0
  99. package/dist/{uninstall-2YYKN5DX.js → uninstall-M76BHLTH.js} +35 -25
  100. package/dist/uninstall-M76BHLTH.js.map +1 -0
  101. package/dist/{upgrade-55AFPJEF.js → upgrade-JLSCNAQA.js} +23 -17
  102. package/dist/upgrade-JLSCNAQA.js.map +1 -0
  103. package/dist/{usage-3PB3WZSL.js → usage-5I72HWCR.js} +2 -2
  104. package/dist/{usage-event-KD5FW6W4.js → usage-event-HIX4ZI45.js} +13 -13
  105. package/dist/{vscode-copilot-LU5NC4ZS.js → vscode-copilot-LILHAPJI.js} +20 -5
  106. package/dist/vscode-copilot-LILHAPJI.js.map +1 -0
  107. package/dist/{warp-4PPG5LOM.js → warp-KJUCWEA3.js} +5 -5
  108. package/dist/{windsurf-3T3RVXKM.js → windsurf-5TGGQR5I.js} +5 -5
  109. package/dist/{zed-ZF2OQ75O.js → zed-EL3JCZ25.js} +5 -5
  110. package/package.json +1 -1
  111. package/dist/antigravity-cli-JO6GUTV7.js.map +0 -1
  112. package/dist/chunk-4HVQ7IUM.js.map +0 -1
  113. package/dist/chunk-7HUUINPB.js +0 -201
  114. package/dist/chunk-7HUUINPB.js.map +0 -1
  115. package/dist/chunk-IXOQDZWC.js.map +0 -1
  116. package/dist/chunk-KIRCPLM4.js.map +0 -1
  117. package/dist/chunk-LF76VPGQ.js.map +0 -1
  118. package/dist/chunk-QKLJU4JX.js.map +0 -1
  119. package/dist/doctor-3CUBPQKU.js.map +0 -1
  120. package/dist/install-7DMK53SB.js +0 -96
  121. package/dist/install-7DMK53SB.js.map +0 -1
  122. package/dist/jetbrains-copilot-T2EPKROP.js.map +0 -1
  123. package/dist/openclaw-BD56E5MV.js +0 -17
  124. package/dist/uninstall-2YYKN5DX.js.map +0 -1
  125. package/dist/upgrade-55AFPJEF.js.map +0 -1
  126. package/dist/vscode-copilot-LU5NC4ZS.js.map +0 -1
  127. /package/dist/{action-L44DXFHT.js.map → action-CVIEPX4U.js.map} +0 -0
  128. /package/dist/{amazon-q-B52EY2SV.js.map → amazon-q-TIT7FIW3.js.map} +0 -0
  129. /package/dist/{amp-UXABVUKC.js.map → amp-NF3OAAUG.js.map} +0 -0
  130. /package/dist/{antigravity-RZHN53VB.js.map → antigravity-7LPK7QOY.js.map} +0 -0
  131. /package/dist/{chunk-UBB7T54N.js.map → chunk-3C5AASHM.js.map} +0 -0
  132. /package/dist/{chunk-BLTVZACS.js.map → chunk-447JWFZO.js.map} +0 -0
  133. /package/dist/{chunk-HORHRHNG.js.map → chunk-4NHXLXSD.js.map} +0 -0
  134. /package/dist/{chunk-AY3RGRTT.js.map → chunk-6TF7MHG5.js.map} +0 -0
  135. /package/dist/{chunk-R6LML2YS.js.map → chunk-7UT6OB52.js.map} +0 -0
  136. /package/dist/{chunk-G4CEELKO.js.map → chunk-AY3VFNOH.js.map} +0 -0
  137. /package/dist/{chunk-LAIITCMW.js.map → chunk-FBCBHEGB.js.map} +0 -0
  138. /package/dist/{chunk-4NSU3KWX.js.map → chunk-FJCUKXGX.js.map} +0 -0
  139. /package/dist/{chunk-ZMLVR4J7.js.map → chunk-FO5CEXXN.js.map} +0 -0
  140. /package/dist/{chunk-4FWETID5.js.map → chunk-IVAWP6HH.js.map} +0 -0
  141. /package/dist/{chunk-NBUEL74R.js.map → chunk-JFXL4HYA.js.map} +0 -0
  142. /package/dist/{chunk-NWLRJNXM.js.map → chunk-JVO6NBTT.js.map} +0 -0
  143. /package/dist/{chunk-25CPWJA7.js.map → chunk-KA55FISM.js.map} +0 -0
  144. /package/dist/{chunk-QARPXSIV.js.map → chunk-L26PSQTY.js.map} +0 -0
  145. /package/dist/{chunk-YYNXIUR2.js.map → chunk-M2H7JURF.js.map} +0 -0
  146. /package/dist/{chunk-56R2ER7K.js.map → chunk-NBYKLUF6.js.map} +0 -0
  147. /package/dist/{chunk-LN76OGNR.js.map → chunk-Z2MRSS2I.js.map} +0 -0
  148. /package/dist/{claude-code-WS4NAGZT.js.map → claude-code-7RS4YVGZ.js.map} +0 -0
  149. /package/dist/{cline-NNMVCECA.js.map → cline-BZQAUYPC.js.map} +0 -0
  150. /package/dist/{codebuddy-RBEZGXBG.js.map → codebuddy-G42IKGKB.js.map} +0 -0
  151. /package/dist/{codebuff-RJIDSEU3.js.map → codebuff-5RLTLZAU.js.map} +0 -0
  152. /package/dist/{continue-MNM7YVJY.js.map → continue-JLIB7R7X.js.map} +0 -0
  153. /package/dist/{copilot-cli-SMTX5F65.js.map → copilot-cli-XZSUYNQZ.js.map} +0 -0
  154. /package/dist/{crush-NYDBHIJE.js.map → crush-ESERLVLT.js.map} +0 -0
  155. /package/dist/{cursor-AOELDNZU.js.map → cursor-FUDOV5VK.js.map} +0 -0
  156. /package/dist/{detect-3S46RUMK.js.map → detect-Z5BDTY6B.js.map} +0 -0
  157. /package/dist/{devin-PRJY2TTD.js.map → devin-Y7PWKVHY.js.map} +0 -0
  158. /package/dist/{droid-PTCH2K7Y.js.map → droid-DTO5POTK.js.map} +0 -0
  159. /package/dist/{gemini-cli-QGLN2UMS.js.map → gemini-cli-RBIG6U2F.js.map} +0 -0
  160. /package/dist/{goose-DQ6GSZ5O.js.map → goose-VGNOP5J2.js.map} +0 -0
  161. /package/dist/{grok-cli-5QD235UB.js.map → grok-cli-2RFBK6J3.js.map} +0 -0
  162. /package/dist/{hermes-E47IG63A.js.map → hermes-NUKFWZI5.js.map} +0 -0
  163. /package/dist/{hook-P6EKDINW.js.map → hook-XPR3AHDI.js.map} +0 -0
  164. /package/dist/{junie-SQ4SDLGK.js.map → junie-TSXIZSCE.js.map} +0 -0
  165. /package/dist/{kilo-OU2ZLZKB.js.map → kilo-JLH3KVZJ.js.map} +0 -0
  166. /package/dist/{kilo-cli-NMWGYF4F.js.map → kilo-cli-5W36VJQZ.js.map} +0 -0
  167. /package/dist/{kimi-Z7L2LEEI.js.map → kimi-R62W7HKZ.js.map} +0 -0
  168. /package/dist/{kiro-4IN5IH46.js.map → kiro-AUJMGIBL.js.map} +0 -0
  169. /package/dist/{leaderboard-LF5SP6X2.js.map → leaderboard-YWMOSJBC.js.map} +0 -0
  170. /package/dist/{mimo-code-G2CBZ4M6.js.map → mimo-code-PGLFFVER.js.map} +0 -0
  171. /package/dist/{mistral-vibe-TRQDHAWV.js.map → mistral-vibe-36CZVQNQ.js.map} +0 -0
  172. /package/dist/{mux-JNM3F2NW.js.map → mux-HWL4N5KH.js.map} +0 -0
  173. /package/dist/{nemoclaw-SHA4IUML.js.map → nemoclaw-QPHETUXM.js.map} +0 -0
  174. /package/dist/{omp-OOVUNXME.js.map → omp-3TFMTJ5U.js.map} +0 -0
  175. /package/dist/{open-interpreter-4PKL56AA.js.map → open-interpreter-UTBKE2EH.js.map} +0 -0
  176. /package/dist/{openclaw-BD56E5MV.js.map → openclaw-RYFO5TLY.js.map} +0 -0
  177. /package/dist/{opencode-W2RK4M7G.js.map → opencode-JX7GBE5Q.js.map} +0 -0
  178. /package/dist/{openhands-5LNH3BKB.js.map → openhands-AZW4PXJ3.js.map} +0 -0
  179. /package/dist/{package-2EAIYSJ4.js.map → package-2KKUGZFS.js.map} +0 -0
  180. /package/dist/{pi-BUADR5MJ.js.map → pi-MRI3EBWU.js.map} +0 -0
  181. /package/dist/{qwen-code-TUJNHKNI.js.map → qwen-code-ISR6BEET.js.map} +0 -0
  182. /package/dist/{roo-code-L5F7S6QH.js.map → roo-code-6TSCME4R.js.map} +0 -0
  183. /package/dist/{serve-K62FW3V7.js.map → serve-EPRN7F2X.js.map} +0 -0
  184. /package/dist/{status-E5MCFZM6.js.map → status-B2PG6YKR.js.map} +0 -0
  185. /package/dist/{statusline-LIPF2KVP.js.map → statusline-5ERFMYSM.js.map} +0 -0
  186. /package/dist/{telemetry-4OC56NTM.js.map → telemetry-ZMCAWBWB.js.map} +0 -0
  187. /package/dist/{trae-Z7CQ2A2Q.js.map → trae-7KDCYIMN.js.map} +0 -0
  188. /package/dist/{usage-3PB3WZSL.js.map → usage-5I72HWCR.js.map} +0 -0
  189. /package/dist/{usage-event-KD5FW6W4.js.map → usage-event-HIX4ZI45.js.map} +0 -0
  190. /package/dist/{warp-4PPG5LOM.js.map → warp-KJUCWEA3.js.map} +0 -0
  191. /package/dist/{windsurf-3T3RVXKM.js.map → windsurf-5TGGQR5I.js.map} +0 -0
  192. /package/dist/{zed-ZF2OQ75O.js.map → zed-EL3JCZ25.js.map} +0 -0
@@ -2,13 +2,14 @@
2
2
  import {
3
3
  installInstructions,
4
4
  packageConnector
5
- } from "./chunk-LF76VPGQ.js";
5
+ } from "./chunk-IBLYVAWH.js";
6
6
  import {
7
7
  MARKETPLACE_NAME,
8
8
  agyPluginInstalled,
9
9
  agyStagingRoot,
10
10
  anyClaudeAgentConnectorPlugins,
11
11
  anyCodexAgentConnectorPlugins,
12
+ anyCopilotAgentConnectorPlugins,
12
13
  anyDroidAgentConnectorPlugins,
13
14
  anyMarketplaceRecordsRemain,
14
15
  claudeKnownMarketplacePath,
@@ -20,6 +21,10 @@ import {
20
21
  codexPluginKey,
21
22
  codexStagingRoot,
22
23
  connectorHasMarketplaceRecords,
24
+ copilotMarketplaceSource,
25
+ copilotPluginInstalled,
26
+ copilotPluginKey,
27
+ copilotStagingRoot,
23
28
  droidMarketplaceSource,
24
29
  droidPluginInstalled,
25
30
  droidPluginKey,
@@ -38,13 +43,13 @@ import {
38
43
  readMarketplaceInstalls,
39
44
  readNpmConfig,
40
45
  writeMarketplaceInstalls
41
- } from "./chunk-QKLJU4JX.js";
46
+ } from "./chunk-2Y2MZRLP.js";
42
47
  import {
43
48
  spawnChild
44
- } from "./chunk-LN76OGNR.js";
49
+ } from "./chunk-Z2MRSS2I.js";
45
50
  import {
46
51
  detectInstalledPlatforms
47
- } from "./chunk-ZMLVR4J7.js";
52
+ } from "./chunk-FO5CEXXN.js";
48
53
  import {
49
54
  log
50
55
  } from "./chunk-KHO5WNTP.js";
@@ -52,20 +57,20 @@ import {
52
57
  deregisterConnector,
53
58
  loadRegisteredConnector,
54
59
  registerConnector
55
- } from "./chunk-NWLRJNXM.js";
60
+ } from "./chunk-JVO6NBTT.js";
56
61
  import {
57
62
  REGISTERED_PLATFORM_IDS,
58
63
  loadAdapter
59
- } from "./chunk-25CPWJA7.js";
64
+ } from "./chunk-KA55FISM.js";
60
65
  import {
61
66
  configPatchManualEdit
62
- } from "./chunk-56R2ER7K.js";
67
+ } from "./chunk-NBYKLUF6.js";
63
68
  import {
64
69
  findUnsetEnvRefs
65
70
  } from "./chunk-BEFVJ2OE.js";
66
71
  import {
67
72
  hasMemoryLedger
68
- } from "./chunk-YYNXIUR2.js";
73
+ } from "./chunk-M2H7JURF.js";
69
74
  import {
70
75
  connectorDir,
71
76
  connectorsDir,
@@ -74,7 +79,7 @@ import {
74
79
  ensureHomeBin,
75
80
  firstSymlinkInPath,
76
81
  homeBinPath
77
- } from "./chunk-IXOQDZWC.js";
82
+ } from "./chunk-GZGLCCEE.js";
78
83
 
79
84
  // src/core/installer.ts
80
85
  import { existsSync, readdirSync, rmSync } from "fs";
@@ -510,8 +515,8 @@ function errMessage(err) {
510
515
  }
511
516
 
512
517
  // src/core/marketplace.ts
513
- import { existsSync as existsSync10, readdirSync as readdirSync5, readFileSync as readFileSync4, rmSync as rmSync9 } from "fs";
514
- import { join as join10 } from "path";
518
+ import { existsSync as existsSync11, readdirSync as readdirSync6, readFileSync as readFileSync5, rmSync as rmSync10 } from "fs";
519
+ import { join as join11 } from "path";
515
520
 
516
521
  // src/core/marketplace-drivers/claude.ts
517
522
  import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync, rmSync as rmSync2, writeFileSync } from "fs";
@@ -1303,15 +1308,15 @@ var codexDriver = {
1303
1308
  }
1304
1309
  };
1305
1310
 
1306
- // src/core/marketplace-drivers/droid.ts
1311
+ // src/core/marketplace-drivers/copilot.ts
1307
1312
  import { existsSync as existsSync5, readdirSync as readdirSync4, readFileSync as readFileSync3, rmSync as rmSync4, writeFileSync as writeFileSync3 } from "fs";
1308
- import { join as join5 } from "path";
1309
- var PLATFORM3 = "droid";
1310
- function droidBinary() {
1311
- return findOnPath("droid");
1313
+ import { dirname as dirname4, join as join5 } from "path";
1314
+ var PLATFORM3 = "copilot-cli";
1315
+ function copilotBinary() {
1316
+ return findOnPath("copilot");
1312
1317
  }
1313
- function droidManualInstallCommands(connectorId, stagingRoot) {
1314
- return `droid plugin marketplace add ${stagingRoot} && droid plugin install ${droidPluginKey(connectorId)}`;
1318
+ function copilotManualInstallCommands(connectorId, stagingRoot) {
1319
+ return `copilot plugin marketplace add ${stagingRoot} && copilot plugin install ${copilotPluginKey(connectorId)}`;
1315
1320
  }
1316
1321
  function errMessage4(err) {
1317
1322
  return err instanceof Error ? err.message : String(err);
@@ -1325,18 +1330,320 @@ function failDetail3(step, r) {
1325
1330
  const line = firstLine(r.stderr) || firstLine(r.stdout);
1326
1331
  return `${step} exited ${r.code}${line ? `: ${line}` : ""}`;
1327
1332
  }
1328
- function stagedDroidPlugins(stagingRoot) {
1333
+ function stagedCopilotPlugins(stagingRoot) {
1329
1334
  if (!existsSync5(stagingRoot)) return [];
1330
1335
  try {
1331
1336
  return readdirSync4(stagingRoot).filter(
1332
- (name) => existsSync5(join5(stagingRoot, name, ".factory-plugin", "plugin.json"))
1337
+ (name) => existsSync5(join5(stagingRoot, name, ".claude-plugin", "plugin.json"))
1338
+ ).sort();
1339
+ } catch {
1340
+ return [];
1341
+ }
1342
+ }
1343
+ function copilotCatalogPath(stagingRoot) {
1344
+ return join5(stagingRoot, ".claude-plugin", "marketplace.json");
1345
+ }
1346
+ function regenerateCopilotCatalog(stagingRoot, changes) {
1347
+ const catalogPath = copilotCatalogPath(stagingRoot);
1348
+ const plugins = stagedCopilotPlugins(stagingRoot).map((name) => {
1349
+ let description = `${name} \u2014 connector emitted by agent-connector`;
1350
+ try {
1351
+ const manifest = JSON.parse(
1352
+ readFileSync3(join5(stagingRoot, name, ".claude-plugin", "plugin.json"), "utf8")
1353
+ );
1354
+ if (typeof manifest.description === "string") description = manifest.description;
1355
+ } catch {
1356
+ }
1357
+ return { name, source: `./${name}`, description };
1358
+ });
1359
+ const catalog = { name: MARKETPLACE_NAME, owner: { name: MARKETPLACE_NAME }, plugins };
1360
+ const serialized = `${JSON.stringify(catalog, null, 2)}
1361
+ `;
1362
+ let existing = null;
1363
+ try {
1364
+ existing = readFileSync3(catalogPath, "utf8");
1365
+ } catch {
1366
+ }
1367
+ if (existing === serialized) return;
1368
+ ensureDir(dirname4(catalogPath));
1369
+ writeFileSync3(catalogPath, serialized, "utf8");
1370
+ changes.push({
1371
+ platform: PLATFORM3,
1372
+ action: existing == null ? "create" : "update",
1373
+ path: catalogPath,
1374
+ detail: `regenerated shared marketplace catalog (${plugins.length} plugin(s))`
1375
+ });
1376
+ }
1377
+ function stageCopilotBundle(connector, changes) {
1378
+ const stagingRoot = copilotStagingRoot();
1379
+ const pluginDir = join5(stagingRoot, connector.id);
1380
+ const existed = existsSync5(pluginDir);
1381
+ const result = packageConnector(connector, { outDir: stagingRoot, format: "copilot-plugin" });
1382
+ changes.push({
1383
+ platform: PLATFORM3,
1384
+ action: existed ? "update" : "create",
1385
+ path: pluginDir,
1386
+ detail: `staged marketplace bundle (${result.files.length} files, copilot-plugin)`
1387
+ });
1388
+ regenerateCopilotCatalog(stagingRoot, changes);
1389
+ return { pluginDir, contentHash: hashDirectory(pluginDir) };
1390
+ }
1391
+ async function driveInstall2(connectorId) {
1392
+ const stagingRoot = copilotStagingRoot();
1393
+ const changes = [];
1394
+ const pluginKey = copilotPluginKey(connectorId);
1395
+ const bin = copilotBinary();
1396
+ if (!bin) {
1397
+ changes.push(
1398
+ warn3(
1399
+ `copilot CLI not found on PATH \u2014 bundle staged but not installed. Install manually: ${copilotManualInstallCommands(connectorId, stagingRoot)}`,
1400
+ stagingRoot
1401
+ )
1402
+ );
1403
+ return { changes, ok: false };
1404
+ }
1405
+ const registeredAt = copilotMarketplaceSource(MARKETPLACE_NAME);
1406
+ if (samePath(registeredAt, stagingRoot)) {
1407
+ changes.push({
1408
+ platform: PLATFORM3,
1409
+ action: "skip",
1410
+ path: stagingRoot,
1411
+ detail: `marketplace "${MARKETPLACE_NAME}" already registered`
1412
+ });
1413
+ } else if (registeredAt != null) {
1414
+ changes.push(
1415
+ warn3(
1416
+ `a marketplace named "${MARKETPLACE_NAME}" is already registered at ${registeredAt} (not ours) \u2014 refusing to touch it. Remove it first (copilot plugin marketplace remove ${MARKETPLACE_NAME}) or install manually: ` + copilotManualInstallCommands(connectorId, stagingRoot)
1417
+ )
1418
+ );
1419
+ return { changes, ok: false };
1420
+ } else {
1421
+ const add = await runHostCommand(bin, ["plugin", "marketplace", "add", stagingRoot]);
1422
+ if (!samePath(copilotMarketplaceSource(MARKETPLACE_NAME), stagingRoot)) {
1423
+ changes.push(
1424
+ warn3(
1425
+ `could not register the local marketplace \u2014 ` + failDetail3("copilot plugin marketplace add", add) + `. Install manually: ${copilotManualInstallCommands(connectorId, stagingRoot)}`,
1426
+ stagingRoot
1427
+ )
1428
+ );
1429
+ return { changes, ok: false };
1430
+ }
1431
+ changes.push({
1432
+ platform: PLATFORM3,
1433
+ action: "create",
1434
+ path: stagingRoot,
1435
+ detail: `registered local marketplace "${MARKETPLACE_NAME}" (copilot plugin marketplace add)`
1436
+ });
1437
+ }
1438
+ if (copilotPluginInstalled(connectorId)) {
1439
+ changes.push({
1440
+ platform: PLATFORM3,
1441
+ action: "skip",
1442
+ detail: `plugin ${pluginKey} already installed`
1443
+ });
1444
+ return { changes, ok: true };
1445
+ }
1446
+ const install = await runHostCommand(bin, ["plugin", "install", pluginKey]);
1447
+ if (!install.ok || !copilotPluginInstalled(connectorId)) {
1448
+ changes.push(
1449
+ warn3(`plugin install did not complete \u2014 ` + failDetail3(`copilot plugin install ${pluginKey}`, install))
1450
+ );
1451
+ return { changes, ok: false };
1452
+ }
1453
+ changes.push({
1454
+ platform: PLATFORM3,
1455
+ action: "create",
1456
+ detail: `installed plugin ${pluginKey} (scope user)`
1457
+ });
1458
+ return { changes, ok: true };
1459
+ }
1460
+ async function driveUninstall2(connectorId) {
1461
+ const changes = [];
1462
+ const pluginKey = copilotPluginKey(connectorId);
1463
+ if (!copilotPluginInstalled(connectorId)) {
1464
+ changes.push({
1465
+ platform: PLATFORM3,
1466
+ action: "skip",
1467
+ detail: `plugin ${pluginKey} not installed on copilot-cli`
1468
+ });
1469
+ return { changes, ok: true };
1470
+ }
1471
+ const bin = copilotBinary();
1472
+ if (!bin) {
1473
+ changes.push(
1474
+ warn3(
1475
+ `copilot CLI not found on PATH \u2014 cannot drive the uninstall. Run manually: copilot plugin uninstall ${pluginKey}`
1476
+ )
1477
+ );
1478
+ return { changes, ok: false };
1479
+ }
1480
+ const remove = await runHostCommand(bin, ["plugin", "uninstall", pluginKey]);
1481
+ if (!remove.ok || copilotPluginInstalled(connectorId)) {
1482
+ changes.push(
1483
+ warn3(`plugin uninstall did not complete \u2014 ` + failDetail3(`copilot plugin uninstall ${pluginKey}`, remove))
1484
+ );
1485
+ return { changes, ok: false };
1486
+ }
1487
+ changes.push({
1488
+ platform: PLATFORM3,
1489
+ action: "remove",
1490
+ detail: `uninstalled plugin ${pluginKey} (copilot plugin uninstall)`
1491
+ });
1492
+ return { changes, ok: true };
1493
+ }
1494
+ async function driveMarketplaceRemove2(stagingRoot) {
1495
+ const bin = copilotBinary();
1496
+ if (!bin) {
1497
+ return [
1498
+ warn3(
1499
+ `copilot CLI not found on PATH \u2014 marketplace registration "${MARKETPLACE_NAME}" left behind. Run manually: copilot plugin marketplace remove ${MARKETPLACE_NAME}`,
1500
+ stagingRoot
1501
+ )
1502
+ ];
1503
+ }
1504
+ const remove = await runHostCommand(bin, ["plugin", "marketplace", "remove", MARKETPLACE_NAME]);
1505
+ if (!remove.ok && copilotMarketplaceSource(MARKETPLACE_NAME) != null) {
1506
+ return [
1507
+ warn3(
1508
+ `could not remove the marketplace registration \u2014 ` + failDetail3(`copilot plugin marketplace remove ${MARKETPLACE_NAME}`, remove),
1509
+ stagingRoot
1510
+ )
1511
+ ];
1512
+ }
1513
+ return [
1514
+ {
1515
+ platform: PLATFORM3,
1516
+ action: "remove",
1517
+ path: stagingRoot,
1518
+ detail: `removed marketplace registration "${MARKETPLACE_NAME}" (no plugins remain)`
1519
+ }
1520
+ ];
1521
+ }
1522
+ var copilotDriver = {
1523
+ platform: PLATFORM3,
1524
+ format: "copilot-plugin",
1525
+ binary: copilotBinary,
1526
+ stagingRoot: copilotStagingRoot,
1527
+ pluginDir(id) {
1528
+ return join5(copilotStagingRoot(), id);
1529
+ },
1530
+ installed: copilotPluginInstalled,
1531
+ stage(connector, changes) {
1532
+ return stageCopilotBundle(connector, changes).contentHash;
1533
+ },
1534
+ planInstall(connector, changes) {
1535
+ const stagingRoot = copilotStagingRoot();
1536
+ const registered = samePath(copilotMarketplaceSource(MARKETPLACE_NAME), stagingRoot);
1537
+ changes.push({
1538
+ platform: PLATFORM3,
1539
+ action: registered ? "skip" : "create",
1540
+ path: stagingRoot,
1541
+ detail: registered ? `marketplace "${MARKETPLACE_NAME}" already registered` : `run: copilot plugin marketplace add ${stagingRoot}`
1542
+ });
1543
+ changes.push({
1544
+ platform: PLATFORM3,
1545
+ action: copilotPluginInstalled(connector.id) ? "skip" : "create",
1546
+ detail: copilotPluginInstalled(connector.id) ? `plugin ${copilotPluginKey(connector.id)} already installed` : `run: copilot plugin install ${copilotPluginKey(connector.id)}`
1547
+ });
1548
+ },
1549
+ planUninstall(id, changes) {
1550
+ const stagingRoot = copilotStagingRoot();
1551
+ const pluginDir = join5(stagingRoot, id);
1552
+ const pluginKey = copilotPluginKey(id);
1553
+ changes.push({
1554
+ platform: PLATFORM3,
1555
+ action: copilotPluginInstalled(id) ? "remove" : "skip",
1556
+ detail: copilotPluginInstalled(id) ? `run: copilot plugin uninstall ${pluginKey}` : `plugin ${pluginKey} not installed on copilot-cli`
1557
+ });
1558
+ if (existsSync5(pluginDir)) {
1559
+ changes.push({
1560
+ platform: PLATFORM3,
1561
+ action: "remove",
1562
+ path: pluginDir,
1563
+ detail: "remove staged marketplace bundle"
1564
+ });
1565
+ }
1566
+ const othersStaged = stagedCopilotPlugins(stagingRoot).some((n) => n !== id);
1567
+ if (!othersStaged && samePath(copilotMarketplaceSource(MARKETPLACE_NAME), stagingRoot)) {
1568
+ changes.push({
1569
+ platform: PLATFORM3,
1570
+ action: "remove",
1571
+ path: stagingRoot,
1572
+ detail: `run: copilot plugin marketplace remove ${MARKETPLACE_NAME} (when no plugins remain)`
1573
+ });
1574
+ }
1575
+ },
1576
+ driveInstall: driveInstall2,
1577
+ driveUninstall: driveUninstall2,
1578
+ // Copilot has no `plugin update` verb — update IS re-stage (done by the caller)
1579
+ // + `plugin install`, which is idempotent and version-cached (same caveat as
1580
+ // claude/codex: bump connector.version for the new copy to win).
1581
+ async driveUpdate(id) {
1582
+ return driveInstall2(id);
1583
+ },
1584
+ async finishUninstall(id, changes) {
1585
+ const stagingRoot = copilotStagingRoot();
1586
+ const pluginDir = join5(stagingRoot, id);
1587
+ if (existsSync5(pluginDir)) {
1588
+ try {
1589
+ rmSync4(pluginDir, { recursive: true, force: true });
1590
+ changes.push({
1591
+ platform: PLATFORM3,
1592
+ action: "remove",
1593
+ path: pluginDir,
1594
+ detail: "removed staged marketplace bundle"
1595
+ });
1596
+ } catch (err) {
1597
+ changes.push({
1598
+ platform: PLATFORM3,
1599
+ action: "warn",
1600
+ path: pluginDir,
1601
+ detail: `could not remove staged bundle: ${errMessage4(err)}`
1602
+ });
1603
+ }
1604
+ }
1605
+ if (existsSync5(stagingRoot)) regenerateCopilotCatalog(stagingRoot, changes);
1606
+ const nothingStaged = stagedCopilotPlugins(stagingRoot).length === 0;
1607
+ if (nothingStaged && !anyCopilotAgentConnectorPlugins() && samePath(copilotMarketplaceSource(MARKETPLACE_NAME), stagingRoot)) {
1608
+ changes.push(...await driveMarketplaceRemove2(stagingRoot));
1609
+ }
1610
+ }
1611
+ };
1612
+
1613
+ // src/core/marketplace-drivers/droid.ts
1614
+ import { existsSync as existsSync6, readdirSync as readdirSync5, readFileSync as readFileSync4, rmSync as rmSync5, writeFileSync as writeFileSync4 } from "fs";
1615
+ import { join as join6 } from "path";
1616
+ var PLATFORM4 = "droid";
1617
+ function droidBinary() {
1618
+ return findOnPath("droid");
1619
+ }
1620
+ function droidManualInstallCommands(connectorId, stagingRoot) {
1621
+ return `droid plugin marketplace add ${stagingRoot} && droid plugin install ${droidPluginKey(connectorId)}`;
1622
+ }
1623
+ function errMessage5(err) {
1624
+ return err instanceof Error ? err.message : String(err);
1625
+ }
1626
+ function warn4(detail, path) {
1627
+ return { platform: PLATFORM4, action: "warn", detail, ...path ? { path } : {} };
1628
+ }
1629
+ function failDetail4(step, r) {
1630
+ if (r.timedOut) return `${step} timed out`;
1631
+ if (r.error) return `${step} failed to spawn: ${r.error}`;
1632
+ const line = firstLine(r.stderr) || firstLine(r.stdout);
1633
+ return `${step} exited ${r.code}${line ? `: ${line}` : ""}`;
1634
+ }
1635
+ function stagedDroidPlugins(stagingRoot) {
1636
+ if (!existsSync6(stagingRoot)) return [];
1637
+ try {
1638
+ return readdirSync5(stagingRoot).filter(
1639
+ (name) => existsSync6(join6(stagingRoot, name, ".factory-plugin", "plugin.json"))
1333
1640
  ).sort();
1334
1641
  } catch {
1335
1642
  return [];
1336
1643
  }
1337
1644
  }
1338
1645
  function droidCatalogPath(stagingRoot) {
1339
- return join5(stagingRoot, "marketplace.json");
1646
+ return join6(stagingRoot, "marketplace.json");
1340
1647
  }
1341
1648
  function regenerateDroidCatalog(stagingRoot, changes) {
1342
1649
  const catalogPath = droidCatalogPath(stagingRoot);
@@ -1344,7 +1651,7 @@ function regenerateDroidCatalog(stagingRoot, changes) {
1344
1651
  let description = `${name} \u2014 connector emitted by agent-connector`;
1345
1652
  try {
1346
1653
  const manifest = JSON.parse(
1347
- readFileSync3(join5(stagingRoot, name, ".factory-plugin", "plugin.json"), "utf8")
1654
+ readFileSync4(join6(stagingRoot, name, ".factory-plugin", "plugin.json"), "utf8")
1348
1655
  );
1349
1656
  if (typeof manifest.description === "string") description = manifest.description;
1350
1657
  } catch {
@@ -1356,14 +1663,14 @@ function regenerateDroidCatalog(stagingRoot, changes) {
1356
1663
  `;
1357
1664
  let existing = null;
1358
1665
  try {
1359
- existing = readFileSync3(catalogPath, "utf8");
1666
+ existing = readFileSync4(catalogPath, "utf8");
1360
1667
  } catch {
1361
1668
  }
1362
1669
  if (existing === serialized) return;
1363
1670
  ensureDir(stagingRoot);
1364
- writeFileSync3(catalogPath, serialized, "utf8");
1671
+ writeFileSync4(catalogPath, serialized, "utf8");
1365
1672
  changes.push({
1366
- platform: PLATFORM3,
1673
+ platform: PLATFORM4,
1367
1674
  action: existing == null ? "create" : "update",
1368
1675
  path: catalogPath,
1369
1676
  detail: `regenerated shared marketplace catalog (${plugins.length} plugin(s))`
@@ -1371,11 +1678,11 @@ function regenerateDroidCatalog(stagingRoot, changes) {
1371
1678
  }
1372
1679
  function stageDroidBundle(connector, changes) {
1373
1680
  const stagingRoot = droidStagingRoot();
1374
- const pluginDir = join5(stagingRoot, connector.id);
1375
- const existed = existsSync5(pluginDir);
1681
+ const pluginDir = join6(stagingRoot, connector.id);
1682
+ const existed = existsSync6(pluginDir);
1376
1683
  const result = packageConnector(connector, { outDir: stagingRoot, format: "factory-plugin" });
1377
1684
  changes.push({
1378
- platform: PLATFORM3,
1685
+ platform: PLATFORM4,
1379
1686
  action: existed ? "update" : "create",
1380
1687
  path: pluginDir,
1381
1688
  detail: `staged marketplace bundle (${result.files.length} files, factory-plugin)`
@@ -1383,14 +1690,14 @@ function stageDroidBundle(connector, changes) {
1383
1690
  regenerateDroidCatalog(stagingRoot, changes);
1384
1691
  return { pluginDir, contentHash: hashDirectory(pluginDir) };
1385
1692
  }
1386
- async function driveInstall2(connectorId) {
1693
+ async function driveInstall3(connectorId) {
1387
1694
  const stagingRoot = droidStagingRoot();
1388
1695
  const changes = [];
1389
1696
  const pluginKey = droidPluginKey(connectorId);
1390
1697
  const bin = droidBinary();
1391
1698
  if (!bin) {
1392
1699
  changes.push(
1393
- warn3(
1700
+ warn4(
1394
1701
  `droid CLI not found on PATH \u2014 bundle staged but not installed. Install manually: ${droidManualInstallCommands(connectorId, stagingRoot)}`,
1395
1702
  stagingRoot
1396
1703
  )
@@ -1400,14 +1707,14 @@ async function driveInstall2(connectorId) {
1400
1707
  const registeredAt = droidMarketplaceSource(MARKETPLACE_NAME);
1401
1708
  if (samePath(registeredAt, stagingRoot)) {
1402
1709
  changes.push({
1403
- platform: PLATFORM3,
1710
+ platform: PLATFORM4,
1404
1711
  action: "skip",
1405
1712
  path: stagingRoot,
1406
1713
  detail: `marketplace "${MARKETPLACE_NAME}" already registered`
1407
1714
  });
1408
1715
  } else if (registeredAt != null) {
1409
1716
  changes.push(
1410
- warn3(
1717
+ warn4(
1411
1718
  `a marketplace named "${MARKETPLACE_NAME}" is already registered at ${registeredAt} (not ours) \u2014 refusing to touch it. Remove it first (droid plugin marketplace remove ${MARKETPLACE_NAME}) or install manually: ` + droidManualInstallCommands(connectorId, stagingRoot)
1412
1719
  )
1413
1720
  );
@@ -1416,15 +1723,15 @@ async function driveInstall2(connectorId) {
1416
1723
  const add = await runHostCommand(bin, ["plugin", "marketplace", "add", stagingRoot]);
1417
1724
  if (!samePath(droidMarketplaceSource(MARKETPLACE_NAME), stagingRoot)) {
1418
1725
  changes.push(
1419
- warn3(
1420
- `could not register the local marketplace \u2014 ` + failDetail3("droid plugin marketplace add", add) + `. Install manually: ${droidManualInstallCommands(connectorId, stagingRoot)}`,
1726
+ warn4(
1727
+ `could not register the local marketplace \u2014 ` + failDetail4("droid plugin marketplace add", add) + `. Install manually: ${droidManualInstallCommands(connectorId, stagingRoot)}`,
1421
1728
  stagingRoot
1422
1729
  )
1423
1730
  );
1424
1731
  return { changes, ok: false };
1425
1732
  }
1426
1733
  changes.push({
1427
- platform: PLATFORM3,
1734
+ platform: PLATFORM4,
1428
1735
  action: "create",
1429
1736
  path: stagingRoot,
1430
1737
  detail: `registered local marketplace "${MARKETPLACE_NAME}" (droid plugin marketplace add)`
@@ -1432,7 +1739,7 @@ async function driveInstall2(connectorId) {
1432
1739
  }
1433
1740
  if (droidPluginInstalled(connectorId)) {
1434
1741
  changes.push({
1435
- platform: PLATFORM3,
1742
+ platform: PLATFORM4,
1436
1743
  action: "skip",
1437
1744
  detail: `plugin ${pluginKey} already installed`
1438
1745
  });
@@ -1441,23 +1748,23 @@ async function driveInstall2(connectorId) {
1441
1748
  const install = await runHostCommand(bin, ["plugin", "install", pluginKey]);
1442
1749
  if (!install.ok || !droidPluginInstalled(connectorId)) {
1443
1750
  changes.push(
1444
- warn3(`plugin install did not complete \u2014 ` + failDetail3(`droid plugin install ${pluginKey}`, install))
1751
+ warn4(`plugin install did not complete \u2014 ` + failDetail4(`droid plugin install ${pluginKey}`, install))
1445
1752
  );
1446
1753
  return { changes, ok: false };
1447
1754
  }
1448
1755
  changes.push({
1449
- platform: PLATFORM3,
1756
+ platform: PLATFORM4,
1450
1757
  action: "create",
1451
1758
  detail: `installed plugin ${pluginKey} (scope user)`
1452
1759
  });
1453
1760
  return { changes, ok: true };
1454
1761
  }
1455
- async function driveUninstall2(connectorId) {
1762
+ async function driveUninstall3(connectorId) {
1456
1763
  const changes = [];
1457
1764
  const pluginKey = droidPluginKey(connectorId);
1458
1765
  if (!droidPluginInstalled(connectorId)) {
1459
1766
  changes.push({
1460
- platform: PLATFORM3,
1767
+ platform: PLATFORM4,
1461
1768
  action: "skip",
1462
1769
  detail: `plugin ${pluginKey} not installed on droid`
1463
1770
  });
@@ -1466,7 +1773,7 @@ async function driveUninstall2(connectorId) {
1466
1773
  const bin = droidBinary();
1467
1774
  if (!bin) {
1468
1775
  changes.push(
1469
- warn3(
1776
+ warn4(
1470
1777
  `droid CLI not found on PATH \u2014 cannot drive the uninstall. Run manually: droid plugin uninstall ${pluginKey}`
1471
1778
  )
1472
1779
  );
@@ -1475,22 +1782,22 @@ async function driveUninstall2(connectorId) {
1475
1782
  const remove = await runHostCommand(bin, ["plugin", "uninstall", pluginKey]);
1476
1783
  if (!remove.ok || droidPluginInstalled(connectorId)) {
1477
1784
  changes.push(
1478
- warn3(`plugin uninstall did not complete \u2014 ` + failDetail3(`droid plugin uninstall ${pluginKey}`, remove))
1785
+ warn4(`plugin uninstall did not complete \u2014 ` + failDetail4(`droid plugin uninstall ${pluginKey}`, remove))
1479
1786
  );
1480
1787
  return { changes, ok: false };
1481
1788
  }
1482
1789
  changes.push({
1483
- platform: PLATFORM3,
1790
+ platform: PLATFORM4,
1484
1791
  action: "remove",
1485
1792
  detail: `uninstalled plugin ${pluginKey} (droid plugin uninstall)`
1486
1793
  });
1487
1794
  return { changes, ok: true };
1488
1795
  }
1489
- async function driveMarketplaceRemove2(stagingRoot) {
1796
+ async function driveMarketplaceRemove3(stagingRoot) {
1490
1797
  const bin = droidBinary();
1491
1798
  if (!bin) {
1492
1799
  return [
1493
- warn3(
1800
+ warn4(
1494
1801
  `droid CLI not found on PATH \u2014 marketplace registration "${MARKETPLACE_NAME}" left behind. Run manually: droid plugin marketplace remove ${MARKETPLACE_NAME}`,
1495
1802
  stagingRoot
1496
1803
  )
@@ -1499,15 +1806,15 @@ async function driveMarketplaceRemove2(stagingRoot) {
1499
1806
  const remove = await runHostCommand(bin, ["plugin", "marketplace", "remove", MARKETPLACE_NAME]);
1500
1807
  if (!remove.ok && droidMarketplaceSource(MARKETPLACE_NAME) != null) {
1501
1808
  return [
1502
- warn3(
1503
- `could not remove the marketplace registration \u2014 ` + failDetail3(`droid plugin marketplace remove ${MARKETPLACE_NAME}`, remove),
1809
+ warn4(
1810
+ `could not remove the marketplace registration \u2014 ` + failDetail4(`droid plugin marketplace remove ${MARKETPLACE_NAME}`, remove),
1504
1811
  stagingRoot
1505
1812
  )
1506
1813
  ];
1507
1814
  }
1508
1815
  return [
1509
1816
  {
1510
- platform: PLATFORM3,
1817
+ platform: PLATFORM4,
1511
1818
  action: "remove",
1512
1819
  path: stagingRoot,
1513
1820
  detail: `removed marketplace registration "${MARKETPLACE_NAME}" (no plugins remain)`
@@ -1515,12 +1822,12 @@ async function driveMarketplaceRemove2(stagingRoot) {
1515
1822
  ];
1516
1823
  }
1517
1824
  var droidDriver = {
1518
- platform: PLATFORM3,
1825
+ platform: PLATFORM4,
1519
1826
  format: "factory-plugin",
1520
1827
  binary: droidBinary,
1521
1828
  stagingRoot: droidStagingRoot,
1522
1829
  pluginDir(id) {
1523
- return join5(droidStagingRoot(), id);
1830
+ return join6(droidStagingRoot(), id);
1524
1831
  },
1525
1832
  installed: droidPluginInstalled,
1526
1833
  stage(connector, changes) {
@@ -1530,29 +1837,29 @@ var droidDriver = {
1530
1837
  const stagingRoot = droidStagingRoot();
1531
1838
  const registered = samePath(droidMarketplaceSource(MARKETPLACE_NAME), stagingRoot);
1532
1839
  changes.push({
1533
- platform: PLATFORM3,
1840
+ platform: PLATFORM4,
1534
1841
  action: registered ? "skip" : "create",
1535
1842
  path: stagingRoot,
1536
1843
  detail: registered ? `marketplace "${MARKETPLACE_NAME}" already registered` : `run: droid plugin marketplace add ${stagingRoot}`
1537
1844
  });
1538
1845
  changes.push({
1539
- platform: PLATFORM3,
1846
+ platform: PLATFORM4,
1540
1847
  action: droidPluginInstalled(connector.id) ? "skip" : "create",
1541
1848
  detail: droidPluginInstalled(connector.id) ? `plugin ${droidPluginKey(connector.id)} already installed` : `run: droid plugin install ${droidPluginKey(connector.id)}`
1542
1849
  });
1543
1850
  },
1544
1851
  planUninstall(id, changes) {
1545
1852
  const stagingRoot = droidStagingRoot();
1546
- const pluginDir = join5(stagingRoot, id);
1853
+ const pluginDir = join6(stagingRoot, id);
1547
1854
  const pluginKey = droidPluginKey(id);
1548
1855
  changes.push({
1549
- platform: PLATFORM3,
1856
+ platform: PLATFORM4,
1550
1857
  action: droidPluginInstalled(id) ? "remove" : "skip",
1551
1858
  detail: droidPluginInstalled(id) ? `run: droid plugin uninstall ${pluginKey}` : `plugin ${pluginKey} not installed on droid`
1552
1859
  });
1553
- if (existsSync5(pluginDir)) {
1860
+ if (existsSync6(pluginDir)) {
1554
1861
  changes.push({
1555
- platform: PLATFORM3,
1862
+ platform: PLATFORM4,
1556
1863
  action: "remove",
1557
1864
  path: pluginDir,
1558
1865
  detail: "remove staged marketplace bundle"
@@ -1561,59 +1868,59 @@ var droidDriver = {
1561
1868
  const othersStaged = stagedDroidPlugins(stagingRoot).some((n) => n !== id);
1562
1869
  if (!othersStaged && samePath(droidMarketplaceSource(MARKETPLACE_NAME), stagingRoot)) {
1563
1870
  changes.push({
1564
- platform: PLATFORM3,
1871
+ platform: PLATFORM4,
1565
1872
  action: "remove",
1566
1873
  path: stagingRoot,
1567
1874
  detail: `run: droid plugin marketplace remove ${MARKETPLACE_NAME} (when no plugins remain)`
1568
1875
  });
1569
1876
  }
1570
1877
  },
1571
- driveInstall: driveInstall2,
1572
- driveUninstall: driveUninstall2,
1878
+ driveInstall: driveInstall3,
1879
+ driveUninstall: driveUninstall3,
1573
1880
  // droid has no documented `plugin update` verb — update IS re-stage (done by
1574
1881
  // the caller) + `plugin install`, assumed idempotent + version-cached (DOCS-only).
1575
1882
  async driveUpdate(id) {
1576
- return driveInstall2(id);
1883
+ return driveInstall3(id);
1577
1884
  },
1578
1885
  async finishUninstall(id, changes) {
1579
1886
  const stagingRoot = droidStagingRoot();
1580
- const pluginDir = join5(stagingRoot, id);
1581
- if (existsSync5(pluginDir)) {
1887
+ const pluginDir = join6(stagingRoot, id);
1888
+ if (existsSync6(pluginDir)) {
1582
1889
  try {
1583
- rmSync4(pluginDir, { recursive: true, force: true });
1890
+ rmSync5(pluginDir, { recursive: true, force: true });
1584
1891
  changes.push({
1585
- platform: PLATFORM3,
1892
+ platform: PLATFORM4,
1586
1893
  action: "remove",
1587
1894
  path: pluginDir,
1588
1895
  detail: "removed staged marketplace bundle"
1589
1896
  });
1590
1897
  } catch (err) {
1591
1898
  changes.push({
1592
- platform: PLATFORM3,
1899
+ platform: PLATFORM4,
1593
1900
  action: "warn",
1594
1901
  path: pluginDir,
1595
- detail: `could not remove staged bundle: ${errMessage4(err)}`
1902
+ detail: `could not remove staged bundle: ${errMessage5(err)}`
1596
1903
  });
1597
1904
  }
1598
1905
  }
1599
- if (existsSync5(stagingRoot)) regenerateDroidCatalog(stagingRoot, changes);
1906
+ if (existsSync6(stagingRoot)) regenerateDroidCatalog(stagingRoot, changes);
1600
1907
  const nothingStaged = stagedDroidPlugins(stagingRoot).length === 0;
1601
1908
  if (nothingStaged && !anyDroidAgentConnectorPlugins() && samePath(droidMarketplaceSource(MARKETPLACE_NAME), stagingRoot)) {
1602
- changes.push(...await driveMarketplaceRemove2(stagingRoot));
1909
+ changes.push(...await driveMarketplaceRemove3(stagingRoot));
1603
1910
  }
1604
1911
  }
1605
1912
  };
1606
1913
 
1607
1914
  // src/core/marketplace-drivers/agy.ts
1608
- import { existsSync as existsSync6, rmSync as rmSync5 } from "fs";
1609
- import { join as join6 } from "path";
1915
+ import { existsSync as existsSync7, rmSync as rmSync6 } from "fs";
1916
+ import { join as join7 } from "path";
1610
1917
  function agyBinary() {
1611
1918
  return findOnPath("agy");
1612
1919
  }
1613
- function errMessage5(err) {
1920
+ function errMessage6(err) {
1614
1921
  return err instanceof Error ? err.message : String(err);
1615
1922
  }
1616
- function failDetail4(step, r) {
1923
+ function failDetail5(step, r) {
1617
1924
  if (r.timedOut) return `${step} timed out`;
1618
1925
  if (r.error) return `${step} failed to spawn: ${r.error}`;
1619
1926
  const line = firstLine(r.stderr) || firstLine(r.stdout);
@@ -1621,8 +1928,8 @@ function failDetail4(step, r) {
1621
1928
  }
1622
1929
  function stageAgyBundle(connector, platform, changes) {
1623
1930
  const stagingRoot = agyStagingRoot();
1624
- const pluginDir = join6(stagingRoot, connector.id);
1625
- const existed = existsSync6(pluginDir);
1931
+ const pluginDir = join7(stagingRoot, connector.id);
1932
+ const existed = existsSync7(pluginDir);
1626
1933
  const result = packageConnector(connector, { outDir: stagingRoot, format: "agy-plugin" });
1627
1934
  changes.push({
1628
1935
  platform,
@@ -1633,7 +1940,7 @@ function stageAgyBundle(connector, platform, changes) {
1633
1940
  return { pluginDir, contentHash: hashDirectory(pluginDir) };
1634
1941
  }
1635
1942
  function makeAgyDriver(platform) {
1636
- const warn6 = (detail, path) => ({
1943
+ const warn7 = (detail, path) => ({
1637
1944
  platform,
1638
1945
  action: "warn",
1639
1946
  detail,
@@ -1646,14 +1953,14 @@ function makeAgyDriver(platform) {
1646
1953
  binary: agyBinary,
1647
1954
  stagingRoot: agyStagingRoot,
1648
1955
  pluginDir(id) {
1649
- return join6(agyStagingRoot(), id);
1956
+ return join7(agyStagingRoot(), id);
1650
1957
  },
1651
1958
  installed: agyPluginInstalled,
1652
1959
  stage(connector, changes) {
1653
1960
  return stageAgyBundle(connector, platform, changes).contentHash;
1654
1961
  },
1655
1962
  planInstall(connector, changes) {
1656
- const pluginDir = join6(agyStagingRoot(), connector.id);
1963
+ const pluginDir = join7(agyStagingRoot(), connector.id);
1657
1964
  changes.push({
1658
1965
  platform,
1659
1966
  action: agyPluginInstalled(connector.id) ? "skip" : "create",
@@ -1661,13 +1968,13 @@ function makeAgyDriver(platform) {
1661
1968
  });
1662
1969
  },
1663
1970
  planUninstall(id, changes) {
1664
- const pluginDir = join6(agyStagingRoot(), id);
1971
+ const pluginDir = join7(agyStagingRoot(), id);
1665
1972
  changes.push({
1666
1973
  platform,
1667
1974
  action: agyPluginInstalled(id) ? "remove" : "skip",
1668
1975
  detail: agyPluginInstalled(id) ? `run: agy plugin uninstall ${id}` : `plugin ${id} not installed on ${platform}`
1669
1976
  });
1670
- if (existsSync6(pluginDir)) {
1977
+ if (existsSync7(pluginDir)) {
1671
1978
  changes.push({
1672
1979
  platform,
1673
1980
  action: "remove",
@@ -1678,11 +1985,11 @@ function makeAgyDriver(platform) {
1678
1985
  },
1679
1986
  async driveInstall(id) {
1680
1987
  const changes = [];
1681
- const pluginDir = join6(agyStagingRoot(), id);
1988
+ const pluginDir = join7(agyStagingRoot(), id);
1682
1989
  const bin = agyBinary();
1683
1990
  if (!bin) {
1684
1991
  changes.push(
1685
- warn6(
1992
+ warn7(
1686
1993
  `agy CLI not found on PATH \u2014 bundle staged but not installed. Install manually: ${manualInstall3(pluginDir)}`,
1687
1994
  pluginDir
1688
1995
  )
@@ -1701,7 +2008,7 @@ function makeAgyDriver(platform) {
1701
2008
  const install = await runHostCommand(bin, ["plugin", "install", pluginDir]);
1702
2009
  if (!install.ok || !agyPluginInstalled(id)) {
1703
2010
  changes.push(
1704
- warn6(`plugin install did not complete \u2014 ` + failDetail4(`agy plugin install ${pluginDir}`, install))
2011
+ warn7(`plugin install did not complete \u2014 ` + failDetail5(`agy plugin install ${pluginDir}`, install))
1705
2012
  );
1706
2013
  return { changes, ok: false };
1707
2014
  }
@@ -1725,7 +2032,7 @@ function makeAgyDriver(platform) {
1725
2032
  const bin = agyBinary();
1726
2033
  if (!bin) {
1727
2034
  changes.push(
1728
- warn6(
2035
+ warn7(
1729
2036
  `agy CLI not found on PATH \u2014 cannot drive the uninstall. Run manually: agy plugin uninstall ${id}`
1730
2037
  )
1731
2038
  );
@@ -1734,7 +2041,7 @@ function makeAgyDriver(platform) {
1734
2041
  const uninstall = await runHostCommand(bin, ["plugin", "uninstall", id]);
1735
2042
  if (!uninstall.ok || agyPluginInstalled(id)) {
1736
2043
  changes.push(
1737
- warn6(`plugin uninstall did not complete \u2014 ` + failDetail4(`agy plugin uninstall ${id}`, uninstall))
2044
+ warn7(`plugin uninstall did not complete \u2014 ` + failDetail5(`agy plugin uninstall ${id}`, uninstall))
1738
2045
  );
1739
2046
  return { changes, ok: false };
1740
2047
  }
@@ -1750,11 +2057,11 @@ function makeAgyDriver(platform) {
1750
2057
  // the probe already shows it present (the bundle on disk changed).
1751
2058
  async driveUpdate(id) {
1752
2059
  const changes = [];
1753
- const pluginDir = join6(agyStagingRoot(), id);
2060
+ const pluginDir = join7(agyStagingRoot(), id);
1754
2061
  const bin = agyBinary();
1755
2062
  if (!bin) {
1756
2063
  changes.push(
1757
- warn6(
2064
+ warn7(
1758
2065
  `agy CLI not found on PATH \u2014 bundle re-staged but the installed copy was not updated. Run manually: ${manualInstall3(pluginDir)}`,
1759
2066
  pluginDir
1760
2067
  )
@@ -1764,7 +2071,7 @@ function makeAgyDriver(platform) {
1764
2071
  const install = await runHostCommand(bin, ["plugin", "install", pluginDir]);
1765
2072
  if (!install.ok || !agyPluginInstalled(id)) {
1766
2073
  changes.push(
1767
- warn6(`plugin install did not complete \u2014 ` + failDetail4(`agy plugin install ${pluginDir}`, install))
2074
+ warn7(`plugin install did not complete \u2014 ` + failDetail5(`agy plugin install ${pluginDir}`, install))
1768
2075
  );
1769
2076
  return { changes, ok: false };
1770
2077
  }
@@ -1778,10 +2085,10 @@ function makeAgyDriver(platform) {
1778
2085
  // Direct driver: no catalog, no marketplace de-registration. Cleanup is just
1779
2086
  // removing the staged bundle dir (the host copied it into its own store).
1780
2087
  async finishUninstall(id, changes) {
1781
- const pluginDir = join6(agyStagingRoot(), id);
1782
- if (existsSync6(pluginDir)) {
2088
+ const pluginDir = join7(agyStagingRoot(), id);
2089
+ if (existsSync7(pluginDir)) {
1783
2090
  try {
1784
- rmSync5(pluginDir, { recursive: true, force: true });
2091
+ rmSync6(pluginDir, { recursive: true, force: true });
1785
2092
  changes.push({
1786
2093
  platform,
1787
2094
  action: "remove",
@@ -1793,7 +2100,7 @@ function makeAgyDriver(platform) {
1793
2100
  platform,
1794
2101
  action: "warn",
1795
2102
  path: pluginDir,
1796
- detail: `could not remove staged bundle: ${errMessage5(err)}`
2103
+ detail: `could not remove staged bundle: ${errMessage6(err)}`
1797
2104
  });
1798
2105
  }
1799
2106
  }
@@ -1802,19 +2109,19 @@ function makeAgyDriver(platform) {
1802
2109
  }
1803
2110
 
1804
2111
  // src/core/marketplace-drivers/gemini.ts
1805
- import { existsSync as existsSync7, rmSync as rmSync6 } from "fs";
1806
- import { join as join7 } from "path";
1807
- var PLATFORM4 = "gemini-cli";
2112
+ import { existsSync as existsSync8, rmSync as rmSync7 } from "fs";
2113
+ import { join as join8 } from "path";
2114
+ var PLATFORM5 = "gemini-cli";
1808
2115
  function geminiBinary() {
1809
2116
  return findOnPath("gemini");
1810
2117
  }
1811
- function errMessage6(err) {
2118
+ function errMessage7(err) {
1812
2119
  return err instanceof Error ? err.message : String(err);
1813
2120
  }
1814
- function warn4(detail, path) {
1815
- return { platform: PLATFORM4, action: "warn", detail, ...path ? { path } : {} };
2121
+ function warn5(detail, path) {
2122
+ return { platform: PLATFORM5, action: "warn", detail, ...path ? { path } : {} };
1816
2123
  }
1817
- function failDetail5(step, r) {
2124
+ function failDetail6(step, r) {
1818
2125
  if (r.timedOut) return `${step} timed out`;
1819
2126
  if (r.error) return `${step} failed to spawn: ${r.error}`;
1820
2127
  const line = firstLine(r.stderr) || firstLine(r.stdout);
@@ -1825,11 +2132,11 @@ function manualInstall(pluginDir) {
1825
2132
  }
1826
2133
  function stageGeminiBundle(connector, changes) {
1827
2134
  const stagingRoot = geminiStagingRoot();
1828
- const pluginDir = join7(stagingRoot, connector.id);
1829
- const existed = existsSync7(pluginDir);
2135
+ const pluginDir = join8(stagingRoot, connector.id);
2136
+ const existed = existsSync8(pluginDir);
1830
2137
  const result = packageConnector(connector, { outDir: stagingRoot, format: "gemini-extension" });
1831
2138
  changes.push({
1832
- platform: PLATFORM4,
2139
+ platform: PLATFORM5,
1833
2140
  action: existed ? "update" : "create",
1834
2141
  path: pluginDir,
1835
2142
  detail: `staged marketplace bundle (${result.files.length} files, gemini-extension)`
@@ -1837,35 +2144,35 @@ function stageGeminiBundle(connector, changes) {
1837
2144
  return { pluginDir, contentHash: hashDirectory(pluginDir) };
1838
2145
  }
1839
2146
  var geminiDriver = {
1840
- platform: PLATFORM4,
2147
+ platform: PLATFORM5,
1841
2148
  format: "gemini-extension",
1842
2149
  binary: geminiBinary,
1843
2150
  stagingRoot: geminiStagingRoot,
1844
2151
  pluginDir(id) {
1845
- return join7(geminiStagingRoot(), id);
2152
+ return join8(geminiStagingRoot(), id);
1846
2153
  },
1847
2154
  installed: geminiExtensionInstalled,
1848
2155
  stage(connector, changes) {
1849
2156
  return stageGeminiBundle(connector, changes).contentHash;
1850
2157
  },
1851
2158
  planInstall(connector, changes) {
1852
- const pluginDir = join7(geminiStagingRoot(), connector.id);
2159
+ const pluginDir = join8(geminiStagingRoot(), connector.id);
1853
2160
  changes.push({
1854
- platform: PLATFORM4,
2161
+ platform: PLATFORM5,
1855
2162
  action: geminiExtensionInstalled(connector.id) ? "skip" : "create",
1856
2163
  detail: geminiExtensionInstalled(connector.id) ? `extension ${connector.id} already installed` : `run: ${manualInstall(pluginDir)}`
1857
2164
  });
1858
2165
  },
1859
2166
  planUninstall(id, changes) {
1860
- const pluginDir = join7(geminiStagingRoot(), id);
2167
+ const pluginDir = join8(geminiStagingRoot(), id);
1861
2168
  changes.push({
1862
- platform: PLATFORM4,
2169
+ platform: PLATFORM5,
1863
2170
  action: geminiExtensionInstalled(id) ? "remove" : "skip",
1864
- detail: geminiExtensionInstalled(id) ? `run: gemini extensions uninstall ${id}` : `extension ${id} not installed on ${PLATFORM4}`
2171
+ detail: geminiExtensionInstalled(id) ? `run: gemini extensions uninstall ${id}` : `extension ${id} not installed on ${PLATFORM5}`
1865
2172
  });
1866
- if (existsSync7(pluginDir)) {
2173
+ if (existsSync8(pluginDir)) {
1867
2174
  changes.push({
1868
- platform: PLATFORM4,
2175
+ platform: PLATFORM5,
1869
2176
  action: "remove",
1870
2177
  path: pluginDir,
1871
2178
  detail: "remove staged marketplace bundle"
@@ -1874,11 +2181,11 @@ var geminiDriver = {
1874
2181
  },
1875
2182
  async driveInstall(id) {
1876
2183
  const changes = [];
1877
- const pluginDir = join7(geminiStagingRoot(), id);
2184
+ const pluginDir = join8(geminiStagingRoot(), id);
1878
2185
  const bin = geminiBinary();
1879
2186
  if (!bin) {
1880
2187
  changes.push(
1881
- warn4(
2188
+ warn5(
1882
2189
  `gemini CLI not found on PATH \u2014 bundle staged but not installed. Install manually: ${manualInstall(pluginDir)}`,
1883
2190
  pluginDir
1884
2191
  )
@@ -1887,7 +2194,7 @@ var geminiDriver = {
1887
2194
  }
1888
2195
  if (geminiExtensionInstalled(id)) {
1889
2196
  changes.push({
1890
- platform: PLATFORM4,
2197
+ platform: PLATFORM5,
1891
2198
  action: "skip",
1892
2199
  detail: `extension ${id} already installed`
1893
2200
  });
@@ -1901,15 +2208,15 @@ var geminiDriver = {
1901
2208
  ${install.stderr}`
1902
2209
  );
1903
2210
  changes.push(
1904
- warn4(
1905
- trustGated ? `extension install blocked by gemini's folder-trust prompt (newer gemini gates local-path installs and --consent does not bypass it). Trust the folder once, then re-run: run \`gemini extensions install ${pluginDir} --consent\` interactively (answer "y" to trust), or set \`security.folderTrust.enabled: false\` in ~/.gemini/settings.json. The bundle is staged and ready.` : `extension install did not complete \u2014 ` + failDetail5(`gemini extensions install ${pluginDir} --consent`, install),
2211
+ warn5(
2212
+ trustGated ? `extension install blocked by gemini's folder-trust prompt (newer gemini gates local-path installs and --consent does not bypass it). Trust the folder once, then re-run: run \`gemini extensions install ${pluginDir} --consent\` interactively (answer "y" to trust), or set \`security.folderTrust.enabled: false\` in ~/.gemini/settings.json. The bundle is staged and ready.` : `extension install did not complete \u2014 ` + failDetail6(`gemini extensions install ${pluginDir} --consent`, install),
1906
2213
  pluginDir
1907
2214
  )
1908
2215
  );
1909
2216
  return { changes, ok: false };
1910
2217
  }
1911
2218
  changes.push({
1912
- platform: PLATFORM4,
2219
+ platform: PLATFORM5,
1913
2220
  action: "create",
1914
2221
  detail: `installed extension ${id} (scope user)`
1915
2222
  });
@@ -1919,16 +2226,16 @@ ${install.stderr}`
1919
2226
  const changes = [];
1920
2227
  if (!geminiExtensionInstalled(id)) {
1921
2228
  changes.push({
1922
- platform: PLATFORM4,
2229
+ platform: PLATFORM5,
1923
2230
  action: "skip",
1924
- detail: `extension ${id} not installed on ${PLATFORM4}`
2231
+ detail: `extension ${id} not installed on ${PLATFORM5}`
1925
2232
  });
1926
2233
  return { changes, ok: true };
1927
2234
  }
1928
2235
  const bin = geminiBinary();
1929
2236
  if (!bin) {
1930
2237
  changes.push(
1931
- warn4(
2238
+ warn5(
1932
2239
  `gemini CLI not found on PATH \u2014 cannot drive the uninstall. Run manually: gemini extensions uninstall ${id}`
1933
2240
  )
1934
2241
  );
@@ -1937,14 +2244,14 @@ ${install.stderr}`
1937
2244
  const uninstall = await runHostCommand(bin, ["extensions", "uninstall", id]);
1938
2245
  if (geminiExtensionInstalled(id)) {
1939
2246
  changes.push(
1940
- warn4(
1941
- `extension uninstall did not complete \u2014 ` + failDetail5(`gemini extensions uninstall ${id}`, uninstall)
2247
+ warn5(
2248
+ `extension uninstall did not complete \u2014 ` + failDetail6(`gemini extensions uninstall ${id}`, uninstall)
1942
2249
  )
1943
2250
  );
1944
2251
  return { changes, ok: false };
1945
2252
  }
1946
2253
  changes.push({
1947
- platform: PLATFORM4,
2254
+ platform: PLATFORM5,
1948
2255
  action: "remove",
1949
2256
  detail: `uninstalled extension ${id} (gemini extensions uninstall)`
1950
2257
  });
@@ -1954,11 +2261,11 @@ ${install.stderr}`
1954
2261
  // uninstall-THEN-install. The bundle was already re-staged by the caller.
1955
2262
  async driveUpdate(id) {
1956
2263
  const changes = [];
1957
- const pluginDir = join7(geminiStagingRoot(), id);
2264
+ const pluginDir = join8(geminiStagingRoot(), id);
1958
2265
  const bin = geminiBinary();
1959
2266
  if (!bin) {
1960
2267
  changes.push(
1961
- warn4(
2268
+ warn5(
1962
2269
  `gemini CLI not found on PATH \u2014 bundle re-staged but the installed copy was not updated. Run manually: gemini extensions uninstall ${id} && ${manualInstall(pluginDir)}`,
1963
2270
  pluginDir
1964
2271
  )
@@ -1969,8 +2276,8 @@ ${install.stderr}`
1969
2276
  const uninstall = await runHostCommand(bin, ["extensions", "uninstall", id]);
1970
2277
  if (geminiExtensionInstalled(id)) {
1971
2278
  changes.push(
1972
- warn4(
1973
- `extension update could not remove the old copy \u2014 ` + failDetail5(`gemini extensions uninstall ${id}`, uninstall)
2279
+ warn5(
2280
+ `extension update could not remove the old copy \u2014 ` + failDetail6(`gemini extensions uninstall ${id}`, uninstall)
1974
2281
  )
1975
2282
  );
1976
2283
  return { changes, ok: false };
@@ -1980,14 +2287,14 @@ ${install.stderr}`
1980
2287
  const install = await runHostCommand(bin, ["extensions", "install", pluginDir, "--consent"]);
1981
2288
  if (!geminiExtensionInstalled(id)) {
1982
2289
  changes.push(
1983
- warn4(
1984
- `extension install did not complete \u2014 ` + failDetail5(`gemini extensions install ${pluginDir} --consent`, install)
2290
+ warn5(
2291
+ `extension install did not complete \u2014 ` + failDetail6(`gemini extensions install ${pluginDir} --consent`, install)
1985
2292
  )
1986
2293
  );
1987
2294
  return { changes, ok: false };
1988
2295
  }
1989
2296
  changes.push({
1990
- platform: PLATFORM4,
2297
+ platform: PLATFORM5,
1991
2298
  action: "update",
1992
2299
  detail: `updated extension ${id} (gemini extensions uninstall + install)`
1993
2300
  });
@@ -1996,22 +2303,22 @@ ${install.stderr}`
1996
2303
  // Direct driver: no catalog, no marketplace de-registration. Cleanup is just
1997
2304
  // removing the staged bundle dir (the host copied it into its own store).
1998
2305
  async finishUninstall(id, changes) {
1999
- const pluginDir = join7(geminiStagingRoot(), id);
2000
- if (existsSync7(pluginDir)) {
2306
+ const pluginDir = join8(geminiStagingRoot(), id);
2307
+ if (existsSync8(pluginDir)) {
2001
2308
  try {
2002
- rmSync6(pluginDir, { recursive: true, force: true });
2309
+ rmSync7(pluginDir, { recursive: true, force: true });
2003
2310
  changes.push({
2004
- platform: PLATFORM4,
2311
+ platform: PLATFORM5,
2005
2312
  action: "remove",
2006
2313
  path: pluginDir,
2007
2314
  detail: "removed staged marketplace bundle"
2008
2315
  });
2009
2316
  } catch (err) {
2010
2317
  changes.push({
2011
- platform: PLATFORM4,
2318
+ platform: PLATFORM5,
2012
2319
  action: "warn",
2013
2320
  path: pluginDir,
2014
- detail: `could not remove staged bundle: ${errMessage6(err)}`
2321
+ detail: `could not remove staged bundle: ${errMessage7(err)}`
2015
2322
  });
2016
2323
  }
2017
2324
  }
@@ -2019,25 +2326,25 @@ ${install.stderr}`
2019
2326
  };
2020
2327
 
2021
2328
  // src/core/marketplace-drivers/npm-local.ts
2022
- import { existsSync as existsSync8, mkdirSync, rmSync as rmSync7, writeFileSync as writeFileSync4 } from "fs";
2023
- import { dirname as dirname4, join as join8 } from "path";
2329
+ import { existsSync as existsSync9, mkdirSync, rmSync as rmSync8, writeFileSync as writeFileSync5 } from "fs";
2330
+ import { dirname as dirname5, join as join9 } from "path";
2024
2331
  import { pathToFileURL } from "url";
2025
- function errMessage7(err) {
2332
+ function errMessage8(err) {
2026
2333
  return err instanceof Error ? err.message : String(err);
2027
2334
  }
2028
- function failDetail6(step, r) {
2335
+ function failDetail7(step, r) {
2029
2336
  if (r.timedOut) return `${step} timed out`;
2030
2337
  if (r.error) return `${step} failed to spawn: ${r.error}`;
2031
2338
  const line = firstLine(r.stderr) || firstLine(r.stdout);
2032
2339
  return `${step} exited ${r.code}${line ? `: ${line}` : ""}`;
2033
2340
  }
2034
2341
  function fileUrlFor(connectorId) {
2035
- return pathToFileURL(join8(npmStagingRoot(), connectorId)).href;
2342
+ return pathToFileURL(join9(npmStagingRoot(), connectorId)).href;
2036
2343
  }
2037
2344
  function makeNpmLocalDriver(platform, opts) {
2038
2345
  const { binaryName } = opts;
2039
2346
  const binary = () => findOnPath(binaryName);
2040
- const warn6 = (detail, path) => ({
2347
+ const warn7 = (detail, path) => ({
2041
2348
  platform,
2042
2349
  action: "warn",
2043
2350
  detail,
@@ -2046,8 +2353,8 @@ function makeNpmLocalDriver(platform, opts) {
2046
2353
  const manualInstall3 = (connectorId) => `${binaryName} plugin --global ${fileUrlFor(connectorId)}`;
2047
2354
  const stageBundle = (connector, changes) => {
2048
2355
  const stagingRoot = npmStagingRoot();
2049
- const pluginDir = join8(stagingRoot, connector.id);
2050
- const existed = existsSync8(pluginDir);
2356
+ const pluginDir = join9(stagingRoot, connector.id);
2357
+ const existed = existsSync9(pluginDir);
2051
2358
  const result = packageConnector(connector, { outDir: stagingRoot, format: "npm-plugin" });
2052
2359
  changes.push({
2053
2360
  platform,
@@ -2057,7 +2364,7 @@ function makeNpmLocalDriver(platform, opts) {
2057
2364
  });
2058
2365
  return { pluginDir, contentHash: hashDirectory(pluginDir) };
2059
2366
  };
2060
- const driveInstall3 = async (id) => {
2367
+ const driveInstall4 = async (id) => {
2061
2368
  const changes = [];
2062
2369
  if (npmPluginInstalled(platform, id)) {
2063
2370
  changes.push({
@@ -2070,9 +2377,9 @@ function makeNpmLocalDriver(platform, opts) {
2070
2377
  const bin = binary();
2071
2378
  if (!bin) {
2072
2379
  changes.push(
2073
- warn6(
2380
+ warn7(
2074
2381
  `${binaryName} CLI not found on PATH \u2014 bundle staged but not installed. Install manually: ${manualInstall3(id)}`,
2075
- join8(npmStagingRoot(), id)
2382
+ join9(npmStagingRoot(), id)
2076
2383
  )
2077
2384
  );
2078
2385
  return { changes, ok: false };
@@ -2087,7 +2394,7 @@ function makeNpmLocalDriver(platform, opts) {
2087
2394
  });
2088
2395
  if (!npmPluginInstalled(platform, id)) {
2089
2396
  changes.push(
2090
- warn6(`plugin install did not complete \u2014 ` + failDetail6(manualInstall3(id), install))
2397
+ warn7(`plugin install did not complete \u2014 ` + failDetail7(manualInstall3(id), install))
2091
2398
  );
2092
2399
  return { changes, ok: false };
2093
2400
  }
@@ -2104,7 +2411,7 @@ function makeNpmLocalDriver(platform, opts) {
2104
2411
  binary,
2105
2412
  stagingRoot: npmStagingRoot,
2106
2413
  pluginDir(id) {
2107
- return join8(npmStagingRoot(), id);
2414
+ return join9(npmStagingRoot(), id);
2108
2415
  },
2109
2416
  installed: (id) => npmPluginInstalled(platform, id),
2110
2417
  stage(connector, changes) {
@@ -2118,14 +2425,14 @@ function makeNpmLocalDriver(platform, opts) {
2118
2425
  });
2119
2426
  },
2120
2427
  planUninstall(id, changes) {
2121
- const pluginDir = join8(npmStagingRoot(), id);
2428
+ const pluginDir = join9(npmStagingRoot(), id);
2122
2429
  const present = npmPluginInstalled(platform, id);
2123
2430
  changes.push({
2124
2431
  platform,
2125
2432
  action: present ? "remove" : "skip",
2126
2433
  detail: present ? `edit ${npmConfigFilePath(platform)}: drop the file:// plugin entry for ${id}` : `plugin ${id} not installed on ${platform}`
2127
2434
  });
2128
- if (existsSync8(pluginDir)) {
2435
+ if (existsSync9(pluginDir)) {
2129
2436
  changes.push({
2130
2437
  platform,
2131
2438
  action: "remove",
@@ -2134,7 +2441,7 @@ function makeNpmLocalDriver(platform, opts) {
2134
2441
  });
2135
2442
  }
2136
2443
  },
2137
- driveInstall: driveInstall3,
2444
+ driveInstall: driveInstall4,
2138
2445
  // No host uninstall verb (`<bin> uninstall` removes the HOST). Removal is an
2139
2446
  // EDIT of the config `plugin` array: drop the entry referencing our staged
2140
2447
  // dir, delete the `plugin` key when empty, preserve every other key.
@@ -2153,7 +2460,7 @@ function makeNpmLocalDriver(platform, opts) {
2153
2460
  const cfg = readNpmConfig(platform);
2154
2461
  if (!cfg) {
2155
2462
  changes.push(
2156
- warn6(
2463
+ warn7(
2157
2464
  `could not parse ${platform} config ${configPath} \u2014 leaving the plugin entry in place. Remove this entry from the "plugin" array by hand: ${entry}`,
2158
2465
  configPath
2159
2466
  )
@@ -2165,18 +2472,18 @@ function makeNpmLocalDriver(platform, opts) {
2165
2472
  if (filtered.length === 0) delete cfg["plugin"];
2166
2473
  else cfg["plugin"] = filtered;
2167
2474
  try {
2168
- mkdirSync(dirname4(configPath), { recursive: true });
2169
- writeFileSync4(configPath, `${JSON.stringify(cfg, null, 2)}
2475
+ mkdirSync(dirname5(configPath), { recursive: true });
2476
+ writeFileSync5(configPath, `${JSON.stringify(cfg, null, 2)}
2170
2477
  `, "utf8");
2171
2478
  } catch (err) {
2172
2479
  changes.push(
2173
- warn6(`could not rewrite ${platform} config: ${errMessage7(err)}`, configPath)
2480
+ warn7(`could not rewrite ${platform} config: ${errMessage8(err)}`, configPath)
2174
2481
  );
2175
2482
  return { changes, ok: false };
2176
2483
  }
2177
2484
  if (npmPluginInstalled(platform, id)) {
2178
2485
  changes.push(
2179
- warn6(`plugin entry persisted after the config edit \u2014 ${configPath}`, configPath)
2486
+ warn7(`plugin entry persisted after the config edit \u2014 ${configPath}`, configPath)
2180
2487
  );
2181
2488
  return { changes, ok: false };
2182
2489
  }
@@ -2192,15 +2499,15 @@ function makeNpmLocalDriver(platform, opts) {
2192
2499
  // a re-run of install (the bundle was re-staged in place by the caller). When
2193
2500
  // the entry is already present, that is an idempotent `=` skip.
2194
2501
  async driveUpdate(id) {
2195
- return driveInstall3(id);
2502
+ return driveInstall4(id);
2196
2503
  },
2197
2504
  // No catalog, no marketplace de-registration: cleanup is removing the staged
2198
2505
  // bundle dir (the host no longer references it after driveUninstall's edit).
2199
2506
  async finishUninstall(id, changes) {
2200
- const pluginDir = join8(npmStagingRoot(), id);
2201
- if (existsSync8(pluginDir)) {
2507
+ const pluginDir = join9(npmStagingRoot(), id);
2508
+ if (existsSync9(pluginDir)) {
2202
2509
  try {
2203
- rmSync7(pluginDir, { recursive: true, force: true });
2510
+ rmSync8(pluginDir, { recursive: true, force: true });
2204
2511
  changes.push({
2205
2512
  platform,
2206
2513
  action: "remove",
@@ -2212,7 +2519,7 @@ function makeNpmLocalDriver(platform, opts) {
2212
2519
  platform,
2213
2520
  action: "warn",
2214
2521
  path: pluginDir,
2215
- detail: `could not remove staged bundle: ${errMessage7(err)}`
2522
+ detail: `could not remove staged bundle: ${errMessage8(err)}`
2216
2523
  });
2217
2524
  }
2218
2525
  }
@@ -2221,19 +2528,19 @@ function makeNpmLocalDriver(platform, opts) {
2221
2528
  }
2222
2529
 
2223
2530
  // src/core/marketplace-drivers/qwen.ts
2224
- import { existsSync as existsSync9, rmSync as rmSync8 } from "fs";
2225
- import { join as join9 } from "path";
2226
- var PLATFORM5 = "qwen-code";
2531
+ import { existsSync as existsSync10, rmSync as rmSync9 } from "fs";
2532
+ import { join as join10 } from "path";
2533
+ var PLATFORM6 = "qwen-code";
2227
2534
  function qwenBinary() {
2228
2535
  return findOnPath("qwen");
2229
2536
  }
2230
- function errMessage8(err) {
2537
+ function errMessage9(err) {
2231
2538
  return err instanceof Error ? err.message : String(err);
2232
2539
  }
2233
- function warn5(detail, path) {
2234
- return { platform: PLATFORM5, action: "warn", detail, ...path ? { path } : {} };
2540
+ function warn6(detail, path) {
2541
+ return { platform: PLATFORM6, action: "warn", detail, ...path ? { path } : {} };
2235
2542
  }
2236
- function failDetail7(step, r) {
2543
+ function failDetail8(step, r) {
2237
2544
  if (r.timedOut) return `${step} timed out`;
2238
2545
  if (r.error) return `${step} failed to spawn: ${r.error}`;
2239
2546
  const line = firstLine(r.stderr) || firstLine(r.stdout);
@@ -2244,11 +2551,11 @@ function manualInstall2(pluginDir) {
2244
2551
  }
2245
2552
  function stageQwenBundle(connector, changes) {
2246
2553
  const stagingRoot = qwenStagingRoot();
2247
- const pluginDir = join9(stagingRoot, connector.id);
2248
- const existed = existsSync9(pluginDir);
2554
+ const pluginDir = join10(stagingRoot, connector.id);
2555
+ const existed = existsSync10(pluginDir);
2249
2556
  const result = packageConnector(connector, { outDir: stagingRoot, format: "qwen-extension" });
2250
2557
  changes.push({
2251
- platform: PLATFORM5,
2558
+ platform: PLATFORM6,
2252
2559
  action: existed ? "update" : "create",
2253
2560
  path: pluginDir,
2254
2561
  detail: `staged marketplace bundle (${result.files.length} files, qwen-extension)`
@@ -2256,35 +2563,35 @@ function stageQwenBundle(connector, changes) {
2256
2563
  return { pluginDir, contentHash: hashDirectory(pluginDir) };
2257
2564
  }
2258
2565
  var qwenDriver = {
2259
- platform: PLATFORM5,
2566
+ platform: PLATFORM6,
2260
2567
  format: "qwen-extension",
2261
2568
  binary: qwenBinary,
2262
2569
  stagingRoot: qwenStagingRoot,
2263
2570
  pluginDir(id) {
2264
- return join9(qwenStagingRoot(), id);
2571
+ return join10(qwenStagingRoot(), id);
2265
2572
  },
2266
2573
  installed: qwenExtensionInstalled,
2267
2574
  stage(connector, changes) {
2268
2575
  return stageQwenBundle(connector, changes).contentHash;
2269
2576
  },
2270
2577
  planInstall(connector, changes) {
2271
- const pluginDir = join9(qwenStagingRoot(), connector.id);
2578
+ const pluginDir = join10(qwenStagingRoot(), connector.id);
2272
2579
  changes.push({
2273
- platform: PLATFORM5,
2580
+ platform: PLATFORM6,
2274
2581
  action: qwenExtensionInstalled(connector.id) ? "skip" : "create",
2275
2582
  detail: qwenExtensionInstalled(connector.id) ? `extension ${connector.id} already installed` : `run: ${manualInstall2(pluginDir)}`
2276
2583
  });
2277
2584
  },
2278
2585
  planUninstall(id, changes) {
2279
- const pluginDir = join9(qwenStagingRoot(), id);
2586
+ const pluginDir = join10(qwenStagingRoot(), id);
2280
2587
  changes.push({
2281
- platform: PLATFORM5,
2588
+ platform: PLATFORM6,
2282
2589
  action: qwenExtensionInstalled(id) ? "remove" : "skip",
2283
- detail: qwenExtensionInstalled(id) ? `run: qwen extensions uninstall ${id}` : `extension ${id} not installed on ${PLATFORM5}`
2590
+ detail: qwenExtensionInstalled(id) ? `run: qwen extensions uninstall ${id}` : `extension ${id} not installed on ${PLATFORM6}`
2284
2591
  });
2285
- if (existsSync9(pluginDir)) {
2592
+ if (existsSync10(pluginDir)) {
2286
2593
  changes.push({
2287
- platform: PLATFORM5,
2594
+ platform: PLATFORM6,
2288
2595
  action: "remove",
2289
2596
  path: pluginDir,
2290
2597
  detail: "remove staged marketplace bundle"
@@ -2293,11 +2600,11 @@ var qwenDriver = {
2293
2600
  },
2294
2601
  async driveInstall(id) {
2295
2602
  const changes = [];
2296
- const pluginDir = join9(qwenStagingRoot(), id);
2603
+ const pluginDir = join10(qwenStagingRoot(), id);
2297
2604
  const bin = qwenBinary();
2298
2605
  if (!bin) {
2299
2606
  changes.push(
2300
- warn5(
2607
+ warn6(
2301
2608
  `qwen CLI not found on PATH \u2014 bundle staged but not installed. Install manually: ${manualInstall2(pluginDir)}`,
2302
2609
  pluginDir
2303
2610
  )
@@ -2306,7 +2613,7 @@ var qwenDriver = {
2306
2613
  }
2307
2614
  if (qwenExtensionInstalled(id)) {
2308
2615
  changes.push({
2309
- platform: PLATFORM5,
2616
+ platform: PLATFORM6,
2310
2617
  action: "skip",
2311
2618
  detail: `extension ${id} already installed`
2312
2619
  });
@@ -2315,14 +2622,14 @@ var qwenDriver = {
2315
2622
  const install = await runHostCommand(bin, ["extensions", "install", pluginDir]);
2316
2623
  if (!qwenExtensionInstalled(id)) {
2317
2624
  changes.push(
2318
- warn5(
2319
- `extension install did not complete \u2014 ` + failDetail7(`qwen extensions install ${pluginDir}`, install)
2625
+ warn6(
2626
+ `extension install did not complete \u2014 ` + failDetail8(`qwen extensions install ${pluginDir}`, install)
2320
2627
  )
2321
2628
  );
2322
2629
  return { changes, ok: false };
2323
2630
  }
2324
2631
  changes.push({
2325
- platform: PLATFORM5,
2632
+ platform: PLATFORM6,
2326
2633
  action: "create",
2327
2634
  detail: `installed extension ${id} (scope user)`
2328
2635
  });
@@ -2332,16 +2639,16 @@ var qwenDriver = {
2332
2639
  const changes = [];
2333
2640
  if (!qwenExtensionInstalled(id)) {
2334
2641
  changes.push({
2335
- platform: PLATFORM5,
2642
+ platform: PLATFORM6,
2336
2643
  action: "skip",
2337
- detail: `extension ${id} not installed on ${PLATFORM5}`
2644
+ detail: `extension ${id} not installed on ${PLATFORM6}`
2338
2645
  });
2339
2646
  return { changes, ok: true };
2340
2647
  }
2341
2648
  const bin = qwenBinary();
2342
2649
  if (!bin) {
2343
2650
  changes.push(
2344
- warn5(
2651
+ warn6(
2345
2652
  `qwen CLI not found on PATH \u2014 cannot drive the uninstall. Run manually: qwen extensions uninstall ${id}`
2346
2653
  )
2347
2654
  );
@@ -2350,14 +2657,14 @@ var qwenDriver = {
2350
2657
  const uninstall = await runHostCommand(bin, ["extensions", "uninstall", id]);
2351
2658
  if (qwenExtensionInstalled(id)) {
2352
2659
  changes.push(
2353
- warn5(
2354
- `extension uninstall did not complete \u2014 ` + failDetail7(`qwen extensions uninstall ${id}`, uninstall)
2660
+ warn6(
2661
+ `extension uninstall did not complete \u2014 ` + failDetail8(`qwen extensions uninstall ${id}`, uninstall)
2355
2662
  )
2356
2663
  );
2357
2664
  return { changes, ok: false };
2358
2665
  }
2359
2666
  changes.push({
2360
- platform: PLATFORM5,
2667
+ platform: PLATFORM6,
2361
2668
  action: "remove",
2362
2669
  detail: `uninstalled extension ${id} (qwen extensions uninstall)`
2363
2670
  });
@@ -2369,11 +2676,11 @@ var qwenDriver = {
2369
2676
  // DOCS-only: the `update` verb + its exit semantics are unverified live.
2370
2677
  async driveUpdate(id) {
2371
2678
  const changes = [];
2372
- const pluginDir = join9(qwenStagingRoot(), id);
2679
+ const pluginDir = join10(qwenStagingRoot(), id);
2373
2680
  const bin = qwenBinary();
2374
2681
  if (!bin) {
2375
2682
  changes.push(
2376
- warn5(
2683
+ warn6(
2377
2684
  `qwen CLI not found on PATH \u2014 bundle re-staged but the installed copy was not updated. Run manually: qwen extensions update ${id}`,
2378
2685
  pluginDir
2379
2686
  )
@@ -2384,14 +2691,14 @@ var qwenDriver = {
2384
2691
  const update = await runHostCommand(bin, ["extensions", "update", id]);
2385
2692
  if (!qwenExtensionInstalled(id)) {
2386
2693
  changes.push(
2387
- warn5(
2388
- `extension update did not complete \u2014 ` + failDetail7(`qwen extensions update ${id}`, update)
2694
+ warn6(
2695
+ `extension update did not complete \u2014 ` + failDetail8(`qwen extensions update ${id}`, update)
2389
2696
  )
2390
2697
  );
2391
2698
  return { changes, ok: false };
2392
2699
  }
2393
2700
  changes.push({
2394
- platform: PLATFORM5,
2701
+ platform: PLATFORM6,
2395
2702
  action: "update",
2396
2703
  detail: `updated extension ${id} (qwen extensions update)`
2397
2704
  });
@@ -2400,14 +2707,14 @@ var qwenDriver = {
2400
2707
  const install = await runHostCommand(bin, ["extensions", "install", pluginDir]);
2401
2708
  if (!qwenExtensionInstalled(id)) {
2402
2709
  changes.push(
2403
- warn5(
2404
- `extension install did not complete \u2014 ` + failDetail7(`qwen extensions install ${pluginDir}`, install)
2710
+ warn6(
2711
+ `extension install did not complete \u2014 ` + failDetail8(`qwen extensions install ${pluginDir}`, install)
2405
2712
  )
2406
2713
  );
2407
2714
  return { changes, ok: false };
2408
2715
  }
2409
2716
  changes.push({
2410
- platform: PLATFORM5,
2717
+ platform: PLATFORM6,
2411
2718
  action: "update",
2412
2719
  detail: `updated extension ${id} (qwen extensions install)`
2413
2720
  });
@@ -2416,22 +2723,22 @@ var qwenDriver = {
2416
2723
  // Direct driver: no catalog, no marketplace de-registration. Cleanup is just
2417
2724
  // removing the staged bundle dir (the host copied it into its own store).
2418
2725
  async finishUninstall(id, changes) {
2419
- const pluginDir = join9(qwenStagingRoot(), id);
2420
- if (existsSync9(pluginDir)) {
2726
+ const pluginDir = join10(qwenStagingRoot(), id);
2727
+ if (existsSync10(pluginDir)) {
2421
2728
  try {
2422
- rmSync8(pluginDir, { recursive: true, force: true });
2729
+ rmSync9(pluginDir, { recursive: true, force: true });
2423
2730
  changes.push({
2424
- platform: PLATFORM5,
2731
+ platform: PLATFORM6,
2425
2732
  action: "remove",
2426
2733
  path: pluginDir,
2427
2734
  detail: "removed staged marketplace bundle"
2428
2735
  });
2429
2736
  } catch (err) {
2430
2737
  changes.push({
2431
- platform: PLATFORM5,
2738
+ platform: PLATFORM6,
2432
2739
  action: "warn",
2433
2740
  path: pluginDir,
2434
- detail: `could not remove staged bundle: ${errMessage8(err)}`
2741
+ detail: `could not remove staged bundle: ${errMessage9(err)}`
2435
2742
  });
2436
2743
  }
2437
2744
  }
@@ -2467,6 +2774,7 @@ function npmLocalDriver(platform) {
2467
2774
  var DRIVER_RESOLVERS = [
2468
2775
  { platforms: ["claude-code"], resolve: () => claudeDriver },
2469
2776
  { platforms: ["codex"], resolve: () => codexDriver },
2777
+ { platforms: ["copilot-cli"], resolve: () => copilotDriver },
2470
2778
  {
2471
2779
  platforms: ["antigravity", "antigravity-cli"],
2472
2780
  resolve: (platform) => agyDriver(platform)
@@ -2506,6 +2814,7 @@ function parseUninstallMethod(value) {
2506
2814
  var MARKETPLACE_FORMAT_BY_PLATFORM = {
2507
2815
  "claude-code": "claude-plugin",
2508
2816
  codex: "codex-plugin",
2817
+ "copilot-cli": "copilot-plugin",
2509
2818
  droid: "factory-plugin",
2510
2819
  "gemini-cli": "gemini-extension",
2511
2820
  "qwen-code": "qwen-extension",
@@ -2524,7 +2833,7 @@ var MARKETPLACE_FORMAT_BY_PLATFORM = {
2524
2833
  function newResult2(connectorId, dryRun) {
2525
2834
  return { connectorId, dryRun, changes: [], warnings: [] };
2526
2835
  }
2527
- function errMessage9(err) {
2836
+ function errMessage10(err) {
2528
2837
  return err instanceof Error ? err.message : String(err);
2529
2838
  }
2530
2839
  function manualHint(platform, format, id) {
@@ -2548,7 +2857,7 @@ async function directInstallPresent(connector, platform, scope, projectDir) {
2548
2857
  const hookCommand = new RegExp(`--connector\\s+${escaped}(?![\\w-])`);
2549
2858
  const matches = (path, re) => {
2550
2859
  try {
2551
- return re.test(readFileSync4(path, "utf8"));
2860
+ return re.test(readFileSync5(path, "utf8"));
2552
2861
  } catch {
2553
2862
  return false;
2554
2863
  }
@@ -2579,12 +2888,12 @@ async function installViaMarketplace(opts) {
2579
2888
  try {
2580
2889
  ensureHomeBin(resolveCliEntry());
2581
2890
  } catch (err) {
2582
- log.warn(`ensureHomeBin failed: ${errMessage9(err)}`);
2891
+ log.warn(`ensureHomeBin failed: ${errMessage10(err)}`);
2583
2892
  }
2584
2893
  try {
2585
2894
  registerConnector(connector, modulePath, scope);
2586
2895
  } catch (err) {
2587
- log.warn(`registerConnector failed: ${errMessage9(err)}`);
2896
+ log.warn(`registerConnector failed: ${errMessage10(err)}`);
2588
2897
  }
2589
2898
  }
2590
2899
  const explicit = opts.targets != null && opts.targets.length > 0;
@@ -2672,7 +2981,8 @@ var MANUAL_UNINSTALL = {
2672
2981
  "gemini-cli": (id) => `gemini extensions uninstall ${id}`,
2673
2982
  antigravity: (id) => `agy plugin uninstall ${id}`,
2674
2983
  "antigravity-cli": (id) => `agy plugin uninstall ${id}`,
2675
- codex: (id) => `codex plugin remove ${id}@${MARKETPLACE_NAME}`
2984
+ codex: (id) => `codex plugin remove ${id}@${MARKETPLACE_NAME}`,
2985
+ "copilot-cli": (id) => `copilot plugin uninstall ${id}@${MARKETPLACE_NAME}`
2676
2986
  };
2677
2987
  async function uninstallViaMarketplace(opts) {
2678
2988
  const { connectorId, dryRun, purge } = opts;
@@ -2734,16 +3044,16 @@ async function uninstallViaMarketplace(opts) {
2734
3044
  const root2 = driver.stagingRoot();
2735
3045
  if (seenRoots.has(root2)) continue;
2736
3046
  seenRoots.add(root2);
2737
- if (!existsSync10(root2)) continue;
3047
+ if (!existsSync11(root2)) continue;
2738
3048
  let bundleDirs;
2739
3049
  try {
2740
- bundleDirs = readdirSync5(root2).filter((n) => !n.startsWith("."));
3050
+ bundleDirs = readdirSync6(root2).filter((n) => !n.startsWith("."));
2741
3051
  } catch {
2742
3052
  bundleDirs = [];
2743
3053
  }
2744
3054
  if (bundleDirs.length > 0) continue;
2745
3055
  try {
2746
- rmSync9(root2, { recursive: true, force: true });
3056
+ rmSync10(root2, { recursive: true, force: true });
2747
3057
  result.changes.push({
2748
3058
  platform: id,
2749
3059
  action: "remove",
@@ -2751,13 +3061,13 @@ async function uninstallViaMarketplace(opts) {
2751
3061
  detail: "removed empty marketplace staging root (--purge)"
2752
3062
  });
2753
3063
  } catch (err) {
2754
- log.warn(`marketplace staging-root removal failed: ${errMessage9(err)}`);
3064
+ log.warn(`marketplace staging-root removal failed: ${errMessage10(err)}`);
2755
3065
  }
2756
3066
  }
2757
3067
  const root = marketplaceRoot();
2758
3068
  try {
2759
- if (existsSync10(root) && readdirSync5(root).length === 0) {
2760
- rmSync9(root, { recursive: true, force: true });
3069
+ if (existsSync11(root) && readdirSync6(root).length === 0) {
3070
+ rmSync10(root, { recursive: true, force: true });
2761
3071
  }
2762
3072
  } catch {
2763
3073
  }
@@ -2857,6 +3167,7 @@ async function marketplaceDoctorChecks(connector, scope, projectDir) {
2857
3167
  const seenHosts = /* @__PURE__ */ new Set();
2858
3168
  const candidates = [
2859
3169
  "codex",
3170
+ "copilot-cli",
2860
3171
  "droid",
2861
3172
  "antigravity",
2862
3173
  "antigravity-cli",
@@ -2893,6 +3204,7 @@ function platformDoctorRank(platform) {
2893
3204
  const order = [
2894
3205
  "claude-code",
2895
3206
  "codex",
3207
+ "copilot-cli",
2896
3208
  "droid",
2897
3209
  "antigravity",
2898
3210
  "antigravity-cli",
@@ -2924,19 +3236,19 @@ async function claudeMarketplaceGroup(connector, scope, projectDir) {
2924
3236
  }
2925
3237
  if (record) {
2926
3238
  const registeredAt = claudeKnownMarketplacePath(MARKETPLACE_NAME);
2927
- const catalogPath = join10(stagingRoot, ".claude-plugin", "marketplace.json");
3239
+ const catalogPath = join11(stagingRoot, ".claude-plugin", "marketplace.json");
2928
3240
  let catalogListed = false;
2929
3241
  try {
2930
- const catalog = JSON.parse(readFileSync4(catalogPath, "utf8"));
3242
+ const catalog = JSON.parse(readFileSync5(catalogPath, "utf8"));
2931
3243
  catalogListed = (catalog.plugins ?? []).some((p) => p.name === id);
2932
3244
  } catch {
2933
3245
  catalogListed = false;
2934
3246
  }
2935
- const intact = registeredAt === stagingRoot && existsSync10(record.bundleDir) && catalogListed;
3247
+ const intact = registeredAt === stagingRoot && existsSync11(record.bundleDir) && catalogListed;
2936
3248
  results.push({
2937
3249
  check: `${id}: marketplace registration`,
2938
3250
  status: intact ? "pass" : "fail",
2939
- message: intact ? `local marketplace "${MARKETPLACE_NAME}" registered at ${stagingRoot}, bundle staged + cataloged` : `marketplace registration broken (registered at ${registeredAt ?? "nowhere"}, bundle ${existsSync10(record.bundleDir) ? "present" : "missing"}, catalog ${catalogListed ? "lists it" : "does not list it"})`,
3251
+ message: intact ? `local marketplace "${MARKETPLACE_NAME}" registered at ${stagingRoot}, bundle staged + cataloged` : `marketplace registration broken (registered at ${registeredAt ?? "nowhere"}, bundle ${existsSync11(record.bundleDir) ? "present" : "missing"}, catalog ${catalogListed ? "lists it" : "does not list it"})`,
2940
3252
  ...intact ? {} : { fix: `agent-connector install --method marketplace --targets claude-code` }
2941
3253
  });
2942
3254
  }
@@ -2963,7 +3275,7 @@ async function claudeMarketplaceGroup(connector, scope, projectDir) {
2963
3275
  message: `connector.version ${connector.version} \u2260 installed ${record.version}`,
2964
3276
  fix: `agent-connector upgrade --method marketplace --targets claude-code`
2965
3277
  });
2966
- } else if (existsSync10(record.bundleDir) && record.contentHash !== "" && hashDirectory(record.bundleDir) !== record.contentHash) {
3278
+ } else if (existsSync11(record.bundleDir) && record.contentHash !== "" && hashDirectory(record.bundleDir) !== record.contentHash) {
2967
3279
  results.push({
2968
3280
  check: `${id}: marketplace staleness`,
2969
3281
  status: "warn",
@@ -2972,7 +3284,7 @@ async function claudeMarketplaceGroup(connector, scope, projectDir) {
2972
3284
  });
2973
3285
  }
2974
3286
  }
2975
- if (pluginPresent && !existsSync10(homeBinPath())) {
3287
+ if (pluginPresent && !existsSync11(homeBinPath())) {
2976
3288
  results.push({
2977
3289
  check: `${id}: marketplace home-bin`,
2978
3290
  status: "fail",
@@ -3036,7 +3348,7 @@ async function genericMarketplaceGroup(connector, platform, scope, projectDir) {
3036
3348
  message: `connector.version ${connector.version} \u2260 installed ${record.version}`,
3037
3349
  fix: `agent-connector upgrade --method marketplace --targets ${platform}`
3038
3350
  });
3039
- } else if (existsSync10(record.bundleDir) && record.contentHash !== "" && hashDirectory(record.bundleDir) !== record.contentHash) {
3351
+ } else if (existsSync11(record.bundleDir) && record.contentHash !== "" && hashDirectory(record.bundleDir) !== record.contentHash) {
3040
3352
  results.push({
3041
3353
  check: `${id}: marketplace staleness`,
3042
3354
  status: "warn",
@@ -3045,7 +3357,7 @@ async function genericMarketplaceGroup(connector, platform, scope, projectDir) {
3045
3357
  });
3046
3358
  }
3047
3359
  }
3048
- if (installed && !existsSync10(homeBinPath())) {
3360
+ if (installed && !existsSync11(homeBinPath())) {
3049
3361
  results.push({
3050
3362
  check: `${id}: marketplace home-bin`,
3051
3363
  status: "fail",
@@ -3084,4 +3396,4 @@ export {
3084
3396
  upgradeViaMarketplace,
3085
3397
  marketplaceDoctorChecks
3086
3398
  };
3087
- //# sourceMappingURL=chunk-KIRCPLM4.js.map
3399
+ //# sourceMappingURL=chunk-JO2IM2JL.js.map