@a1st/aix-core 0.0.4 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/README.md +6 -6
  2. package/dist/cache/index.d.ts +1 -1
  3. package/dist/cache/index.d.ts.map +1 -1
  4. package/dist/cache/index.js +1 -1
  5. package/dist/cache/index.js.map +1 -1
  6. package/dist/cache/paths.d.ts +9 -0
  7. package/dist/cache/paths.d.ts.map +1 -1
  8. package/dist/cache/paths.js +13 -0
  9. package/dist/cache/paths.js.map +1 -1
  10. package/dist/editors/adapters/base.d.ts +5 -0
  11. package/dist/editors/adapters/base.d.ts.map +1 -1
  12. package/dist/editors/adapters/base.js +1 -1
  13. package/dist/editors/adapters/base.js.map +1 -1
  14. package/dist/editors/adapters/claude-code.d.ts +2 -1
  15. package/dist/editors/adapters/claude-code.d.ts.map +1 -1
  16. package/dist/editors/adapters/claude-code.js +11 -4
  17. package/dist/editors/adapters/claude-code.js.map +1 -1
  18. package/dist/editors/adapters/codex.d.ts +26 -7
  19. package/dist/editors/adapters/codex.d.ts.map +1 -1
  20. package/dist/editors/adapters/codex.js +89 -10
  21. package/dist/editors/adapters/codex.js.map +1 -1
  22. package/dist/editors/adapters/{vscode.d.ts → copilot.d.ts} +7 -6
  23. package/dist/editors/adapters/copilot.d.ts.map +1 -0
  24. package/dist/editors/adapters/{vscode.js → copilot.js} +19 -12
  25. package/dist/editors/adapters/copilot.js.map +1 -0
  26. package/dist/editors/adapters/cursor.d.ts +1 -0
  27. package/dist/editors/adapters/cursor.d.ts.map +1 -1
  28. package/dist/editors/adapters/cursor.js +7 -0
  29. package/dist/editors/adapters/cursor.js.map +1 -1
  30. package/dist/editors/adapters/index.d.ts +1 -1
  31. package/dist/editors/adapters/index.d.ts.map +1 -1
  32. package/dist/editors/adapters/index.js +1 -1
  33. package/dist/editors/adapters/index.js.map +1 -1
  34. package/dist/editors/adapters/windsurf.d.ts +1 -0
  35. package/dist/editors/adapters/windsurf.d.ts.map +1 -1
  36. package/dist/editors/adapters/windsurf.js +7 -0
  37. package/dist/editors/adapters/windsurf.js.map +1 -1
  38. package/dist/editors/adapters/zed.d.ts +1 -0
  39. package/dist/editors/adapters/zed.d.ts.map +1 -1
  40. package/dist/editors/adapters/zed.js +7 -0
  41. package/dist/editors/adapters/zed.js.map +1 -1
  42. package/dist/editors/import.d.ts +2 -1
  43. package/dist/editors/import.d.ts.map +1 -1
  44. package/dist/editors/import.js +43 -17
  45. package/dist/editors/import.js.map +1 -1
  46. package/dist/editors/index.d.ts +1 -1
  47. package/dist/editors/index.d.ts.map +1 -1
  48. package/dist/editors/index.js +1 -1
  49. package/dist/editors/index.js.map +1 -1
  50. package/dist/editors/install.d.ts.map +1 -1
  51. package/dist/editors/install.js +3 -38
  52. package/dist/editors/install.js.map +1 -1
  53. package/dist/editors/strategies/claude-code/hooks.d.ts.map +1 -1
  54. package/dist/editors/strategies/claude-code/hooks.js +35 -5
  55. package/dist/editors/strategies/claude-code/hooks.js.map +1 -1
  56. package/dist/editors/strategies/claude-code/mcp.d.ts +6 -2
  57. package/dist/editors/strategies/claude-code/mcp.d.ts.map +1 -1
  58. package/dist/editors/strategies/claude-code/mcp.js +40 -2
  59. package/dist/editors/strategies/claude-code/mcp.js.map +1 -1
  60. package/dist/editors/strategies/claude-code/prompts.d.ts +11 -1
  61. package/dist/editors/strategies/claude-code/prompts.d.ts.map +1 -1
  62. package/dist/editors/strategies/claude-code/prompts.js +29 -0
  63. package/dist/editors/strategies/claude-code/prompts.js.map +1 -1
  64. package/dist/editors/strategies/claude-code/rules.d.ts +12 -1
  65. package/dist/editors/strategies/claude-code/rules.d.ts.map +1 -1
  66. package/dist/editors/strategies/claude-code/rules.js +49 -5
  67. package/dist/editors/strategies/claude-code/rules.js.map +1 -1
  68. package/dist/editors/strategies/codex/index.d.ts +1 -1
  69. package/dist/editors/strategies/codex/index.d.ts.map +1 -1
  70. package/dist/editors/strategies/codex/index.js +1 -1
  71. package/dist/editors/strategies/codex/index.js.map +1 -1
  72. package/dist/editors/strategies/codex/mcp.d.ts +0 -10
  73. package/dist/editors/strategies/codex/mcp.d.ts.map +1 -1
  74. package/dist/editors/strategies/codex/mcp.js +13 -27
  75. package/dist/editors/strategies/codex/mcp.js.map +1 -1
  76. package/dist/editors/strategies/codex/prompts.d.ts +11 -1
  77. package/dist/editors/strategies/codex/prompts.d.ts.map +1 -1
  78. package/dist/editors/strategies/codex/prompts.js +34 -0
  79. package/dist/editors/strategies/codex/prompts.js.map +1 -1
  80. package/dist/editors/strategies/codex/rules.d.ts +3 -2
  81. package/dist/editors/strategies/codex/rules.d.ts.map +1 -1
  82. package/dist/editors/strategies/codex/rules.js +5 -4
  83. package/dist/editors/strategies/codex/rules.js.map +1 -1
  84. package/dist/editors/strategies/copilot/hooks.d.ts +14 -0
  85. package/dist/editors/strategies/copilot/hooks.d.ts.map +1 -0
  86. package/dist/editors/strategies/copilot/hooks.js +95 -0
  87. package/dist/editors/strategies/copilot/hooks.js.map +1 -0
  88. package/dist/editors/strategies/copilot/index.d.ts +5 -0
  89. package/dist/editors/strategies/copilot/index.d.ts.map +1 -0
  90. package/dist/editors/strategies/copilot/index.js +5 -0
  91. package/dist/editors/strategies/copilot/index.js.map +1 -0
  92. package/dist/editors/strategies/{vscode → copilot}/mcp.d.ts +2 -2
  93. package/dist/editors/strategies/copilot/mcp.d.ts.map +1 -0
  94. package/dist/editors/strategies/{vscode → copilot}/mcp.js +4 -4
  95. package/dist/editors/strategies/copilot/mcp.js.map +1 -0
  96. package/dist/editors/strategies/copilot/prompts.d.ts +28 -0
  97. package/dist/editors/strategies/copilot/prompts.d.ts.map +1 -0
  98. package/dist/editors/strategies/{vscode → copilot}/prompts.js +32 -3
  99. package/dist/editors/strategies/copilot/prompts.js.map +1 -0
  100. package/dist/editors/strategies/{vscode → copilot}/rules.d.ts +2 -2
  101. package/dist/editors/strategies/copilot/rules.d.ts.map +1 -0
  102. package/dist/editors/strategies/{vscode → copilot}/rules.js +5 -5
  103. package/dist/editors/strategies/copilot/rules.js.map +1 -0
  104. package/dist/editors/strategies/cursor/hooks.d.ts.map +1 -1
  105. package/dist/editors/strategies/cursor/hooks.js +11 -0
  106. package/dist/editors/strategies/cursor/hooks.js.map +1 -1
  107. package/dist/editors/strategies/cursor/rules.d.ts +14 -1
  108. package/dist/editors/strategies/cursor/rules.d.ts.map +1 -1
  109. package/dist/editors/strategies/cursor/rules.js +51 -5
  110. package/dist/editors/strategies/cursor/rules.js.map +1 -1
  111. package/dist/editors/strategies/index.d.ts +1 -1
  112. package/dist/editors/strategies/index.d.ts.map +1 -1
  113. package/dist/editors/strategies/index.js +1 -1
  114. package/dist/editors/strategies/index.js.map +1 -1
  115. package/dist/editors/strategies/shared/native-skills.d.ts +1 -1
  116. package/dist/editors/strategies/shared/native-skills.js +1 -1
  117. package/dist/editors/strategies/shared/no-hooks.d.ts +1 -1
  118. package/dist/editors/strategies/shared/no-hooks.js +1 -1
  119. package/dist/editors/strategies/shared/no-mcp.d.ts +1 -1
  120. package/dist/editors/strategies/shared/no-mcp.js +1 -1
  121. package/dist/editors/strategies/shared/standard-mcp.d.ts +3 -1
  122. package/dist/editors/strategies/shared/standard-mcp.d.ts.map +1 -1
  123. package/dist/editors/strategies/shared/standard-mcp.js +5 -1
  124. package/dist/editors/strategies/shared/standard-mcp.js.map +1 -1
  125. package/dist/editors/strategies/types.d.ts +48 -2
  126. package/dist/editors/strategies/types.d.ts.map +1 -1
  127. package/dist/editors/strategies/windsurf/prompts.d.ts +11 -1
  128. package/dist/editors/strategies/windsurf/prompts.d.ts.map +1 -1
  129. package/dist/editors/strategies/windsurf/prompts.js +29 -0
  130. package/dist/editors/strategies/windsurf/prompts.js.map +1 -1
  131. package/dist/editors/strategies/windsurf/rules.d.ts +14 -1
  132. package/dist/editors/strategies/windsurf/rules.d.ts.map +1 -1
  133. package/dist/editors/strategies/windsurf/rules.js +43 -5
  134. package/dist/editors/strategies/windsurf/rules.js.map +1 -1
  135. package/dist/editors/types.d.ts +6 -1
  136. package/dist/editors/types.d.ts.map +1 -1
  137. package/dist/frontmatter-parser.d.ts +24 -0
  138. package/dist/frontmatter-parser.d.ts.map +1 -0
  139. package/dist/frontmatter-parser.js +137 -0
  140. package/dist/frontmatter-parser.js.map +1 -0
  141. package/dist/frontmatter-utils.d.ts +36 -0
  142. package/dist/frontmatter-utils.d.ts.map +1 -0
  143. package/dist/frontmatter-utils.js +109 -0
  144. package/dist/frontmatter-utils.js.map +1 -0
  145. package/dist/git-download.d.ts +18 -0
  146. package/dist/git-download.d.ts.map +1 -0
  147. package/dist/git-download.js +49 -0
  148. package/dist/git-download.js.map +1 -0
  149. package/dist/global/processor.d.ts.map +1 -1
  150. package/dist/global/processor.js +27 -12
  151. package/dist/global/processor.js.map +1 -1
  152. package/dist/global/types.d.ts +2 -0
  153. package/dist/global/types.d.ts.map +1 -1
  154. package/dist/import-writer.d.ts +6 -1
  155. package/dist/import-writer.d.ts.map +1 -1
  156. package/dist/import-writer.js +8 -5
  157. package/dist/import-writer.js.map +1 -1
  158. package/dist/inheritance.d.ts +2 -0
  159. package/dist/inheritance.d.ts.map +1 -1
  160. package/dist/inheritance.js +172 -41
  161. package/dist/inheritance.js.map +1 -1
  162. package/dist/loader.d.ts.map +1 -1
  163. package/dist/loader.js +2 -1
  164. package/dist/loader.js.map +1 -1
  165. package/dist/prompts/loader.d.ts.map +1 -1
  166. package/dist/prompts/loader.js +11 -39
  167. package/dist/prompts/loader.js.map +1 -1
  168. package/dist/remote-loader.d.ts.map +1 -1
  169. package/dist/remote-loader.js +19 -44
  170. package/dist/remote-loader.js.map +1 -1
  171. package/dist/rules/loader.d.ts.map +1 -1
  172. package/dist/rules/loader.js +23 -13
  173. package/dist/rules/loader.js.map +1 -1
  174. package/dist/skills/parser.d.ts +3 -1
  175. package/dist/skills/parser.d.ts.map +1 -1
  176. package/dist/skills/parser.js +22 -10
  177. package/dist/skills/parser.js.map +1 -1
  178. package/dist/skills/validate.js +1 -1
  179. package/dist/skills/validate.js.map +1 -1
  180. package/dist/updater.d.ts.map +1 -1
  181. package/dist/updater.js +5 -12
  182. package/dist/updater.js.map +1 -1
  183. package/dist/url-parsing.d.ts +1 -7
  184. package/dist/url-parsing.d.ts.map +1 -1
  185. package/dist/url-parsing.js +2 -19
  186. package/dist/url-parsing.js.map +1 -1
  187. package/package.json +13 -6
  188. package/dist/editors/adapters/vscode.d.ts.map +0 -1
  189. package/dist/editors/adapters/vscode.js.map +0 -1
  190. package/dist/editors/strategies/vscode/index.d.ts +0 -4
  191. package/dist/editors/strategies/vscode/index.d.ts.map +0 -1
  192. package/dist/editors/strategies/vscode/index.js +0 -4
  193. package/dist/editors/strategies/vscode/index.js.map +0 -1
  194. package/dist/editors/strategies/vscode/mcp.d.ts.map +0 -1
  195. package/dist/editors/strategies/vscode/mcp.js.map +0 -1
  196. package/dist/editors/strategies/vscode/prompts.d.ts +0 -18
  197. package/dist/editors/strategies/vscode/prompts.d.ts.map +0 -1
  198. package/dist/editors/strategies/vscode/prompts.js.map +0 -1
  199. package/dist/editors/strategies/vscode/rules.d.ts.map +0 -1
  200. package/dist/editors/strategies/vscode/rules.js.map +0 -1
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Map from generic ai.json hook events to GitHub Copilot's PascalCase event names.
3
+ * GitHub Copilot supports 8 events: SessionStart, UserPromptSubmit, PreToolUse,
4
+ * PostToolUse, PreCompact, SubagentStart, SubagentStop, Stop.
5
+ */
6
+ const EVENT_MAP = {
7
+ pre_tool_use: 'PreToolUse',
8
+ post_tool_use: 'PostToolUse',
9
+ pre_file_read: 'PreToolUse',
10
+ post_file_read: 'PostToolUse',
11
+ pre_file_write: 'PreToolUse',
12
+ post_file_write: 'PostToolUse',
13
+ pre_command: 'PreToolUse',
14
+ post_command: 'PostToolUse',
15
+ pre_mcp_tool: 'PreToolUse',
16
+ post_mcp_tool: 'PostToolUse',
17
+ session_start: 'SessionStart',
18
+ agent_stop: 'Stop',
19
+ pre_prompt: 'UserPromptSubmit',
20
+ };
21
+ /**
22
+ * Tool-name matchers to inject for events that target a specific GitHub Copilot tool.
23
+ * GitHub Copilot uses the same tool naming convention as Claude Code for hook matchers.
24
+ * Events not listed here use the user-supplied matcher (or empty string for all tools).
25
+ */
26
+ const TOOL_MATCHER_MAP = {
27
+ pre_command: 'Bash',
28
+ post_command: 'Bash',
29
+ pre_file_read: 'Read',
30
+ post_file_read: 'Read',
31
+ pre_file_write: 'Write|Edit',
32
+ post_file_write: 'Write|Edit',
33
+ pre_mcp_tool: 'mcp__.*',
34
+ post_mcp_tool: 'mcp__.*',
35
+ };
36
+ /**
37
+ * Events that GitHub Copilot supports.
38
+ * GitHub Copilot does not support `session_end`.
39
+ */
40
+ const SUPPORTED_EVENTS = new Set([
41
+ 'pre_tool_use',
42
+ 'post_tool_use',
43
+ 'pre_file_read',
44
+ 'post_file_read',
45
+ 'pre_file_write',
46
+ 'post_file_write',
47
+ 'pre_command',
48
+ 'post_command',
49
+ 'pre_mcp_tool',
50
+ 'post_mcp_tool',
51
+ 'session_start',
52
+ 'agent_stop',
53
+ 'pre_prompt',
54
+ ]);
55
+ /**
56
+ * GitHub Copilot hooks strategy. Writes hooks to `.github/hooks/hooks.json`.
57
+ * Translates generic ai.json event names to GitHub Copilot's PascalCase format.
58
+ * Uses the same matcher-based structure as Claude Code hooks.
59
+ */
60
+ export class CopilotHooksStrategy {
61
+ isSupported() {
62
+ return true;
63
+ }
64
+ getConfigPath() {
65
+ // GitHub Copilot hooks live in .github/hooks/, not in .vscode/
66
+ return '../.github/hooks/hooks.json';
67
+ }
68
+ getUnsupportedEvents(hooks) {
69
+ return Object.keys(hooks).filter((event) => !SUPPORTED_EVENTS.has(event));
70
+ }
71
+ formatConfig(hooks) {
72
+ const copilotHooks = {};
73
+ for (const [event, matchers] of Object.entries(hooks)) {
74
+ const copilotEvent = EVENT_MAP[event];
75
+ if (!copilotEvent) {
76
+ continue;
77
+ }
78
+ const toolMatcher = TOOL_MATCHER_MAP[event];
79
+ const mapped = matchers.map((matcher) => ({
80
+ matcher: toolMatcher ?? matcher.matcher ?? '',
81
+ hooks: matcher.hooks.map((hook) => ({
82
+ type: 'command',
83
+ command: hook.command,
84
+ ...(hook.timeout && { timeout: hook.timeout }),
85
+ })),
86
+ }));
87
+ if (!copilotHooks[copilotEvent]) {
88
+ copilotHooks[copilotEvent] = [];
89
+ }
90
+ copilotHooks[copilotEvent].push(...mapped);
91
+ }
92
+ return JSON.stringify({ hooks: copilotHooks }, null, 2) + '\n';
93
+ }
94
+ }
95
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/hooks.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,SAAS,GAA2B;IACvC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,YAAY;IAC3B,cAAc,EAAE,aAAa;IAC7B,cAAc,EAAE,YAAY;IAC5B,eAAe,EAAE,aAAa;IAC9B,WAAW,EAAE,YAAY;IACzB,YAAY,EAAE,aAAa;IAC3B,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,cAAc;IAC7B,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,kBAAkB;CAChC,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,GAA2B;IAC9C,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;IACpB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IACtB,cAAc,EAAE,YAAY;IAC5B,eAAe,EAAE,YAAY;IAC7B,YAAY,EAAE,SAAS;IACvB,aAAa,EAAE,SAAS;CAC1B,CAAC;AAEF;;;GAGG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC9B,cAAc;IACd,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,iB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AAI,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC/B,YAAY,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;YACnC,CAAC;YACD,YAAY,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IAClE,CAAC;CACH"}
@@ -0,0 +1,5 @@
1
+ export { CopilotRulesStrategy } from './rules.js';
2
+ export { CopilotMcpStrategy } from './mcp.js';
3
+ export { CopilotPromptsStrategy } from './prompts.js';
4
+ export { CopilotHooksStrategy } from './hooks.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { CopilotRulesStrategy } from './rules.js';
2
+ export { CopilotMcpStrategy } from './mcp.js';
3
+ export { CopilotPromptsStrategy } from './prompts.js';
4
+ export { CopilotHooksStrategy } from './hooks.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import type { McpServerConfig } from '@a1st/aix-schema';
2
2
  import type { McpStrategy } from '../types.js';
3
3
  /**
4
- * VS Code MCP strategy. VS Code uses `mcp.json` with a `servers` object (not `mcpServers`).
4
+ * GitHub Copilot MCP strategy. GitHub Copilot uses `mcp.json` with a `servers` object (not `mcpServers`).
5
5
  * Project-level config goes to `.vscode/mcp.json`.
6
6
  */
7
- export declare class VSCodeMcpStrategy implements McpStrategy {
7
+ export declare class CopilotMcpStrategy implements McpStrategy {
8
8
  isSupported(): boolean;
9
9
  getConfigPath(): string;
10
10
  getGlobalMcpConfigPath(): string | null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/mcp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,WAAW;IACnD,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,sBAAsB,IAAI,MAAM,GAAG,IAAI;IAUvC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,MAAM;IA2B1D,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;QACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QACrC,QAAQ,EAAE,MAAM,EAAE,CAAC;KACrB;CA2CH"}
@@ -1,10 +1,10 @@
1
1
  import { platform } from 'node:os';
2
2
  import { getTransport } from '../../../mcp/normalize.js';
3
3
  /**
4
- * VS Code MCP strategy. VS Code uses `mcp.json` with a `servers` object (not `mcpServers`).
4
+ * GitHub Copilot MCP strategy. GitHub Copilot uses `mcp.json` with a `servers` object (not `mcpServers`).
5
5
  * Project-level config goes to `.vscode/mcp.json`.
6
6
  */
7
- export class VSCodeMcpStrategy {
7
+ export class CopilotMcpStrategy {
8
8
  isSupported() {
9
9
  return true;
10
10
  }
@@ -72,12 +72,12 @@ export class VSCodeMcpStrategy {
72
72
  };
73
73
  }
74
74
  else {
75
- warnings.push(`Skipping VS Code MCP server "${name}": unknown format`);
75
+ warnings.push(`Skipping GitHub Copilot MCP server "${name}": unknown format`);
76
76
  }
77
77
  }
78
78
  }
79
79
  catch (err) {
80
- warnings.push(`Failed to parse VS Code MCP config: ${err.message}`);
80
+ warnings.push(`Failed to parse GitHub Copilot MCP config: ${err.message}`);
81
81
  }
82
82
  return { mcp, warnings };
83
83
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAC5B,WAAW;QACR,OAAO,IAAI,CAAC;IACf,CAAC;IAED,aAAa;QACV,OAAO,UAAU,CAAC;IACrB,CAAC;IAED,sBAAsB;QACnB,MAAM,KAAK,GAA2B;YACnC,MAAM,EAAE,gDAAgD;YACxD,KAAK,EAAE,4BAA4B;YACnC,KAAK,EAAE,oCAAoC;SAC7C,CAAC;QAEF,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC;IACpC,CAAC;IAED,YAAY,CAAC,GAAoC;QAC9C,MAAM,OAAO,GAA4B,EAAE,CAAC;QAE5C,KAAK,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACtD,IAAI,YAAY,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;gBAClC,SAAS;YACZ,CAAC;Y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4
+ * GitHub Copilot prompts strategy. Uses markdown files with YAML frontmatter in `.github/prompts/`.
5
+ * Files use `.prompt.md` extension. Supports `description` and `argument-hint` frontmatter fields.
6
+ */
7
+ export declare class CopilotPromptsStrategy implements PromptsStrategy {
8
+ isSupported(): boolean;
9
+ getPromptsDir(): string;
10
+ getFileExtension(): string;
11
+ getGlobalPromptsPath(): string | null;
12
+ formatPrompt(prompt: EditorPrompt): string;
13
+ parseGlobalPrompts(files: string[], readFile: (filename: string) => Promise<string>): Promise<{
14
+ prompts: Record<string, string>;
15
+ warnings: string[];
16
+ }>;
17
+ /**
18
+ * Detect if content appears to be in GitHub Copilot's prompt frontmatter format.
19
+ * GitHub Copilot prompts use `mode:` or `tools:` fields.
20
+ */
21
+ detectFormat(content: string): boolean;
22
+ /**
23
+ * Parse GitHub Copilot-specific frontmatter into unified format.
24
+ * Extracts `description` and `argument-hint` fields.
25
+ */
26
+ parseFrontmatter(rawContent: string): ParsedPromptFrontmatter;
27
+ }
28
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/prompts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG5E;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC3D,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAKvB,gBAAgB,IAAI,MAAM;IAI1B,oBAAoB,IAAI,MAAM,GAAG,IAAI;IAUrC,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM;IAyBpC,kBAAkB,CACrB,KAAK,EAAE,MAAM,EAAE,EACf,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAC/C,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAiDnE;;;OAGG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IActC;;;OAGG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,uBAAuB;CAiB/D"}
@@ -1,15 +1,16 @@
1
1
  import pMap from 'p-map';
2
2
  import { platform } from 'node:os';
3
+ import { extractFrontmatter, parseYamlValue } from '../../../frontmatter-utils.js';
3
4
  /**
4
- * VS Code prompts strategy. Uses markdown files with YAML frontmatter in `.github/prompts/`.
5
+ * GitHub Copilot prompts strategy. Uses markdown files with YAML frontmatter in `.github/prompts/`.
5
6
  * Files use `.prompt.md` extension. Supports `description` and `argument-hint` frontmatter fields.
6
7
  */
7
- export class VSCodePromptsStrategy {
8
+ export class CopilotPromptsStrategy {
8
9
  isSupported() {
9
10
  return true;
10
11
  }
11
12
  getPromptsDir() {
12
- // VS Code prompt files go in .github/prompts/, not in .vscode/
13
+ // GitHub Copilot prompt files go in .github/prompts/, not in .vscode/
13
14
  return '../.github/prompts';
14
15
  }
15
16
  getFileExtension() {
@@ -77,5 +78,33 @@ export class VSCodePromptsStrategy {
77
78
  }
78
79
  return { prompts, warnings };
79
80
  }
81
+ /**
82
+ * Detect if content appears to be in GitHub Copilot's prompt frontmatter format.
83
+ * GitHub Copilot prompts use `mode:` or `tools:` fields.
84
+ */
85
+ detectFormat(content) {
86
+ const { frontmatter, hasFrontmatter } = extractFrontmatter(content);
87
+ if (!hasFrontmatter) {
88
+ return false;
89
+ }
90
+ const lines = frontmatter.split('\n'), hasMode = parseYamlValue(lines, 'mode') !== undefined, hasTools = parseYamlValue(lines, 'tools') !== undefined;
91
+ return hasMode || hasTools;
92
+ }
93
+ /**
94
+ * Parse GitHub Copilot-specific frontmatter into unified format.
95
+ * Extracts `description` and `argument-hint` fields.
96
+ */
97
+ parseFrontmatter(rawContent) {
98
+ const { frontmatter, content, hasFrontmatter } = extractFrontmatter(rawContent);
99
+ if (!hasFrontmatter) {
100
+ return { content: rawContent };
101
+ }
102
+ const lines = frontmatter.split('\n'), description = parseYamlValue(lines, 'description'), argumentHint = parseYamlValue(lines, 'argument-hint');
103
+ return {
104
+ content,
105
+ description,
106
+ argumentHint,
107
+ };
108
+ }
80
109
  }
81
110
  //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,OAAO,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEnF;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAChC,WAAW;QACR,OAAO,IAAI,CAAC;IACf,CAAC;IAED,aAAa;QACV,sEAAsE;QACtE,OAAO,oBAAoB,CAAC;IAC/B,CAAC;IAED,gBAAgB;QACb,OAAO,YAAY,CAAC;IACvB,CAAC;IAED,oBAAoB;QACjB,MAAM,KAAK,GAA2B;YACnC,MAAM,EAAE,+CAA+C;YACvD,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE,mCAAmC;SAC5C,CAAC;QAEF,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC;IACpC,CAAC;IAED,YAAY,CAAC,MAAoB;QAC9B,MAAM,WAAW,GAA2B,EAAE,CAAC;QAE/C,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACtB,WAAW,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAChD,CAAC;QAED,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;YACvB,WAAW,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;QACtD,CAAC;QAED,MAAM,KAAK,GAAa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AC,cAAc,EAAE,CAAC;YACnB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;QAClC,CAAC;QAED,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,EAC/B,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,aAAa,CAAuB,EACxE,YAAY,GAAG,cAAc,CAAC,KAAK,EAAE,eAAe,CAAuB,CAAC;QAElF,OAAO;YACJ,OAAO;YACP,WAAW;YACX,YAAY;SACd,CAAC;IACL,CAAC;CACH"}
@@ -1,10 +1,10 @@
1
1
  import type { RulesStrategy } from '../types.js';
2
2
  import type { EditorRule } from '../../types.js';
3
3
  /**
4
- * VS Code (GitHub Copilot) rules strategy. Uses `.instructions.md` files with YAML frontmatter
4
+ * GitHub Copilot rules strategy. Uses `.instructions.md` files with YAML frontmatter
5
5
  * containing an `applyTo` field for glob patterns. Rules go to `.github/instructions/` directory.
6
6
  */
7
- export declare class VSCodeRulesStrategy implements RulesStrategy {
7
+ export declare class CopilotRulesStrategy implements RulesStrategy {
8
8
  getRulesDir(): string;
9
9
  getFileExtension(): string;
10
10
  getGlobalRulesPath(): string | null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,aAAa;IACvD,WAAW,IAAI,MAAM;IAKrB,gBAAgB,IAAI,MAAM;IAI1B,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAKnC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE;IAI3E,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;CAqBtC"}
@@ -1,8 +1,8 @@
1
1
  /**
2
- * VS Code (GitHub Copilot) rules strategy. Uses `.instructions.md` files with YAML frontmatter
2
+ * GitHub Copilot rules strategy. Uses `.instructions.md` files with YAML frontmatter
3
3
  * containing an `applyTo` field for glob patterns. Rules go to `.github/instructions/` directory.
4
4
  */
5
- export class VSCodeRulesStrategy {
5
+ export class CopilotRulesStrategy {
6
6
  getRulesDir() {
7
7
  // Rules go to .github/instructions/, not .vscode/
8
8
  return '../.github/instructions';
@@ -11,7 +11,7 @@ export class VSCodeRulesStrategy {
11
11
  return '.instructions.md';
12
12
  }
13
13
  getGlobalRulesPath() {
14
- // VS Code doesn't have global rules file
14
+ // GitHub Copilot doesn't have global rules file
15
15
  return null;
16
16
  }
17
17
  parseGlobalRules(_content) {
@@ -19,10 +19,10 @@ export class VSCodeRulesStrategy {
19
19
  }
20
20
  formatRule(rule) {
21
21
  const lines = [];
22
- // VS Code uses applyTo for glob patterns, otherwise rules apply to all files
22
+ // GitHub Copilot uses applyTo for glob patterns, otherwise rules apply to all files
23
23
  if (rule.activation.type === 'glob' && rule.activation.globs?.length) {
24
24
  lines.push('---');
25
- // VS Code expects a single glob pattern string
25
+ // GitHub Copilot expects a single glob pattern string
26
26
  lines.push(`applyTo: "${rule.activation.globs.join(', ')}"`);
27
27
  lines.push('---', '');
28
28
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/editors/strategies/copilot/rules.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAC9B,WAAW;QACR,kDAAkD;QAClD,OAAO,yBAAyB,CAAC;IACpC,CAAC;IAED,gBAAgB;QACb,OAAO,kBAAkB,CAAC;IAC7B,CAAC;IAED,kBAAkB;QACf,gDAAgD;QAChD,OAAO,IAAI,CAAC;IACf,CAAC;IAED,gBAAgB,CAAC,QAAgB;QAC9B,OAAO,EAAE,KAAK,EAAE,EAAE,E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AAE,WAAW,GAAG,MAAM,EAAE;IAIlD,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM;CAoB1C"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/cursor/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAsCjD;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACtD,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE;IAIlD,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM;CAqB1C"}
@@ -2,6 +2,11 @@
2
2
  * Map from generic ai.json hook events to Cursor's camelCase event names.
3
3
  */
4
4
  const EVENT_MAP = {
5
+ session_start: 'sessionStart',
6
+ session_end: 'sessionEnd',
7
+ pre_tool_use: 'preToolUse',
8
+ post_tool_use: 'postToolUse',
9
+ pre_file_read: 'beforeReadFile',
5
10
  pre_command: 'beforeShellExecution',
6
11
  post_command: 'afterShellExecution',
7
12
  pre_mcp_tool: 'beforeMCPExecution',
@@ -14,6 +19,11 @@ const EVENT_MAP = {
14
19
  * Events that Cursor supports.
15
20
  */
16
21
  const SUPPORTED_EVENTS = new Set([
22
+ 'session_start',
23
+ 'session_end',
24
+ 'pre_tool_use',
25
+ 'post_tool_use',
26
+ 'pre_file_read',
17
27
  'pre_command',
18
28
  'post_command',
19
29
  'pre_mcp_tool',
@@ -45,6 +55,7 @@ export class CursorHooksStrategy {
45
55
  }
46
56
  cursorHooks[cursorEvent] = matchers.flatMap((matcher) => matcher.hooks.map((hook) => ({
47
57
  command: hook.command,
58
+ ...(matcher.matcher && { matcher: matcher.matcher }),
48
59
  ...(hook.timeout && { timeout: hook.timeout }),
49
60
  })));
50
61
  }
@@ -1 +1 @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C,CAAC;gBAC1B,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;aAChD,CAAC,CAAC,CACL,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IACjE,CAAC;CACH"}
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/editors/strategies/cursor/hooks.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,SAAS,GAA2B;IACvC,aAAa,EAAE,cAAc;IAC7B,WAAW,EAAE,YAAY;IACzB,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,gBAAgB;IAC/B,WAAW,EAAE,sBAAsB;IACnC,YAAY,EAAE,qBAAqB;IACnC,YAAY,EAAE,oBAAoB;IAClC,aAAa,EAAE,mBAAmB;IAClC,eAAe,EAAE,eAAe;IAChC,UAAU,EAAE,oBAAoB;IAChC,UAAU,EAAE,MAAM;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC9B,eAAe;IACf,aAAa;IACb,cAAc;IACd,eAAe;IACf,eAAe;IACf,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,YAAY;IACZ,YAAY;CACd,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAC7B,WAAW;QACR,OAAO,IAAI,CAAC;IACf,CAAC;IAED,aAAa;QACV,OAAO,YAAY,CAAC;IACvB,CAAC;IAED,oBAAoB,CAAC,KAAkB;QACpC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,YAAY,CAAC,KAAkB;QAC5B,MAAM,WAAW,GAA8B,EAAE,CAAC;QAElD,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACrD,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;YAErC,IAAI,CAAC,WAAW,EAAE,CAAC;gBAChB,SAAS;YACZ,CAAC;YAED,WAAW,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAoB,EAAE,EAAE,CAClE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBAC1B,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;gBACpD,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;aAChD,CAAC,CAAC,CACL,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IACjE,CAAC;CACH"}
@@ -1,4 +1,4 @@
1
- import type { RulesStrategy } from '../types.js';
1
+ import type { ParsedRuleFrontmatter, RulesStrategy } from '../types.js';
2
2
  import type { EditorRule } from '../../types.js';
3
3
  /**
4
4
  * Cursor rules strategy. Uses `.mdc` files (Markdown with YAML frontmatter) containing
@@ -13,5 +13,18 @@ export declare class CursorRulesStrategy implements RulesStrategy {
13
13
  rules: string[];
14
14
  warnings: string[];
15
15
  };
16
+ /**
17
+ * Detect if content appears to be in Cursor's frontmatter format.
18
+ * Cursor uses `alwaysApply:` field in frontmatter.
19
+ */
20
+ detectFormat(content: string): boolean;
21
+ /**
22
+ * Parse Cursor-specific frontmatter into unified format.
23
+ * - `alwaysApply: true` → `activation: 'always'`
24
+ * - `alwaysApply: false` + `globs:` → `activation: 'glob'`
25
+ * - `alwaysApply: false` + `description:` (no globs) → `activation: 'auto'`
26
+ * - `alwaysApply: false` (no globs, no description) → `activation: 'manual'`
27
+ */
28
+ parseFrontmatter(rawContent: string): ParsedRuleFrontmatter;
16
29
  }
17
30
  //# sourceMappingURL=rules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/cursor/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACtD,WAAW,IAAI,MAAM;IAIrB,gBAAgB,IAAI,MAAM;IAI1B,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAKnC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;IA6BpC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE;CAG7E"}
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/cursor/rules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACtD,WAAW,IAAI,MAAM;IAIrB,gBAAgB,IAAI,MAAM;IAI1B,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAKnC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;IAqBpC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE;IAI3E;;;OAGG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAYtC;;;;;;OAMG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB;CAqC7D"}
@@ -1,3 +1,4 @@
1
+ import { extractFrontmatter, parseYamlValue } from '../../../frontmatter-utils.js';
1
2
  /**
2
3
  * Cursor rules strategy. Uses `.mdc` files (Markdown with YAML frontmatter) containing
3
4
  * `alwaysApply`, `globs`, and `description` fields.
@@ -26,16 +27,61 @@ export class CursorRulesStrategy {
26
27
  // alwaysApply is true for 'always' activation, false otherwise
27
28
  lines.push(`alwaysApply: ${rule.activation.type === 'always'}`);
28
29
  lines.push('---', '');
29
- // Include rule name as heading for context, but only if content doesn't already start with one
30
- const contentStartsWithHeading = /^#\s/.test(rule.content.trim());
31
- if (rule.name && !contentStartsWithHeading) {
32
- lines.push(`# ${rule.name}`, '');
33
- }
34
30
  lines.push(rule.content);
35
31
  return lines.join('\n');
36
32
  }
37
33
  parseGlobalRules(_content) {
38
34
  return { rules: [], warnings: [] };
39
35
  }
36
+ /**
37
+ * Detect if content appears to be in Cursor's frontmatter format.
38
+ * Cursor uses `alwaysApply:` field in frontmatter.
39
+ */
40
+ detectFormat(content) {
41
+ const { frontmatter, hasFrontmatter } = extractFrontmatter(content);
42
+ if (!hasFrontmatter) {
43
+ return false;
44
+ }
45
+ const lines = frontmatter.split('\n');
46
+ return parseYamlValue(lines, 'alwaysApply') !== undefined;
47
+ }
48
+ /**
49
+ * Parse Cursor-specific frontmatter into unified format.
50
+ * - `alwaysApply: true` → `activation: 'always'`
51
+ * - `alwaysApply: false` + `globs:` → `activation: 'glob'`
52
+ * - `alwaysApply: false` + `description:` (no globs) → `activation: 'auto'`
53
+ * - `alwaysApply: false` (no globs, no description) → `activation: 'manual'`
54
+ */
55
+ parseFrontmatter(rawContent) {
56
+ const { frontmatter, content, hasFrontmatter } = extractFrontmatter(rawContent);
57
+ if (!hasFrontmatter) {
58
+ return { content: rawContent, metadata: {} };
59
+ }
60
+ const lines = frontmatter.split('\n'), alwaysApply = parseYamlValue(lines, 'alwaysApply'), description = parseYamlValue(lines, 'description'), globs = parseYamlValue(lines, 'globs');
61
+ // Parse globs (can be comma-separated string or array)
62
+ const globsArray = typeof globs === 'string' ? globs.split(',').map((g) => g.trim()) : globs;
63
+ // Determine activation mode based on Cursor's rules
64
+ let activation;
65
+ if (alwaysApply === true) {
66
+ activation = 'always';
67
+ }
68
+ else if (globsArray && globsArray.length > 0) {
69
+ activation = 'glob';
70
+ }
71
+ else if (description) {
72
+ activation = 'auto';
73
+ }
74
+ else if (alwaysApply === false) {
75
+ activation = 'manual';
76
+ }
77
+ return {
78
+ content,
79
+ metadata: {
80
+ activation,
81
+ description,
82
+ globs: globsArray,
83
+ },
84
+ };
85
+ }
40
86
  }
41
87
  //# sourceMappingURL=rules.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/editors/strategies/cursor/rules.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAC7B,WAAW;QACR,OAAO,OAAO,CAAC;IAClB,CAAC;IAED,gBAAgB;QACb,OAAO,MAAM,CAAC;IACjB,CAAC;IAED,kBAAkB;QACf,mEAAmE;QACnE,OAAO,IAAI,CAAC;IACf,CAAC;IAED,UAAU,CAAC,IAAgB;QACxB,MAAM,KAAK,GAAa,CAAC,KAAK,CAAC,CAAC;QAEhC,6BAA6B;QAC7B,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;YAC/B,KAAK,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,CAAC,CAAC;QAC/D,CAA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,EAAE;gBACP,UAAU;gBACV,WAAW;gBACX,KAAK,EAAE,UAAU;aACnB;SACH,CAAC;IACL,CAAC;CACH"}
@@ -3,7 +3,7 @@ export { NativeSkillsStrategy, PointerSkillsStrategy, StandardMcpStrategy, NoMcp
3
3
  export { WindsurfRulesStrategy, WindsurfPromptsStrategy, WindsurfMcpStrategy, } from './windsurf/index.js';
4
4
  export { CursorRulesStrategy, CursorPromptsStrategy } from './cursor/index.js';
5
5
  export { ClaudeCodeRulesStrategy, ClaudeCodeMcpStrategy, ClaudeCodePromptsStrategy, } from './claude-code/index.js';
6
- export { VSCodeRulesStrategy, VSCodeMcpStrategy, VSCodePromptsStrategy } from './vscode/index.js';
6
+ export { CopilotRulesStrategy, CopilotMcpStrategy, CopilotPromptsStrategy } from './copilot/index.js';
7
7
  export { ZedRulesStrategy, ZedMcpStrategy, ZedPromptsStrategy } from './zed/index.js';
8
8
  export { CodexRulesStrategy, CodexPromptsStrategy, CodexMcpStrategy } from './codex/index.js';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editors/strategies/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,kBAAkB,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACJ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACJ,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACJ,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editors/strategies/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,kBAAkB,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACJ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACJ,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACJ,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -4,7 +4,7 @@ export { NativeSkillsStrategy, PointerSkillsStrategy, StandardMcpStrategy, NoMcp
4
4
  export { WindsurfRulesStrategy, WindsurfPromptsStrategy, WindsurfMcpStrategy, } from './windsurf/index.js';
5
5
  export { CursorRulesStrategy, CursorPromptsStrategy } from './cursor/index.js';
6
6
  export { ClaudeCodeRulesStrategy, ClaudeCodeMcpStrategy, ClaudeCodePromptsStrategy, } from './claude-code/index.js';
7
- export { VSCodeRulesStrategy, VSCodeMcpStrategy, VSCodePromptsStrategy } from './vscode/index.js';
7
+ export { CopilotRulesStrategy, CopilotMcpStrategy, CopilotPromptsStrategy } from './copilot/index.js';
8
8
  export { ZedRulesStrategy, ZedMcpStrategy, ZedPromptsStrategy } from './zed/index.js';
9
9
  export { CodexRulesStrategy, CodexPromptsStrategy, CodexMcpStrategy } from './codex/index.js';
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/editors/strategies/index.ts"],"names":[],"mappings":"AAQA,+CAA+C;AAC/C,OAAO,EACJ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,6BAA6B;AAC7B,OAAO,EACJ,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACJ,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/editors/strategies/index.ts"],"names":[],"mappings":"AAQA,+CAA+C;AAC/C,OAAO,EACJ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,6BAA6B;AAC7B,OAAO,EACJ,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACJ,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -2,7 +2,7 @@ import type { ParsedSkill } from '@a1st/aix-schema';
2
2
  import type { SkillsStrategy, NativeSkillsConfig } from '../types.js';
3
3
  import type { EditorRule, FileChange } from '../../types.js';
4
4
  /**
5
- * Native skills strategy for editors that support Agent Skills natively (Claude Code, VS Code,
5
+ * Native skills strategy for editors that support Agent Skills natively (Claude Code, GitHub Copilot,
6
6
  * Cursor). Copies skills to `.aix/skills/` as the source of truth and creates symlinks from the
7
7
  * editor's skills directory.
8
8
  */
@@ -4,7 +4,7 @@ import { existsSync } from 'node:fs';
4
4
  import { join, dirname, relative } from 'pathe';
5
5
  import { safeRm } from '../../../fs/safe-rm.js';
6
6
  /**
7
- * Native skills strategy for editors that support Agent Skills natively (Claude Code, VS Code,
7
+ * Native skills strategy for editors that support Agent Skills natively (Claude Code, GitHub Copilot,
8
8
  * Cursor). Copies skills to `.aix/skills/` as the source of truth and creates symlinks from the
9
9
  * editor's skills directory.
10
10
  */
@@ -1,7 +1,7 @@
1
1
  import type { HooksConfig } from '@a1st/aix-schema';
2
2
  import type { HooksStrategy } from '../types.js';
3
3
  /**
4
- * No-op hooks strategy for editors that don't support hooks (VS Code, Zed, Codex).
4
+ * No-op hooks strategy for editors that don't support hooks (GitHub Copilot, Zed, Codex).
5
5
  * Returns unsupported for all hook events.
6
6
  */
7
7
  export declare class NoHooksStrategy implements HooksStrategy {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * No-op hooks strategy for editors that don't support hooks (VS Code, Zed, Codex).
2
+ * No-op hooks strategy for editors that don't support hooks (GitHub Copilot, Zed, Codex).
3
3
  * Returns unsupported for all hook events.
4
4
  */
5
5
  export class NoHooksStrategy {
@@ -1,7 +1,7 @@
1
1
  import type { McpServerConfig } from '@a1st/aix-schema';
2
2
  import type { McpStrategy } from '../types.js';
3
3
  /**
4
- * No-op MCP strategy for editors that don't support MCP (e.g., VS Code with GitHub Copilot).
4
+ * No-op MCP strategy for editors that don't support MCP (e.g., GitHub Copilot without MCP support).
5
5
  */
6
6
  export declare class NoMcpStrategy implements McpStrategy {
7
7
  isSupported(): boolean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * No-op MCP strategy for editors that don't support MCP (e.g., VS Code with GitHub Copilot).
2
+ * No-op MCP strategy for editors that don't support MCP (e.g., GitHub Copilot without MCP support).
3
3
  */
4
4
  export class NoMcpStrategy {
5
5
  isSupported() {
@@ -1,11 +1,13 @@
1
1
  import type { McpServerConfig } from '@a1st/aix-schema';
2
2
  import type { McpStrategy } from '../types.js';
3
3
  /**
4
- * Standard MCP strategy used by Cursor and Claude Code. Uses `mcp.json` with a `mcpServers` object.
4
+ * Standard MCP strategy used by Cursor. Uses `mcp.json` with a `mcpServers` object. Claude Code
5
+ * extends this with {@link ClaudeCodeMcpStrategy} for its `.mcp.json` (dot-prefixed) filename.
5
6
  */
6
7
  export declare class StandardMcpStrategy implements McpStrategy {
7
8
  isSupported(): boolean;
8
9
  getConfigPath(): string;
10
+ isProjectRootConfig(): boolean;
9
11
  getGlobalMcpConfigPath(): string | null;
10
12
  formatConfig(mcp: Record<string, McpServerConfig>): string;
11
13
  parseGlobalMcpConfig(content: string): {
@@ -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;;GAEG;AACH,qBAAa,mBAAoB,YAAW,WAAW;IACpD,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,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;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"}