@a1st/aix-core 0.6.0 → 0.7.0

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 (282) hide show
  1. package/README.md +1 -1
  2. package/dist/agents/parser.d.ts.map +1 -1
  3. package/dist/agents/parser.js +3 -2
  4. package/dist/agents/parser.js.map +1 -1
  5. package/dist/direct-install.d.ts +8 -1
  6. package/dist/direct-install.d.ts.map +1 -1
  7. package/dist/direct-install.js +48 -6
  8. package/dist/direct-install.js.map +1 -1
  9. package/dist/editors/adapters/antigravity.d.ts +32 -0
  10. package/dist/editors/adapters/antigravity.d.ts.map +1 -0
  11. package/dist/editors/adapters/antigravity.js +94 -0
  12. package/dist/editors/adapters/antigravity.js.map +1 -0
  13. package/dist/editors/adapters/base.d.ts +34 -3
  14. package/dist/editors/adapters/base.d.ts.map +1 -1
  15. package/dist/editors/adapters/base.js +194 -34
  16. package/dist/editors/adapters/base.js.map +1 -1
  17. package/dist/editors/adapters/claude-code.d.ts +3 -1
  18. package/dist/editors/adapters/claude-code.d.ts.map +1 -1
  19. package/dist/editors/adapters/claude-code.js +5 -3
  20. package/dist/editors/adapters/claude-code.js.map +1 -1
  21. package/dist/editors/adapters/codex.d.ts +3 -1
  22. package/dist/editors/adapters/codex.d.ts.map +1 -1
  23. package/dist/editors/adapters/codex.js +7 -5
  24. package/dist/editors/adapters/codex.js.map +1 -1
  25. package/dist/editors/adapters/copilot.d.ts +3 -1
  26. package/dist/editors/adapters/copilot.d.ts.map +1 -1
  27. package/dist/editors/adapters/copilot.js +13 -3
  28. package/dist/editors/adapters/copilot.js.map +1 -1
  29. package/dist/editors/adapters/cursor.d.ts +3 -1
  30. package/dist/editors/adapters/cursor.d.ts.map +1 -1
  31. package/dist/editors/adapters/cursor.js +5 -3
  32. package/dist/editors/adapters/cursor.js.map +1 -1
  33. package/dist/editors/adapters/grok.d.ts +33 -0
  34. package/dist/editors/adapters/grok.d.ts.map +1 -0
  35. package/dist/editors/adapters/grok.js +121 -0
  36. package/dist/editors/adapters/grok.js.map +1 -0
  37. package/dist/editors/adapters/index.d.ts +2 -1
  38. package/dist/editors/adapters/index.d.ts.map +1 -1
  39. package/dist/editors/adapters/index.js +2 -1
  40. package/dist/editors/adapters/index.js.map +1 -1
  41. package/dist/editors/adapters/opencode.d.ts +3 -1
  42. package/dist/editors/adapters/opencode.d.ts.map +1 -1
  43. package/dist/editors/adapters/opencode.js +5 -3
  44. package/dist/editors/adapters/opencode.js.map +1 -1
  45. package/dist/editors/adapters/windsurf.d.ts +3 -1
  46. package/dist/editors/adapters/windsurf.d.ts.map +1 -1
  47. package/dist/editors/adapters/windsurf.js +6 -4
  48. package/dist/editors/adapters/windsurf.js.map +1 -1
  49. package/dist/editors/adapters/zed.d.ts +3 -1
  50. package/dist/editors/adapters/zed.d.ts.map +1 -1
  51. package/dist/editors/adapters/zed.js +6 -4
  52. package/dist/editors/adapters/zed.js.map +1 -1
  53. package/dist/editors/index.d.ts +3 -3
  54. package/dist/editors/index.d.ts.map +1 -1
  55. package/dist/editors/index.js +2 -2
  56. package/dist/editors/index.js.map +1 -1
  57. package/dist/editors/install.d.ts.map +1 -1
  58. package/dist/editors/install.js +16 -6
  59. package/dist/editors/install.js.map +1 -1
  60. package/dist/editors/remove.d.ts +49 -1
  61. package/dist/editors/remove.d.ts.map +1 -1
  62. package/dist/editors/remove.js +222 -3
  63. package/dist/editors/remove.js.map +1 -1
  64. package/dist/editors/section-managed-markdown.d.ts +1 -1
  65. package/dist/editors/section-managed-markdown.js +1 -1
  66. package/dist/editors/strategies/{gemini → antigravity}/hooks.d.ts +3 -3
  67. package/dist/editors/strategies/antigravity/hooks.d.ts.map +1 -0
  68. package/dist/editors/strategies/{gemini → antigravity}/hooks.js +25 -38
  69. package/dist/editors/strategies/antigravity/hooks.js.map +1 -0
  70. package/dist/editors/strategies/antigravity/index.d.ts +5 -0
  71. package/dist/editors/strategies/antigravity/index.d.ts.map +1 -0
  72. package/dist/editors/strategies/antigravity/index.js +5 -0
  73. package/dist/editors/strategies/antigravity/index.js.map +1 -0
  74. package/dist/editors/strategies/{gemini → antigravity}/mcp.d.ts +4 -4
  75. package/dist/editors/strategies/antigravity/mcp.d.ts.map +1 -0
  76. package/dist/editors/strategies/antigravity/mcp.js +49 -0
  77. package/dist/editors/strategies/antigravity/mcp.js.map +1 -0
  78. package/dist/editors/strategies/antigravity/prompts.d.ts +20 -0
  79. package/dist/editors/strategies/antigravity/prompts.d.ts.map +1 -0
  80. package/dist/editors/strategies/antigravity/prompts.js +42 -0
  81. package/dist/editors/strategies/antigravity/prompts.js.map +1 -0
  82. package/dist/editors/strategies/antigravity/rules.d.ts +19 -0
  83. package/dist/editors/strategies/antigravity/rules.d.ts.map +1 -0
  84. package/dist/editors/strategies/antigravity/rules.js +90 -0
  85. package/dist/editors/strategies/antigravity/rules.js.map +1 -0
  86. package/dist/editors/strategies/claude-code/hooks.d.ts.map +1 -1
  87. package/dist/editors/strategies/claude-code/hooks.js +9 -5
  88. package/dist/editors/strategies/claude-code/hooks.js.map +1 -1
  89. package/dist/editors/strategies/claude-code/index.d.ts +2 -0
  90. package/dist/editors/strategies/claude-code/index.d.ts.map +1 -1
  91. package/dist/editors/strategies/claude-code/index.js +2 -0
  92. package/dist/editors/strategies/claude-code/index.js.map +1 -1
  93. package/dist/editors/strategies/claude-code/marketplaces.d.ts +14 -0
  94. package/dist/editors/strategies/claude-code/marketplaces.d.ts.map +1 -0
  95. package/dist/editors/strategies/claude-code/marketplaces.js +71 -0
  96. package/dist/editors/strategies/claude-code/marketplaces.js.map +1 -0
  97. package/dist/editors/strategies/claude-code/mcp.d.ts.map +1 -1
  98. package/dist/editors/strategies/claude-code/mcp.js +3 -24
  99. package/dist/editors/strategies/claude-code/mcp.js.map +1 -1
  100. package/dist/editors/strategies/claude-code/plugins.d.ts +14 -0
  101. package/dist/editors/strategies/claude-code/plugins.d.ts.map +1 -0
  102. package/dist/editors/strategies/claude-code/plugins.js +37 -0
  103. package/dist/editors/strategies/claude-code/plugins.js.map +1 -0
  104. package/dist/editors/strategies/codex/hooks.d.ts.map +1 -1
  105. package/dist/editors/strategies/codex/hooks.js +44 -10
  106. package/dist/editors/strategies/codex/hooks.js.map +1 -1
  107. package/dist/editors/strategies/codex/mcp.d.ts.map +1 -1
  108. package/dist/editors/strategies/codex/mcp.js +123 -34
  109. package/dist/editors/strategies/codex/mcp.js.map +1 -1
  110. package/dist/editors/strategies/copilot/index.d.ts +2 -0
  111. package/dist/editors/strategies/copilot/index.d.ts.map +1 -1
  112. package/dist/editors/strategies/copilot/index.js +2 -0
  113. package/dist/editors/strategies/copilot/index.js.map +1 -1
  114. package/dist/editors/strategies/copilot/marketplaces.d.ts +15 -0
  115. package/dist/editors/strategies/copilot/marketplaces.d.ts.map +1 -0
  116. package/dist/editors/strategies/copilot/marketplaces.js +44 -0
  117. package/dist/editors/strategies/copilot/marketplaces.js.map +1 -0
  118. package/dist/editors/strategies/copilot/mcp.d.ts.map +1 -1
  119. package/dist/editors/strategies/copilot/mcp.js +5 -59
  120. package/dist/editors/strategies/copilot/mcp.js.map +1 -1
  121. package/dist/editors/strategies/copilot/plugins.d.ts +15 -0
  122. package/dist/editors/strategies/copilot/plugins.d.ts.map +1 -0
  123. package/dist/editors/strategies/copilot/plugins.js +41 -0
  124. package/dist/editors/strategies/copilot/plugins.js.map +1 -0
  125. package/dist/editors/strategies/cursor/index.d.ts +2 -0
  126. package/dist/editors/strategies/cursor/index.d.ts.map +1 -1
  127. package/dist/editors/strategies/cursor/index.js +2 -0
  128. package/dist/editors/strategies/cursor/index.js.map +1 -1
  129. package/dist/editors/strategies/cursor/marketplaces.d.ts +13 -0
  130. package/dist/editors/strategies/cursor/marketplaces.d.ts.map +1 -0
  131. package/dist/editors/strategies/cursor/marketplaces.js +39 -0
  132. package/dist/editors/strategies/cursor/marketplaces.js.map +1 -0
  133. package/dist/editors/strategies/cursor/plugins.d.ts +13 -0
  134. package/dist/editors/strategies/cursor/plugins.d.ts.map +1 -0
  135. package/dist/editors/strategies/cursor/plugins.js +36 -0
  136. package/dist/editors/strategies/cursor/plugins.js.map +1 -0
  137. package/dist/editors/strategies/grok/hooks.d.ts +14 -0
  138. package/dist/editors/strategies/grok/hooks.d.ts.map +1 -0
  139. package/dist/editors/strategies/grok/hooks.js +190 -0
  140. package/dist/editors/strategies/grok/hooks.js.map +1 -0
  141. package/dist/editors/strategies/grok/index.d.ts +5 -0
  142. package/dist/editors/strategies/grok/index.d.ts.map +1 -0
  143. package/dist/editors/strategies/grok/index.js +5 -0
  144. package/dist/editors/strategies/grok/index.js.map +1 -0
  145. package/dist/editors/strategies/grok/mcp.d.ts +19 -0
  146. package/dist/editors/strategies/grok/mcp.d.ts.map +1 -0
  147. package/dist/editors/strategies/grok/mcp.js +60 -0
  148. package/dist/editors/strategies/grok/mcp.js.map +1 -0
  149. package/dist/editors/strategies/grok/prompts.d.ts +24 -0
  150. package/dist/editors/strategies/grok/prompts.d.ts.map +1 -0
  151. package/dist/editors/strategies/grok/prompts.js +46 -0
  152. package/dist/editors/strategies/grok/prompts.js.map +1 -0
  153. package/dist/editors/strategies/grok/rules.d.ts +20 -0
  154. package/dist/editors/strategies/grok/rules.d.ts.map +1 -0
  155. package/dist/editors/strategies/grok/rules.js +41 -0
  156. package/dist/editors/strategies/grok/rules.js.map +1 -0
  157. package/dist/editors/strategies/index.d.ts +8 -7
  158. package/dist/editors/strategies/index.d.ts.map +1 -1
  159. package/dist/editors/strategies/index.js +7 -6
  160. package/dist/editors/strategies/index.js.map +1 -1
  161. package/dist/editors/strategies/opencode/index.d.ts +1 -0
  162. package/dist/editors/strategies/opencode/index.d.ts.map +1 -1
  163. package/dist/editors/strategies/opencode/index.js +1 -0
  164. package/dist/editors/strategies/opencode/index.js.map +1 -1
  165. package/dist/editors/strategies/opencode/mcp.d.ts.map +1 -1
  166. package/dist/editors/strategies/opencode/mcp.js +7 -12
  167. package/dist/editors/strategies/opencode/mcp.js.map +1 -1
  168. package/dist/editors/strategies/opencode/plugins.d.ts +15 -0
  169. package/dist/editors/strategies/opencode/plugins.d.ts.map +1 -0
  170. package/dist/editors/strategies/opencode/plugins.js +52 -0
  171. package/dist/editors/strategies/opencode/plugins.js.map +1 -0
  172. package/dist/editors/strategies/shared/agents.d.ts +1 -0
  173. package/dist/editors/strategies/shared/agents.d.ts.map +1 -1
  174. package/dist/editors/strategies/shared/agents.js +2 -2
  175. package/dist/editors/strategies/shared/agents.js.map +1 -1
  176. package/dist/editors/strategies/shared/global-mcp.d.ts +10 -0
  177. package/dist/editors/strategies/shared/global-mcp.d.ts.map +1 -1
  178. package/dist/editors/strategies/shared/global-mcp.js +6 -0
  179. package/dist/editors/strategies/shared/global-mcp.js.map +1 -1
  180. package/dist/editors/strategies/shared/hook-paths.d.ts +16 -0
  181. package/dist/editors/strategies/shared/hook-paths.d.ts.map +1 -0
  182. package/dist/editors/strategies/shared/hook-paths.js +30 -0
  183. package/dist/editors/strategies/shared/hook-paths.js.map +1 -0
  184. package/dist/editors/strategies/shared/index.d.ts +5 -0
  185. package/dist/editors/strategies/shared/index.d.ts.map +1 -1
  186. package/dist/editors/strategies/shared/index.js +5 -0
  187. package/dist/editors/strategies/shared/index.js.map +1 -1
  188. package/dist/editors/strategies/shared/mcp-import-utils.d.ts +7 -0
  189. package/dist/editors/strategies/shared/mcp-import-utils.d.ts.map +1 -0
  190. package/dist/editors/strategies/shared/mcp-import-utils.js +16 -0
  191. package/dist/editors/strategies/shared/mcp-import-utils.js.map +1 -0
  192. package/dist/editors/strategies/shared/no-marketplaces.d.ts +13 -0
  193. package/dist/editors/strategies/shared/no-marketplaces.d.ts.map +1 -0
  194. package/dist/editors/strategies/shared/no-marketplaces.js +19 -0
  195. package/dist/editors/strategies/shared/no-marketplaces.js.map +1 -0
  196. package/dist/editors/strategies/shared/no-plugins.d.ts +13 -0
  197. package/dist/editors/strategies/shared/no-plugins.d.ts.map +1 -0
  198. package/dist/editors/strategies/shared/no-plugins.js +19 -0
  199. package/dist/editors/strategies/shared/no-plugins.js.map +1 -0
  200. package/dist/editors/strategies/shared/plugin-compatibility.d.ts +33 -0
  201. package/dist/editors/strategies/shared/plugin-compatibility.d.ts.map +1 -0
  202. package/dist/editors/strategies/shared/plugin-compatibility.js +134 -0
  203. package/dist/editors/strategies/shared/plugin-compatibility.js.map +1 -0
  204. package/dist/editors/strategies/shared/plugin-paths.d.ts +20 -0
  205. package/dist/editors/strategies/shared/plugin-paths.d.ts.map +1 -0
  206. package/dist/editors/strategies/shared/plugin-paths.js +62 -0
  207. package/dist/editors/strategies/shared/plugin-paths.js.map +1 -0
  208. package/dist/editors/strategies/shared/standard-mcp.d.ts +34 -0
  209. package/dist/editors/strategies/shared/standard-mcp.d.ts.map +1 -1
  210. package/dist/editors/strategies/shared/standard-mcp.js +76 -30
  211. package/dist/editors/strategies/shared/standard-mcp.js.map +1 -1
  212. package/dist/editors/strategies/types.d.ts +44 -1
  213. package/dist/editors/strategies/types.d.ts.map +1 -1
  214. package/dist/editors/strategies/windsurf/mcp.d.ts.map +1 -1
  215. package/dist/editors/strategies/windsurf/mcp.js +40 -55
  216. package/dist/editors/strategies/windsurf/mcp.js.map +1 -1
  217. package/dist/editors/strategies/zed/mcp.d.ts.map +1 -1
  218. package/dist/editors/strategies/zed/mcp.js +19 -29
  219. package/dist/editors/strategies/zed/mcp.js.map +1 -1
  220. package/dist/editors/types.d.ts +30 -6
  221. package/dist/editors/types.d.ts.map +1 -1
  222. package/dist/editors/types.js +10 -3
  223. package/dist/editors/types.js.map +1 -1
  224. package/dist/format-error.d.ts.map +1 -1
  225. package/dist/format-error.js +1 -3
  226. package/dist/format-error.js.map +1 -1
  227. package/dist/fs/safe-rm.d.ts.map +1 -1
  228. package/dist/fs/safe-rm.js +2 -0
  229. package/dist/fs/safe-rm.js.map +1 -1
  230. package/dist/global/processor.d.ts.map +1 -1
  231. package/dist/global/processor.js +17 -18
  232. package/dist/global/processor.js.map +1 -1
  233. package/dist/global/types.d.ts +5 -0
  234. package/dist/global/types.d.ts.map +1 -1
  235. package/dist/mcp/env.d.ts +7 -0
  236. package/dist/mcp/env.d.ts.map +1 -1
  237. package/dist/mcp/env.js +10 -1
  238. package/dist/mcp/env.js.map +1 -1
  239. package/dist/mcp/index.d.ts +1 -1
  240. package/dist/mcp/index.d.ts.map +1 -1
  241. package/dist/mcp/index.js +1 -1
  242. package/dist/mcp/index.js.map +1 -1
  243. package/dist/merge.d.ts +11 -2
  244. package/dist/merge.d.ts.map +1 -1
  245. package/dist/merge.js +41 -0
  246. package/dist/merge.js.map +1 -1
  247. package/dist/reference-resolver.d.ts +1 -1
  248. package/dist/reference-resolver.d.ts.map +1 -1
  249. package/dist/reference-resolver.js +1 -0
  250. package/dist/reference-resolver.js.map +1 -1
  251. package/dist/state/tracker.d.ts +18 -0
  252. package/dist/state/tracker.d.ts.map +1 -1
  253. package/dist/state/tracker.js +31 -0
  254. package/dist/state/tracker.js.map +1 -1
  255. package/dist/state/types.d.ts +4 -2
  256. package/dist/state/types.d.ts.map +1 -1
  257. package/dist/type-guards.d.ts +6 -0
  258. package/dist/type-guards.d.ts.map +1 -0
  259. package/dist/type-guards.js +8 -0
  260. package/dist/type-guards.js.map +1 -0
  261. package/package.json +1 -1
  262. package/dist/editors/adapters/gemini.d.ts +0 -45
  263. package/dist/editors/adapters/gemini.d.ts.map +0 -1
  264. package/dist/editors/adapters/gemini.js +0 -144
  265. package/dist/editors/adapters/gemini.js.map +0 -1
  266. package/dist/editors/strategies/gemini/hooks.d.ts.map +0 -1
  267. package/dist/editors/strategies/gemini/hooks.js.map +0 -1
  268. package/dist/editors/strategies/gemini/index.d.ts +0 -5
  269. package/dist/editors/strategies/gemini/index.d.ts.map +0 -1
  270. package/dist/editors/strategies/gemini/index.js +0 -5
  271. package/dist/editors/strategies/gemini/index.js.map +0 -1
  272. package/dist/editors/strategies/gemini/mcp.d.ts.map +0 -1
  273. package/dist/editors/strategies/gemini/mcp.js +0 -73
  274. package/dist/editors/strategies/gemini/mcp.js.map +0 -1
  275. package/dist/editors/strategies/gemini/prompts.d.ts +0 -34
  276. package/dist/editors/strategies/gemini/prompts.d.ts.map +0 -1
  277. package/dist/editors/strategies/gemini/prompts.js +0 -92
  278. package/dist/editors/strategies/gemini/prompts.js.map +0 -1
  279. package/dist/editors/strategies/gemini/rules.d.ts +0 -19
  280. package/dist/editors/strategies/gemini/rules.d.ts.map +0 -1
  281. package/dist/editors/strategies/gemini/rules.js +0 -51
  282. package/dist/editors/strategies/gemini/rules.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook-paths.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/hook-paths.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC/B,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAE,SAAS,GAAG,MAAM,GAC/B,OAAO,CAQT;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACnC,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,SAAS,GAAG,MAAM,GAC/B,MAAM,GAAG,SAAS,CAUpB"}
@@ -0,0 +1,30 @@
1
+ import { join } from 'pathe';
2
+ import { getRuntimeAdapter } from '../../../runtime/index.js';
3
+ /**
4
+ * Whether the editor keeps a hooks config file at the given scope. An editor can support
5
+ * hooks in general but only in one scope: Claude Code reads both `.claude/settings.json`
6
+ * and `~/.claude/settings.json`, while an editor with only a user-level hooks file has
7
+ * nowhere to put project hooks.
8
+ */
9
+ export function hasHooksConfigPath(strategy, targetScope) {
10
+ if (!strategy.isSupported()) {
11
+ return false;
12
+ }
13
+ return Boolean(targetScope === 'user' ? strategy.getGlobalConfigPath() : strategy.getConfigPath());
14
+ }
15
+ /**
16
+ * Resolve where an editor keeps its hooks config for the requested scope, or `undefined`
17
+ * when it has no hooks file at that scope. Callers must not fall back to the other scope:
18
+ * writing project hooks into the user's home directory (or the reverse) puts them where
19
+ * the editor will not read them, and silently widens their reach.
20
+ */
21
+ export function resolveHooksConfigPath(strategy, configDir, targetScope) {
22
+ if (!hasHooksConfigPath(strategy, targetScope)) {
23
+ return undefined;
24
+ }
25
+ if (targetScope === 'user') {
26
+ return join(getRuntimeAdapter().os.homedir(), String(strategy.getGlobalConfigPath()));
27
+ }
28
+ return join(configDir, strategy.getConfigPath());
29
+ }
30
+ //# sourceMappingURL=hook-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook-paths.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/hook-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAC/B,QAAuB,EACvB,WAA+B;IAE/B,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,OAAO,OAAO,CACX,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,EAAE,CACpF,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACnC,QAAuB,EACvB,SAAiB,EACjB,WAA+B;IAE/B,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACpB,CAAC;IAED,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;AACpD,CAAC"}
@@ -4,7 +4,12 @@ export { StandardMcpStrategy } from './standard-mcp.js';
4
4
  export { NoMcpStrategy } from './no-mcp.js';
5
5
  export { NoPromptsStrategy } from './no-prompts.js';
6
6
  export { NoHooksStrategy } from './no-hooks.js';
7
+ export { NoPluginsStrategy } from './no-plugins.js';
8
+ export { NoMarketplacesStrategy } from './no-marketplaces.js';
7
9
  export { MarkdownAgentsStrategy, NoAgentsStrategy } from './agents.js';
8
10
  export { GlobalMcpStrategy } from './global-mcp.js';
9
11
  export { formatPlainMarkdownRule } from './rule-utils.js';
12
+ export { hasHooksConfigPath, resolveHooksConfigPath } from './hook-paths.js';
13
+ export { resolvePluginsConfigPath, resolveMarketplacesConfigPath, hasPluginsConfigPath, hasMarketplacesConfigPath, } from './plugin-paths.js';
14
+ export { PluginCompatibilityStrategy, unpackPluginDirectory, unpackAllPlugins, type UnpackedPluginComponents, } from './plugin-compatibility.js';
10
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACJ,wBAAwB,EACxB,6BAA6B,EAC7B,oBAAoB,EACpB,yBAAyB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACJ,2BAA2B,EAC3B,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,wBAAwB,GAC/B,MAAM,2BAA2B,CAAC"}
@@ -4,7 +4,12 @@ export { StandardMcpStrategy } from './standard-mcp.js';
4
4
  export { NoMcpStrategy } from './no-mcp.js';
5
5
  export { NoPromptsStrategy } from './no-prompts.js';
6
6
  export { NoHooksStrategy } from './no-hooks.js';
7
+ export { NoPluginsStrategy } from './no-plugins.js';
8
+ export { NoMarketplacesStrategy } from './no-marketplaces.js';
7
9
  export { MarkdownAgentsStrategy, NoAgentsStrategy } from './agents.js';
8
10
  export { GlobalMcpStrategy } from './global-mcp.js';
9
11
  export { formatPlainMarkdownRule } from './rule-utils.js';
12
+ export { hasHooksConfigPath, resolveHooksConfigPath } from './hook-paths.js';
13
+ export { resolvePluginsConfigPath, resolveMarketplacesConfigPath, hasPluginsConfigPath, hasMarketplacesConfigPath, } from './plugin-paths.js';
14
+ export { PluginCompatibilityStrategy, unpackPluginDirectory, unpackAllPlugins, } from './plugin-compatibility.js';
10
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACJ,wBAAwB,EACxB,6BAA6B,EAC7B,oBAAoB,EACpB,yBAAyB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACJ,2BAA2B,EAC3B,qBAAqB,EACrB,gBAAgB,GAElB,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Read a `Record<string, string>` field (`env`, `headers`) from a parsed MCP config,
3
+ * coercing values to strings. Returns undefined for missing or empty objects so callers
4
+ * can omit the key entirely.
5
+ */
6
+ export declare function parseStringRecord(value: unknown): Record<string, string> | undefined;
7
+ //# sourceMappingURL=mcp-import-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-import-utils.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/mcp-import-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAYpF"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Read a `Record<string, string>` field (`env`, `headers`) from a parsed MCP config,
3
+ * coercing values to strings. Returns undefined for missing or empty objects so callers
4
+ * can omit the key entirely.
5
+ */
6
+ export function parseStringRecord(value) {
7
+ if (typeof value !== 'object' || value === null) {
8
+ return undefined;
9
+ }
10
+ const entries = Object.entries(value);
11
+ if (entries.length === 0) {
12
+ return undefined;
13
+ }
14
+ return Object.fromEntries(entries.map(([key, entry]) => [key, String(entry)]));
15
+ }
16
+ //# sourceMappingURL=mcp-import-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-import-utils.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/mcp-import-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC;IACpB,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEtC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACpB,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAE,GAAG,EAAE,KAAK,CAAE,EAAE,EAAE,CAAC,CAAE,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAE,CAAC,CAAC,CAAC;AACtF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { MarketplacesConfig } from '@a1st/aix-schema';
2
+ import type { MarketplacesStrategy } from '../types.js';
3
+ /**
4
+ * No-op marketplaces strategy for editors that don't support marketplace catalog
5
+ * registration. Reports every supplied marketplace as unsupported.
6
+ */
7
+ export declare class NoMarketplacesStrategy implements MarketplacesStrategy {
8
+ isSupported(): boolean;
9
+ formatConfig(_marketplaces: MarketplacesConfig): string;
10
+ getConfigPath(): string;
11
+ getUnsupportedMarketplaces(marketplaces: MarketplacesConfig): string[];
12
+ }
13
+ //# sourceMappingURL=no-marketplaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-marketplaces.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-marketplaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,oBAAoB;IAChE,WAAW,IAAI,OAAO;IAItB,YAAY,CAAC,aAAa,EAAE,kBAAkB,GAAG,MAAM;IAIvD,aAAa,IAAI,MAAM;IAIvB,0BAA0B,CAAC,YAAY,EAAE,kBAAkB,GAAG,MAAM,EAAE;CAGxE"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * No-op marketplaces strategy for editors that don't support marketplace catalog
3
+ * registration. Reports every supplied marketplace as unsupported.
4
+ */
5
+ export class NoMarketplacesStrategy {
6
+ isSupported() {
7
+ return false;
8
+ }
9
+ formatConfig(_marketplaces) {
10
+ return '';
11
+ }
12
+ getConfigPath() {
13
+ return '';
14
+ }
15
+ getUnsupportedMarketplaces(marketplaces) {
16
+ return Object.keys(marketplaces);
17
+ }
18
+ }
19
+ //# sourceMappingURL=no-marketplaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-marketplaces.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-marketplaces.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAChC,WAAW;QACR,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,YAAY,CAAC,aAAiC;QAC3C,OAAO,EAAE,CAAC;IACb,CAAC;IAED,aAAa;QACV,OAAO,EAAE,CAAC;IACb,CAAC;IAED,0BAA0B,CAAC,YAAgC;QACxD,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;CACH"}
@@ -0,0 +1,13 @@
1
+ import type { PluginsConfig } from '@a1st/aix-schema';
2
+ import type { PluginsStrategy } from '../types.js';
3
+ /**
4
+ * No-op plugins strategy for editors that don't support plugins. Reports every
5
+ * supplied plugin as unsupported.
6
+ */
7
+ export declare class NoPluginsStrategy implements PluginsStrategy {
8
+ isSupported(): boolean;
9
+ formatConfig(_plugins: PluginsConfig): string;
10
+ getConfigPath(): string;
11
+ getUnsupportedPlugins(plugins: PluginsConfig): string[];
12
+ }
13
+ //# sourceMappingURL=no-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-plugins.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,eAAe;IACtD,WAAW,IAAI,OAAO;IAItB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM;IAI7C,aAAa,IAAI,MAAM;IAIvB,qBAAqB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE;CAGzD"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * No-op plugins strategy for editors that don't support plugins. Reports every
3
+ * supplied plugin as unsupported.
4
+ */
5
+ export class NoPluginsStrategy {
6
+ isSupported() {
7
+ return false;
8
+ }
9
+ formatConfig(_plugins) {
10
+ return '';
11
+ }
12
+ getConfigPath() {
13
+ return '';
14
+ }
15
+ getUnsupportedPlugins(plugins) {
16
+ return Object.keys(plugins);
17
+ }
18
+ }
19
+ //# sourceMappingURL=no-plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-plugins.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-plugins.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAC3B,WAAW;QACR,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,YAAY,CAAC,QAAuB;QACjC,OAAO,EAAE,CAAC;IACb,CAAC;IAED,aAAa;QACV,OAAO,EAAE,CAAC;IACb,CAAC;IAED,qBAAqB,CAAC,OAAsB;QACzC,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;CACH"}
@@ -0,0 +1,33 @@
1
+ import type { PluginsConfig, McpServerConfig } from '@a1st/aix-schema';
2
+ import type { PluginsStrategy } from '../types.js';
3
+ export interface UnpackedPluginComponents {
4
+ skills: Record<string, {
5
+ path: string;
6
+ }>;
7
+ mcp: Record<string, McpServerConfig>;
8
+ rules: Record<string, {
9
+ content: string;
10
+ }>;
11
+ }
12
+ /**
13
+ * Discovers and unpacks plugin components (skills, MCP servers, rules) from a local
14
+ * plugin directory so editors without native plugin systems can consume them.
15
+ */
16
+ export declare function unpackPluginDirectory(pluginName: string, pluginDir: string): Promise<UnpackedPluginComponents>;
17
+ /**
18
+ * Unpacks all configured local plugins into their composite parts.
19
+ */
20
+ export declare function unpackAllPlugins(plugins: PluginsConfig, projectRoot: string): Promise<UnpackedPluginComponents>;
21
+ /**
22
+ * Compatibility plugins strategy for editors lacking native plugin systems
23
+ * (e.g., Windsurf, Zed, Codex, Antigravity, Grok). Reports support as true
24
+ * because components are unpacked into native skills, MCP, and rules.
25
+ */
26
+ export declare class PluginCompatibilityStrategy implements PluginsStrategy {
27
+ isSupported(): boolean;
28
+ isCompatibility(): boolean;
29
+ formatConfig(_plugins: PluginsConfig): string;
30
+ getConfigPath(): string;
31
+ getUnsupportedPlugins(_plugins: PluginsConfig): string[];
32
+ }
33
+ //# sourceMappingURL=plugin-compatibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-compatibility.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/plugin-compatibility.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,WAAW,wBAAwB;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7C;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACxC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GACjB,OAAO,CAAC,wBAAwB,CAAC,CA0EnC;AAoCD;;GAEG;AACH,wBAAsB,gBAAgB,CACnC,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,GACnB,OAAO,CAAC,wBAAwB,CAAC,CAgCnC;AAED;;;;GAIG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IAChE,WAAW,IAAI,OAAO;IAItB,eAAe,IAAI,OAAO;IAI1B,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM;IAI7C,aAAa,IAAI,MAAM;IAIvB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,EAAE;CAG1D"}
@@ -0,0 +1,134 @@
1
+ import { join, resolve } from 'pathe';
2
+ import { parseJsonc } from '@a1st/aix-schema';
3
+ import { getRuntimeAdapter } from '../../../runtime/index.js';
4
+ /**
5
+ * Discovers and unpacks plugin components (skills, MCP servers, rules) from a local
6
+ * plugin directory so editors without native plugin systems can consume them.
7
+ */
8
+ export async function unpackPluginDirectory(pluginName, pluginDir) {
9
+ const fs = getRuntimeAdapter().fs, result = {
10
+ skills: {},
11
+ mcp: {},
12
+ rules: {},
13
+ };
14
+ try {
15
+ if (!fs.existsSync(pluginDir)) {
16
+ return result;
17
+ }
18
+ // 1. Discover skills: check <pluginDir>/skills or <pluginDir>/SKILL.md
19
+ const skillsDir = join(pluginDir, 'skills'), rootSkillFile = join(pluginDir, 'SKILL.md');
20
+ if (fs.existsSync(skillsDir)) {
21
+ const entries = await fs.readdir(skillsDir, { withFileTypes: true });
22
+ for (const entry of entries) {
23
+ if (!entry.isDirectory()) {
24
+ continue;
25
+ }
26
+ const skillSubdir = join(skillsDir, entry.name), skillFile = join(skillSubdir, 'SKILL.md');
27
+ if (fs.existsSync(skillFile)) {
28
+ result.skills[`${pluginName}-${entry.name}`] = { path: skillSubdir };
29
+ }
30
+ }
31
+ }
32
+ else if (fs.existsSync(rootSkillFile)) {
33
+ result.skills[pluginName] = { path: pluginDir };
34
+ }
35
+ // 2. Discover MCP servers: check <pluginDir>/.mcp.json or <pluginDir>/mcp.json
36
+ const mcpCandidates = ['.mcp.json', 'mcp.json'], existingMcpFile = mcpCandidates.map((c) => join(pluginDir, c)).find((p) => fs.existsSync(p));
37
+ if (existingMcpFile) {
38
+ const raw = await fs.readFile(existingMcpFile, 'utf-8'), parsed = parseJsonc(raw), servers = (parsed.data?.mcpServers ?? parsed.data?.servers ?? parsed.data);
39
+ for (const [serverName, serverConfig] of Object.entries(servers ?? {})) {
40
+ if (typeof serverConfig === 'object' && serverConfig !== null) {
41
+ result.mcp[`${pluginName}-${serverName}`] = serverConfig;
42
+ }
43
+ }
44
+ }
45
+ // 3. Discover rules: check <pluginDir>/rules/*.md
46
+ const rulesDir = join(pluginDir, 'rules');
47
+ if (fs.existsSync(rulesDir)) {
48
+ const entries = await fs.readdir(rulesDir, { withFileTypes: true }), ruleEntries = entries.filter((e) => e.isFile() && (e.name.endsWith('.md') || e.name.endsWith('.mdc')));
49
+ await Promise.all(ruleEntries.map(async (entry) => {
50
+ const rulePath = join(rulesDir, entry.name), content = await fs.readFile(rulePath, 'utf-8'), ruleName = entry.name.replace(/\.(md|mdc)$/, '');
51
+ result.rules[`${pluginName}-${ruleName}`] = { content };
52
+ }));
53
+ }
54
+ }
55
+ catch {
56
+ // Graceful fallback on unreadable directories
57
+ }
58
+ return result;
59
+ }
60
+ /**
61
+ * Resolves local filesystem path for a plugin entry if applicable.
62
+ */
63
+ function resolvePluginLocalPath(value, projectRoot) {
64
+ if (typeof value === 'string' && (value.startsWith('.') || value.startsWith('/'))) {
65
+ return resolve(projectRoot, value);
66
+ }
67
+ if (typeof value !== 'object' || value === null) {
68
+ return null;
69
+ }
70
+ const obj = value;
71
+ if (obj.enabled === false) {
72
+ return null;
73
+ }
74
+ if (typeof obj.source === 'string' && (obj.source.startsWith('.') || obj.source.startsWith('/'))) {
75
+ return resolve(projectRoot, obj.source);
76
+ }
77
+ if (typeof obj.source === 'object' &&
78
+ obj.source !== null &&
79
+ 'path' in obj.source &&
80
+ typeof obj.source.path === 'string') {
81
+ return resolve(projectRoot, obj.source.path);
82
+ }
83
+ return null;
84
+ }
85
+ /**
86
+ * Unpacks all configured local plugins into their composite parts.
87
+ */
88
+ export async function unpackAllPlugins(plugins, projectRoot) {
89
+ const aggregated = {
90
+ skills: {},
91
+ mcp: {},
92
+ rules: {},
93
+ };
94
+ const pluginTasks = [];
95
+ for (const [name, value] of Object.entries(plugins)) {
96
+ if (value === false) {
97
+ continue;
98
+ }
99
+ const sourcePath = resolvePluginLocalPath(value, projectRoot);
100
+ if (sourcePath) {
101
+ pluginTasks.push({ name, sourcePath });
102
+ }
103
+ }
104
+ const unpackedList = await Promise.all(pluginTasks.map(({ name, sourcePath }) => unpackPluginDirectory(name, sourcePath)));
105
+ for (const unpacked of unpackedList) {
106
+ Object.assign(aggregated.skills, unpacked.skills);
107
+ Object.assign(aggregated.mcp, unpacked.mcp);
108
+ Object.assign(aggregated.rules, unpacked.rules);
109
+ }
110
+ return aggregated;
111
+ }
112
+ /**
113
+ * Compatibility plugins strategy for editors lacking native plugin systems
114
+ * (e.g., Windsurf, Zed, Codex, Antigravity, Grok). Reports support as true
115
+ * because components are unpacked into native skills, MCP, and rules.
116
+ */
117
+ export class PluginCompatibilityStrategy {
118
+ isSupported() {
119
+ return true;
120
+ }
121
+ isCompatibility() {
122
+ return true;
123
+ }
124
+ formatConfig(_plugins) {
125
+ return '';
126
+ }
127
+ getConfigPath() {
128
+ return '';
129
+ }
130
+ getUnsupportedPlugins(_plugins) {
131
+ return [];
132
+ }
133
+ }
134
+ //# sourceMappingURL=plugin-compatibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-compatibility.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/plugin-compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAQ9D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACxC,UAAkB,EAClB,SAAiB;IAEjB,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAC,EAAE,EAC3B,MAAM,GAA6B;QAChC,MAAM,EAAE,EAAE;QACV,GAAG,EAAE,EAAE;QACP,KAAK,EAAE,EAAE;KACX,CAAC;IAER,IAAI,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7B,OAAO,MAAM,CAAC;QACjB,CAAC;QAED,uEAAuE;QACvE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,EACrC,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAElD,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5B,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YAErE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC3B,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;oBACxB,SAAS;gBACZ,CAAC;gBAED,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,EACzC,SAAS,GAAG,IAAI,CAAC,WAAW,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C,OAAO,CAAC,EAAE,CAAC;QACnD,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YACnB,SAAS;QACZ,CAAC;QAED,MAAM,UAAU,GAAG,sBAAsB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE9D,IAAI,UAAU,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QAC1C,CAAC;IACJ,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CACnC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CACpF,CAAC;IAEF,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,UAAU,CAAC;AACrB,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,2BAA2B;IACrC,WAAW;QACR,OAAO,IAAI,CAAC;IACf,CAAC;IAED,eAAe;QACZ,OAAO,IAAI,CAAC;IACf,CAAC;IAED,YAAY,CAAC,QAAuB;QACjC,OAAO,EAAE,CAAC;IACb,CAAC;IAED,aAAa;QACV,OAAO,EAAE,CAAC;IACb,CAAC;IAED,qBAAqB,CAAC,QAAuB;QAC1C,OAAO,EAAE,CAAC;IACb,CAAC;CACH"}
@@ -0,0 +1,20 @@
1
+ import type { PluginsStrategy, MarketplacesStrategy } from '../types.js';
2
+ /**
3
+ * Resolve where an editor keeps its plugins config for the requested scope, or `undefined`
4
+ * if it has no plugins config file at that scope.
5
+ */
6
+ export declare function resolvePluginsConfigPath(strategy: PluginsStrategy, configDir: string, targetScope: 'project' | 'user', projectRoot?: string): string | undefined;
7
+ /**
8
+ * Resolve where an editor keeps its marketplace config for the requested scope, or `undefined`
9
+ * if it has no marketplace config file at that scope.
10
+ */
11
+ export declare function resolveMarketplacesConfigPath(strategy: MarketplacesStrategy, configDir: string, targetScope: 'project' | 'user', projectRoot?: string): string | undefined;
12
+ /**
13
+ * Whether the editor supports plugins config at the requested scope.
14
+ */
15
+ export declare function hasPluginsConfigPath(strategy: PluginsStrategy, targetScope: 'project' | 'user'): boolean;
16
+ /**
17
+ * Whether the editor supports marketplace config at the requested scope.
18
+ */
19
+ export declare function hasMarketplacesConfigPath(strategy: MarketplacesStrategy, targetScope: 'project' | 'user'): boolean;
20
+ //# sourceMappingURL=plugin-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-paths.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/plugin-paths.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEzE;;;GAGG;AACH,wBAAgB,wBAAwB,CACrC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,SAAS,GAAG,MAAM,EAC/B,WAAW,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAoBpB;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC1C,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,SAAS,GAAG,MAAM,EAC/B,WAAW,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAoBpB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CACjC,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,SAAS,GAAG,MAAM,GAC/B,OAAO,CAYT;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACtC,QAAQ,EAAE,oBAAoB,EAC9B,WAAW,EAAE,SAAS,GAAG,MAAM,GAC/B,OAAO,CAQT"}
@@ -0,0 +1,62 @@
1
+ import { join } from 'pathe';
2
+ import { getRuntimeAdapter } from '../../../runtime/index.js';
3
+ /**
4
+ * Resolve where an editor keeps its plugins config for the requested scope, or `undefined`
5
+ * if it has no plugins config file at that scope.
6
+ */
7
+ export function resolvePluginsConfigPath(strategy, configDir, targetScope, projectRoot) {
8
+ if (!strategy.isSupported()) {
9
+ return undefined;
10
+ }
11
+ if (targetScope === 'user') {
12
+ const globalPath = strategy.getGlobalConfigPath?.();
13
+ return globalPath ? join(getRuntimeAdapter().os.homedir(), globalPath) : undefined;
14
+ }
15
+ const relPath = strategy.getConfigPath?.(targetScope);
16
+ if (!relPath) {
17
+ return undefined;
18
+ }
19
+ const baseDir = strategy.isProjectRootConfig?.() && projectRoot ? projectRoot : configDir;
20
+ return join(baseDir, relPath);
21
+ }
22
+ /**
23
+ * Resolve where an editor keeps its marketplace config for the requested scope, or `undefined`
24
+ * if it has no marketplace config file at that scope.
25
+ */
26
+ export function resolveMarketplacesConfigPath(strategy, configDir, targetScope, projectRoot) {
27
+ if (!strategy.isSupported()) {
28
+ return undefined;
29
+ }
30
+ if (targetScope === 'user') {
31
+ const globalPath = strategy.getGlobalConfigPath?.();
32
+ return globalPath ? join(getRuntimeAdapter().os.homedir(), globalPath) : undefined;
33
+ }
34
+ const relPath = strategy.getConfigPath?.(targetScope);
35
+ if (!relPath) {
36
+ return undefined;
37
+ }
38
+ const baseDir = strategy.isProjectRootConfig?.() && projectRoot ? projectRoot : configDir;
39
+ return join(baseDir, relPath);
40
+ }
41
+ /**
42
+ * Whether the editor supports plugins config at the requested scope.
43
+ */
44
+ export function hasPluginsConfigPath(strategy, targetScope) {
45
+ if (!strategy.isSupported()) {
46
+ return false;
47
+ }
48
+ if (strategy.isCompatibility?.()) {
49
+ return targetScope === 'project';
50
+ }
51
+ return Boolean(targetScope === 'user' ? strategy.getGlobalConfigPath?.() : strategy.getConfigPath?.(targetScope));
52
+ }
53
+ /**
54
+ * Whether the editor supports marketplace config at the requested scope.
55
+ */
56
+ export function hasMarketplacesConfigPath(strategy, targetScope) {
57
+ if (!strategy.isSupported()) {
58
+ return false;
59
+ }
60
+ return Boolean(targetScope === 'user' ? strategy.getGlobalConfigPath?.() : strategy.getConfigPath?.(targetScope));
61
+ }
62
+ //# sourceMappingURL=plugin-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-paths.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/plugin-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACrC,QAAyB,EACzB,SAAiB,EACjB,WAA+B,EAC/B,WAAoB;IAEpB,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACpB,CAAC;IAED,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;QAC1B,MAAM,UAAU,GAAG,QAAQ,CAAC,mBAAmB,EAAE,EAAE,CAAC;QAEpD,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtF,CAAC;IAED,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,CAAC;IAEtD,IAAI,CAAC,OAAO,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IACpB,CAAC;IAED,MAAM,OAAO,GAAG,QAAQ,CAAC,mBAAmB,EAAE,EAAE,IAAI,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SA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AAQ,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,CACnG,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACtC,QAA8B,EAC9B,WAA+B;IAE/B,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,OAAO,OAAO,CACX,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,CACnG,CAAC;AACL,CAAC"}
@@ -1,5 +1,39 @@
1
1
  import type { McpServerConfig } from '@a1st/aix-schema';
2
2
  import type { McpStrategy } from '../types.js';
3
+ /**
4
+ * Values some editors write in each entry's `type` field to name the transport. Claude Code
5
+ * uses `stdio` and `http`; GitHub Copilot uses `local` and `http`.
6
+ */
7
+ export interface TransportTypeNames {
8
+ readonly stdio: string;
9
+ readonly http: string;
10
+ }
11
+ /**
12
+ * How one editor's entries differ from the common shape.
13
+ */
14
+ export interface StandardServerEntryOptions {
15
+ /** Transport names for the `type` field. Omit for the editors that have no such field. */
16
+ readonly transportTypes?: TransportTypeNames;
17
+ /**
18
+ * Keys that can hold a remote server's endpoint, most preferred first. The first is the one
19
+ * written; reading accepts any of them. Gemini CLI names its streamable HTTP endpoint
20
+ * `httpUrl` and Windsurf documents `serverUrl`, while most editors use `url`.
21
+ */
22
+ readonly urlKeys?: readonly string[];
23
+ }
24
+ /**
25
+ * Build one `mcpServers` entry in the shape shared by Cursor, Claude Code, Gemini CLI,
26
+ * GitHub Copilot, Windsurf, and Zed: `command` with optional `args` and `env` for stdio
27
+ * servers, a URL with optional `headers` for remote ones. Empty maps and arrays are left out
28
+ * so the written config stays shorthand.
29
+ */
30
+ export declare function buildStandardServerEntry(serverConfig: McpServerConfig, options?: StandardServerEntryOptions): Record<string, unknown>;
31
+ /**
32
+ * Read one `mcpServers` entry written in the shape produced by
33
+ * {@link buildStandardServerEntry}. Returns null when the entry names neither a command nor a
34
+ * URL, so each caller can word its own "unknown format" warning.
35
+ */
36
+ export declare function parseStandardServerEntry(server: unknown, options?: StandardServerEntryOptions): McpServerConfig | null;
3
37
  /**
4
38
  * Standard MCP strategy used by Cursor. Uses `mcp.json` with a `mcpServers` object. Claude Code
5
39
  * extends this with {@link ClaudeCodeMcpStrategy} for its `.mcp.json` (dot-prefixed) filename.
@@ -1 +1 @@
1
- {"version":3,"file":"standard-mcp.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/standard-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,WAAW;IACpD,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,mBAAmB,IAAI,OAAO;IAI9B,sBAAsB,IAAI,MAAM,GAAG,IAAI;IAIvC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,MAAM;IA0B1D,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;QACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QACrC,QAAQ,EAAE,MAAM,EAAE,CAAC;KACrB;CAsCH"}
1
+ {"version":3,"file":"standard-mcp.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/standard-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,M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