@aiwg/cli 2026.8.0 → 2026.8.1
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 +33 -0
- package/agentic/code/providers/capability-matrix.yaml +511 -0
- package/agentic/code/providers/model-capabilities.v1.json +120 -0
- package/agentic/code/providers/model-catalog.v1.json +96 -0
- package/agentic/code/providers/model-policy-evaluations.v1.json +50 -0
- package/agentic/code/providers/premium-model-allowlist.v1.json +36 -0
- package/bin/aiwg.mjs +14 -10
- package/dist/src/api/index.d.ts +1 -0
- package/dist/src/api/index.js +1 -0
- package/dist/src/artifacts/cli.js +2 -0
- package/dist/src/artifacts/types.js +4 -0
- package/dist/src/auth/client.js +209 -0
- package/dist/src/auth/config.js +38 -0
- package/dist/src/auth/credential-store.js +141 -0
- package/dist/src/auth/resource-credentials.js +25 -0
- package/dist/src/auth/types.js +2 -0
- package/dist/src/channel/manager.mjs +5 -5
- package/dist/src/cli/handlers/auth.js +125 -0
- package/dist/src/cli/handlers/help.js +1 -0
- package/dist/src/cli/handlers/index.js +3 -1
- package/dist/src/cli/handlers/resource-versions.js +2 -0
- package/dist/src/cli/handlers/sessions.js +23 -5
- package/dist/src/cli/handlers/subcommands.js +10 -1
- package/dist/src/cli/handlers/use.js +342 -43
- package/dist/src/config/gitignore.js +1 -0
- package/dist/src/extensions/commands/definitions.js +19 -0
- package/dist/src/memory/canonical-context.js +342 -0
- package/dist/src/memory/context-pack.js +282 -0
- package/dist/src/memory/index.js +4 -0
- package/dist/src/memory/intake.js +118 -0
- package/dist/src/resources/resolver.js +1 -0
- package/dist/src/resources/web-release.d.ts +3 -1
- package/dist/src/resources/web-release.js +14 -6
- package/dist/src/serve/agentic-sandbox-fleet-client.js +213 -0
- package/dist/src/serve/fleet-mission-conductor.js +293 -0
- package/dist/src/sessions/index.js +1 -0
- package/dist/src/sessions/output-registration.js +338 -0
- package/dist/src/sessions/promotion.js +73 -2
- package/dist/src/sessions/repository.js +2 -1
- package/dist/src/update/notifier.mjs +13 -2
- package/package.json +8 -1
- package/tools/_resolve-impl.mjs +74 -0
- package/tools/agents/deploy-agents.mjs +962 -0
- package/tools/agents/providers/base.mjs +2954 -0
- package/tools/agents/providers/claude.mjs +711 -0
- package/tools/agents/providers/codex.mjs +699 -0
- package/tools/agents/providers/copilot.mjs +659 -0
- package/tools/agents/providers/cursor.mjs +714 -0
- package/tools/agents/providers/factory.mjs +1130 -0
- package/tools/agents/providers/hermes.mjs +663 -0
- package/tools/agents/providers/hook-capabilities.mjs +85 -0
- package/tools/agents/providers/model-role.mjs +56 -0
- package/tools/agents/providers/openclaw-translator.mjs +348 -0
- package/tools/agents/providers/openclaw.mjs +680 -0
- package/tools/agents/providers/opencode.mjs +675 -0
- package/tools/agents/providers/openhuman.mjs +292 -0
- package/tools/agents/providers/warp.mjs +413 -0
- package/tools/agents/providers/windsurf.mjs +748 -0
- package/tools/commands/deploy-prompts-codex.mjs +336 -0
- package/tools/plugin/package-plugins.mjs +1013 -0
- package/tools/skills/deploy-skills-codex.mjs +571 -0
|
@@ -0,0 +1,1013 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file package-plugins.mjs
|
|
5
|
+
* @description Package AIWG components as Claude Code plugins
|
|
6
|
+
* @implements @.aiwg/architecture/decisions/ADR-016-claude-code-plugin-distribution.md
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* node tools/plugin/package-plugins.mjs --all # Package all plugins
|
|
10
|
+
* node tools/plugin/package-plugins.mjs --plugin aiwg-sdlc # Package specific plugin
|
|
11
|
+
* node tools/plugin/package-plugins.mjs --clean # Clean agentic/code/plugins directory
|
|
12
|
+
* node tools/plugin/package-plugins.mjs --dry-run # Show what would be copied
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import fs from 'fs';
|
|
16
|
+
import path from 'path';
|
|
17
|
+
import { fileURLToPath } from 'url';
|
|
18
|
+
import { importImpl } from '../_resolve-impl.mjs';
|
|
19
|
+
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = path.dirname(__filename);
|
|
22
|
+
const ROOT_DIR = path.resolve(__dirname, '../..');
|
|
23
|
+
const PLUGINS_DIR = path.join(ROOT_DIR, 'agentic/code/plugins');
|
|
24
|
+
|
|
25
|
+
// Plugin configurations
|
|
26
|
+
const PLUGIN_CONFIGS = {
|
|
27
|
+
'sdlc': {
|
|
28
|
+
name: 'sdlc',
|
|
29
|
+
displayName: 'AIWG SDLC Complete',
|
|
30
|
+
version: '2024.12.4',
|
|
31
|
+
description: 'Complete SDLC framework with 180+ specialized agents for software development lifecycle management.',
|
|
32
|
+
sources: {
|
|
33
|
+
agents: 'agentic/code/frameworks/sdlc-complete/agents',
|
|
34
|
+
commands: 'agentic/code/frameworks/sdlc-complete/commands',
|
|
35
|
+
skills: 'agentic/code/frameworks/sdlc-complete/skills'
|
|
36
|
+
},
|
|
37
|
+
readme: `# AIWG SDLC Complete
|
|
38
|
+
|
|
39
|
+
Complete Software Development Lifecycle framework with 180+ specialized agents.
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **58 Specialized Agents**: Architecture, security, testing, deployment, and more
|
|
44
|
+
- **Phase-Based Workflows**: Inception → Elaboration → Construction → Transition
|
|
45
|
+
- **Security Reviews**: Automated threat modeling and security gates
|
|
46
|
+
- **Testing Orchestration**: Multi-level test strategy execution
|
|
47
|
+
- **Deployment Automation**: Release planning and deployment workflows
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
\`\`\`bash
|
|
52
|
+
# Check project status
|
|
53
|
+
/project-status
|
|
54
|
+
|
|
55
|
+
# Start SDLC workflow
|
|
56
|
+
"transition to elaboration"
|
|
57
|
+
|
|
58
|
+
# Run security review
|
|
59
|
+
"run security review"
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
## Agents
|
|
63
|
+
|
|
64
|
+
Key agents include:
|
|
65
|
+
- \`architecture-designer\` - System architecture and ADRs
|
|
66
|
+
- \`security-architect\` - Threat modeling and security gates
|
|
67
|
+
- \`test-engineer\` - Test strategy and automation
|
|
68
|
+
- \`devops-engineer\` - CI/CD and deployment
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
- Full guide: https://docs.aiwg.io/sdlc
|
|
73
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
74
|
+
`
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
'marketing': {
|
|
78
|
+
name: 'marketing',
|
|
79
|
+
displayName: 'AIWG Marketing Kit',
|
|
80
|
+
version: '2024.12.4',
|
|
81
|
+
description: 'Marketing automation framework with 37 specialized agents for campaign management.',
|
|
82
|
+
sources: {
|
|
83
|
+
agents: 'agentic/code/frameworks/media-marketing-kit/agents',
|
|
84
|
+
commands: 'agentic/code/frameworks/media-marketing-kit/commands',
|
|
85
|
+
skills: 'agentic/code/frameworks/media-marketing-kit/skills'
|
|
86
|
+
},
|
|
87
|
+
readme: `# AIWG Marketing Kit
|
|
88
|
+
|
|
89
|
+
Marketing automation framework with 37 specialized agents.
|
|
90
|
+
|
|
91
|
+
## Features
|
|
92
|
+
|
|
93
|
+
- **37 Marketing Agents**: Campaign, content, brand, social media specialists
|
|
94
|
+
- **Full Campaign Lifecycle**: Strategy → Creation → Review → Publication → Analysis
|
|
95
|
+
- **Brand Compliance**: Automated brand voice and guideline enforcement
|
|
96
|
+
- **Analytics Integration**: Campaign performance tracking
|
|
97
|
+
|
|
98
|
+
## Quick Start
|
|
99
|
+
|
|
100
|
+
\`\`\`bash
|
|
101
|
+
# Start marketing intake
|
|
102
|
+
/marketing-intake-wizard
|
|
103
|
+
|
|
104
|
+
# Create campaign brief
|
|
105
|
+
/creative-brief
|
|
106
|
+
|
|
107
|
+
# Review brand compliance
|
|
108
|
+
/brand-review
|
|
109
|
+
\`\`\`
|
|
110
|
+
|
|
111
|
+
## Documentation
|
|
112
|
+
|
|
113
|
+
- Full guide: https://docs.aiwg.io/marketing
|
|
114
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
115
|
+
`
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
'voice': {
|
|
119
|
+
name: 'voice',
|
|
120
|
+
displayName: 'AIWG Voice Framework',
|
|
121
|
+
version: '1.0.0',
|
|
122
|
+
description: 'Voice profile system for consistent, authentic writing.',
|
|
123
|
+
sources: {
|
|
124
|
+
skills: 'agentic/code/addons/voice-framework/skills'
|
|
125
|
+
},
|
|
126
|
+
extraCopy: [
|
|
127
|
+
{ from: 'agentic/code/addons/voice-framework/voices', to: 'voices' }
|
|
128
|
+
],
|
|
129
|
+
readme: `# AIWG Voice Framework
|
|
130
|
+
|
|
131
|
+
Voice profile system for consistent, authentic writing.
|
|
132
|
+
|
|
133
|
+
## Built-in Profiles
|
|
134
|
+
|
|
135
|
+
- **technical-authority**: Direct, precise, confident
|
|
136
|
+
- **friendly-explainer**: Approachable, encouraging
|
|
137
|
+
- **executive-brief**: Concise, outcome-focused
|
|
138
|
+
- **casual-conversational**: Relaxed, personal
|
|
139
|
+
|
|
140
|
+
## Skills
|
|
141
|
+
|
|
142
|
+
- \`voice-apply\`: Apply a voice profile to content
|
|
143
|
+
- \`voice-create\`: Generate new voice from description
|
|
144
|
+
- \`voice-blend\`: Combine multiple profiles
|
|
145
|
+
- \`voice-analyze\`: Analyze content's voice characteristics
|
|
146
|
+
|
|
147
|
+
## Quick Start
|
|
148
|
+
|
|
149
|
+
\`\`\`bash
|
|
150
|
+
# Apply voice to content
|
|
151
|
+
"write this in technical-authority voice"
|
|
152
|
+
|
|
153
|
+
# Create custom voice
|
|
154
|
+
"create a voice for API docs - precise, no-nonsense"
|
|
155
|
+
|
|
156
|
+
# Blend voices
|
|
157
|
+
"blend 70% technical with 30% friendly"
|
|
158
|
+
\`\`\`
|
|
159
|
+
|
|
160
|
+
## Documentation
|
|
161
|
+
|
|
162
|
+
- Full guide: https://docs.aiwg.io/voice
|
|
163
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
164
|
+
`
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
'writing': {
|
|
168
|
+
name: 'writing',
|
|
169
|
+
displayName: 'AIWG Writing Quality',
|
|
170
|
+
version: '1.0.0',
|
|
171
|
+
description: 'Writing quality validation and AI pattern detection.',
|
|
172
|
+
sources: {
|
|
173
|
+
agents: 'agentic/code/addons/writing-quality/agents',
|
|
174
|
+
skills: 'agentic/code/addons/writing-quality/skills'
|
|
175
|
+
},
|
|
176
|
+
readme: `# AIWG Writing Quality
|
|
177
|
+
|
|
178
|
+
Writing quality validation and AI pattern detection.
|
|
179
|
+
|
|
180
|
+
## Features
|
|
181
|
+
|
|
182
|
+
- **AI Pattern Detection**: Identify AI-generated writing patterns
|
|
183
|
+
- **Authenticity Enhancement**: Suggestions for more authentic voice
|
|
184
|
+
- **Writing Validation**: Check against AIWG principles
|
|
185
|
+
|
|
186
|
+
## Agents
|
|
187
|
+
|
|
188
|
+
- \`writing-validator\`: Validates content for voice consistency and authenticity
|
|
189
|
+
- \`prompt-optimizer\`: Enhances prompts using AIWG principles
|
|
190
|
+
- \`content-diversifier\`: Generates varied examples and perspectives
|
|
191
|
+
|
|
192
|
+
## Quick Start
|
|
193
|
+
|
|
194
|
+
\`\`\`bash
|
|
195
|
+
# Validate content
|
|
196
|
+
/writing-validator "path/to/content.md"
|
|
197
|
+
|
|
198
|
+
# Detect AI patterns
|
|
199
|
+
"check this content for AI patterns"
|
|
200
|
+
\`\`\`
|
|
201
|
+
|
|
202
|
+
## Documentation
|
|
203
|
+
|
|
204
|
+
- Full guide: https://docs.aiwg.io/writing
|
|
205
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
206
|
+
`
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
'utils': {
|
|
210
|
+
name: 'utils',
|
|
211
|
+
displayName: 'AIWG Utilities',
|
|
212
|
+
version: '1.5.0',
|
|
213
|
+
description: 'Core AIWG utilities for context regeneration and workspace management.',
|
|
214
|
+
sources: {
|
|
215
|
+
agents: 'agentic/code/addons/aiwg-utils/agents',
|
|
216
|
+
commands: 'agentic/code/addons/aiwg-utils/commands',
|
|
217
|
+
skills: 'agentic/code/addons/aiwg-utils/skills'
|
|
218
|
+
},
|
|
219
|
+
readme: `# AIWG Utilities
|
|
220
|
+
|
|
221
|
+
Core AIWG utilities for context regeneration and workspace management.
|
|
222
|
+
|
|
223
|
+
## Features
|
|
224
|
+
|
|
225
|
+
- **Context Regeneration**: Update CLAUDE.md, WARP.md, AGENTS.md
|
|
226
|
+
- **Workspace Management**: Prune, realign, reset workspaces
|
|
227
|
+
- **Development Kit**: Scaffold new addons, agents, commands, skills
|
|
228
|
+
- **@-Mention Traceability**: Wire, validate, and report on @-mentions
|
|
229
|
+
|
|
230
|
+
## Commands
|
|
231
|
+
|
|
232
|
+
- \`/aiwg-regenerate\`: Regenerate platform context files
|
|
233
|
+
- \`/workspace-realign\`: Reorganize .aiwg/ documentation
|
|
234
|
+
- \`/devkit-create-*\`: Scaffold new components
|
|
235
|
+
- \`/mention-wire\`: Inject @-mentions for traceability
|
|
236
|
+
|
|
237
|
+
## Quick Start
|
|
238
|
+
|
|
239
|
+
\`\`\`bash
|
|
240
|
+
# Regenerate context
|
|
241
|
+
/aiwg-regenerate
|
|
242
|
+
|
|
243
|
+
# Create new agent
|
|
244
|
+
/devkit-create-agent "my-new-agent"
|
|
245
|
+
|
|
246
|
+
# Check @-mention traceability
|
|
247
|
+
/mention-validate
|
|
248
|
+
\`\`\`
|
|
249
|
+
|
|
250
|
+
## Documentation
|
|
251
|
+
|
|
252
|
+
- Full guide: https://docs.aiwg.io/utils
|
|
253
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
254
|
+
`
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
'codex-sdlc': {
|
|
258
|
+
name: 'codex-sdlc',
|
|
259
|
+
displayName: 'AIWG SDLC for Codex',
|
|
260
|
+
pluginType: 'codex',
|
|
261
|
+
description: 'Complete SDLC framework packaged as a Codex plugin with skills, agents, and marketplace entry.',
|
|
262
|
+
sources: {
|
|
263
|
+
skills: 'agentic/code/frameworks/sdlc-complete/skills'
|
|
264
|
+
},
|
|
265
|
+
readme: `# AIWG SDLC for Codex
|
|
266
|
+
|
|
267
|
+
AIWG SDLC framework packaged as a Codex plugin.
|
|
268
|
+
|
|
269
|
+
## Installation
|
|
270
|
+
|
|
271
|
+
\`\`\`bash
|
|
272
|
+
# Generate the plugin bundle
|
|
273
|
+
aiwg use sdlc --provider codex --as-plugin
|
|
274
|
+
|
|
275
|
+
# Or package directly
|
|
276
|
+
node tools/plugin/package-plugins.mjs --plugin codex-sdlc
|
|
277
|
+
\`\`\`
|
|
278
|
+
|
|
279
|
+
Then install in Codex via the \`/plugins\` command or the repo marketplace.
|
|
280
|
+
|
|
281
|
+
## Documentation
|
|
282
|
+
|
|
283
|
+
- Full guide: https://docs.aiwg.io/sdlc
|
|
284
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
285
|
+
`
|
|
286
|
+
},
|
|
287
|
+
|
|
288
|
+
'forensics': {
|
|
289
|
+
name: 'forensics',
|
|
290
|
+
displayName: 'AIWG Forensics Complete',
|
|
291
|
+
version: '2026.5.0',
|
|
292
|
+
description: 'Digital forensics and incident response framework with 14 specialized agents covering target profiling, evidence acquisition, log/memory/container/cloud analysis, IOC extraction, and reporting.',
|
|
293
|
+
sources: {
|
|
294
|
+
agents: 'agentic/code/frameworks/forensics-complete/agents',
|
|
295
|
+
commands: 'agentic/code/frameworks/forensics-complete/commands',
|
|
296
|
+
skills: 'agentic/code/frameworks/forensics-complete/skills'
|
|
297
|
+
},
|
|
298
|
+
readme: `# AIWG Forensics Complete
|
|
299
|
+
|
|
300
|
+
Digital forensics and incident response framework with 14 specialized agents.
|
|
301
|
+
|
|
302
|
+
## Features
|
|
303
|
+
|
|
304
|
+
- **Triage & Acquisition**: RFC 3227 volatility-order capture, chain of custody, hash verification
|
|
305
|
+
- **Multi-Domain Analysis**: Logs, memory (Volatility 3), containers (Docker/K8s), cloud (AWS/Azure/GCP)
|
|
306
|
+
- **Threat Hunting**: Sigma rule application, IOC extraction in STIX 2.1 format
|
|
307
|
+
- **Reporting**: Executive summaries, technical findings, MITRE ATT&CK mapping, remediation plans
|
|
308
|
+
|
|
309
|
+
## Quick Start
|
|
310
|
+
|
|
311
|
+
\`\`\`bash
|
|
312
|
+
# Full investigation workflow
|
|
313
|
+
/forensics-investigate
|
|
314
|
+
|
|
315
|
+
# Quick triage
|
|
316
|
+
/forensics-triage
|
|
317
|
+
|
|
318
|
+
# Build target profile
|
|
319
|
+
/forensics-profile
|
|
320
|
+
|
|
321
|
+
# Generate forensic report
|
|
322
|
+
/forensics-report
|
|
323
|
+
\`\`\`
|
|
324
|
+
|
|
325
|
+
## Documentation
|
|
326
|
+
|
|
327
|
+
- Full guide: https://docs.aiwg.io/forensics
|
|
328
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
329
|
+
`
|
|
330
|
+
},
|
|
331
|
+
|
|
332
|
+
'security-engineering': {
|
|
333
|
+
name: 'security-engineering',
|
|
334
|
+
displayName: 'AIWG Security Engineering',
|
|
335
|
+
version: '2026.5.0',
|
|
336
|
+
description: 'Applied security framework for cryptographic primitive selection, chain-of-trust design, authentication factor analysis, supply-chain trust, and physical-threat modeling. Complements OWASP-style application audits.',
|
|
337
|
+
sources: {
|
|
338
|
+
agents: 'agentic/code/frameworks/security-engineering/agents',
|
|
339
|
+
commands: 'agentic/code/frameworks/security-engineering/commands',
|
|
340
|
+
skills: 'agentic/code/frameworks/security-engineering/skills'
|
|
341
|
+
},
|
|
342
|
+
readme: `# AIWG Security Engineering
|
|
343
|
+
|
|
344
|
+
Applied security engineering framework for cryptographic primitive selection, chain-of-trust integrity, and physical-threat modeling.
|
|
345
|
+
|
|
346
|
+
## Features
|
|
347
|
+
|
|
348
|
+
- **Applied Cryptography Review**: AEAD selection, KDF correctness, key separation, openssl flag verification
|
|
349
|
+
- **Chain-of-Trust Design**: Bootstrap integrity, signing key custody, measured boot
|
|
350
|
+
- **Authentication Factor Design**: have/know/are mapping, coercion-resistance, FIDO2 PIN/UV policy
|
|
351
|
+
- **Supply-Chain Trust**: Beyond CVE/SBOM — pinning depth, reproducible builds, firmware version locking
|
|
352
|
+
- **Physical Threat Modeling**: Evil-maid, DMA, hostile peripherals, cold-boot, side-channel
|
|
353
|
+
|
|
354
|
+
## Agents
|
|
355
|
+
|
|
356
|
+
- \`applied-cryptographer\` - Crypto primitive selection and KDF correctness
|
|
357
|
+
- \`secure-bootstrap-reviewer\` - Chain-of-trust integrity
|
|
358
|
+
|
|
359
|
+
## Quick Start
|
|
360
|
+
|
|
361
|
+
\`\`\`bash
|
|
362
|
+
# Crypto primitive selection
|
|
363
|
+
/crypto-primitive-selection
|
|
364
|
+
|
|
365
|
+
# Chain-of-trust design
|
|
366
|
+
/chain-of-trust-design
|
|
367
|
+
|
|
368
|
+
# Auth factor design
|
|
369
|
+
/auth-factor-design
|
|
370
|
+
\`\`\`
|
|
371
|
+
|
|
372
|
+
## Documentation
|
|
373
|
+
|
|
374
|
+
- Full guide: https://docs.aiwg.io/security-engineering
|
|
375
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
376
|
+
`
|
|
377
|
+
},
|
|
378
|
+
|
|
379
|
+
'research': {
|
|
380
|
+
name: 'research',
|
|
381
|
+
displayName: 'AIWG Research Complete',
|
|
382
|
+
version: '2026.5.0',
|
|
383
|
+
description: 'Research workflow framework with 9 specialized agents for discovery, acquisition, synthesis, citation management, GRADE quality assessment, and OAIS-compliant archival.',
|
|
384
|
+
sources: {
|
|
385
|
+
agents: 'agentic/code/frameworks/research-complete/agents',
|
|
386
|
+
commands: 'agentic/code/frameworks/research-complete/commands',
|
|
387
|
+
skills: 'agentic/code/frameworks/research-complete/skills'
|
|
388
|
+
},
|
|
389
|
+
readme: `# AIWG Research Complete
|
|
390
|
+
|
|
391
|
+
Research workflow framework with 9 specialized agents for academic and technical research.
|
|
392
|
+
|
|
393
|
+
## Features
|
|
394
|
+
|
|
395
|
+
- **Discovery**: Multi-database search, gap detection, reproducible search strategies
|
|
396
|
+
- **Acquisition**: PDF download, metadata extraction, provenance tracking
|
|
397
|
+
- **Synthesis**: Literature notes, structured summaries, citation networks
|
|
398
|
+
- **Quality (GRADE)**: Source quality assessment, FAIR compliance, hedging enforcement
|
|
399
|
+
- **Archival (OAIS)**: Long-term preservation, integrity verification, version control
|
|
400
|
+
- **Citation Management**: 9,000+ styles, reference verification, hallucination detection
|
|
401
|
+
|
|
402
|
+
## Quick Start
|
|
403
|
+
|
|
404
|
+
\`\`\`bash
|
|
405
|
+
# Discover sources
|
|
406
|
+
/research-discover
|
|
407
|
+
|
|
408
|
+
# Run full pipeline
|
|
409
|
+
/research-workflow
|
|
410
|
+
|
|
411
|
+
# Verify citations
|
|
412
|
+
/verify-citations
|
|
413
|
+
|
|
414
|
+
# Generate corpus snapshot
|
|
415
|
+
/corpus-snapshot
|
|
416
|
+
\`\`\`
|
|
417
|
+
|
|
418
|
+
## Documentation
|
|
419
|
+
|
|
420
|
+
- Full guide: https://docs.aiwg.io/research
|
|
421
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
422
|
+
`
|
|
423
|
+
},
|
|
424
|
+
|
|
425
|
+
'media-curator': {
|
|
426
|
+
name: 'media-curator',
|
|
427
|
+
displayName: 'AIWG Media Curator',
|
|
428
|
+
version: '2026.5.0',
|
|
429
|
+
description: 'Media archive management framework with 7 specialized agents for source discovery, acquisition (yt-dlp / Internet Archive / Bandcamp), quality assessment, metadata tagging, and provenance tracking.',
|
|
430
|
+
sources: {
|
|
431
|
+
agents: 'agentic/code/frameworks/media-curator/agents',
|
|
432
|
+
commands: 'agentic/code/frameworks/media-curator/commands',
|
|
433
|
+
skills: 'agentic/code/frameworks/media-curator/skills'
|
|
434
|
+
},
|
|
435
|
+
readme: `# AIWG Media Curator
|
|
436
|
+
|
|
437
|
+
Media archive management framework with 7 specialized agents.
|
|
438
|
+
|
|
439
|
+
## Features
|
|
440
|
+
|
|
441
|
+
- **Discography Analysis**: Era identification, catalog structure
|
|
442
|
+
- **Source Discovery**: Multi-platform ranking (YouTube, Internet Archive, Bandcamp)
|
|
443
|
+
- **Acquisition**: yt-dlp patterns, archive download, format selection
|
|
444
|
+
- **Quality Filtering**: Audio/video quality scoring, accept/reject thresholds
|
|
445
|
+
- **Metadata Curation**: opustags / ffmpeg patterns, cover art embedding
|
|
446
|
+
- **Transcription**: executable local WhisperX transcript sidecars
|
|
447
|
+
- **Speaker Diarization**: anonymous speaker clustering with pyannote via WhisperX
|
|
448
|
+
- **Provenance Tracking**: W3C PROV-O derivation chains
|
|
449
|
+
- **Export**: Plex / Jellyfin / MPD / archival formats
|
|
450
|
+
|
|
451
|
+
## Quick Start
|
|
452
|
+
|
|
453
|
+
\`\`\`bash
|
|
454
|
+
# Full curation workflow
|
|
455
|
+
/curate
|
|
456
|
+
|
|
457
|
+
# Acquire from sources
|
|
458
|
+
/acquire
|
|
459
|
+
|
|
460
|
+
# Tag a collection
|
|
461
|
+
/tag-collection
|
|
462
|
+
|
|
463
|
+
# Generate a transcript sidecar
|
|
464
|
+
/transcribe-media
|
|
465
|
+
|
|
466
|
+
# Generate an anonymous speaker-diarized transcript sidecar
|
|
467
|
+
/diarize-media
|
|
468
|
+
|
|
469
|
+
# Verify archive integrity
|
|
470
|
+
/verify-archive
|
|
471
|
+
\`\`\`
|
|
472
|
+
|
|
473
|
+
## Documentation
|
|
474
|
+
|
|
475
|
+
- Full guide: https://docs.aiwg.io/media-curator
|
|
476
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
477
|
+
`
|
|
478
|
+
},
|
|
479
|
+
|
|
480
|
+
'ops': {
|
|
481
|
+
name: 'ops',
|
|
482
|
+
displayName: 'AIWG Ops Complete',
|
|
483
|
+
version: '2026.5.0',
|
|
484
|
+
description: 'Operational infrastructure framework with 12 specialized agents covering incident response, runbook execution, fleet inventory, certificate lifecycle, and disaster recovery planning.',
|
|
485
|
+
sources: {
|
|
486
|
+
agents: 'agentic/code/frameworks/ops-complete/agents',
|
|
487
|
+
commands: 'agentic/code/frameworks/ops-complete/commands',
|
|
488
|
+
skills: 'agentic/code/frameworks/ops-complete/skills'
|
|
489
|
+
},
|
|
490
|
+
readme: `# AIWG Ops Complete
|
|
491
|
+
|
|
492
|
+
Operational infrastructure framework with 12 specialized agents for sysops, devops, and itops workflows.
|
|
493
|
+
|
|
494
|
+
## Features
|
|
495
|
+
|
|
496
|
+
- **Fleet Inventory**: Reconcile hosts, services, network resources
|
|
497
|
+
- **Runbook Execution**: Step-by-step with verification gates and audit trails
|
|
498
|
+
- **Incident Response**: Triage, escalation, post-mortem
|
|
499
|
+
- **Certificate Lifecycle**: Issuance, renewal, revocation, expiry monitoring
|
|
500
|
+
- **Disaster Recovery**: Topology-aware runbook generation with RTO budgets
|
|
501
|
+
- **Identity & Secrets**: IdP audits, OpenBao/Vault operations, key rotation
|
|
502
|
+
- **Stream Health**: Transcoder, output, service availability monitoring
|
|
503
|
+
|
|
504
|
+
## Quick Start
|
|
505
|
+
|
|
506
|
+
\`\`\`bash
|
|
507
|
+
# Manage ops workspaces
|
|
508
|
+
/ops
|
|
509
|
+
|
|
510
|
+
# Execute a runbook
|
|
511
|
+
/ops-run
|
|
512
|
+
|
|
513
|
+
# Health check fleet
|
|
514
|
+
/ops-status
|
|
515
|
+
\`\`\`
|
|
516
|
+
|
|
517
|
+
## Documentation
|
|
518
|
+
|
|
519
|
+
- Full guide: https://docs.aiwg.io/ops
|
|
520
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
521
|
+
`
|
|
522
|
+
},
|
|
523
|
+
|
|
524
|
+
'knowledge-base': {
|
|
525
|
+
name: 'knowledge-base',
|
|
526
|
+
displayName: 'AIWG Knowledge Base',
|
|
527
|
+
version: '2026.5.0',
|
|
528
|
+
description: 'Knowledge-base / wiki framework with skills for ingestion, query, and lint. Build a structured, citable corpus with cross-references and concept pages.',
|
|
529
|
+
sources: {
|
|
530
|
+
skills: 'agentic/code/frameworks/knowledge-base/skills'
|
|
531
|
+
},
|
|
532
|
+
readme: `# AIWG Knowledge Base
|
|
533
|
+
|
|
534
|
+
Knowledge-base / wiki framework for structured corpus authoring.
|
|
535
|
+
|
|
536
|
+
## Features
|
|
537
|
+
|
|
538
|
+
- **Source Ingestion**: URL, file, or freeform note → entity + concept pages
|
|
539
|
+
- **Query**: Search the local KB, synthesize answers with inline citations
|
|
540
|
+
- **Health & Lint**: Orphan page detection, broken wiki-links, stale claims, index regeneration
|
|
541
|
+
|
|
542
|
+
## Skills
|
|
543
|
+
|
|
544
|
+
- \`kb-ingest\`: Ingest a source into the knowledge base
|
|
545
|
+
- \`kb-health\`: Lint and health-check the KB
|
|
546
|
+
|
|
547
|
+
## Quick Start
|
|
548
|
+
|
|
549
|
+
\`\`\`bash
|
|
550
|
+
# Ingest a source
|
|
551
|
+
/kb-ingest "https://example.com/article"
|
|
552
|
+
|
|
553
|
+
# Health check
|
|
554
|
+
/kb-health
|
|
555
|
+
\`\`\`
|
|
556
|
+
|
|
557
|
+
## Documentation
|
|
558
|
+
|
|
559
|
+
- Full guide: https://docs.aiwg.io/knowledge-base
|
|
560
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
561
|
+
`
|
|
562
|
+
},
|
|
563
|
+
|
|
564
|
+
'hooks': {
|
|
565
|
+
name: 'hooks',
|
|
566
|
+
displayName: 'AIWG Hooks',
|
|
567
|
+
version: '1.0.0',
|
|
568
|
+
description: 'Claude Code hooks for workflow tracing and observability.',
|
|
569
|
+
sources: {
|
|
570
|
+
hooks: 'agentic/code/addons/aiwg-hooks/hooks'
|
|
571
|
+
},
|
|
572
|
+
extraCopy: [
|
|
573
|
+
{ from: 'agentic/code/addons/aiwg-hooks/scripts', to: 'scripts' }
|
|
574
|
+
],
|
|
575
|
+
readme: `# AIWG Hooks
|
|
576
|
+
|
|
577
|
+
Claude Code hooks for workflow tracing and observability.
|
|
578
|
+
|
|
579
|
+
## Features
|
|
580
|
+
|
|
581
|
+
- **Workflow Tracing**: Capture multi-agent workflow traces
|
|
582
|
+
- **JSONL Output**: Streaming data for analysis
|
|
583
|
+
- **Session Management**: Track session state across interactions
|
|
584
|
+
- **Timeline Visualization**: Understand workflow execution
|
|
585
|
+
|
|
586
|
+
## Hooks
|
|
587
|
+
|
|
588
|
+
- \`SessionStart\`: Initialize tracing on session start
|
|
589
|
+
- \`PostToolUse\`: Capture tool execution results
|
|
590
|
+
- \`AgentComplete\`: Record agent completion status
|
|
591
|
+
|
|
592
|
+
## Quick Start
|
|
593
|
+
|
|
594
|
+
Install the plugin and hooks are automatically active.
|
|
595
|
+
|
|
596
|
+
Traces are written to \`.aiwg/traces/\` in JSONL format.
|
|
597
|
+
|
|
598
|
+
## Documentation
|
|
599
|
+
|
|
600
|
+
- Full guide: https://docs.aiwg.io/hooks
|
|
601
|
+
- Discord: https://discord.gg/BuAusFMxdA
|
|
602
|
+
`
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
// Parse command line arguments
|
|
607
|
+
function parseArgs() {
|
|
608
|
+
const args = process.argv.slice(2);
|
|
609
|
+
const options = {
|
|
610
|
+
all: false,
|
|
611
|
+
plugin: null,
|
|
612
|
+
clean: false,
|
|
613
|
+
dryRun: false
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
for (let i = 0; i < args.length; i++) {
|
|
617
|
+
switch (args[i]) {
|
|
618
|
+
case '--all':
|
|
619
|
+
case '-a':
|
|
620
|
+
options.all = true;
|
|
621
|
+
break;
|
|
622
|
+
case '--plugin':
|
|
623
|
+
case '-p':
|
|
624
|
+
options.plugin = args[++i];
|
|
625
|
+
break;
|
|
626
|
+
case '--provider':
|
|
627
|
+
options.provider = args[++i];
|
|
628
|
+
break;
|
|
629
|
+
case '--source':
|
|
630
|
+
options.source = args[++i];
|
|
631
|
+
break;
|
|
632
|
+
case '--output':
|
|
633
|
+
options.output = args[++i];
|
|
634
|
+
break;
|
|
635
|
+
case '--clean':
|
|
636
|
+
case '-c':
|
|
637
|
+
options.clean = true;
|
|
638
|
+
break;
|
|
639
|
+
case '--dry-run':
|
|
640
|
+
case '-n':
|
|
641
|
+
options.dryRun = true;
|
|
642
|
+
break;
|
|
643
|
+
case '--help':
|
|
644
|
+
case '-h':
|
|
645
|
+
console.log(`
|
|
646
|
+
AIWG Plugin Packager
|
|
647
|
+
|
|
648
|
+
Usage:
|
|
649
|
+
node tools/plugin/package-plugins.mjs [options]
|
|
650
|
+
|
|
651
|
+
Options:
|
|
652
|
+
--all, -a Package all plugins
|
|
653
|
+
--plugin, -p NAME Package specific plugin
|
|
654
|
+
--provider NAME Package for a specific provider
|
|
655
|
+
(claude, codex, cursor, factory, openclaw, all)
|
|
656
|
+
Default: claude
|
|
657
|
+
--source PATH Explicit project-local wrapper source
|
|
658
|
+
--output PATH Standalone archive output (default: dist/plugins)
|
|
659
|
+
--clean, -c Clean plugins directory before packaging
|
|
660
|
+
--dry-run, -n Show what would be done without writing
|
|
661
|
+
--help, -h Show this help message
|
|
662
|
+
|
|
663
|
+
Examples:
|
|
664
|
+
node tools/plugin/package-plugins.mjs --all
|
|
665
|
+
node tools/plugin/package-plugins.mjs --plugin sdlc
|
|
666
|
+
node tools/plugin/package-plugins.mjs --all --provider codex
|
|
667
|
+
node tools/plugin/package-plugins.mjs --plugin sdlc --provider cursor
|
|
668
|
+
node tools/plugin/package-plugins.mjs --all --provider all --clean
|
|
669
|
+
`);
|
|
670
|
+
process.exit(0);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
return options;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// Copy directory recursively
|
|
678
|
+
function copyDir(src, dest, dryRun = false, filter = null) {
|
|
679
|
+
const srcPath = path.join(ROOT_DIR, src);
|
|
680
|
+
|
|
681
|
+
if (!fs.existsSync(srcPath)) {
|
|
682
|
+
console.log(` ⚠️ Source not found: ${src}`);
|
|
683
|
+
return 0;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
if (!dryRun) {
|
|
687
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
let copied = 0;
|
|
691
|
+
const entries = fs.readdirSync(srcPath, { withFileTypes: true });
|
|
692
|
+
|
|
693
|
+
for (const entry of entries) {
|
|
694
|
+
const srcFile = path.join(srcPath, entry.name);
|
|
695
|
+
const destFile = path.join(dest, entry.name);
|
|
696
|
+
|
|
697
|
+
if (entry.isDirectory()) {
|
|
698
|
+
copied += copyDir(path.join(src, entry.name), destFile, dryRun, filter);
|
|
699
|
+
} else {
|
|
700
|
+
// Apply filter if provided
|
|
701
|
+
if (filter) {
|
|
702
|
+
const baseName = path.basename(entry.name, '.md');
|
|
703
|
+
if (!filter.includes(baseName)) {
|
|
704
|
+
continue;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
if (dryRun) {
|
|
709
|
+
console.log(` Would copy: ${entry.name}`);
|
|
710
|
+
} else {
|
|
711
|
+
fs.copyFileSync(srcFile, destFile);
|
|
712
|
+
}
|
|
713
|
+
copied++;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
return copied;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// Clean plugin directory (except .claude-plugin)
|
|
721
|
+
function cleanPlugin(pluginDir) {
|
|
722
|
+
if (!fs.existsSync(pluginDir)) return;
|
|
723
|
+
|
|
724
|
+
const entries = fs.readdirSync(pluginDir, { withFileTypes: true });
|
|
725
|
+
for (const entry of entries) {
|
|
726
|
+
if (entry.name === '.claude-plugin') continue;
|
|
727
|
+
|
|
728
|
+
const fullPath = path.join(pluginDir, entry.name);
|
|
729
|
+
if (entry.isDirectory()) {
|
|
730
|
+
fs.rmSync(fullPath, { recursive: true, force: true });
|
|
731
|
+
} else {
|
|
732
|
+
fs.unlinkSync(fullPath);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
// Package a single plugin
|
|
738
|
+
function packagePlugin(name, config, options) {
|
|
739
|
+
console.log(`\n📦 Packaging ${config.displayName}...`);
|
|
740
|
+
|
|
741
|
+
const pluginDir = path.join(PLUGINS_DIR, name);
|
|
742
|
+
|
|
743
|
+
if (options.clean) {
|
|
744
|
+
console.log(' 🧹 Cleaning existing files...');
|
|
745
|
+
if (!options.dryRun) {
|
|
746
|
+
cleanPlugin(pluginDir);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// Copy sources
|
|
751
|
+
for (const [type, srcPath] of Object.entries(config.sources || {})) {
|
|
752
|
+
const destPath = path.join(pluginDir, type);
|
|
753
|
+
console.log(` 📁 Copying ${type}...`);
|
|
754
|
+
|
|
755
|
+
const filter = type === 'agents' && config.agentFilter ? config.agentFilter : null;
|
|
756
|
+
const count = copyDir(srcPath, destPath, options.dryRun, filter);
|
|
757
|
+
console.log(` ${count} files`);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
// Copy extra files
|
|
761
|
+
for (const extra of config.extraCopy || []) {
|
|
762
|
+
const destPath = path.join(pluginDir, extra.to);
|
|
763
|
+
console.log(` 📁 Copying ${extra.to}...`);
|
|
764
|
+
const count = copyDir(extra.from, destPath, options.dryRun);
|
|
765
|
+
console.log(` ${count} files`);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
// Write README
|
|
769
|
+
if (config.readme && !options.dryRun) {
|
|
770
|
+
const readmePath = path.join(pluginDir, 'README.md');
|
|
771
|
+
fs.writeFileSync(readmePath, config.readme);
|
|
772
|
+
console.log(' 📄 Created README.md');
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
console.log(` ✅ ${config.displayName} packaged successfully`);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
// Package a Codex-format plugin (generates .codex-plugin/plugin.json + marketplace.json)
|
|
779
|
+
async function packageCodexPlugin(name, config, options) {
|
|
780
|
+
console.log(`\n📦 Packaging ${config.displayName} (Codex plugin format)...`);
|
|
781
|
+
|
|
782
|
+
const { generatePluginBundle } = await import(
|
|
783
|
+
path.join(ROOT_DIR, 'tools/agents/providers/codex.mjs')
|
|
784
|
+
);
|
|
785
|
+
|
|
786
|
+
generatePluginBundle(ROOT_DIR, {
|
|
787
|
+
dryRun: options.dryRun,
|
|
788
|
+
srcRoot: ROOT_DIR
|
|
789
|
+
});
|
|
790
|
+
|
|
791
|
+
const pluginDir = path.join(PLUGINS_DIR, name);
|
|
792
|
+
|
|
793
|
+
if (options.clean) {
|
|
794
|
+
console.log(' 🧹 Cleaning existing files...');
|
|
795
|
+
if (!options.dryRun) {
|
|
796
|
+
cleanPlugin(pluginDir);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// Copy sources into the plugin directory for self-containment
|
|
801
|
+
for (const [type, srcPath] of Object.entries(config.sources || {})) {
|
|
802
|
+
const destPath = path.join(pluginDir, type);
|
|
803
|
+
console.log(` 📁 Copying ${type}...`);
|
|
804
|
+
const count = copyDir(srcPath, destPath, options.dryRun);
|
|
805
|
+
console.log(` ${count} files`);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
// Write README
|
|
809
|
+
if (config.readme && !options.dryRun) {
|
|
810
|
+
const readmePath = path.join(pluginDir, 'README.md');
|
|
811
|
+
fs.writeFileSync(readmePath, config.readme);
|
|
812
|
+
console.log(' 📄 Created README.md');
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
console.log(` ✅ ${config.displayName} packaged successfully`);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// Package a plugin for a generic provider that exposes generatePluginBundle().
|
|
819
|
+
// Used for cursor, factory, openclaw. The provider's generator writes the
|
|
820
|
+
// manifest (e.g. .cursor-plugin/plugin.json, .factory-plugin/plugin.json,
|
|
821
|
+
// clawhub.json) and this function copies the framework sources alongside.
|
|
822
|
+
async function packageProviderPlugin(name, config, options, provider) {
|
|
823
|
+
console.log(`\n📦 Packaging ${config.displayName} (${provider} plugin format)...`);
|
|
824
|
+
|
|
825
|
+
const providerModule = await import(
|
|
826
|
+
path.join(ROOT_DIR, `tools/agents/providers/${provider}.mjs`)
|
|
827
|
+
);
|
|
828
|
+
|
|
829
|
+
if (typeof providerModule.generatePluginBundle !== 'function') {
|
|
830
|
+
throw new Error(`Provider '${provider}' does not export generatePluginBundle()`);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
const pluginDir = path.join(PLUGINS_DIR, name);
|
|
834
|
+
|
|
835
|
+
if (options.clean) {
|
|
836
|
+
console.log(' 🧹 Cleaning existing files...');
|
|
837
|
+
if (!options.dryRun) {
|
|
838
|
+
cleanPlugin(pluginDir);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
providerModule.generatePluginBundle(pluginDir, {
|
|
843
|
+
dryRun: options.dryRun,
|
|
844
|
+
srcRoot: ROOT_DIR,
|
|
845
|
+
name: `aiwg-${name}`,
|
|
846
|
+
description: config.description,
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
// Copy sources into the plugin directory
|
|
850
|
+
for (const [type, srcPath] of Object.entries(config.sources || {})) {
|
|
851
|
+
const destPath = path.join(pluginDir, type);
|
|
852
|
+
console.log(` 📁 Copying ${type}...`);
|
|
853
|
+
const count = copyDir(srcPath, destPath, options.dryRun);
|
|
854
|
+
console.log(` ${count} files`);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
// Write README
|
|
858
|
+
if (config.readme && !options.dryRun) {
|
|
859
|
+
const readmePath = path.join(pluginDir, 'README.md');
|
|
860
|
+
fs.writeFileSync(readmePath, config.readme);
|
|
861
|
+
console.log(' 📄 Created README.md');
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
console.log(` ✅ ${config.displayName} packaged successfully (${provider})`);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
// Write a root Codex marketplace.json that aggregates all plugins with
|
|
868
|
+
// Codex pluginType. This is the project-level manifest Codex looks for
|
|
869
|
+
// when it opens the project.
|
|
870
|
+
function writeCodexMarketplaceManifest(options) {
|
|
871
|
+
const codexPlugins = Object.entries(PLUGIN_CONFIGS)
|
|
872
|
+
.filter(([, config]) => config.pluginType === 'codex' || config.supportsCodex !== false)
|
|
873
|
+
.map(([pluginName, config]) => ({
|
|
874
|
+
name: pluginName,
|
|
875
|
+
source: { source: 'local', path: `./agentic/code/plugins/${pluginName}` },
|
|
876
|
+
policy: {
|
|
877
|
+
installation: 'AVAILABLE',
|
|
878
|
+
authentication: 'ON_INSTALL',
|
|
879
|
+
},
|
|
880
|
+
category: config.category || 'Productivity',
|
|
881
|
+
description: config.description,
|
|
882
|
+
}));
|
|
883
|
+
|
|
884
|
+
const manifest = {
|
|
885
|
+
name: 'aiwg',
|
|
886
|
+
interface: { displayName: 'AIWG Framework' },
|
|
887
|
+
plugins: codexPlugins,
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
const manifestDir = path.join(ROOT_DIR, '.agents', 'plugins');
|
|
891
|
+
const manifestPath = path.join(manifestDir, 'marketplace.json');
|
|
892
|
+
|
|
893
|
+
if (options.dryRun) {
|
|
894
|
+
console.log(`\n[dry-run] Would write Codex marketplace: ${manifestPath}`);
|
|
895
|
+
console.log(` ${codexPlugins.length} plugins`);
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
fs.mkdirSync(manifestDir, { recursive: true });
|
|
900
|
+
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n', 'utf-8');
|
|
901
|
+
console.log(`\n✓ Wrote Codex project marketplace: ${manifestPath} (${codexPlugins.length} plugins)`);
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// Main function
|
|
905
|
+
async function main() {
|
|
906
|
+
const options = parseArgs();
|
|
907
|
+
|
|
908
|
+
if (!options.all && !options.plugin) {
|
|
909
|
+
console.log('Please specify --all or --plugin NAME');
|
|
910
|
+
console.log('Use --help for more information');
|
|
911
|
+
process.exit(1);
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
console.log('🚀 AIWG Plugin Packager');
|
|
915
|
+
console.log(` Root: ${ROOT_DIR}`);
|
|
916
|
+
console.log(` Output: ${PLUGINS_DIR}`);
|
|
917
|
+
|
|
918
|
+
if (options.dryRun) {
|
|
919
|
+
console.log(' Mode: DRY RUN (no files will be changed)');
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
if (options.plugin && !options.all) {
|
|
923
|
+
const { packageStandalonePlugin } = await importImpl(import.meta.url, 'plugins/standalone-packager.js');
|
|
924
|
+
const standalone = await packageStandalonePlugin({
|
|
925
|
+
cwd: process.cwd(),
|
|
926
|
+
name: options.plugin,
|
|
927
|
+
source: options.source,
|
|
928
|
+
output: options.output,
|
|
929
|
+
provider: options.provider,
|
|
930
|
+
clean: options.clean,
|
|
931
|
+
dryRun: options.dryRun,
|
|
932
|
+
});
|
|
933
|
+
if (standalone) {
|
|
934
|
+
console.log(` Source: ${standalone.sourceRoot}`);
|
|
935
|
+
for (const plan of standalone.plans) {
|
|
936
|
+
console.log(` ${options.dryRun ? 'Would write' : 'Wrote'} ${plan.provider}: ${plan.archivePath}`);
|
|
937
|
+
}
|
|
938
|
+
console.log('\n✨ Done!');
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
941
|
+
if (options.source) {
|
|
942
|
+
throw new Error(`Standalone plugin source not found: ${options.source}`);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
// Resolve provider selection
|
|
947
|
+
const PROVIDER_PLUGIN_FORMATS = ['claude', 'codex', 'cursor', 'factory', 'openclaw'];
|
|
948
|
+
const requestedProvider = options.provider || 'claude';
|
|
949
|
+
let providersToRun;
|
|
950
|
+
|
|
951
|
+
if (requestedProvider === 'all') {
|
|
952
|
+
providersToRun = PROVIDER_PLUGIN_FORMATS;
|
|
953
|
+
} else if (PROVIDER_PLUGIN_FORMATS.includes(requestedProvider)) {
|
|
954
|
+
providersToRun = [requestedProvider];
|
|
955
|
+
} else {
|
|
956
|
+
console.error(`Unknown provider: ${requestedProvider}`);
|
|
957
|
+
console.log(`Available providers: ${PROVIDER_PLUGIN_FORMATS.join(', ')}, all`);
|
|
958
|
+
process.exit(1);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
console.log(` Providers: ${providersToRun.join(', ')}`);
|
|
962
|
+
|
|
963
|
+
// Determine which plugins to package
|
|
964
|
+
const pluginsToPackage = options.plugin
|
|
965
|
+
? [[options.plugin, PLUGIN_CONFIGS[options.plugin]]].filter(([, c]) => c)
|
|
966
|
+
: Object.entries(PLUGIN_CONFIGS);
|
|
967
|
+
|
|
968
|
+
if (options.plugin && !PLUGIN_CONFIGS[options.plugin]) {
|
|
969
|
+
console.error(`Unknown plugin: ${options.plugin}`);
|
|
970
|
+
console.log(`Available plugins: ${Object.keys(PLUGIN_CONFIGS).join(', ')}`);
|
|
971
|
+
process.exit(1);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
// Package for each (provider, plugin) combination
|
|
975
|
+
for (const provider of providersToRun) {
|
|
976
|
+
for (const [name, config] of pluginsToPackage) {
|
|
977
|
+
// Respect the legacy pluginType flag when selecting defaults:
|
|
978
|
+
// if pluginType is set and provider is 'claude' (default), skip this
|
|
979
|
+
// plugin for claude and route it to its declared pluginType instead.
|
|
980
|
+
const effectiveProvider =
|
|
981
|
+
provider === 'claude' && config.pluginType ? config.pluginType : provider;
|
|
982
|
+
|
|
983
|
+
if (effectiveProvider === 'claude') {
|
|
984
|
+
packagePlugin(name, config, options);
|
|
985
|
+
} else if (effectiveProvider === 'codex') {
|
|
986
|
+
await packageCodexPlugin(name, config, options);
|
|
987
|
+
} else {
|
|
988
|
+
// cursor, factory, openclaw — generic provider plugin bundle
|
|
989
|
+
await packageProviderPlugin(name, config, options, effectiveProvider);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
// After packaging for Codex, also write the root marketplace.json
|
|
994
|
+
if (provider === 'codex' || (provider === 'claude' && pluginsToPackage.some(([, c]) => c.pluginType === 'codex'))) {
|
|
995
|
+
writeCodexMarketplaceManifest(options);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
console.log('\n✨ Done!');
|
|
1000
|
+
console.log('\nTo test locally:');
|
|
1001
|
+
console.log(' /plugin marketplace add ./agentic/code/plugins # Claude Code');
|
|
1002
|
+
console.log(' /plugin install sdlc@aiwg');
|
|
1003
|
+
console.log('\nFor other providers:');
|
|
1004
|
+
console.log(' aiwg use sdlc --provider codex # Codex (reads .agents/plugins/marketplace.json)');
|
|
1005
|
+
console.log(' aiwg use sdlc --provider cursor # Cursor (manual install from .cursor-plugin/)');
|
|
1006
|
+
console.log(' aiwg use sdlc --provider factory # Factory (git-URL install from .factory-plugin/)');
|
|
1007
|
+
console.log(' aiwg use sdlc --provider openclaw # OpenClaw (ClawHub publish pending)');
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
main().catch((error) => {
|
|
1011
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
1012
|
+
process.exitCode = 1;
|
|
1013
|
+
});
|