Spaces:
Sleeping
Sleeping
| import { mkdir, copyFile } from 'node:fs/promises'; | |
| import { dirname, resolve } from 'node:path'; | |
| const root = resolve(new URL('..', import.meta.url).pathname); | |
| const targets = [ | |
| ['agent.json', 'dist/agent.json'], | |
| ['mcp-config.json', 'dist/mcp-config.json'], | |
| ['A2A-CARD.md', 'dist/A2A-CARD.md'], | |
| ]; | |
| for (const [sourceRelative, targetRelative] of targets) { | |
| const source = resolve(root, sourceRelative); | |
| const target = resolve(root, targetRelative); | |
| await mkdir(dirname(target), { recursive: true }); | |
| await copyFile(source, target); | |
| } | |