()
| 340 | instructions: 'Use citadel_status to orient on campaign, fleet, telemetry, and artifact state before invoking Citadel workflows.', |
| 341 | }, |
| 342 | }, |
| 343 | }, |
| 344 | }, null, 2) + '\n'; |
| 345 | writeFile(mcpPath, content); |
| 346 | } |
| 347 | |
| 348 | // ---- 3. Generate .codex-plugin/plugin.json ---------------------------------- |
| 349 | |
| 350 | function countSkills() { |
| 351 | const skillsDir = path.join(CITADEL_ROOT, 'skills'); |
| 352 | if (!fs.existsSync(skillsDir)) return 0; |
| 353 | return fs.readdirSync(skillsDir).filter(d => |
| 354 | fs.existsSync(path.join(skillsDir, d, 'SKILL.md')) |
| 355 | ).length; |
| 356 | } |
| 357 | |
| 358 | function generatePluginManifest() { |
| 359 | console.log('Generating .codex-plugin/plugin.json...'); |
| 360 | |
| 361 | const pkg = readJSON(path.join(CITADEL_ROOT, 'package.json')) || {}; |
| 362 | const repoUrl = (pkg.repository && pkg.repository.url) || ''; |
| 363 | const repositoryUrl = repoUrl.replace(/^git\+/, '').replace(/\.git$/, ''); |
| 364 | const skillCount = countSkills(); |
| 365 | const pluginInCitadelRoot = path.resolve(PROJECT_ROOT) === CITADEL_ROOT; |
| 366 | const rootIconPath = pluginInCitadelRoot ? './assets/icon.svg' : './.agents/assets/icon.svg'; |
| 367 | const rootScreenshotPath = pluginInCitadelRoot |
| 368 | ? './assets/terminal-demo.svg' |
| 369 | : './.agents/assets/terminal-demo.svg'; |
| 370 | |
| 371 | const manifest = { |
| 372 | name: pkg.name || 'citadel', |
| 373 | version: pkg.version || '1.0.0', |
| 374 | description: 'Codex-native agent orchestration harness for durable campaigns, skills, hooks, telemetry, and parallel work.', |
| 375 | author: { |
| 376 | name: pkg.author || 'Citadel', |
| 377 | url: repositoryUrl, |
| 378 | }, |
| 379 | repository: repositoryUrl, |
| 380 | homepage: 'https://sethgammon.github.io/Citadel/', |
| 381 | license: pkg.license || 'MIT', |
| 382 | keywords: ['codex', 'openai', 'agent', 'harness', 'orchestration', 'skills', 'hooks', 'mcp', 'automation'], |
| 383 | skills: pluginInCitadelRoot ? './skills/' : './.agents/skills/', |
| 384 | mcpServers: './.mcp.json', |
| 385 | hooks: CODEX_PLUGIN_HOOKS_PATH, |
| 386 | interface: { |
| 387 | displayName: 'Citadel Harness', |
| 388 | composerIcon: rootIconPath, |
| 389 | logo: rootIconPath, |
| 390 | screenshots: [rootScreenshotPath], |
| 391 | websiteURL: 'https://sethgammon.github.io/Citadel/', |
| 392 | privacyPolicyURL: 'https://github.com/SethGammon/Citadel/blob/main/PRIVACY.md', |
| 393 | termsOfServiceURL: 'https://github.com/SethGammon/Citadel/blob/main/LICENSE', |
| 394 | shortDescription: `Codex-native orchestration: ${skillCount} skills, campaigns, fleet coordination, quality gates`, |
| 395 | longDescription: 'Citadel adds durable planning state, reusable skills, lifecycle hooks, telemetry, PR triage, and coordinated multi-agent workflows to Codex.', |
| 396 | developerName: 'Citadel', |
| 397 | category: 'Developer Tools', |
| 398 | capabilities: [ |
| 399 | 'orchestration', |
no test coverage detected