specweave 1.0.447 ā 1.0.450
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/bin/specweave.js +18 -0
- package/dist/plugins/specweave-ado/lib/ado-client.d.ts +6 -0
- package/dist/plugins/specweave-ado/lib/ado-client.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-client.js +22 -0
- package/dist/plugins/specweave-ado/lib/ado-client.js.map +1 -1
- package/dist/src/adapters/adapter-base.d.ts +15 -0
- package/dist/src/adapters/adapter-base.d.ts.map +1 -1
- package/dist/src/adapters/adapter-base.js +56 -0
- package/dist/src/adapters/adapter-base.js.map +1 -1
- package/dist/src/adapters/adapter-loader.d.ts.map +1 -1
- package/dist/src/adapters/adapter-loader.js +20 -2
- package/dist/src/adapters/adapter-loader.js.map +1 -1
- package/dist/src/adapters/aider/adapter.d.ts +21 -0
- package/dist/src/adapters/aider/adapter.d.ts.map +1 -0
- package/dist/src/adapters/aider/adapter.js +57 -0
- package/dist/src/adapters/aider/adapter.js.map +1 -0
- package/dist/src/adapters/amazonq/adapter.d.ts +21 -0
- package/dist/src/adapters/amazonq/adapter.d.ts.map +1 -0
- package/dist/src/adapters/amazonq/adapter.js +57 -0
- package/dist/src/adapters/amazonq/adapter.js.map +1 -0
- package/dist/src/adapters/cline/adapter.d.ts +21 -0
- package/dist/src/adapters/cline/adapter.d.ts.map +1 -0
- package/dist/src/adapters/cline/adapter.js +57 -0
- package/dist/src/adapters/cline/adapter.js.map +1 -0
- package/dist/src/adapters/codex/adapter.d.ts +18 -0
- package/dist/src/adapters/codex/adapter.d.ts.map +1 -1
- package/dist/src/adapters/codex/adapter.js +32 -0
- package/dist/src/adapters/codex/adapter.js.map +1 -1
- package/dist/src/adapters/continue/adapter.d.ts +63 -0
- package/dist/src/adapters/continue/adapter.d.ts.map +1 -0
- package/dist/src/adapters/continue/adapter.js +103 -0
- package/dist/src/adapters/continue/adapter.js.map +1 -0
- package/dist/src/adapters/copilot/adapter.d.ts +65 -0
- package/dist/src/adapters/copilot/adapter.d.ts.map +1 -0
- package/dist/src/adapters/copilot/adapter.js +106 -0
- package/dist/src/adapters/copilot/adapter.js.map +1 -0
- package/dist/src/adapters/cursor/adapter.d.ts +4 -20
- package/dist/src/adapters/cursor/adapter.d.ts.map +1 -1
- package/dist/src/adapters/cursor/adapter.js +12 -129
- package/dist/src/adapters/cursor/adapter.js.map +1 -1
- package/dist/src/adapters/gemini/adapter.d.ts +18 -0
- package/dist/src/adapters/gemini/adapter.d.ts.map +1 -1
- package/dist/src/adapters/gemini/adapter.js +32 -0
- package/dist/src/adapters/gemini/adapter.js.map +1 -1
- package/dist/src/adapters/jetbrains/adapter.d.ts +21 -0
- package/dist/src/adapters/jetbrains/adapter.d.ts.map +1 -0
- package/dist/src/adapters/jetbrains/adapter.js +57 -0
- package/dist/src/adapters/jetbrains/adapter.js.map +1 -0
- package/dist/src/adapters/registry.yaml +166 -20
- package/dist/src/adapters/tabnine/adapter.d.ts +21 -0
- package/dist/src/adapters/tabnine/adapter.d.ts.map +1 -0
- package/dist/src/adapters/tabnine/adapter.js +57 -0
- package/dist/src/adapters/tabnine/adapter.js.map +1 -0
- package/dist/src/adapters/windsurf/adapter.d.ts +64 -0
- package/dist/src/adapters/windsurf/adapter.d.ts.map +1 -0
- package/dist/src/adapters/windsurf/adapter.js +106 -0
- package/dist/src/adapters/windsurf/adapter.js.map +1 -0
- package/dist/src/adapters/zed/adapter.d.ts +21 -0
- package/dist/src/adapters/zed/adapter.d.ts.map +1 -0
- package/dist/src/adapters/zed/adapter.js +57 -0
- package/dist/src/adapters/zed/adapter.js.map +1 -0
- package/dist/src/cli/commands/get.d.ts +17 -1
- package/dist/src/cli/commands/get.d.ts.map +1 -1
- package/dist/src/cli/commands/get.js +51 -1
- package/dist/src/cli/commands/get.js.map +1 -1
- package/dist/src/cli/commands/link-pr.d.ts +17 -0
- package/dist/src/cli/commands/link-pr.d.ts.map +1 -0
- package/dist/src/cli/commands/link-pr.js +45 -0
- package/dist/src/cli/commands/link-pr.js.map +1 -0
- package/dist/src/cli/helpers/get/bulk-get.d.ts +41 -0
- package/dist/src/cli/helpers/get/bulk-get.d.ts.map +1 -0
- package/dist/src/cli/helpers/get/bulk-get.js +88 -0
- package/dist/src/cli/helpers/get/bulk-get.js.map +1 -0
- package/dist/src/cli/helpers/init/github-repo-cloning.d.ts +50 -0
- package/dist/src/cli/helpers/init/github-repo-cloning.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/github-repo-cloning.js +1 -1
- package/dist/src/cli/helpers/init/github-repo-cloning.js.map +1 -1
- package/dist/src/core/skills/skill-judge.d.ts.map +1 -1
- package/dist/src/core/skills/skill-judge.js +2 -1
- package/dist/src/core/skills/skill-judge.js.map +1 -1
- package/dist/src/integrations/jira/jira-client.d.ts +12 -0
- package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-client.js +37 -0
- package/dist/src/integrations/jira/jira-client.js.map +1 -1
- package/dist/src/metrics/dora-calculator.d.ts.map +1 -1
- package/dist/src/metrics/dora-calculator.js +3 -2
- package/dist/src/metrics/dora-calculator.js.map +1 -1
- package/dist/src/sync/format-preservation-sync.d.ts +3 -0
- package/dist/src/sync/format-preservation-sync.d.ts.map +1 -1
- package/dist/src/sync/format-preservation-sync.js +9 -0
- package/dist/src/sync/format-preservation-sync.js.map +1 -1
- package/dist/src/sync/integration-health-check.d.ts +45 -0
- package/dist/src/sync/integration-health-check.d.ts.map +1 -0
- package/dist/src/sync/integration-health-check.js +186 -0
- package/dist/src/sync/integration-health-check.js.map +1 -0
- package/dist/src/sync/pr-linker.d.ts +38 -0
- package/dist/src/sync/pr-linker.d.ts.map +1 -0
- package/dist/src/sync/pr-linker.js +157 -0
- package/dist/src/sync/pr-linker.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/commands/sync-setup.md +24 -1
- package/plugins/specweave/skills/get/SKILL.md +38 -6
- package/plugins/specweave/skills/pr/SKILL.md +39 -2
- package/plugins/specweave-ado/lib/ado-client.js +22 -0
- package/plugins/specweave-ado/lib/ado-client.ts +25 -0
- package/src/templates/AGENTS.md.template +19 -5
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { AdapterBase } from '../adapter-base.js';
|
|
15
15
|
import { AdapterOptions, AdapterFile } from '../adapter-interface.js';
|
|
16
|
+
import type { Plugin } from '../../core/types/plugin.js';
|
|
16
17
|
export declare class CodexAdapter extends AdapterBase {
|
|
17
18
|
name: string;
|
|
18
19
|
description: string;
|
|
@@ -42,6 +43,23 @@ export declare class CodexAdapter extends AdapterBase {
|
|
|
42
43
|
* Post-installation instructions
|
|
43
44
|
*/
|
|
44
45
|
postInstall(options: AdapterOptions): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Check if Codex adapter supports plugins
|
|
48
|
+
*/
|
|
49
|
+
supportsPlugins(): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Compile and install a plugin for OpenAI Codex.
|
|
52
|
+
* Writes each SKILL.md as a separate file in `.codex/rules/`.
|
|
53
|
+
*/
|
|
54
|
+
compilePlugin(plugin: Plugin): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Unload a plugin from Codex ā removes skill files from `.codex/rules/`.
|
|
57
|
+
*/
|
|
58
|
+
unloadPlugin(pluginName: string): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Get installed plugins for Codex by scanning `.codex/rules/`.
|
|
61
|
+
*/
|
|
62
|
+
getInstalledPlugins(): Promise<string[]>;
|
|
45
63
|
/**
|
|
46
64
|
* Get usage instructions for Codex adapter
|
|
47
65
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/codex/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/codex/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAIzD,qBAAa,YAAa,SAAQ,WAAW;IAC3C,IAAI,SAAW;IACf,WAAW,SAAoF;IAC/F,eAAe,EAAG,MAAM,CAAU;IAElC;;;;;;;OAOG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAQhC;;OAEG;IACH,QAAQ,IAAI,WAAW,EAAE;IAezB;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBrD;;OAEG;YACW,gBAAgB;IAgB9B;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;;OAGG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlD;;OAEG;IACG,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrD;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI9C;;OAEG;IACH,eAAe,IAAI,MAAM;CAsN1B"}
|
|
@@ -94,6 +94,38 @@ export class CodexAdapter extends AdapterBase {
|
|
|
94
94
|
async postInstall(options) {
|
|
95
95
|
console.log(this.getInstructions());
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Check if Codex adapter supports plugins
|
|
99
|
+
*/
|
|
100
|
+
supportsPlugins() {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Compile and install a plugin for OpenAI Codex.
|
|
105
|
+
* Writes each SKILL.md as a separate file in `.codex/rules/`.
|
|
106
|
+
*/
|
|
107
|
+
async compilePlugin(plugin) {
|
|
108
|
+
const rulesDir = '.codex/rules';
|
|
109
|
+
console.log(`\nš¦ Installing plugin skills for Codex: ${plugin.manifest.name}`);
|
|
110
|
+
await this.writeSkillFiles(plugin, rulesDir);
|
|
111
|
+
console.log(` ā ${plugin.skills.length} skill(s) written to ${rulesDir}/`);
|
|
112
|
+
console.log(`\nā
Plugin ${plugin.manifest.name} installed for Codex!`);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Unload a plugin from Codex ā removes skill files from `.codex/rules/`.
|
|
116
|
+
*/
|
|
117
|
+
async unloadPlugin(pluginName) {
|
|
118
|
+
console.log(`\nšļø Unloading plugin from Codex: ${pluginName}`);
|
|
119
|
+
await this.removeSkillFiles(pluginName, '.codex/rules');
|
|
120
|
+
console.log(` ā Removed from .codex/rules/`);
|
|
121
|
+
console.log(`\nā
Plugin ${pluginName} unloaded!`);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get installed plugins for Codex by scanning `.codex/rules/`.
|
|
125
|
+
*/
|
|
126
|
+
async getInstalledPlugins() {
|
|
127
|
+
return await this.listInstalledPluginsInDir('.codex/rules');
|
|
128
|
+
}
|
|
97
129
|
/**
|
|
98
130
|
* Get usage instructions for Codex adapter
|
|
99
131
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../src/adapters/codex/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA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AC,mBAAmB;QACvB,OAAO,MAAM,IAAI,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmNN,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Continue.dev Adapter
|
|
3
|
+
*
|
|
4
|
+
* Semi-automation adapter for Continue.dev.
|
|
5
|
+
* Uses rule files in .continue/rules/ for context-specific instructions.
|
|
6
|
+
*/
|
|
7
|
+
import { AdapterBase } from '../adapter-base.js';
|
|
8
|
+
import { AdapterOptions, AdapterFile } from '../adapter-interface.js';
|
|
9
|
+
import type { Plugin } from '../../core/types/plugin.js';
|
|
10
|
+
export declare class ContinueAdapter extends AdapterBase {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
automationLevel: "semi";
|
|
14
|
+
/**
|
|
15
|
+
* Detect if Continue.dev is configured
|
|
16
|
+
*
|
|
17
|
+
* Checks for:
|
|
18
|
+
* - .continue/ directory exists
|
|
19
|
+
*/
|
|
20
|
+
detect(): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Get files to install for Continue adapter
|
|
23
|
+
*/
|
|
24
|
+
getFiles(): AdapterFile[];
|
|
25
|
+
/**
|
|
26
|
+
* Install Continue adapter
|
|
27
|
+
*/
|
|
28
|
+
install(options: AdapterOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Check if Continue adapter supports plugins
|
|
31
|
+
*/
|
|
32
|
+
supportsPlugins(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Compile and install a plugin for Continue.dev
|
|
35
|
+
*
|
|
36
|
+
* Writes skill SKILL.md files as <plugin>-<skill>.md
|
|
37
|
+
* into .continue/rules/ for auto-loading by Continue.
|
|
38
|
+
*
|
|
39
|
+
* @param plugin Plugin to install
|
|
40
|
+
*/
|
|
41
|
+
compilePlugin(plugin: Plugin): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Unload a plugin from Continue.dev
|
|
44
|
+
*
|
|
45
|
+
* Removes <pluginName>-*.md files from .continue/rules/
|
|
46
|
+
*
|
|
47
|
+
* @param pluginName Name of plugin to unload
|
|
48
|
+
*/
|
|
49
|
+
unloadPlugin(pluginName: string): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Get list of installed plugins for Continue.dev
|
|
52
|
+
*/
|
|
53
|
+
getInstalledPlugins(): Promise<string[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Post-installation instructions
|
|
56
|
+
*/
|
|
57
|
+
postInstall(options: AdapterOptions): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Get usage instructions for Continue.dev adapter
|
|
60
|
+
*/
|
|
61
|
+
getInstructions(): string;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/continue/adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,IAAI,SAAc;IAClB,WAAW,SAA2E;IACtF,eAAe,EAAG,MAAM,CAAU;IAElC;;;;;OAKG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAIhC;;OAEG;IACH,QAAQ,IAAI,WAAW,EAAE;IAIzB;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrD;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;;;;;;OAOG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlD;;;;;;OAMG;IACG,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrD;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI9C;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;OAEG;IACH,eAAe,IAAI,MAAM;CAW1B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Continue.dev Adapter
|
|
3
|
+
*
|
|
4
|
+
* Semi-automation adapter for Continue.dev.
|
|
5
|
+
* Uses rule files in .continue/rules/ for context-specific instructions.
|
|
6
|
+
*/
|
|
7
|
+
import * as path from 'path';
|
|
8
|
+
import * as fs from '../../utils/fs-native.js';
|
|
9
|
+
import { AdapterBase } from '../adapter-base.js';
|
|
10
|
+
export class ContinueAdapter extends AdapterBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.name = 'continue';
|
|
14
|
+
this.description = 'Continue.dev adapter - Semi-automation with rules in .continue/rules/';
|
|
15
|
+
this.automationLevel = 'semi';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Detect if Continue.dev is configured
|
|
19
|
+
*
|
|
20
|
+
* Checks for:
|
|
21
|
+
* - .continue/ directory exists
|
|
22
|
+
*/
|
|
23
|
+
async detect() {
|
|
24
|
+
return await this.fileExists('.continue');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get files to install for Continue adapter
|
|
28
|
+
*/
|
|
29
|
+
getFiles() {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Install Continue adapter
|
|
34
|
+
*/
|
|
35
|
+
async install(options) {
|
|
36
|
+
console.log('\nš¦ Installing Continue.dev Adapter\n');
|
|
37
|
+
const rulesDir = path.join(options.projectPath, '.continue', 'rules');
|
|
38
|
+
await fs.ensureDir(rulesDir);
|
|
39
|
+
console.log('\n⨠Continue.dev adapter installed!');
|
|
40
|
+
console.log(' Run `specweave refresh-plugins` to install skills.');
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Check if Continue adapter supports plugins
|
|
44
|
+
*/
|
|
45
|
+
supportsPlugins() {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Compile and install a plugin for Continue.dev
|
|
50
|
+
*
|
|
51
|
+
* Writes skill SKILL.md files as <plugin>-<skill>.md
|
|
52
|
+
* into .continue/rules/ for auto-loading by Continue.
|
|
53
|
+
*
|
|
54
|
+
* @param plugin Plugin to install
|
|
55
|
+
*/
|
|
56
|
+
async compilePlugin(plugin) {
|
|
57
|
+
const rulesDir = '.continue/rules';
|
|
58
|
+
console.log(`\nš¦ Installing plugin skills for Continue.dev: ${plugin.manifest.name}`);
|
|
59
|
+
await this.writeSkillFiles(plugin, rulesDir, '.md');
|
|
60
|
+
console.log(` ā ${plugin.skills.length} skill(s) written to ${rulesDir}/`);
|
|
61
|
+
console.log(`\nā
Plugin ${plugin.manifest.name} installed for Continue.dev!`);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Unload a plugin from Continue.dev
|
|
65
|
+
*
|
|
66
|
+
* Removes <pluginName>-*.md files from .continue/rules/
|
|
67
|
+
*
|
|
68
|
+
* @param pluginName Name of plugin to unload
|
|
69
|
+
*/
|
|
70
|
+
async unloadPlugin(pluginName) {
|
|
71
|
+
console.log(`\nšļø Unloading plugin from Continue.dev: ${pluginName}`);
|
|
72
|
+
await this.removeSkillFiles(pluginName, '.continue/rules', '.md');
|
|
73
|
+
console.log(` ā Removed from .continue/rules/`);
|
|
74
|
+
console.log(`\nā
Plugin ${pluginName} unloaded!`);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get list of installed plugins for Continue.dev
|
|
78
|
+
*/
|
|
79
|
+
async getInstalledPlugins() {
|
|
80
|
+
return await this.listInstalledPluginsInDir('.continue/rules');
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Post-installation instructions
|
|
84
|
+
*/
|
|
85
|
+
async postInstall(options) {
|
|
86
|
+
console.log(this.getInstructions());
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get usage instructions for Continue.dev adapter
|
|
90
|
+
*/
|
|
91
|
+
getInstructions() {
|
|
92
|
+
return `
|
|
93
|
+
Continue.dev Adapter
|
|
94
|
+
|
|
95
|
+
Skills are installed in .continue/rules/ ā Continue.dev loads *.md rule files automatically.
|
|
96
|
+
|
|
97
|
+
Quick Start:
|
|
98
|
+
Run: specweave refresh-plugins
|
|
99
|
+
Then use Continue.dev normally ā skills are auto-loaded.
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../src/adapters/continue/adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAAhD;;QACE,SAAI,GAAG,UAAU,CAAC;QAClB,gBAAW,GAAG,uEAAuE,CAAC;QACtF,oBAAe,GAAG,MAAe,CAAC;IA+FpC,CAAC;IA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B,EAAE,KAAK,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,cAAc,UAAU,YAAY,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB;QACvB,OAAO,MAAM,IAAI,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CAAC,OAAuB;QACvC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO;;;;;;;;KAQN,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot Adapter
|
|
3
|
+
*
|
|
4
|
+
* Basic-automation adapter for GitHub Copilot.
|
|
5
|
+
* Uses per-context instruction files in .github/instructions/.
|
|
6
|
+
* GitHub Copilot reads *.instructions.md files for context-specific rules.
|
|
7
|
+
*/
|
|
8
|
+
import { AdapterBase } from '../adapter-base.js';
|
|
9
|
+
import { AdapterOptions, AdapterFile } from '../adapter-interface.js';
|
|
10
|
+
import type { Plugin } from '../../core/types/plugin.js';
|
|
11
|
+
export declare class CopilotAdapter extends AdapterBase {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
automationLevel: "basic";
|
|
15
|
+
/**
|
|
16
|
+
* Detect if GitHub Copilot is configured
|
|
17
|
+
*
|
|
18
|
+
* Checks for:
|
|
19
|
+
* - .github/copilot-instructions.md (global instructions file)
|
|
20
|
+
* - .github/instructions/ directory (per-context instructions)
|
|
21
|
+
*/
|
|
22
|
+
detect(): Promise<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Get files to install for Copilot adapter
|
|
25
|
+
*/
|
|
26
|
+
getFiles(): AdapterFile[];
|
|
27
|
+
/**
|
|
28
|
+
* Install Copilot adapter
|
|
29
|
+
*/
|
|
30
|
+
install(options: AdapterOptions): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Check if Copilot adapter supports plugins
|
|
33
|
+
*/
|
|
34
|
+
supportsPlugins(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Compile and install a plugin for GitHub Copilot
|
|
37
|
+
*
|
|
38
|
+
* Writes skill SKILL.md files as <plugin>-<skill>.instructions.md
|
|
39
|
+
* into .github/instructions/ for per-context rule loading.
|
|
40
|
+
*
|
|
41
|
+
* @param plugin Plugin to install
|
|
42
|
+
*/
|
|
43
|
+
compilePlugin(plugin: Plugin): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Unload a plugin from GitHub Copilot
|
|
46
|
+
*
|
|
47
|
+
* Removes <pluginName>-*.instructions.md files from .github/instructions/
|
|
48
|
+
*
|
|
49
|
+
* @param pluginName Name of plugin to unload
|
|
50
|
+
*/
|
|
51
|
+
unloadPlugin(pluginName: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Get list of installed plugins for GitHub Copilot
|
|
54
|
+
*/
|
|
55
|
+
getInstalledPlugins(): Promise<string[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Post-installation instructions
|
|
58
|
+
*/
|
|
59
|
+
postInstall(options: AdapterOptions): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Get usage instructions for GitHub Copilot adapter
|
|
62
|
+
*/
|
|
63
|
+
getInstructions(): string;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/copilot/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,qBAAa,cAAe,SAAQ,WAAW;IAC7C,IAAI,SAAa;IACjB,WAAW,SAAkF;IAC7F,eAAe,EAAG,OAAO,CAAU;IAEnC;;;;;;OAMG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAOhC;;OAEG;IACH,QAAQ,IAAI,WAAW,EAAE;IAIzB;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrD;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;;;;;;OAOG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlD;;;;;;OAMG;IACG,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrD;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI9C;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;OAEG;IACH,eAAe,IAAI,MAAM;CAW1B"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot Adapter
|
|
3
|
+
*
|
|
4
|
+
* Basic-automation adapter for GitHub Copilot.
|
|
5
|
+
* Uses per-context instruction files in .github/instructions/.
|
|
6
|
+
* GitHub Copilot reads *.instructions.md files for context-specific rules.
|
|
7
|
+
*/
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
import * as fs from '../../utils/fs-native.js';
|
|
10
|
+
import { AdapterBase } from '../adapter-base.js';
|
|
11
|
+
export class CopilotAdapter extends AdapterBase {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.name = 'copilot';
|
|
15
|
+
this.description = 'GitHub Copilot adapter - Basic automation with per-context instruction files';
|
|
16
|
+
this.automationLevel = 'basic';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Detect if GitHub Copilot is configured
|
|
20
|
+
*
|
|
21
|
+
* Checks for:
|
|
22
|
+
* - .github/copilot-instructions.md (global instructions file)
|
|
23
|
+
* - .github/instructions/ directory (per-context instructions)
|
|
24
|
+
*/
|
|
25
|
+
async detect() {
|
|
26
|
+
return ((await this.fileExists('.github/copilot-instructions.md')) ||
|
|
27
|
+
(await this.fileExists('.github/instructions')));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get files to install for Copilot adapter
|
|
31
|
+
*/
|
|
32
|
+
getFiles() {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Install Copilot adapter
|
|
37
|
+
*/
|
|
38
|
+
async install(options) {
|
|
39
|
+
console.log('\nš¦ Installing GitHub Copilot Adapter\n');
|
|
40
|
+
const instructionsDir = path.join(options.projectPath, '.github', 'instructions');
|
|
41
|
+
await fs.ensureDir(instructionsDir);
|
|
42
|
+
console.log('\n⨠GitHub Copilot adapter installed!');
|
|
43
|
+
console.log(' Run `specweave refresh-plugins` to install skills.');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if Copilot adapter supports plugins
|
|
47
|
+
*/
|
|
48
|
+
supportsPlugins() {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Compile and install a plugin for GitHub Copilot
|
|
53
|
+
*
|
|
54
|
+
* Writes skill SKILL.md files as <plugin>-<skill>.instructions.md
|
|
55
|
+
* into .github/instructions/ for per-context rule loading.
|
|
56
|
+
*
|
|
57
|
+
* @param plugin Plugin to install
|
|
58
|
+
*/
|
|
59
|
+
async compilePlugin(plugin) {
|
|
60
|
+
const rulesDir = '.github/instructions';
|
|
61
|
+
console.log(`\nš¦ Installing plugin skills for GitHub Copilot: ${plugin.manifest.name}`);
|
|
62
|
+
await this.writeSkillFiles(plugin, rulesDir, '.instructions.md');
|
|
63
|
+
console.log(` ā ${plugin.skills.length} skill(s) written to ${rulesDir}/`);
|
|
64
|
+
console.log(`\nā
Plugin ${plugin.manifest.name} installed for GitHub Copilot!`);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Unload a plugin from GitHub Copilot
|
|
68
|
+
*
|
|
69
|
+
* Removes <pluginName>-*.instructions.md files from .github/instructions/
|
|
70
|
+
*
|
|
71
|
+
* @param pluginName Name of plugin to unload
|
|
72
|
+
*/
|
|
73
|
+
async unloadPlugin(pluginName) {
|
|
74
|
+
console.log(`\nšļø Unloading plugin from GitHub Copilot: ${pluginName}`);
|
|
75
|
+
await this.removeSkillFiles(pluginName, '.github/instructions', '.instructions.md');
|
|
76
|
+
console.log(` ā Removed from .github/instructions/`);
|
|
77
|
+
console.log(`\nā
Plugin ${pluginName} unloaded!`);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get list of installed plugins for GitHub Copilot
|
|
81
|
+
*/
|
|
82
|
+
async getInstalledPlugins() {
|
|
83
|
+
return await this.listInstalledPluginsInDir('.github/instructions');
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Post-installation instructions
|
|
87
|
+
*/
|
|
88
|
+
async postInstall(options) {
|
|
89
|
+
console.log(this.getInstructions());
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get usage instructions for GitHub Copilot adapter
|
|
93
|
+
*/
|
|
94
|
+
getInstructions() {
|
|
95
|
+
return `
|
|
96
|
+
GitHub Copilot Adapter
|
|
97
|
+
|
|
98
|
+
Skills are installed in .github/instructions/ ā Copilot loads *.instructions.md files as per-context rules.
|
|
99
|
+
|
|
100
|
+
Quick Start:
|
|
101
|
+
Run: specweave refresh-plugins
|
|
102
|
+
Then use GitHub Copilot normally ā skills are auto-loaded.
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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CAAC,CAAC;QACzF,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,QAAQ,MAAM,CAAC,MAAM,CAAC,MAAM,wBAAwB,QAAQ,GAAG,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,cAAc,MAAM,CAAC,QAAQ,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,YAAY,CAAC,UAAkB;QACnC,OAAO,CAAC,GAAG,CAAC,gDAAgD,UAAU,EAAE,CAAC,CAAC;QAC1E,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;QACpF,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,cAAc,UAAU,YAAY,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB;QACvB,OAAO,MAAM,IAAI,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CAAC,OAAuB;QACvC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO;;;;;;;;KAQN,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -54,32 +54,16 @@ export declare class CursorAdapter extends AdapterBase {
|
|
|
54
54
|
*/
|
|
55
55
|
supportsPlugins(): boolean;
|
|
56
56
|
/**
|
|
57
|
-
* Compile and install a plugin for Cursor
|
|
58
|
-
*
|
|
59
|
-
* Cursor uses AGENTS.md compilation:
|
|
60
|
-
* - Append skills to AGENTS.md
|
|
61
|
-
* - Append agents to AGENTS.md
|
|
62
|
-
* - Append commands to team commands JSON
|
|
63
|
-
*
|
|
64
|
-
* NEW: Injects system prompts for non-English languages
|
|
65
|
-
*
|
|
66
|
-
* @param plugin Plugin to install
|
|
57
|
+
* Compile and install a plugin for Cursor.
|
|
58
|
+
* Writes each SKILL.md as a separate file in `.cursor/rules/`.
|
|
67
59
|
*/
|
|
68
60
|
compilePlugin(plugin: Plugin): Promise<void>;
|
|
69
61
|
/**
|
|
70
|
-
* Unload a plugin from Cursor
|
|
71
|
-
*
|
|
72
|
-
* Removes plugin section from AGENTS.md
|
|
73
|
-
*
|
|
74
|
-
* @param pluginName Name of plugin to unload
|
|
62
|
+
* Unload a plugin from Cursor ā removes skill files from `.cursor/rules/`.
|
|
75
63
|
*/
|
|
76
64
|
unloadPlugin(pluginName: string): Promise<void>;
|
|
77
65
|
/**
|
|
78
|
-
* Get
|
|
79
|
-
*
|
|
80
|
-
* Parses AGENTS.md for plugin markers
|
|
81
|
-
*
|
|
82
|
-
* @returns Array of installed plugin names
|
|
66
|
+
* Get installed plugins for Cursor by scanning `.cursor/rules/`.
|
|
83
67
|
*/
|
|
84
68
|
getInstalledPlugins(): Promise<string[]>;
|
|
85
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/cursor/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,qBAAa,aAAc,SAAQ,WAAW;IAC5C,IAAI,SAAY;IAChB,WAAW,SAA6E;IACxF,eAAe,EAAG,MAAM,CAAU;IAElC;;;;;;;;;;OAUG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAOhC;;;;;OAKG;IACH,QAAQ,IAAI,WAAW,EAAE;IA8BzB;;OAEG;IACG,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S.md, .cursor/README.md
|
|
|
124
124
|
return true;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
* Compile and install a plugin for Cursor
|
|
128
|
-
*
|
|
129
|
-
* Cursor uses AGENTS.md compilation:
|
|
130
|
-
* - Append skills to AGENTS.md
|
|
131
|
-
* - Append agents to AGENTS.md
|
|
132
|
-
* - Append commands to team commands JSON
|
|
133
|
-
*
|
|
134
|
-
* NEW: Injects system prompts for non-English languages
|
|
135
|
-
*
|
|
136
|
-
* @param plugin Plugin to install
|
|
127
|
+
* Compile and install a plugin for Cursor.
|
|
128
|
+
* Writes each SKILL.md as a separate file in `.cursor/rules/`.
|
|
137
129
|
*/
|
|
138
130
|
async compilePlugin(plugin) {
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (language !== 'en') {
|
|
145
|
-
console.log(` š Language: ${language} (system prompts will be injected)`);
|
|
146
|
-
}
|
|
147
|
-
// Ensure AGENTS.md exists
|
|
148
|
-
if (!(await fs.pathExists(agentsMdPath))) {
|
|
149
|
-
throw new Error('AGENTS.md not found. Run specweave init first.');
|
|
150
|
-
}
|
|
151
|
-
// Read current AGENTS.md
|
|
152
|
-
let agentsMd = await fs.readFile(agentsMdPath, 'utf-8');
|
|
153
|
-
// Check if plugin already compiled
|
|
154
|
-
const pluginMarker = `<!-- Plugin: ${plugin.manifest.name} -->`;
|
|
155
|
-
if (agentsMd.includes(pluginMarker)) {
|
|
156
|
-
console.log(` ā¹ļø Plugin ${plugin.manifest.name} already compiled to AGENTS.md`);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
// Generate plugin section for AGENTS.md
|
|
160
|
-
let pluginSection = `\n\n${pluginMarker}\n\n`;
|
|
161
|
-
pluginSection += `# Plugin: ${plugin.manifest.name}\n\n`;
|
|
162
|
-
pluginSection += `${plugin.manifest.description}\n\n`;
|
|
163
|
-
// Add skills
|
|
164
|
-
if (plugin.skills.length > 0) {
|
|
165
|
-
pluginSection += `## Skills\n\n`;
|
|
166
|
-
for (const skill of plugin.skills) {
|
|
167
|
-
const skillContent = await fs.readFile(path.join(skill.path, 'SKILL.md'), 'utf-8');
|
|
168
|
-
// Remove frontmatter for AGENTS.md
|
|
169
|
-
const contentWithoutFrontmatter = skillContent.replace(/^---\n[\s\S]+?\n---\n/, '');
|
|
170
|
-
// Inject system prompt if needed
|
|
171
|
-
const modifiedContent = this.injectSystemPrompt(contentWithoutFrontmatter, language);
|
|
172
|
-
pluginSection += `### ${skill.name}\n\n`;
|
|
173
|
-
pluginSection += `${modifiedContent}\n\n`;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
// Add agents
|
|
177
|
-
if (plugin.agents.length > 0) {
|
|
178
|
-
pluginSection += `## Agents\n\n`;
|
|
179
|
-
for (const agent of plugin.agents) {
|
|
180
|
-
const agentContent = await fs.readFile(path.join(agent.path, 'AGENT.md'), 'utf-8');
|
|
181
|
-
// Inject system prompt if needed
|
|
182
|
-
const modifiedContent = this.injectSystemPrompt(agentContent, language);
|
|
183
|
-
pluginSection += `### ${agent.name}\n\n`;
|
|
184
|
-
pluginSection += `${modifiedContent}\n\n`;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
// Add commands
|
|
188
|
-
if (plugin.commands.length > 0) {
|
|
189
|
-
pluginSection += `## Commands\n\n`;
|
|
190
|
-
for (const command of plugin.commands) {
|
|
191
|
-
const commandContent = await fs.readFile(command.path, 'utf-8');
|
|
192
|
-
// Remove frontmatter
|
|
193
|
-
const contentWithoutFrontmatter = commandContent.replace(/^---\n[\s\S]+?\n---\n/, '');
|
|
194
|
-
// Inject system prompt if needed
|
|
195
|
-
const modifiedContent = this.injectSystemPrompt(contentWithoutFrontmatter, language);
|
|
196
|
-
pluginSection += `### /${command.name}\n\n`;
|
|
197
|
-
pluginSection += `${modifiedContent}\n\n`;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
pluginSection += `<!-- End Plugin: ${plugin.manifest.name} -->\n`;
|
|
201
|
-
// Append to AGENTS.md
|
|
202
|
-
agentsMd += pluginSection;
|
|
203
|
-
await fs.writeFile(agentsMdPath, agentsMd, 'utf-8');
|
|
204
|
-
console.log(` ā Compiled to AGENTS.md`);
|
|
205
|
-
console.log(` ā ${plugin.skills.length} skills added`);
|
|
206
|
-
console.log(` ā ${plugin.agents.length} agents added`);
|
|
207
|
-
console.log(` ā ${plugin.commands.length} commands added`);
|
|
208
|
-
console.log(`\nā
Plugin ${plugin.manifest.name} compiled for Cursor!`);
|
|
131
|
+
const rulesDir = '.cursor/rules';
|
|
132
|
+
console.log(`\nš¦ Installing plugin skills for Cursor: ${plugin.manifest.name}`);
|
|
133
|
+
await this.writeSkillFiles(plugin, rulesDir);
|
|
134
|
+
console.log(` ā ${plugin.skills.length} skill(s) written to ${rulesDir}/`);
|
|
135
|
+
console.log(`\nā
Plugin ${plugin.manifest.name} installed for Cursor!`);
|
|
209
136
|
}
|
|
210
137
|
/**
|
|
211
|
-
* Unload a plugin from Cursor
|
|
212
|
-
*
|
|
213
|
-
* Removes plugin section from AGENTS.md
|
|
214
|
-
*
|
|
215
|
-
* @param pluginName Name of plugin to unload
|
|
138
|
+
* Unload a plugin from Cursor ā removes skill files from `.cursor/rules/`.
|
|
216
139
|
*/
|
|
217
140
|
async unloadPlugin(pluginName) {
|
|
218
|
-
const projectPath = process.cwd();
|
|
219
|
-
const agentsMdPath = path.join(projectPath, 'AGENTS.md');
|
|
220
141
|
console.log(`\nšļø Unloading plugin from Cursor: ${pluginName}`);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
// Read AGENTS.md
|
|
226
|
-
let agentsMd = await fs.readFile(agentsMdPath, 'utf-8');
|
|
227
|
-
// Find plugin section
|
|
228
|
-
const startMarker = `<!-- Plugin: ${pluginName} -->`;
|
|
229
|
-
const endMarker = `<!-- End Plugin: ${pluginName} -->`;
|
|
230
|
-
const startIndex = agentsMd.indexOf(startMarker);
|
|
231
|
-
if (startIndex === -1) {
|
|
232
|
-
console.warn(`ā ļø Plugin ${pluginName} not found in AGENTS.md`);
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
const endIndex = agentsMd.indexOf(endMarker, startIndex);
|
|
236
|
-
if (endIndex === -1) {
|
|
237
|
-
console.warn(`ā ļø Plugin ${pluginName} section malformed in AGENTS.md`);
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
// Remove plugin section
|
|
241
|
-
agentsMd = agentsMd.slice(0, startIndex) + agentsMd.slice(endIndex + endMarker.length);
|
|
242
|
-
// Write back
|
|
243
|
-
await fs.writeFile(agentsMdPath, agentsMd, 'utf-8');
|
|
244
|
-
console.log(` ā Removed from AGENTS.md`);
|
|
142
|
+
await this.removeSkillFiles(pluginName, '.cursor/rules');
|
|
143
|
+
console.log(` ā Removed from .cursor/rules/`);
|
|
245
144
|
console.log(`\nā
Plugin ${pluginName} unloaded!`);
|
|
246
145
|
}
|
|
247
146
|
/**
|
|
248
|
-
* Get
|
|
249
|
-
*
|
|
250
|
-
* Parses AGENTS.md for plugin markers
|
|
251
|
-
*
|
|
252
|
-
* @returns Array of installed plugin names
|
|
147
|
+
* Get installed plugins for Cursor by scanning `.cursor/rules/`.
|
|
253
148
|
*/
|
|
254
149
|
async getInstalledPlugins() {
|
|
255
|
-
|
|
256
|
-
const agentsMdPath = path.join(projectPath, 'AGENTS.md');
|
|
257
|
-
if (!(await fs.pathExists(agentsMdPath))) {
|
|
258
|
-
return [];
|
|
259
|
-
}
|
|
260
|
-
const agentsMd = await fs.readFile(agentsMdPath, 'utf-8');
|
|
261
|
-
const pluginMarkerRegex = /<!-- Plugin: (specweave-[a-z0-9-]+) -->/g;
|
|
262
|
-
const matches = agentsMd.matchAll(pluginMarkerRegex);
|
|
263
|
-
const plugins = [];
|
|
264
|
-
for (const match of matches) {
|
|
265
|
-
plugins.push(match[1]);
|
|
266
|
-
}
|
|
267
|
-
return plugins;
|
|
150
|
+
return await this.listInstalledPluginsInDir('.cursor/rules');
|
|
268
151
|
}
|
|
269
152
|
}
|
|
270
153
|
//# sourceMappingURL=adapter.js.map
|