@a1st/aix-core 0.0.3
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.
- package/dist/backup.d.ts +12 -0
- package/dist/backup.d.ts.map +1 -0
- package/dist/backup.js +70 -0
- package/dist/backup.js.map +1 -0
- package/dist/cache/cleanup.d.ts +14 -0
- package/dist/cache/cleanup.d.ts.map +1 -0
- package/dist/cache/cleanup.js +61 -0
- package/dist/cache/cleanup.js.map +1 -0
- package/dist/cache/clear.d.ts +10 -0
- package/dist/cache/clear.d.ts.map +1 -0
- package/dist/cache/clear.js +30 -0
- package/dist/cache/clear.js.map +1 -0
- package/dist/cache/index.d.ts +5 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +5 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/paths.d.ts +57 -0
- package/dist/cache/paths.d.ts.map +1 -0
- package/dist/cache/paths.js +86 -0
- package/dist/cache/paths.js.map +1 -0
- package/dist/cache/status.d.ts +21 -0
- package/dist/cache/status.d.ts.map +1 -0
- package/dist/cache/status.js +67 -0
- package/dist/cache/status.js.map +1 -0
- package/dist/discovery.d.ts +14 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +96 -0
- package/dist/discovery.js.map +1 -0
- package/dist/editors/adapters/base.d.ts +101 -0
- package/dist/editors/adapters/base.d.ts.map +1 -0
- package/dist/editors/adapters/base.js +399 -0
- package/dist/editors/adapters/base.js.map +1 -0
- package/dist/editors/adapters/claude-code.d.ts +27 -0
- package/dist/editors/adapters/claude-code.d.ts.map +1 -0
- package/dist/editors/adapters/claude-code.js +46 -0
- package/dist/editors/adapters/claude-code.js.map +1 -0
- package/dist/editors/adapters/codex.d.ts +30 -0
- package/dist/editors/adapters/codex.d.ts.map +1 -0
- package/dist/editors/adapters/codex.js +56 -0
- package/dist/editors/adapters/codex.js.map +1 -0
- package/dist/editors/adapters/cursor.d.ts +23 -0
- package/dist/editors/adapters/cursor.d.ts.map +1 -0
- package/dist/editors/adapters/cursor.js +39 -0
- package/dist/editors/adapters/cursor.js.map +1 -0
- package/dist/editors/adapters/index.d.ts +8 -0
- package/dist/editors/adapters/index.d.ts.map +1 -0
- package/dist/editors/adapters/index.js +8 -0
- package/dist/editors/adapters/index.js.map +1 -0
- package/dist/editors/adapters/vscode.d.ts +23 -0
- package/dist/editors/adapters/vscode.d.ts.map +1 -0
- package/dist/editors/adapters/vscode.js +36 -0
- package/dist/editors/adapters/vscode.js.map +1 -0
- package/dist/editors/adapters/windsurf.d.ts +23 -0
- package/dist/editors/adapters/windsurf.d.ts.map +1 -0
- package/dist/editors/adapters/windsurf.js +38 -0
- package/dist/editors/adapters/windsurf.js.map +1 -0
- package/dist/editors/adapters/zed.d.ts +29 -0
- package/dist/editors/adapters/zed.d.ts.map +1 -0
- package/dist/editors/adapters/zed.js +61 -0
- package/dist/editors/adapters/zed.js.map +1 -0
- package/dist/editors/import.d.ts +31 -0
- package/dist/editors/import.d.ts.map +1 -0
- package/dist/editors/import.js +271 -0
- package/dist/editors/import.js.map +1 -0
- package/dist/editors/index.d.ts +6 -0
- package/dist/editors/index.d.ts.map +1 -0
- package/dist/editors/index.js +4 -0
- package/dist/editors/index.js.map +1 -0
- package/dist/editors/install.d.ts +33 -0
- package/dist/editors/install.d.ts.map +1 -0
- package/dist/editors/install.js +186 -0
- package/dist/editors/install.js.map +1 -0
- package/dist/editors/strategies/claude-code/hooks.d.ts +13 -0
- package/dist/editors/strategies/claude-code/hooks.d.ts.map +1 -0
- package/dist/editors/strategies/claude-code/hooks.js +61 -0
- package/dist/editors/strategies/claude-code/hooks.js.map +1 -0
- package/dist/editors/strategies/claude-code/index.d.ts +5 -0
- package/dist/editors/strategies/claude-code/index.d.ts.map +1 -0
- package/dist/editors/strategies/claude-code/index.js +5 -0
- package/dist/editors/strategies/claude-code/index.js.map +1 -0
- package/dist/editors/strategies/claude-code/mcp.d.ts +10 -0
- package/dist/editors/strategies/claude-code/mcp.d.ts.map +1 -0
- package/dist/editors/strategies/claude-code/mcp.js +17 -0
- package/dist/editors/strategies/claude-code/mcp.js.map +1 -0
- package/dist/editors/strategies/claude-code/prompts.d.ts +18 -0
- package/dist/editors/strategies/claude-code/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/claude-code/prompts.js +42 -0
- package/dist/editors/strategies/claude-code/prompts.js.map +1 -0
- package/dist/editors/strategies/claude-code/rules.d.ts +17 -0
- package/dist/editors/strategies/claude-code/rules.d.ts.map +1 -0
- package/dist/editors/strategies/claude-code/rules.js +61 -0
- package/dist/editors/strategies/claude-code/rules.js.map +1 -0
- package/dist/editors/strategies/codex/index.d.ts +4 -0
- package/dist/editors/strategies/codex/index.d.ts.map +1 -0
- package/dist/editors/strategies/codex/index.js +4 -0
- package/dist/editors/strategies/codex/index.js.map +1 -0
- package/dist/editors/strategies/codex/mcp.d.ts +18 -0
- package/dist/editors/strategies/codex/mcp.d.ts.map +1 -0
- package/dist/editors/strategies/codex/mcp.js +93 -0
- package/dist/editors/strategies/codex/mcp.js.map +1 -0
- package/dist/editors/strategies/codex/prompts.d.ts +37 -0
- package/dist/editors/strategies/codex/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/codex/prompts.js +82 -0
- package/dist/editors/strategies/codex/prompts.js.map +1 -0
- package/dist/editors/strategies/codex/rules.d.ts +17 -0
- package/dist/editors/strategies/codex/rules.d.ts.map +1 -0
- package/dist/editors/strategies/codex/rules.js +35 -0
- package/dist/editors/strategies/codex/rules.js.map +1 -0
- package/dist/editors/strategies/cursor/hooks.d.ts +13 -0
- package/dist/editors/strategies/cursor/hooks.d.ts.map +1 -0
- package/dist/editors/strategies/cursor/hooks.js +54 -0
- package/dist/editors/strategies/cursor/hooks.js.map +1 -0
- package/dist/editors/strategies/cursor/index.d.ts +4 -0
- package/dist/editors/strategies/cursor/index.d.ts.map +1 -0
- package/dist/editors/strategies/cursor/index.js +4 -0
- package/dist/editors/strategies/cursor/index.js.map +1 -0
- package/dist/editors/strategies/cursor/prompts.d.ts +18 -0
- package/dist/editors/strategies/cursor/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/cursor/prompts.js +67 -0
- package/dist/editors/strategies/cursor/prompts.js.map +1 -0
- package/dist/editors/strategies/cursor/rules.d.ts +17 -0
- package/dist/editors/strategies/cursor/rules.d.ts.map +1 -0
- package/dist/editors/strategies/cursor/rules.js +41 -0
- package/dist/editors/strategies/cursor/rules.js.map +1 -0
- package/dist/editors/strategies/index.d.ts +9 -0
- package/dist/editors/strategies/index.d.ts.map +1 -0
- package/dist/editors/strategies/index.js +10 -0
- package/dist/editors/strategies/index.js.map +1 -0
- package/dist/editors/strategies/shared/global-mcp.d.ts +74 -0
- package/dist/editors/strategies/shared/global-mcp.d.ts.map +1 -0
- package/dist/editors/strategies/shared/global-mcp.js +85 -0
- package/dist/editors/strategies/shared/global-mcp.js.map +1 -0
- package/dist/editors/strategies/shared/index.d.ts +8 -0
- package/dist/editors/strategies/shared/index.d.ts.map +1 -0
- package/dist/editors/strategies/shared/index.js +8 -0
- package/dist/editors/strategies/shared/index.js.map +1 -0
- package/dist/editors/strategies/shared/native-skills.d.ts +19 -0
- package/dist/editors/strategies/shared/native-skills.d.ts.map +1 -0
- package/dist/editors/strategies/shared/native-skills.js +72 -0
- package/dist/editors/strategies/shared/native-skills.js.map +1 -0
- package/dist/editors/strategies/shared/no-hooks.d.ts +13 -0
- package/dist/editors/strategies/shared/no-hooks.d.ts.map +1 -0
- package/dist/editors/strategies/shared/no-hooks.js +19 -0
- package/dist/editors/strategies/shared/no-hooks.js.map +1 -0
- package/dist/editors/strategies/shared/no-mcp.d.ts +16 -0
- package/dist/editors/strategies/shared/no-mcp.d.ts.map +1 -0
- package/dist/editors/strategies/shared/no-mcp.js +21 -0
- package/dist/editors/strategies/shared/no-mcp.js.map +1 -0
- package/dist/editors/strategies/shared/no-prompts.d.ts +17 -0
- package/dist/editors/strategies/shared/no-prompts.d.ts.map +1 -0
- package/dist/editors/strategies/shared/no-prompts.js +24 -0
- package/dist/editors/strategies/shared/no-prompts.js.map +1 -0
- package/dist/editors/strategies/shared/pointer-skills.d.ts +17 -0
- package/dist/editors/strategies/shared/pointer-skills.d.ts.map +1 -0
- package/dist/editors/strategies/shared/pointer-skills.js +72 -0
- package/dist/editors/strategies/shared/pointer-skills.js.map +1 -0
- package/dist/editors/strategies/shared/standard-mcp.d.ts +16 -0
- package/dist/editors/strategies/shared/standard-mcp.d.ts.map +1 -0
- package/dist/editors/strategies/shared/standard-mcp.js +68 -0
- package/dist/editors/strategies/shared/standard-mcp.js.map +1 -0
- package/dist/editors/strategies/types.d.ts +126 -0
- package/dist/editors/strategies/types.d.ts.map +1 -0
- package/dist/editors/strategies/types.js +2 -0
- package/dist/editors/strategies/types.js.map +1 -0
- package/dist/editors/strategies/vscode/index.d.ts +4 -0
- package/dist/editors/strategies/vscode/index.d.ts.map +1 -0
- package/dist/editors/strategies/vscode/index.js +4 -0
- package/dist/editors/strategies/vscode/index.js.map +1 -0
- package/dist/editors/strategies/vscode/mcp.d.ts +17 -0
- package/dist/editors/strategies/vscode/mcp.d.ts.map +1 -0
- package/dist/editors/strategies/vscode/mcp.js +85 -0
- package/dist/editors/strategies/vscode/mcp.js.map +1 -0
- package/dist/editors/strategies/vscode/prompts.d.ts +18 -0
- package/dist/editors/strategies/vscode/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/vscode/prompts.js +81 -0
- package/dist/editors/strategies/vscode/prompts.js.map +1 -0
- package/dist/editors/strategies/vscode/rules.d.ts +17 -0
- package/dist/editors/strategies/vscode/rules.d.ts.map +1 -0
- package/dist/editors/strategies/vscode/rules.js +38 -0
- package/dist/editors/strategies/vscode/rules.js.map +1 -0
- package/dist/editors/strategies/windsurf/hooks.d.ts +13 -0
- package/dist/editors/strategies/windsurf/hooks.d.ts.map +1 -0
- package/dist/editors/strategies/windsurf/hooks.js +61 -0
- package/dist/editors/strategies/windsurf/hooks.js.map +1 -0
- package/dist/editors/strategies/windsurf/index.d.ts +6 -0
- package/dist/editors/strategies/windsurf/index.d.ts.map +1 -0
- package/dist/editors/strategies/windsurf/index.js +6 -0
- package/dist/editors/strategies/windsurf/index.js.map +1 -0
- package/dist/editors/strategies/windsurf/mcp.d.ts +8 -0
- package/dist/editors/strategies/windsurf/mcp.d.ts.map +1 -0
- package/dist/editors/strategies/windsurf/mcp.js +99 -0
- package/dist/editors/strategies/windsurf/mcp.js.map +1 -0
- package/dist/editors/strategies/windsurf/prompts.d.ts +18 -0
- package/dist/editors/strategies/windsurf/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/windsurf/prompts.js +68 -0
- package/dist/editors/strategies/windsurf/prompts.js.map +1 -0
- package/dist/editors/strategies/windsurf/rules.d.ts +17 -0
- package/dist/editors/strategies/windsurf/rules.d.ts.map +1 -0
- package/dist/editors/strategies/windsurf/rules.js +55 -0
- package/dist/editors/strategies/windsurf/rules.js.map +1 -0
- package/dist/editors/strategies/windsurf/skills.d.ts +9 -0
- package/dist/editors/strategies/windsurf/skills.d.ts.map +1 -0
- package/dist/editors/strategies/windsurf/skills.js +11 -0
- package/dist/editors/strategies/windsurf/skills.js.map +1 -0
- package/dist/editors/strategies/zed/index.d.ts +4 -0
- package/dist/editors/strategies/zed/index.d.ts.map +1 -0
- package/dist/editors/strategies/zed/index.js +4 -0
- package/dist/editors/strategies/zed/index.js.map +1 -0
- package/dist/editors/strategies/zed/mcp.d.ts +17 -0
- package/dist/editors/strategies/zed/mcp.d.ts.map +1 -0
- package/dist/editors/strategies/zed/mcp.js +68 -0
- package/dist/editors/strategies/zed/mcp.js.map +1 -0
- package/dist/editors/strategies/zed/prompts.d.ts +18 -0
- package/dist/editors/strategies/zed/prompts.d.ts.map +1 -0
- package/dist/editors/strategies/zed/prompts.js +25 -0
- package/dist/editors/strategies/zed/prompts.js.map +1 -0
- package/dist/editors/strategies/zed/rules.d.ts +17 -0
- package/dist/editors/strategies/zed/rules.d.ts.map +1 -0
- package/dist/editors/strategies/zed/rules.js +33 -0
- package/dist/editors/strategies/zed/rules.js.map +1 -0
- package/dist/editors/types.d.ts +164 -0
- package/dist/editors/types.d.ts.map +1 -0
- package/dist/editors/types.js +2 -0
- package/dist/editors/types.js.map +1 -0
- package/dist/env/ci.d.ts +6 -0
- package/dist/env/ci.d.ts.map +1 -0
- package/dist/env/ci.js +22 -0
- package/dist/env/ci.js.map +1 -0
- package/dist/env/index.d.ts +2 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +2 -0
- package/dist/env/index.js.map +1 -0
- package/dist/errors.d.ts +44 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +68 -0
- package/dist/errors.js.map +1 -0
- package/dist/format-error.d.ts +18 -0
- package/dist/format-error.d.ts.map +1 -0
- package/dist/format-error.js +113 -0
- package/dist/format-error.js.map +1 -0
- package/dist/fs/safe-rm.d.ts +20 -0
- package/dist/fs/safe-rm.d.ts.map +1 -0
- package/dist/fs/safe-rm.js +129 -0
- package/dist/fs/safe-rm.js.map +1 -0
- package/dist/git-loader.d.ts +21 -0
- package/dist/git-loader.d.ts.map +1 -0
- package/dist/git-loader.js +61 -0
- package/dist/git-loader.js.map +1 -0
- package/dist/global/comparison.d.ts +16 -0
- package/dist/global/comparison.d.ts.map +1 -0
- package/dist/global/comparison.js +52 -0
- package/dist/global/comparison.js.map +1 -0
- package/dist/global/index.d.ts +5 -0
- package/dist/global/index.d.ts.map +1 -0
- package/dist/global/index.js +4 -0
- package/dist/global/index.js.map +1 -0
- package/dist/global/processor.d.ts +26 -0
- package/dist/global/processor.d.ts.map +1 -0
- package/dist/global/processor.js +318 -0
- package/dist/global/processor.js.map +1 -0
- package/dist/global/tracking.d.ts +109 -0
- package/dist/global/tracking.d.ts.map +1 -0
- package/dist/global/tracking.js +193 -0
- package/dist/global/tracking.js.map +1 -0
- package/dist/global/types.d.ts +54 -0
- package/dist/global/types.d.ts.map +1 -0
- package/dist/global/types.js +2 -0
- package/dist/global/types.js.map +1 -0
- package/dist/import-writer.d.ts +37 -0
- package/dist/import-writer.d.ts.map +1 -0
- package/dist/import-writer.js +129 -0
- package/dist/import-writer.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/inheritance.d.ts +9 -0
- package/dist/inheritance.d.ts.map +1 -0
- package/dist/inheritance.js +133 -0
- package/dist/inheritance.js.map +1 -0
- package/dist/json.d.ts +75 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +123 -0
- package/dist/json.js.map +1 -0
- package/dist/loader.d.ts +35 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +147 -0
- package/dist/loader.js.map +1 -0
- package/dist/mcp/env.d.ts +28 -0
- package/dist/mcp/env.d.ts.map +1 -0
- package/dist/mcp/env.js +47 -0
- package/dist/mcp/env.js.map +1 -0
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +4 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/normalize.d.ts +33 -0
- package/dist/mcp/normalize.d.ts.map +1 -0
- package/dist/mcp/normalize.js +29 -0
- package/dist/mcp/normalize.js.map +1 -0
- package/dist/mcp/templates.d.ts +18 -0
- package/dist/mcp/templates.d.ts.map +1 -0
- package/dist/mcp/templates.js +66 -0
- package/dist/mcp/templates.js.map +1 -0
- package/dist/merge.d.ts +29 -0
- package/dist/merge.d.ts.map +1 -0
- package/dist/merge.js +154 -0
- package/dist/merge.js.map +1 -0
- package/dist/npm/index.d.ts +2 -0
- package/dist/npm/index.d.ts.map +1 -0
- package/dist/npm/index.js +2 -0
- package/dist/npm/index.js.map +1 -0
- package/dist/npm/resolve.d.ts +16 -0
- package/dist/npm/resolve.d.ts.map +1 -0
- package/dist/npm/resolve.js +42 -0
- package/dist/npm/resolve.js.map +1 -0
- package/dist/prompts/index.d.ts +2 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +2 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/loader.d.ts +23 -0
- package/dist/prompts/loader.d.ts.map +1 -0
- package/dist/prompts/loader.js +115 -0
- package/dist/prompts/loader.js.map +1 -0
- package/dist/remote-loader.d.ts +29 -0
- package/dist/remote-loader.d.ts.map +1 -0
- package/dist/remote-loader.js +208 -0
- package/dist/remote-loader.js.map +1 -0
- package/dist/rules/index.d.ts +6 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +6 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/interpolate.d.ts +27 -0
- package/dist/rules/interpolate.d.ts.map +1 -0
- package/dist/rules/interpolate.js +48 -0
- package/dist/rules/interpolate.js.map +1 -0
- package/dist/rules/loader.d.ts +27 -0
- package/dist/rules/loader.d.ts.map +1 -0
- package/dist/rules/loader.js +94 -0
- package/dist/rules/loader.js.map +1 -0
- package/dist/rules/merger.d.ts +37 -0
- package/dist/rules/merger.d.ts.map +1 -0
- package/dist/rules/merger.js +93 -0
- package/dist/rules/merger.js.map +1 -0
- package/dist/rules/skill-rules.d.ts +13 -0
- package/dist/rules/skill-rules.d.ts.map +1 -0
- package/dist/rules/skill-rules.js +70 -0
- package/dist/rules/skill-rules.js.map +1 -0
- package/dist/rules/utils.d.ts +36 -0
- package/dist/rules/utils.d.ts.map +1 -0
- package/dist/rules/utils.js +82 -0
- package/dist/rules/utils.js.map +1 -0
- package/dist/skills/cache.d.ts +10 -0
- package/dist/skills/cache.d.ts.map +1 -0
- package/dist/skills/cache.js +20 -0
- package/dist/skills/cache.js.map +1 -0
- package/dist/skills/index.d.ts +9 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +9 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/parser.d.ts +6 -0
- package/dist/skills/parser.d.ts.map +1 -0
- package/dist/skills/parser.js +28 -0
- package/dist/skills/parser.js.map +1 -0
- package/dist/skills/reference-parser.d.ts +23 -0
- package/dist/skills/reference-parser.d.ts.map +1 -0
- package/dist/skills/reference-parser.js +162 -0
- package/dist/skills/reference-parser.js.map +1 -0
- package/dist/skills/resolve.d.ts +21 -0
- package/dist/skills/resolve.d.ts.map +1 -0
- package/dist/skills/resolve.js +43 -0
- package/dist/skills/resolve.js.map +1 -0
- package/dist/skills/resolvers/git.d.ts +8 -0
- package/dist/skills/resolvers/git.d.ts.map +1 -0
- package/dist/skills/resolvers/git.js +43 -0
- package/dist/skills/resolvers/git.js.map +1 -0
- package/dist/skills/resolvers/local.d.ts +7 -0
- package/dist/skills/resolvers/local.d.ts.map +1 -0
- package/dist/skills/resolvers/local.js +16 -0
- package/dist/skills/resolvers/local.js.map +1 -0
- package/dist/skills/resolvers/npm.d.ts +12 -0
- package/dist/skills/resolvers/npm.d.ts.map +1 -0
- package/dist/skills/resolvers/npm.js +28 -0
- package/dist/skills/resolvers/npm.js.map +1 -0
- package/dist/skills/validate.d.ts +11 -0
- package/dist/skills/validate.d.ts.map +1 -0
- package/dist/skills/validate.js +43 -0
- package/dist/skills/validate.js.map +1 -0
- package/dist/updater.d.ts +23 -0
- package/dist/updater.d.ts.map +1 -0
- package/dist/updater.js +100 -0
- package/dist/updater.js.map +1 -0
- package/dist/url-parsing.d.ts +121 -0
- package/dist/url-parsing.d.ts.map +1 -0
- package/dist/url-parsing.js +199 -0
- package/dist/url-parsing.js.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EditorPrompt } from '../../types.js';
|
|
2
|
+
import type { PromptsStrategy } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Cursor prompts strategy. Uses plain markdown files in `.cursor/commands/`.
|
|
5
|
+
* Cursor commands don't support frontmatter - just plain markdown content.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CursorPromptsStrategy 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
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/cursor/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAC1D,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,gBAAgB,IAAI,MAAM;IAI1B,oBAAoB,IAAI,MAAM,GAAG,IAAI;IAIrC,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM;IAkBpC,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;CA8CrE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor prompts strategy. Uses plain markdown files in `.cursor/commands/`.
|
|
3
|
+
* Cursor commands don't support frontmatter - just plain markdown content.
|
|
4
|
+
*/
|
|
5
|
+
export class CursorPromptsStrategy {
|
|
6
|
+
isSupported() {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
getPromptsDir() {
|
|
10
|
+
return 'commands';
|
|
11
|
+
}
|
|
12
|
+
getFileExtension() {
|
|
13
|
+
return '.md';
|
|
14
|
+
}
|
|
15
|
+
getGlobalPromptsPath() {
|
|
16
|
+
return '.cursor/commands';
|
|
17
|
+
}
|
|
18
|
+
formatPrompt(prompt) {
|
|
19
|
+
const lines = [], contentStartsWithHeading = /^#\s/.test(prompt.content.trim());
|
|
20
|
+
// Only add heading if content doesn't already start with one
|
|
21
|
+
if (!contentStartsWithHeading) {
|
|
22
|
+
lines.push(`# ${prompt.name}`, '');
|
|
23
|
+
}
|
|
24
|
+
// Include description as a paragraph if present (only if we added a heading)
|
|
25
|
+
if (prompt.description && !contentStartsWithHeading) {
|
|
26
|
+
lines.push(prompt.description, '');
|
|
27
|
+
}
|
|
28
|
+
lines.push(prompt.content);
|
|
29
|
+
return lines.join('\n');
|
|
30
|
+
}
|
|
31
|
+
async parseGlobalPrompts(files, readFile) {
|
|
32
|
+
const mdFiles = files.filter((f) => f.endsWith('.md'));
|
|
33
|
+
const results = await Promise.all(mdFiles.map(async (file) => {
|
|
34
|
+
try {
|
|
35
|
+
const content = await readFile(file);
|
|
36
|
+
if (content.trim()) {
|
|
37
|
+
return {
|
|
38
|
+
type: 'prompt',
|
|
39
|
+
name: file.replace(/\.md$/, ''),
|
|
40
|
+
content: content.trim(),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
return {
|
|
47
|
+
type: 'warning',
|
|
48
|
+
message: `Failed to read prompt ${file}: ${err.message}`,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
const prompts = {}, warnings = [];
|
|
53
|
+
for (const result of results) {
|
|
54
|
+
if (!result) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (result.type === 'warning') {
|
|
58
|
+
warnings.push(result.message);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
prompts[result.name] = result.content;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return { prompts, warnings };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../src/editors/strategies/cursor/prompts.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAC/B,WAAW;QACR,OAAO,IAAI,CAAC;IACf,CAAC;IAED,aAAa;QACV,OAAO,UAAU,CAAC;IACrB,CAAC;IAED,gBAAgB;QACb,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,oBAAoB;QACjB,OAAO,kBAAkB,CAAC;IAC7B,CAAC;IAED,YAAY,CAAC,MAAoB;QAC9B,MAAM,KAAK,GAAa,EAAE,EACpB,wBAAwB,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAEpE,6DAA6D;QAC7D,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC;QAED,6EAA6E;QAC7E,IAAI,MAAM,CAAC,WAAW,IAAI,CAAC,wBAAwB,EAAE,CAAC;YACnD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,kBAAkB,CACrB,KAAe,EACf,QAA+C;QAE/C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAOvD,MAAM,OAAO,GAAkB,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.mdc` files (Markdown with YAML frontmatter) containing
|
|
5
|
+
* `alwaysApply`, `globs`, and `description` fields.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CursorRulesStrategy implements RulesStrategy {
|
|
8
|
+
getRulesDir(): string;
|
|
9
|
+
getFileExtension(): string;
|
|
10
|
+
getGlobalRulesPath(): string | null;
|
|
11
|
+
formatRule(rule: EditorRule): string;
|
|
12
|
+
parseGlobalRules(_content: string): {
|
|
13
|
+
rules: string[];
|
|
14
|
+
warnings: string[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor rules strategy. Uses `.mdc` files (Markdown with YAML frontmatter) containing
|
|
3
|
+
* `alwaysApply`, `globs`, and `description` fields.
|
|
4
|
+
*/
|
|
5
|
+
export class CursorRulesStrategy {
|
|
6
|
+
getRulesDir() {
|
|
7
|
+
return 'rules';
|
|
8
|
+
}
|
|
9
|
+
getFileExtension() {
|
|
10
|
+
return '.mdc';
|
|
11
|
+
}
|
|
12
|
+
getGlobalRulesPath() {
|
|
13
|
+
// Cursor stores user rules in Settings UI, not accessible via file
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
formatRule(rule) {
|
|
17
|
+
const lines = ['---'];
|
|
18
|
+
// Add description if present
|
|
19
|
+
if (rule.activation.description) {
|
|
20
|
+
lines.push(`description: "${rule.activation.description}"`);
|
|
21
|
+
}
|
|
22
|
+
// Add globs for glob activation mode
|
|
23
|
+
if (rule.activation.type === 'glob' && rule.activation.globs?.length) {
|
|
24
|
+
lines.push(`globs: ${rule.activation.globs.join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
// alwaysApply is true for 'always' activation, false otherwise
|
|
27
|
+
lines.push(`alwaysApply: ${rule.activation.type === 'always'}`);
|
|
28
|
+
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
|
+
lines.push(rule.content);
|
|
35
|
+
return lines.join('\n');
|
|
36
|
+
}
|
|
37
|
+
parseGlobalRules(_content) {
|
|
38
|
+
return { rules: [], warnings: [] };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +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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, } from './types.js';
|
|
2
|
+
export { NativeSkillsStrategy, PointerSkillsStrategy, StandardMcpStrategy, NoMcpStrategy, NoPromptsStrategy, GlobalMcpStrategy, } from './shared/index.js';
|
|
3
|
+
export { WindsurfRulesStrategy, WindsurfPromptsStrategy, WindsurfMcpStrategy, } from './windsurf/index.js';
|
|
4
|
+
export { CursorRulesStrategy, CursorPromptsStrategy } from './cursor/index.js';
|
|
5
|
+
export { ClaudeCodeRulesStrategy, ClaudeCodeMcpStrategy, ClaudeCodePromptsStrategy, } from './claude-code/index.js';
|
|
6
|
+
export { VSCodeRulesStrategy, VSCodeMcpStrategy, VSCodePromptsStrategy } from './vscode/index.js';
|
|
7
|
+
export { ZedRulesStrategy, ZedMcpStrategy, ZedPromptsStrategy } from './zed/index.js';
|
|
8
|
+
export { CodexRulesStrategy, CodexPromptsStrategy, CodexMcpStrategy } from './codex/index.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Shared strategies (used by multiple editors)
|
|
2
|
+
export { NativeSkillsStrategy, PointerSkillsStrategy, StandardMcpStrategy, NoMcpStrategy, NoPromptsStrategy, GlobalMcpStrategy, } from './shared/index.js';
|
|
3
|
+
// Editor-specific strategies
|
|
4
|
+
export { WindsurfRulesStrategy, WindsurfPromptsStrategy, WindsurfMcpStrategy, } from './windsurf/index.js';
|
|
5
|
+
export { CursorRulesStrategy, CursorPromptsStrategy } from './cursor/index.js';
|
|
6
|
+
export { ClaudeCodeRulesStrategy, ClaudeCodeMcpStrategy, ClaudeCodePromptsStrategy, } from './claude-code/index.js';
|
|
7
|
+
export { VSCodeRulesStrategy, VSCodeMcpStrategy, VSCodePromptsStrategy } from './vscode/index.js';
|
|
8
|
+
export { ZedRulesStrategy, ZedMcpStrategy, ZedPromptsStrategy } from './zed/index.js';
|
|
9
|
+
export { CodexRulesStrategy, CodexPromptsStrategy, CodexMcpStrategy } from './codex/index.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { McpServerConfig } from '@a1st/aix-schema';
|
|
2
|
+
import type { McpStrategy } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for global-only MCP strategy.
|
|
5
|
+
*/
|
|
6
|
+
export interface GlobalMcpConfig {
|
|
7
|
+
/** Editor name (e.g., 'windsurf', 'codex') */
|
|
8
|
+
editor: string;
|
|
9
|
+
/** Path to global config file relative to home directory */
|
|
10
|
+
globalConfigPath: string;
|
|
11
|
+
/** Config file format */
|
|
12
|
+
format: 'json' | 'toml';
|
|
13
|
+
/** Function to format MCP config for this editor's format */
|
|
14
|
+
formatFn: (mcp: Record<string, McpServerConfig>) => string;
|
|
15
|
+
/** Function to parse existing global config */
|
|
16
|
+
parseFn: (content: string) => {
|
|
17
|
+
mcp: Record<string, McpServerConfig>;
|
|
18
|
+
warnings: string[];
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* MCP strategy for editors that only support global MCP configuration (Windsurf, Codex).
|
|
23
|
+
* This strategy marks MCP as supported but global-only, allowing the install flow to handle
|
|
24
|
+
* global config management with user confirmation.
|
|
25
|
+
*/
|
|
26
|
+
export declare class GlobalMcpStrategy implements McpStrategy {
|
|
27
|
+
private readonly config;
|
|
28
|
+
constructor(config: GlobalMcpConfig);
|
|
29
|
+
/**
|
|
30
|
+
* Returns true because MCP IS supported, just globally. The install flow checks
|
|
31
|
+
* isGlobalOnly() to determine if special handling is needed.
|
|
32
|
+
*/
|
|
33
|
+
isSupported(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Returns true to indicate this editor only supports global MCP config.
|
|
36
|
+
*/
|
|
37
|
+
isGlobalOnly(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Returns empty string since there's no project-level config path.
|
|
40
|
+
*/
|
|
41
|
+
getConfigPath(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the global config path relative to home directory.
|
|
44
|
+
*/
|
|
45
|
+
getGlobalMcpConfigPath(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Get the absolute path to the global config file.
|
|
48
|
+
*/
|
|
49
|
+
getAbsoluteGlobalPath(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Format MCP config for this editor.
|
|
52
|
+
*/
|
|
53
|
+
formatConfig(mcp: Record<string, McpServerConfig>): string;
|
|
54
|
+
/**
|
|
55
|
+
* Parse existing global MCP config.
|
|
56
|
+
*/
|
|
57
|
+
parseGlobalMcpConfig(content: string): {
|
|
58
|
+
mcp: Record<string, McpServerConfig>;
|
|
59
|
+
warnings: string[];
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Read the current global config file.
|
|
63
|
+
*/
|
|
64
|
+
readGlobalConfig(): Promise<{
|
|
65
|
+
exists: boolean;
|
|
66
|
+
mcp: Record<string, McpServerConfig>;
|
|
67
|
+
warnings: string[];
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Get the editor name for this strategy.
|
|
71
|
+
*/
|
|
72
|
+
getEditor(): string;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=global-mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-mcp.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/global-mcp.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE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E,CAAC;KACrB,CAAC;IAqBF;;OAEG;IACH,SAAS,IAAI,MAAM;CAGrB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { join } from 'pathe';
|
|
5
|
+
/**
|
|
6
|
+
* MCP strategy for editors that only support global MCP configuration (Windsurf, Codex).
|
|
7
|
+
* This strategy marks MCP as supported but global-only, allowing the install flow to handle
|
|
8
|
+
* global config management with user confirmation.
|
|
9
|
+
*/
|
|
10
|
+
export class GlobalMcpStrategy {
|
|
11
|
+
config;
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this.config = config;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns true because MCP IS supported, just globally. The install flow checks
|
|
17
|
+
* isGlobalOnly() to determine if special handling is needed.
|
|
18
|
+
*/
|
|
19
|
+
isSupported() {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns true to indicate this editor only supports global MCP config.
|
|
24
|
+
*/
|
|
25
|
+
isGlobalOnly() {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns empty string since there's no project-level config path.
|
|
30
|
+
*/
|
|
31
|
+
getConfigPath() {
|
|
32
|
+
return '';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Returns the global config path relative to home directory.
|
|
36
|
+
*/
|
|
37
|
+
getGlobalMcpConfigPath() {
|
|
38
|
+
return this.config.globalConfigPath;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the absolute path to the global config file.
|
|
42
|
+
*/
|
|
43
|
+
getAbsoluteGlobalPath() {
|
|
44
|
+
return join(homedir(), this.config.globalConfigPath);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Format MCP config for this editor.
|
|
48
|
+
*/
|
|
49
|
+
formatConfig(mcp) {
|
|
50
|
+
return this.config.formatFn(mcp);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Parse existing global MCP config.
|
|
54
|
+
*/
|
|
55
|
+
parseGlobalMcpConfig(content) {
|
|
56
|
+
return this.config.parseFn(content);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Read the current global config file.
|
|
60
|
+
*/
|
|
61
|
+
async readGlobalConfig() {
|
|
62
|
+
const globalPath = this.getAbsoluteGlobalPath();
|
|
63
|
+
if (!existsSync(globalPath)) {
|
|
64
|
+
return { exists: false, mcp: {}, warnings: [] };
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
const content = await readFile(globalPath, 'utf-8'), { mcp, warnings } = this.parseGlobalMcpConfig(content);
|
|
68
|
+
return { exists: true, mcp, warnings };
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
return {
|
|
72
|
+
exists: true,
|
|
73
|
+
mcp: {},
|
|
74
|
+
warnings: [`Failed to read global config: ${error.message}`],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get the editor name for this strategy.
|
|
80
|
+
*/
|
|
81
|
+
getEditor() {
|
|
82
|
+
return this.config.editor;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=global-mcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-mcp.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/global-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAoB7B;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IACV,MAAM,CA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K,EAAE,CAAC;YACd,OAAO;gBACJ,MAAM,EAAE,IAAI;gBACZ,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,CAAC,iCAAkC,KAAe,CAAC,OAAO,EAAE,CAAC;aACzE,CAAC;QACL,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,SAAS;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC7B,CAAC;CACH"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { NativeSkillsStrategy } from './native-skills.js';
|
|
2
|
+
export { PointerSkillsStrategy } from './pointer-skills.js';
|
|
3
|
+
export { StandardMcpStrategy } from './standard-mcp.js';
|
|
4
|
+
export { NoMcpStrategy } from './no-mcp.js';
|
|
5
|
+
export { NoPromptsStrategy } from './no-prompts.js';
|
|
6
|
+
export { NoHooksStrategy } from './no-hooks.js';
|
|
7
|
+
export { GlobalMcpStrategy } from './global-mcp.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { NativeSkillsStrategy } from './native-skills.js';
|
|
2
|
+
export { PointerSkillsStrategy } from './pointer-skills.js';
|
|
3
|
+
export { StandardMcpStrategy } from './standard-mcp.js';
|
|
4
|
+
export { NoMcpStrategy } from './no-mcp.js';
|
|
5
|
+
export { NoPromptsStrategy } from './no-prompts.js';
|
|
6
|
+
export { NoHooksStrategy } from './no-hooks.js';
|
|
7
|
+
export { GlobalMcpStrategy } from './global-mcp.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ParsedSkill } from '@a1st/aix-schema';
|
|
2
|
+
import type { SkillsStrategy, NativeSkillsConfig } from '../types.js';
|
|
3
|
+
import type { EditorRule, FileChange } from '../../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Native skills strategy for editors that support Agent Skills natively (Claude Code, VS Code,
|
|
6
|
+
* Cursor). Copies skills to `.aix/skills/` as the source of truth and creates symlinks from the
|
|
7
|
+
* editor's skills directory.
|
|
8
|
+
*/
|
|
9
|
+
export declare class NativeSkillsStrategy implements SkillsStrategy {
|
|
10
|
+
private editorSkillsDir;
|
|
11
|
+
constructor(config: NativeSkillsConfig);
|
|
12
|
+
getSkillsDir(): string;
|
|
13
|
+
isNative(): boolean;
|
|
14
|
+
installSkills(skills: Map<string, ParsedSkill>, projectRoot: string, options?: {
|
|
15
|
+
dryRun?: boolean;
|
|
16
|
+
}): Promise<FileChange[]>;
|
|
17
|
+
generateSkillRules(_skills: Map<string, ParsedSkill>): EditorRule[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=native-skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-skills.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/native-skills.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG7D;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,cAAc;IACxD,OAAO,CAAC,eAAe,CAAS;gBAEpB,MAAM,EAAE,kBAAkB;IAItC,YAAY,IAAI,MAAM;IAItB,QAAQ,IAAI,OAAO;IAIb,aAAa,CAChB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAChC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO,GAClC,OAAO,CAAC,UAAU,EAAE,CAAC;IA+DxB,kBAAkB,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,UAAU,EAAE;CAIrE"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import pMap from 'p-map';
|
|
2
|
+
import { mkdir, cp, symlink, lstat } from 'node:fs/promises';
|
|
3
|
+
import { existsSync } from 'node:fs';
|
|
4
|
+
import { join, dirname, relative } from 'pathe';
|
|
5
|
+
import { safeRm } from '../../../fs/safe-rm.js';
|
|
6
|
+
/**
|
|
7
|
+
* Native skills strategy for editors that support Agent Skills natively (Claude Code, VS Code,
|
|
8
|
+
* Cursor). Copies skills to `.aix/skills/` as the source of truth and creates symlinks from the
|
|
9
|
+
* editor's skills directory.
|
|
10
|
+
*/
|
|
11
|
+
export class NativeSkillsStrategy {
|
|
12
|
+
editorSkillsDir;
|
|
13
|
+
constructor(config) {
|
|
14
|
+
this.editorSkillsDir = config.editorSkillsDir;
|
|
15
|
+
}
|
|
16
|
+
getSkillsDir() {
|
|
17
|
+
return '.aix/skills';
|
|
18
|
+
}
|
|
19
|
+
isNative() {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
async installSkills(skills, projectRoot, options = {}) {
|
|
23
|
+
const entries = Array.from(skills.entries());
|
|
24
|
+
const nestedChanges = await pMap(entries, async ([name, skill]) => {
|
|
25
|
+
const changes = [];
|
|
26
|
+
// 1. Copy to .aix/skills/{name}/ (source of truth)
|
|
27
|
+
const aixSkillDir = join(projectRoot, '.aix', 'skills', name), aixExists = existsSync(aixSkillDir);
|
|
28
|
+
if (!options.dryRun) {
|
|
29
|
+
await mkdir(dirname(aixSkillDir), { recursive: true });
|
|
30
|
+
await cp(skill.basePath, aixSkillDir, { recursive: true, force: true });
|
|
31
|
+
}
|
|
32
|
+
changes.push({
|
|
33
|
+
path: aixSkillDir,
|
|
34
|
+
action: aixExists ? 'update' : 'create',
|
|
35
|
+
content: `[skill directory: ${skill.basePath}]`,
|
|
36
|
+
isDirectory: true,
|
|
37
|
+
category: 'skill',
|
|
38
|
+
});
|
|
39
|
+
// 2. Create symlink from editor skills dir to .aix/skills/{name}
|
|
40
|
+
const editorSkillPath = join(projectRoot, this.editorSkillsDir, name), relativePath = relative(dirname(editorSkillPath), aixSkillDir);
|
|
41
|
+
let symlinkExists = false;
|
|
42
|
+
try {
|
|
43
|
+
const stats = await lstat(editorSkillPath);
|
|
44
|
+
symlinkExists = stats.isSymbolicLink() || stats.isDirectory();
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
// Path doesn't exist
|
|
48
|
+
}
|
|
49
|
+
if (!options.dryRun) {
|
|
50
|
+
await mkdir(dirname(editorSkillPath), { recursive: true });
|
|
51
|
+
if (symlinkExists) {
|
|
52
|
+
await safeRm(editorSkillPath, { force: true });
|
|
53
|
+
}
|
|
54
|
+
await symlink(relativePath, editorSkillPath);
|
|
55
|
+
}
|
|
56
|
+
changes.push({
|
|
57
|
+
path: editorSkillPath,
|
|
58
|
+
action: symlinkExists ? 'update' : 'create',
|
|
59
|
+
content: `[symlink → ${relativePath}]`,
|
|
60
|
+
isDirectory: true,
|
|
61
|
+
category: 'skill',
|
|
62
|
+
});
|
|
63
|
+
return changes;
|
|
64
|
+
}, { concurrency: 5 });
|
|
65
|
+
return nestedChanges.flat();
|
|
66
|
+
}
|
|
67
|
+
generateSkillRules(_skills) {
|
|
68
|
+
// Native skills don't need pointer rules - the editor reads skills directly
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=native-skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-skills.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/native-skills.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,OAAO,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIhD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IACtB,eAAe,CAAS;IAEhC,YAAY,MAA0B;QACnC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACjD,CAAC;IAED,YAAY;QACT,OAAO,aAAa,CAAC;IACxB,CAAC;IAED,QAAQ;QACL,OAAO,IAAI,CAAC;IACf,CAAC;IAED,KAAK,CAAC,aAAa,CAChB,MAAgC,EA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e,CAAC,CAAC;gBAE3C,aAAa,GAAG,KAAK,CAAC,cAAc,EAAE,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACjE,CAAC;YAAC,MAAM,CAAC;gBACN,qBAAqB;YACxB,CAAC;YAED,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,MAAM,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC3D,IAAI,aAAa,EAAE,CAAC;oBACjB,MAAM,MAAM,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;gBAClD,CAAC;gBACD,MAAM,OAAO,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;YAChD,CAAC;YAED,OAAO,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;gBAC3C,OAAO,EAAE,cAAc,YAAY,GAAG;gBACtC,WAAW,EAAE,IAAI;gBACjB,QAAQ,EAAE,OAAO;aACnB,CAAC,CAAC;YAEH,OAAO,OAAO,CAAC;QAClB,CAAC,EACD,EAAE,WAAW,EAAE,CAAC,EAAE,CACpB,CAAC;QAEF,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED,kBAAkB,CAAC,OAAiC;QACjD,4EAA4E;QAC5E,OAAO,EAAE,CAAC;IACb,CAAC;CACH"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HooksConfig } from '@a1st/aix-schema';
|
|
2
|
+
import type { HooksStrategy } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* No-op hooks strategy for editors that don't support hooks (VS Code, Zed, Codex).
|
|
5
|
+
* Returns unsupported for all hook events.
|
|
6
|
+
*/
|
|
7
|
+
export declare class NoHooksStrategy implements HooksStrategy {
|
|
8
|
+
isSupported(): boolean;
|
|
9
|
+
getConfigPath(): string;
|
|
10
|
+
formatConfig(_hooks: HooksConfig): string;
|
|
11
|
+
getUnsupportedEvents(hooks: HooksConfig): string[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=no-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-hooks.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AACH,qBAAa,eAAgB,YAAW,aAAa;IAClD,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAIzC,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE;CAGpD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No-op hooks strategy for editors that don't support hooks (VS Code, Zed, Codex).
|
|
3
|
+
* Returns unsupported for all hook events.
|
|
4
|
+
*/
|
|
5
|
+
export class NoHooksStrategy {
|
|
6
|
+
isSupported() {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
getConfigPath() {
|
|
10
|
+
return '';
|
|
11
|
+
}
|
|
12
|
+
formatConfig(_hooks) {
|
|
13
|
+
return '';
|
|
14
|
+
}
|
|
15
|
+
getUnsupportedEvents(hooks) {
|
|
16
|
+
return Object.keys(hooks);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=no-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-hooks.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-hooks.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,eAAe;IACzB,WAAW;QACR,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,aAAa;QACV,OAAO,EAAE,CAAC;IACb,CAAC;IAED,YAAY,CAAC,MAAmB;QAC7B,OAAO,EAAE,CAAC;IACb,CAAC;IAED,oBAAoB,CAAC,KAAkB;QACpC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;CACH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { McpServerConfig } from '@a1st/aix-schema';
|
|
2
|
+
import type { McpStrategy } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* No-op MCP strategy for editors that don't support MCP (e.g., VS Code with GitHub Copilot).
|
|
5
|
+
*/
|
|
6
|
+
export declare class NoMcpStrategy implements McpStrategy {
|
|
7
|
+
isSupported(): boolean;
|
|
8
|
+
getConfigPath(): string;
|
|
9
|
+
getGlobalMcpConfigPath(): string | null;
|
|
10
|
+
formatConfig(_mcp: Record<string, McpServerConfig>): string;
|
|
11
|
+
parseGlobalMcpConfig(_content: string): {
|
|
12
|
+
mcp: Record<string, McpServerConfig>;
|
|
13
|
+
warnings: string[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=no-mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-mcp.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-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,aAAc,YAAW,WAAW;IAC9C,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,sBAAsB,IAAI,MAAM,GAAG,IAAI;IAIvC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,MAAM;IAI3D,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG;QACrC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QACrC,QAAQ,EAAE,MAAM,EAAE,CAAC;KACrB;CAGH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No-op MCP strategy for editors that don't support MCP (e.g., VS Code with GitHub Copilot).
|
|
3
|
+
*/
|
|
4
|
+
export class NoMcpStrategy {
|
|
5
|
+
isSupported() {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
getConfigPath() {
|
|
9
|
+
return '';
|
|
10
|
+
}
|
|
11
|
+
getGlobalMcpConfigPath() {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
formatConfig(_mcp) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
parseGlobalMcpConfig(_content) {
|
|
18
|
+
return { mcp: {}, warnings: [] };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=no-mcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-mcp.js","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-mcp.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,OAAO,aAAa;IACvB,WAAW;QACR,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,aAAa;QACV,OAAO,EAAE,CAAC;IACb,CAAC;IAED,sBAAsB;QACnB,OAAO,IAAI,CAAC;IACf,CAAC;IAED,YAAY,CAAC,IAAqC;QAC/C,OAAO,EAAE,CAAC;IACb,CAAC;IAED,oBAAoB,CAAC,QAAgB;QAIlC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EditorPrompt } from '../../types.js';
|
|
2
|
+
import type { PromptsStrategy } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* No-op prompts strategy for editors that don't support prompts/commands (e.g., Zed).
|
|
5
|
+
*/
|
|
6
|
+
export declare class NoPromptsStrategy implements PromptsStrategy {
|
|
7
|
+
isSupported(): boolean;
|
|
8
|
+
getPromptsDir(): string;
|
|
9
|
+
getFileExtension(): string;
|
|
10
|
+
getGlobalPromptsPath(): string | null;
|
|
11
|
+
formatPrompt(_prompt: EditorPrompt): string;
|
|
12
|
+
parseGlobalPrompts(_files: string[], _readFile: (filename: string) => Promise<string>): Promise<{
|
|
13
|
+
prompts: Record<string, string>;
|
|
14
|
+
warnings: string[];
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=no-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-prompts.d.ts","sourceRoot":"","sources":["../../../../src/editors/strategies/shared/no-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,qBAAa,iBAAkB,YAAW,eAAe;IACtD,WAAW,IAAI,OAAO;IAItB,aAAa,IAAI,MAAM;IAIvB,gBAAgB,IAAI,MAAM;IAI1B,oBAAoB,IAAI,MAAM,GAAG,IAAI;IAIrC,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM;IAIrC,kBAAkB,CACrB,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAChD,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAGrE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No-op prompts strategy for editors that don't support prompts/commands (e.g., Zed).
|
|
3
|
+
*/
|
|
4
|
+
export class NoPromptsStrategy {
|
|
5
|
+
isSupported() {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
getPromptsDir() {
|
|
9
|
+
return '';
|
|
10
|
+
}
|
|
11
|
+
getFileExtension() {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
getGlobalPromptsPath() {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
formatPrompt(_prompt) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
async parseGlobalPrompts(_files, _readFile) {
|
|
21
|
+
return { prompts: {}, warnings: [] };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=no-prompts.js.map
|