()
| 28 | } |
| 29 | |
| 30 | function stagePluginRoot(targetRoot) { |
| 31 | const excluded = new Set(['.git', '.planning', 'node_modules']); |
| 32 | fs.cpSync(CITADEL_ROOT, targetRoot, { |
| 33 | recursive: true, |
| 34 | filter(source) { |
| 35 | const relative = path.relative(CITADEL_ROOT, source); |
| 36 | const topLevel = relative.split(path.sep)[0]; |
| 37 | return !excluded.has(topLevel); |
| 38 | }, |
| 39 | }); |
| 40 | } |
| 41 | |
| 42 | function snapshotSourcePluginArtifacts() { |
| 43 | return [ |
| 44 | path.join(CITADEL_ROOT, '.codex', 'config.toml'), |
| 45 | path.join(CITADEL_ROOT, '.agents', 'plugins', 'marketplace.json'), |
| 46 | ].map((file) => ({ |
| 47 | file, |
| 48 | contents: fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : null, |
| 49 | })); |
| 50 | } |
| 51 | |
| 52 | function assertPluginAssetsExist(pluginRoot, manifest, expectedScreenshots) { |
| 53 | const interfaceMetadata = manifest.interface || {}; |
no test coverage detected