@specd/plugin-agent-copilot
Advanced tools
+3
-2
@@ -1,2 +0,2 @@ | ||
| import { AgentPlugin } from '@specd/plugin-manager'; | ||
| import { PluginLoaderOptions, AgentPlugin } from '@specd/plugin-manager'; | ||
@@ -6,6 +6,7 @@ /** | ||
| * | ||
| * @param _options - Loader options. | ||
| * @returns Configured CopilotAgentPlugin instance. | ||
| */ | ||
| declare function create(): Promise<AgentPlugin>; | ||
| declare function create(_options: PluginLoaderOptions): Promise<AgentPlugin>; | ||
| export { create }; |
+28
-24
@@ -53,11 +53,12 @@ // src/index.ts | ||
| * | ||
| * @param projectRoot - Absolute project root. | ||
| * @param config - Project configuration. | ||
| * @param options - Install options. | ||
| * @returns Install summary. | ||
| */ | ||
| async execute(projectRoot, options) { | ||
| async execute(config, options) { | ||
| const repository = createSkillRepository(); | ||
| const availableSkills = repository.list(); | ||
| const requestedSkills = options?.skills !== void 0 && options.skills.length > 0 ? options.skills : availableSkills.map((skill) => skill.name); | ||
| const targetDir = path.join(projectRoot, ".github", "skills"); | ||
| const targetDir = path.join(config.projectRoot, ".github", "skills"); | ||
| const sharedDir = path.join(targetDir, "_specd-shared"); | ||
| await mkdir(targetDir, { recursive: true }); | ||
@@ -72,3 +73,3 @@ const installed = []; | ||
| } | ||
| const bundle = repository.getBundle(skillName, options?.variables); | ||
| const bundle = repository.getBundle(skillName, options?.variables, config); | ||
| if (bundle.files.length === 0) { | ||
@@ -84,4 +85,6 @@ skipped.push({ skill: skillName, reason: "bundle has no files" }); | ||
| for (const file of bundle.files) { | ||
| const outputPath = path.join(skillDir, file.filename); | ||
| const content = file.filename.endsWith(".md") ? renderFrontmatter(frontmatter, file.content) : file.content; | ||
| const baseDir = file.shared === true ? sharedDir : skillDir; | ||
| const outputPath = path.join(baseDir, file.filename); | ||
| await mkdir(path.dirname(outputPath), { recursive: true }); | ||
| const content = file.filename.endsWith(".md") && file.shared !== true ? renderFrontmatter(frontmatter, file.content) : file.content; | ||
| await writeFile(outputPath, content, "utf8"); | ||
@@ -115,4 +118,4 @@ } | ||
| import { rm as rm2 } from "fs/promises"; | ||
| import { createSkillRepository as createSkillRepository2 } from "@specd/skills"; | ||
| import path2 from "path"; | ||
| import { createSkillRepository as createSkillRepository2 } from "@specd/skills"; | ||
| var UninstallSkills = class { | ||
@@ -122,8 +125,8 @@ /** | ||
| * | ||
| * @param projectRoot - Absolute project root. | ||
| * @param config - Project configuration. | ||
| * @param options - Uninstall options. | ||
| * @returns A promise that resolves when uninstall finishes. | ||
| */ | ||
| async execute(projectRoot, options) { | ||
| const targetDir = path2.join(projectRoot, ".github", "skills"); | ||
| async execute(config, options) { | ||
| const targetDir = path2.join(config.projectRoot, ".github", "skills"); | ||
| if (options?.skills !== void 0 && options.skills.length > 0) { | ||
@@ -136,7 +139,8 @@ for (const skill of options.skills) { | ||
| } | ||
| const repository = createSkillRepository2(); | ||
| for (const skill of repository.list()) { | ||
| await rm2(path2.join(targetDir, skill.name), { recursive: true, force: true }); | ||
| await rm2(path2.join(targetDir, `${skill.name}.md`), { force: true }); | ||
| const managedSkills = createSkillRepository2().list().map((skill) => skill.name); | ||
| for (const skill of managedSkills) { | ||
| await rm2(path2.join(targetDir, skill), { recursive: true, force: true }); | ||
| await rm2(path2.join(targetDir, `${skill}.md`), { force: true }); | ||
| } | ||
| await rm2(path2.join(targetDir, "_specd-shared"), { recursive: true, force: true }); | ||
| } | ||
@@ -203,8 +207,8 @@ }; | ||
| * | ||
| * @param projectRoot - Absolute project root. | ||
| * @param config - Project configuration. | ||
| * @param options - Install options. | ||
| * @returns Install summary. | ||
| */ | ||
| async install(projectRoot, options) { | ||
| return this.runInstall(projectRoot, options); | ||
| async install(config, options) { | ||
| return this.runInstall(config, options); | ||
| } | ||
@@ -214,8 +218,8 @@ /** | ||
| * | ||
| * @param projectRoot - Absolute project root. | ||
| * @param config - Project configuration. | ||
| * @param options - Optional skill filter. | ||
| * @returns A promise that resolves when uninstall finishes. | ||
| * @returns A promise that resolves when uninstall completes. | ||
| */ | ||
| async uninstall(projectRoot, options) { | ||
| return this.runUninstall(projectRoot, options); | ||
| async uninstall(config, options) { | ||
| return this.runUninstall(config, options); | ||
| } | ||
@@ -242,3 +246,3 @@ }; | ||
| } | ||
| async function create() { | ||
| async function create(_options) { | ||
| const { name, version } = await readManifest(); | ||
@@ -250,4 +254,4 @@ const installSkills = new InstallSkills(); | ||
| version, | ||
| (projectRoot, options) => installSkills.execute(projectRoot, options), | ||
| (projectRoot, options) => uninstallSkills.execute(projectRoot, options) | ||
| (targetConfig, installOptions) => installSkills.execute(targetConfig, installOptions), | ||
| (targetConfig, uninstallOptions) => uninstallSkills.execute(targetConfig, uninstallOptions) | ||
| ); | ||
@@ -254,0 +258,0 @@ } |
+6
-4
| { | ||
| "name": "@specd/plugin-agent-copilot", | ||
| "version": "0.1.0", | ||
| "version": "0.2.0", | ||
| "license": "MIT", | ||
| "private": false, | ||
| "repository": "https://github.com/specd-sdd/specd", | ||
| "repository": "https://github.com/specd-sdd/SpecD", | ||
| "homepage": "https://getspecd.dev", | ||
| "files": [ | ||
@@ -19,4 +20,5 @@ "dist/", | ||
| "dependencies": { | ||
| "@specd/plugin-manager": "0.1.0", | ||
| "@specd/skills": "0.1.0" | ||
| "@specd/core": "^0.2.0", | ||
| "@specd/plugin-manager": "0.2.0", | ||
| "@specd/skills": "0.2.0" | ||
| }, | ||
@@ -23,0 +25,0 @@ "scripts": { |
+8
-2
| # @specd/plugin-agent-copilot | ||
| GitHub Copilot agent plugin for specd. Installs specd skills into `.github/skills/` with Copilot-specific YAML frontmatter. | ||
| GitHub Copilot agent plugin for [specd](https://github.com/specd-sdd/SpecD). For more information, visit [getspecd.dev](https://getspecd.dev). Installs specd skills into `.github/skills/` with Copilot-specific YAML frontmatter. | ||
@@ -24,6 +24,12 @@ ## Install | ||
| Skills are written to `.github/skills/<skill-name>/` under the project root. | ||
| Skill-local files are written to `.github/skills/<skill-name>/` under the project root. | ||
| Files marked as shared are written once to `.github/skills/_specd-shared/`. | ||
| ## Uninstall behavior | ||
| - `specd plugins uninstall @specd/plugin-agent-copilot --skills <name>` removes only selected skill directories and keeps `_specd-shared/`. | ||
| - `specd plugins uninstall @specd/plugin-agent-copilot` removes `.github/skills/` completely, including `_specd-shared/`. | ||
| ## License | ||
| MIT |
| { | ||
| "schemaVersion": 1, | ||
| "name": "@specd/plugin-agent-copilot", | ||
| "version": "0.1.0", | ||
| "version": "0.2.0", | ||
| "description": "Copilot agent plugin for specd skills installation", | ||
@@ -6,0 +6,0 @@ "pluginType": "agent", |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
12218
8.73%262
1.95%1
-50%35
20.69%3
50%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated