workspace-architect 2.2.76 → 2.2.78
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/README.md +69 -1
- package/assets-manifest.json +154 -1
- package/bin/cli-functions.js +135 -8
- package/bin/cli.js +3 -3
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -87,6 +87,9 @@ npx wsa list
|
|
|
87
87
|
npx workspace-architect list instructions
|
|
88
88
|
npx wsa list agents
|
|
89
89
|
npx wsa list prompts
|
|
90
|
+
npx wsa list skills
|
|
91
|
+
npx wsa list hooks
|
|
92
|
+
npx wsa list plugins
|
|
90
93
|
npx wsa list collections
|
|
91
94
|
```
|
|
92
95
|
|
|
@@ -109,6 +112,15 @@ npx wsa download instructions reactjs
|
|
|
109
112
|
# Download an agent
|
|
110
113
|
npx wsa download agents planner
|
|
111
114
|
|
|
115
|
+
# Download a skill
|
|
116
|
+
npx wsa download skills example-planner
|
|
117
|
+
|
|
118
|
+
# Download a hook
|
|
119
|
+
npx wsa download hooks governance-audit
|
|
120
|
+
|
|
121
|
+
# Download a plugin
|
|
122
|
+
npx wsa download plugins awesome-copilot
|
|
123
|
+
|
|
112
124
|
# Download a complete collection
|
|
113
125
|
npx wsa download collections devops-essentials
|
|
114
126
|
```
|
|
@@ -121,7 +133,7 @@ npx wsa download collections devops-essentials
|
|
|
121
133
|
|
|
122
134
|
## Asset Types
|
|
123
135
|
|
|
124
|
-
Workspace Architect provides
|
|
136
|
+
Workspace Architect provides seven types of assets:
|
|
125
137
|
|
|
126
138
|
| Type | Description | Location |
|
|
127
139
|
|------|-------------|----------|
|
|
@@ -129,6 +141,8 @@ Workspace Architect provides five types of assets:
|
|
|
129
141
|
| **Prompts** | Reusable templates for specific tasks | `.github/prompts/` |
|
|
130
142
|
| **Agents** | Specialized personas defining Copilot behavior | `.github/agents/` |
|
|
131
143
|
| **Skills** | Claude Skills with templates, scripts, and resources | `.github/skills/` |
|
|
144
|
+
| **Hooks** | Event-driven scripts that run during Copilot sessions | `.github/hooks/` |
|
|
145
|
+
| **Plugins** | Bundled collections of agents, skills, and commands | `.github/plugins/` |
|
|
132
146
|
| **Collections** | Bundled assets for specific domains or workflows | Multiple locations |
|
|
133
147
|
|
|
134
148
|
### What are Skills?
|
|
@@ -153,6 +167,58 @@ npx workspace-architect list skills
|
|
|
153
167
|
|
|
154
168
|
For more information, see [Skills User Guide](docs/skills-guide.md) and [Skills vs Agents](docs/skills-vs-agents.md).
|
|
155
169
|
|
|
170
|
+
### What are Hooks?
|
|
171
|
+
|
|
172
|
+
**Hooks** are event-driven scripts that execute automatically during GitHub Copilot coding agent sessions. They enable:
|
|
173
|
+
|
|
174
|
+
- **Session Management**: Run scripts when sessions start or end
|
|
175
|
+
- **Prompt Monitoring**: Execute logic when users submit prompts
|
|
176
|
+
- **Governance & Auditing**: Track and control agent behavior
|
|
177
|
+
- **Custom Workflows**: Integrate with external tools and systems
|
|
178
|
+
|
|
179
|
+
Hooks are directory-based assets containing:
|
|
180
|
+
- **README.md**: Documentation with metadata (name, description, tags)
|
|
181
|
+
- **hooks.json**: Hook configuration defining event triggers
|
|
182
|
+
- **Shell scripts**: Executable scripts for each hook event
|
|
183
|
+
|
|
184
|
+
**Example:**
|
|
185
|
+
```bash
|
|
186
|
+
# Download a Hook
|
|
187
|
+
npx workspace-architect download hooks governance-audit
|
|
188
|
+
|
|
189
|
+
# List all Hooks
|
|
190
|
+
npx workspace-architect list hooks
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Available Hook Events:**
|
|
194
|
+
- `sessionStart` - Triggered when a coding session begins
|
|
195
|
+
- `sessionEnd` - Triggered when a coding session ends
|
|
196
|
+
- `userPromptSubmitted` - Triggered when a user submits a prompt
|
|
197
|
+
|
|
198
|
+
### What are Plugins?
|
|
199
|
+
|
|
200
|
+
**Plugins** are bundled packages that extend GitHub Copilot with curated collections of agents, skills, and commands for specific domains or workflows. Each plugin provides:
|
|
201
|
+
|
|
202
|
+
- **Agents**: Custom agents for specialized tasks
|
|
203
|
+
- **Skills**: Meta-prompts and slash commands
|
|
204
|
+
- **Commands**: Interactive workflows
|
|
205
|
+
- **Documentation**: Setup and usage guides
|
|
206
|
+
|
|
207
|
+
Plugins are directory-based assets containing:
|
|
208
|
+
- **README.md**: Documentation with metadata
|
|
209
|
+
- **agents/**: Agent definitions
|
|
210
|
+
- **skills/**: Skill definitions
|
|
211
|
+
- **.github/plugin/**: Plugin configuration
|
|
212
|
+
|
|
213
|
+
**Example:**
|
|
214
|
+
```bash
|
|
215
|
+
# Download a Plugin
|
|
216
|
+
npx workspace-architect download plugins awesome-copilot
|
|
217
|
+
|
|
218
|
+
# List all Plugins
|
|
219
|
+
npx workspace-architect list plugins
|
|
220
|
+
```
|
|
221
|
+
|
|
156
222
|
## Roadmap
|
|
157
223
|
|
|
158
224
|
See [ROADMAP.md](ROADMAP.md) for our development timeline, upcoming features, and current capabilities.
|
|
@@ -226,6 +292,8 @@ Create a JSON file in `assets/collections/`:
|
|
|
226
292
|
- `npm run sync-agents` - Sync agents from github/awesome-copilot
|
|
227
293
|
- `npm run sync-instructions` - Sync instructions from github/awesome-copilot
|
|
228
294
|
- `npm run sync-skills` - Sync skills from anthropics/skills
|
|
295
|
+
- `npm run sync-hooks` - Sync hooks from github/awesome-copilot
|
|
296
|
+
- `npm run sync-plugins` - Sync plugins from github/awesome-copilot
|
|
229
297
|
- Note: Prompts are maintained locally and not synced from upstream
|
|
230
298
|
- `npm run validate-skills` - Validate all synced skills
|
|
231
299
|
|
package/assets-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "2.0.0",
|
|
3
|
-
"generatedAt": "2026-04-
|
|
3
|
+
"generatedAt": "2026-04-28T03:14:21.082Z",
|
|
4
4
|
"assets": {
|
|
5
5
|
"agents": {
|
|
6
6
|
"CSharpExpert": {
|
|
@@ -1017,6 +1017,12 @@
|
|
|
1017
1017
|
"title": "salesforce-visualforce",
|
|
1018
1018
|
"type": "agents"
|
|
1019
1019
|
},
|
|
1020
|
+
"sast-sca-security-analyzer": {
|
|
1021
|
+
"path": "assets/agents/sast-sca-security-analyzer.agent.md",
|
|
1022
|
+
"description": "Use when: performing SAST (Static Application Security Testing), SCA (Software Composition Analysis), scanning source code or binaries for security flaws, auditing third-party dependency vulnerabilities, checking policy compliance, generating structured security reports, identifying CWE-mapped flaws with file/line precision, reviewing open-source license risk, or producing CI/CD-gate security findings.",
|
|
1023
|
+
"title": "sast-sca-security-analyzer",
|
|
1024
|
+
"type": "agents"
|
|
1025
|
+
},
|
|
1020
1026
|
"scientific-paper-research": {
|
|
1021
1027
|
"path": "assets/agents/scientific-paper-research.agent.md",
|
|
1022
1028
|
"description": "Research agent that searches scientific papers and retrieves structured experimental data from full-text studies using the BGPT MCP server.",
|
|
@@ -5443,6 +5449,7 @@
|
|
|
5443
5449
|
"shared/managed-agents-core.md",
|
|
5444
5450
|
"shared/managed-agents-environments.md",
|
|
5445
5451
|
"shared/managed-agents-events.md",
|
|
5452
|
+
"shared/managed-agents-memory.md",
|
|
5446
5453
|
"shared/managed-agents-onboarding.md",
|
|
5447
5454
|
"shared/managed-agents-overview.md",
|
|
5448
5455
|
"shared/managed-agents-tools.md",
|
|
@@ -5980,6 +5987,152 @@
|
|
|
5980
5987
|
"license": "Proprietary. LICENSE.txt has complete terms"
|
|
5981
5988
|
}
|
|
5982
5989
|
}
|
|
5990
|
+
},
|
|
5991
|
+
"hooks": {
|
|
5992
|
+
"governance-audit": {
|
|
5993
|
+
"path": "assets/hooks/governance-audit",
|
|
5994
|
+
"description": "Scans Copilot agent prompts for threat signals and logs governance events",
|
|
5995
|
+
"title": "Governance Audit",
|
|
5996
|
+
"type": "hooks",
|
|
5997
|
+
"files": [
|
|
5998
|
+
"README.md",
|
|
5999
|
+
"audit-prompt.sh",
|
|
6000
|
+
"audit-session-end.sh",
|
|
6001
|
+
"audit-session-start.sh",
|
|
6002
|
+
"hooks.json"
|
|
6003
|
+
],
|
|
6004
|
+
"metadata": {}
|
|
6005
|
+
},
|
|
6006
|
+
"session-auto-commit": {
|
|
6007
|
+
"path": "assets/hooks/session-auto-commit",
|
|
6008
|
+
"description": "Automatically commits and pushes changes when a Copilot coding agent session ends",
|
|
6009
|
+
"title": "Session Auto-Commit",
|
|
6010
|
+
"type": "hooks",
|
|
6011
|
+
"files": [
|
|
6012
|
+
"README.md",
|
|
6013
|
+
"auto-commit.sh",
|
|
6014
|
+
"hooks.json"
|
|
6015
|
+
],
|
|
6016
|
+
"metadata": {}
|
|
6017
|
+
},
|
|
6018
|
+
"session-logger": {
|
|
6019
|
+
"path": "assets/hooks/session-logger",
|
|
6020
|
+
"description": "Logs all Copilot coding agent session activity for audit and analysis",
|
|
6021
|
+
"title": "Session Logger",
|
|
6022
|
+
"type": "hooks",
|
|
6023
|
+
"files": [
|
|
6024
|
+
"README.md",
|
|
6025
|
+
"hooks.json",
|
|
6026
|
+
"log-prompt.sh",
|
|
6027
|
+
"log-session-end.sh",
|
|
6028
|
+
"log-session-start.sh"
|
|
6029
|
+
],
|
|
6030
|
+
"metadata": {}
|
|
6031
|
+
}
|
|
6032
|
+
},
|
|
6033
|
+
"plugins": {
|
|
6034
|
+
"awesome-copilot": {
|
|
6035
|
+
"path": "assets/plugins/awesome-copilot",
|
|
6036
|
+
"description": "",
|
|
6037
|
+
"title": "awesome-copilot",
|
|
6038
|
+
"type": "plugins",
|
|
6039
|
+
"files": [
|
|
6040
|
+
".github/plugin/plugin.json",
|
|
6041
|
+
"README.md",
|
|
6042
|
+
"agents/meta-agentic-project-scaffold.md",
|
|
6043
|
+
"skills/suggest-awesome-github-copilot-agents/SKILL.md",
|
|
6044
|
+
"skills/suggest-awesome-github-copilot-instructions/SKILL.md",
|
|
6045
|
+
"skills/suggest-awesome-github-copilot-prompts/SKILL.md",
|
|
6046
|
+
"skills/suggest-awesome-github-copilot-skills/SKILL.md"
|
|
6047
|
+
],
|
|
6048
|
+
"metadata": {}
|
|
6049
|
+
},
|
|
6050
|
+
"azure-cloud-development": {
|
|
6051
|
+
"path": "assets/plugins/azure-cloud-development",
|
|
6052
|
+
"description": "",
|
|
6053
|
+
"title": "azure-cloud-development",
|
|
6054
|
+
"type": "plugins",
|
|
6055
|
+
"files": [
|
|
6056
|
+
".github/plugin/plugin.json",
|
|
6057
|
+
"README.md",
|
|
6058
|
+
"agents/azure-logic-apps-expert.md",
|
|
6059
|
+
"agents/azure-principal-architect.md",
|
|
6060
|
+
"agents/azure-saas-architect.md",
|
|
6061
|
+
"agents/azure-verified-modules-bicep.md",
|
|
6062
|
+
"agents/azure-verified-modules-terraform.md",
|
|
6063
|
+
"agents/terraform-azure-implement.md",
|
|
6064
|
+
"agents/terraform-azure-planning.md",
|
|
6065
|
+
"skills/az-cost-optimize/SKILL.md",
|
|
6066
|
+
"skills/azure-resource-health-diagnose/SKILL.md"
|
|
6067
|
+
],
|
|
6068
|
+
"metadata": {}
|
|
6069
|
+
},
|
|
6070
|
+
"cast-imaging": {
|
|
6071
|
+
"path": "assets/plugins/cast-imaging",
|
|
6072
|
+
"description": "",
|
|
6073
|
+
"title": "cast-imaging",
|
|
6074
|
+
"type": "plugins",
|
|
6075
|
+
"files": [
|
|
6076
|
+
".github/plugin/plugin.json",
|
|
6077
|
+
"README.md",
|
|
6078
|
+
"agents/cast-imaging-impact-analysis.md",
|
|
6079
|
+
"agents/cast-imaging-software-discovery.md",
|
|
6080
|
+
"agents/cast-imaging-structural-quality-advisor.md"
|
|
6081
|
+
],
|
|
6082
|
+
"metadata": {}
|
|
6083
|
+
},
|
|
6084
|
+
"clojure-interactive-programming": {
|
|
6085
|
+
"path": "assets/plugins/clojure-interactive-programming",
|
|
6086
|
+
"description": "",
|
|
6087
|
+
"title": "clojure-interactive-programming",
|
|
6088
|
+
"type": "plugins",
|
|
6089
|
+
"files": [
|
|
6090
|
+
".github/plugin/plugin.json",
|
|
6091
|
+
"README.md",
|
|
6092
|
+
"agents/clojure-interactive-programming.md",
|
|
6093
|
+
"skills/remember-interactive-programming/SKILL.md"
|
|
6094
|
+
],
|
|
6095
|
+
"metadata": {}
|
|
6096
|
+
},
|
|
6097
|
+
"context-engineering": {
|
|
6098
|
+
"path": "assets/plugins/context-engineering",
|
|
6099
|
+
"description": "",
|
|
6100
|
+
"title": "context-engineering",
|
|
6101
|
+
"type": "plugins",
|
|
6102
|
+
"files": [
|
|
6103
|
+
".github/plugin/plugin.json",
|
|
6104
|
+
"README.md",
|
|
6105
|
+
"agents/context-architect.md",
|
|
6106
|
+
"skills/context-map/SKILL.md",
|
|
6107
|
+
"skills/refactor-plan/SKILL.md",
|
|
6108
|
+
"skills/what-context-needed/SKILL.md"
|
|
6109
|
+
],
|
|
6110
|
+
"metadata": {}
|
|
6111
|
+
},
|
|
6112
|
+
"copilot-sdk": {
|
|
6113
|
+
"path": "assets/plugins/copilot-sdk",
|
|
6114
|
+
"description": "",
|
|
6115
|
+
"title": "copilot-sdk",
|
|
6116
|
+
"type": "plugins",
|
|
6117
|
+
"files": [
|
|
6118
|
+
".github/plugin/plugin.json",
|
|
6119
|
+
"README.md",
|
|
6120
|
+
"skills/copilot-sdk/SKILL.md"
|
|
6121
|
+
],
|
|
6122
|
+
"metadata": {}
|
|
6123
|
+
},
|
|
6124
|
+
"csharp-dotnet-development": {
|
|
6125
|
+
"path": "assets/plugins/csharp-dotnet-development",
|
|
6126
|
+
"description": "",
|
|
6127
|
+
"title": "csharp-dotnet-development",
|
|
6128
|
+
"type": "plugins",
|
|
6129
|
+
"files": [
|
|
6130
|
+
".github/plugin/plugin.json",
|
|
6131
|
+
"README.md",
|
|
6132
|
+
"agents/expert-dotnet-software-engineer.md"
|
|
6133
|
+
],
|
|
6134
|
+
"metadata": {}
|
|
6135
|
+
}
|
|
5983
6136
|
}
|
|
5984
6137
|
}
|
|
5985
6138
|
}
|
package/bin/cli-functions.js
CHANGED
|
@@ -73,7 +73,9 @@ export function convertYamlItemsToFlat(items) {
|
|
|
73
73
|
'instruction': 'instructions',
|
|
74
74
|
'prompt': 'prompts',
|
|
75
75
|
'skill': 'skills',
|
|
76
|
-
'collection': 'collections'
|
|
76
|
+
'collection': 'collections',
|
|
77
|
+
'hook': 'hooks',
|
|
78
|
+
'plugin': 'plugins'
|
|
77
79
|
};
|
|
78
80
|
|
|
79
81
|
const flatItems = [];
|
|
@@ -137,11 +139,17 @@ export async function listAssets(type) {
|
|
|
137
139
|
let description = '';
|
|
138
140
|
|
|
139
141
|
try {
|
|
140
|
-
if (type === 'skills' && stat.isDirectory()) {
|
|
141
|
-
// For Skills, read
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
|
|
142
|
+
if ((type === 'skills' || type === 'hooks' || type === 'plugins') && stat.isDirectory()) {
|
|
143
|
+
// For Skills, Hooks, and Plugins, read README.md from directory
|
|
144
|
+
let readmePath;
|
|
145
|
+
if (type === 'skills') {
|
|
146
|
+
readmePath = path.join(filePath, 'SKILL.md');
|
|
147
|
+
} else {
|
|
148
|
+
readmePath = path.join(filePath, 'README.md');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (await fs.pathExists(readmePath)) {
|
|
152
|
+
const content = await fs.readFile(readmePath, 'utf8');
|
|
145
153
|
const parsed = matter(content);
|
|
146
154
|
description = parsed.data.description || '';
|
|
147
155
|
}
|
|
@@ -165,7 +173,7 @@ export async function listAssets(type) {
|
|
|
165
173
|
|
|
166
174
|
// Extract clean name without extensions
|
|
167
175
|
let name;
|
|
168
|
-
if (type === 'skills' && stat.isDirectory()) {
|
|
176
|
+
if ((type === 'skills' || type === 'hooks' || type === 'plugins') && stat.isDirectory()) {
|
|
169
177
|
name = file;
|
|
170
178
|
} else if (type === 'collections') {
|
|
171
179
|
name = file.replace(/\.(collection\.)?(yml|yaml|json)$/, '');
|
|
@@ -317,6 +325,119 @@ export async function downloadSkill(name, options) {
|
|
|
317
325
|
console.log(chalk.green(`Successfully downloaded skill ${skillName} to ${destDir} (${skillFiles.length} files)`));
|
|
318
326
|
}
|
|
319
327
|
|
|
328
|
+
export async function downloadDirectoryAsset(type, name, options) {
|
|
329
|
+
const assetName = name;
|
|
330
|
+
let assetFiles = [];
|
|
331
|
+
let assetPath = '';
|
|
332
|
+
|
|
333
|
+
if (IS_LOCAL) {
|
|
334
|
+
// Local mode: copy from assets/<type>
|
|
335
|
+
assetPath = path.join(ASSETS_DIR, type, assetName);
|
|
336
|
+
|
|
337
|
+
if (!await fs.pathExists(assetPath)) {
|
|
338
|
+
throw new Error(`${type} not found: ${type}/${assetName}`);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Get all files in the asset directory
|
|
342
|
+
const getAllFiles = async (dir, baseDir = dir) => {
|
|
343
|
+
const files = [];
|
|
344
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
345
|
+
|
|
346
|
+
for (const entry of entries) {
|
|
347
|
+
const fullPath = path.join(dir, entry.name);
|
|
348
|
+
if (entry.isDirectory()) {
|
|
349
|
+
const subFiles = await getAllFiles(fullPath, baseDir);
|
|
350
|
+
files.push(...subFiles);
|
|
351
|
+
} else {
|
|
352
|
+
const relativePath = path.relative(baseDir, fullPath);
|
|
353
|
+
files.push({ relative: relativePath, full: fullPath });
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return files;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
assetFiles = await getAllFiles(assetPath);
|
|
360
|
+
} else {
|
|
361
|
+
// Production mode: fetch from manifest and download from GitHub
|
|
362
|
+
const manifest = await getManifest();
|
|
363
|
+
const asset = manifest.assets[type]?.[assetName];
|
|
364
|
+
|
|
365
|
+
if (!asset) {
|
|
366
|
+
throw new Error(`${type} not found: ${assetName}`);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
assetPath = asset.path;
|
|
370
|
+
assetFiles = asset.files.map(file => ({
|
|
371
|
+
relative: file,
|
|
372
|
+
url: `https://raw.githubusercontent.com/archubbuck/workspace-architect/main/${asset.path}/${file}`
|
|
373
|
+
}));
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Determine destination
|
|
377
|
+
let destDir;
|
|
378
|
+
if (options.output) {
|
|
379
|
+
destDir = path.resolve(process.cwd(), options.output);
|
|
380
|
+
} else {
|
|
381
|
+
destDir = path.join(process.cwd(), '.github', type, assetName);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
if (options.dryRun) {
|
|
385
|
+
console.log(chalk.cyan(`[Dry Run] Would create ${type.slice(0, -1)} directory at ${destDir}`));
|
|
386
|
+
for (const file of assetFiles) {
|
|
387
|
+
console.log(chalk.cyan(` Would copy: ${file.relative}`));
|
|
388
|
+
}
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// Check if asset already exists
|
|
393
|
+
if (await fs.pathExists(destDir) && !options.force) {
|
|
394
|
+
const inquirer = (await import('inquirer')).default;
|
|
395
|
+
const { overwrite } = await inquirer.prompt([
|
|
396
|
+
{
|
|
397
|
+
type: 'confirm',
|
|
398
|
+
name: 'overwrite',
|
|
399
|
+
message: `${type.charAt(0).toUpperCase() + type.slice(1, -1)} ${assetName} already exists in ${destDir}. Overwrite?`,
|
|
400
|
+
default: false
|
|
401
|
+
}
|
|
402
|
+
]);
|
|
403
|
+
|
|
404
|
+
if (!overwrite) {
|
|
405
|
+
console.log(chalk.yellow('Operation cancelled.'));
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
console.log(chalk.blue(`Downloading ${type.slice(0, -1)}: ${assetName}`));
|
|
411
|
+
|
|
412
|
+
// Create asset directory
|
|
413
|
+
await fs.ensureDir(destDir);
|
|
414
|
+
|
|
415
|
+
// Download/copy all files
|
|
416
|
+
for (const file of assetFiles) {
|
|
417
|
+
const destPath = path.join(destDir, file.relative);
|
|
418
|
+
const destFileDir = path.dirname(destPath);
|
|
419
|
+
await fs.ensureDir(destFileDir);
|
|
420
|
+
|
|
421
|
+
if (IS_LOCAL) {
|
|
422
|
+
// Copy from local assets
|
|
423
|
+
await fs.copyFile(file.full, destPath);
|
|
424
|
+
} else {
|
|
425
|
+
// Download from GitHub
|
|
426
|
+
const response = await fetch(file.url);
|
|
427
|
+
if (!response.ok) {
|
|
428
|
+
console.warn(chalk.yellow(`Warning: Failed to download ${file.relative}`));
|
|
429
|
+
continue;
|
|
430
|
+
}
|
|
431
|
+
const content = await response.text();
|
|
432
|
+
await fs.writeFile(destPath, content);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
console.log(chalk.dim(` Downloaded: ${file.relative}`));
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
console.log(chalk.green(`Successfully downloaded ${type.slice(0, -1)} ${assetName} to ${destDir} (${assetFiles.length} files)`));
|
|
439
|
+
}
|
|
440
|
+
|
|
320
441
|
export async function downloadAsset(id, options) {
|
|
321
442
|
const [type, name] = id.split(':');
|
|
322
443
|
|
|
@@ -324,7 +445,7 @@ export async function downloadAsset(id, options) {
|
|
|
324
445
|
throw new Error('Invalid ID format. Use type:name (e.g., instructions:basic-setup)');
|
|
325
446
|
}
|
|
326
447
|
|
|
327
|
-
const validTypes = ['instructions', 'prompts', 'agents', 'skills', 'collections'];
|
|
448
|
+
const validTypes = ['instructions', 'prompts', 'agents', 'skills', 'hooks', 'plugins', 'collections'];
|
|
328
449
|
if (!validTypes.includes(type)) {
|
|
329
450
|
throw new Error(`Invalid type: ${type}. Valid types are: ${validTypes.join(', ')}`);
|
|
330
451
|
}
|
|
@@ -399,6 +520,12 @@ export async function downloadAsset(id, options) {
|
|
|
399
520
|
return;
|
|
400
521
|
}
|
|
401
522
|
|
|
523
|
+
// Handle Hooks and Plugins (multi-file folder-based assets)
|
|
524
|
+
if (type === 'hooks' || type === 'plugins') {
|
|
525
|
+
await downloadDirectoryAsset(type, name, options);
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
|
|
402
529
|
// Handle Single Asset
|
|
403
530
|
let content = '';
|
|
404
531
|
let fileName = '';
|
package/bin/cli.js
CHANGED
|
@@ -13,18 +13,18 @@ import {
|
|
|
13
13
|
|
|
14
14
|
program
|
|
15
15
|
.name('workspace-architect')
|
|
16
|
-
.description('CLI to download GitHub Copilot instructions, prompts, and
|
|
16
|
+
.description('CLI to download GitHub Copilot instructions, prompts, agents, hooks, plugins, and skills (alias: wsa)')
|
|
17
17
|
.version('1.0.0');
|
|
18
18
|
|
|
19
19
|
program
|
|
20
20
|
.command('list [type]')
|
|
21
|
-
.description('List available assets (instructions, prompts, agents, skills, collections)')
|
|
21
|
+
.description('List available assets (instructions, prompts, agents, skills, hooks, plugins, collections)')
|
|
22
22
|
.action(async (type) => {
|
|
23
23
|
try {
|
|
24
24
|
if (type) {
|
|
25
25
|
await listAssets(type);
|
|
26
26
|
} else {
|
|
27
|
-
const types = ['instructions', 'prompts', 'agents', 'skills', 'collections'];
|
|
27
|
+
const types = ['instructions', 'prompts', 'agents', 'skills', 'hooks', 'plugins', 'collections'];
|
|
28
28
|
for (const t of types) {
|
|
29
29
|
await listAssets(t);
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workspace-architect",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.78",
|
|
4
4
|
"description": "A comprehensive library of specialized AI agents and personas for GitHub Copilot, ranging from architectural planning and specific tech stacks to advanced cognitive reasoning models.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"workspace-architect": "bin/cli.js",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"sync-prompts": "node scripts/sync-repo.js prompts",
|
|
25
25
|
"sync-collections": "node scripts/sync-repo.js collections",
|
|
26
26
|
"sync-skills": "node scripts/sync-repo.js skills",
|
|
27
|
+
"sync-hooks": "node scripts/sync-repo.js hooks",
|
|
28
|
+
"sync-plugins": "node scripts/sync-repo.js plugins",
|
|
27
29
|
"sync-all": "node scripts/sync-repo.js all",
|
|
28
30
|
"validate-skills": "node scripts/analysis/validate-skills.js",
|
|
29
31
|
"validate-assets": "node scripts/analysis/validate-assets.js",
|