agent-orchestrator-kit 0.1.10 → 0.1.12
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/CHANGELOG.md +26 -0
- package/README.md +70 -4
- package/bin/agent-orchestrator.js +302 -4
- package/package.json +4 -2
- package/profiles/generic/orchestrator.yaml +7 -0
- package/profiles/mvp/orchestrator.yaml +7 -0
- package/profiles/node/orchestrator.yaml +7 -0
- package/profiles/vue3/orchestrator.yaml +6 -0
- package/templates/.agents/amp.settings.json.example +4 -0
- package/templates/.agents/commands/opsx-apply.md +3 -3
- package/templates/.agents/commands/opsx-archive.md +2 -2
- package/templates/.agents/commands/opsx-design.md +2 -2
- package/templates/.agents/commands/opsx-explore.md +2 -2
- package/templates/.agents/commands/opsx-propose.md +5 -5
- package/templates/.agents/commands/opsx-quick.md +2 -2
- package/templates/.agents/commands/opsx-review.md +3 -3
- package/templates/.agents/commands/opsx-sync.md +2 -2
- package/templates/.agents/figma.local.env.example +10 -0
- package/templates/.agents/mcp.json.example +4 -0
- package/templates/.agents/rules/agent-orchestration.mdc +1 -0
- package/templates/.agents/rules/cli-via-npm.mdc +40 -0
- package/templates/.agents/rules/figma-token-setup.mdc +35 -0
- package/templates/.agents/rules/openspec-workflow.mdc +8 -5
- package/templates/.agents/skills/agent-orchestration/SKILL.md +8 -7
- package/templates/.agents/skills/openspec-apply-change/SKILL.md +3 -3
- package/templates/.agents/skills/openspec-archive-change/SKILL.md +2 -2
- package/templates/.agents/skills/openspec-explore/SKILL.md +2 -2
- package/templates/.agents/skills/openspec-howto/SKILL.md +4 -0
- package/templates/.agents/skills/openspec-propose/SKILL.md +5 -5
- package/templates/.agents/skills/openspec-sync-specs/SKILL.md +2 -2
- package/templates/.agents/subagents/code-reviewer.md +1 -1
- package/templates/.agents/subagents/openspec-guide.md +2 -2
- package/templates/.agents/subagents/setup-doctor.md +2 -1
- package/templates/.github/workflows/agent-verify.yml +3 -3
- package/templates/.github/workflows/spec-verify.yml +3 -3
- package/templates/AGENTS.md +15 -3
- package/templates/CLAUDE.md +3 -2
- package/templates/orchestrator.yaml +15 -0
- package/templates/scripts/figma-mcp-launcher.cjs +67 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawn } = require('child_process');
|
|
3
|
+
const { existsSync, readFileSync } = require('fs');
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
|
|
6
|
+
const projectDir = join(__dirname, '..');
|
|
7
|
+
const envPath = join(projectDir, '.agents', 'figma.local.env');
|
|
8
|
+
|
|
9
|
+
function readLocalToken() {
|
|
10
|
+
if (!existsSync(envPath)) {
|
|
11
|
+
console.error(
|
|
12
|
+
`[figma-mcp-launcher] Missing ${envPath}. Copy .agents/figma.local.env.example → .agents/figma.local.env and add FIGMA_ACCESS_TOKEN (do not paste the token into chat).`
|
|
13
|
+
);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const raw = readFileSync(envPath, 'utf-8');
|
|
18
|
+
const values = {};
|
|
19
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
20
|
+
const trimmed = line.trim();
|
|
21
|
+
if (!trimmed || trimmed.startsWith('#')) continue;
|
|
22
|
+
const eq = trimmed.indexOf('=');
|
|
23
|
+
if (eq === -1) continue;
|
|
24
|
+
const key = trimmed.slice(0, eq).trim();
|
|
25
|
+
let value = trimmed.slice(eq + 1).trim();
|
|
26
|
+
if (
|
|
27
|
+
(value.startsWith('"') && value.endsWith('"')) ||
|
|
28
|
+
(value.startsWith("'") && value.endsWith("'"))
|
|
29
|
+
) {
|
|
30
|
+
value = value.slice(1, -1);
|
|
31
|
+
}
|
|
32
|
+
values[key] = value;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return values.FIGMA_ACCESS_TOKEN || values.FIGMA_API_KEY || '';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const token = readLocalToken();
|
|
39
|
+
if (!token) {
|
|
40
|
+
console.error(
|
|
41
|
+
'[figma-mcp-launcher] FIGMA_ACCESS_TOKEN is empty in .agents/figma.local.env. Add your Figma personal access token locally (never in chat).'
|
|
42
|
+
);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const child = spawn('npx', ['-y', 'figma-developer-mcp', '--stdio'], {
|
|
47
|
+
stdio: 'inherit',
|
|
48
|
+
env: {
|
|
49
|
+
...process.env,
|
|
50
|
+
FIGMA_API_KEY: token,
|
|
51
|
+
FIGMA_ACCESS_TOKEN: token,
|
|
52
|
+
},
|
|
53
|
+
shell: process.platform === 'win32',
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
child.on('exit', (code, signal) => {
|
|
57
|
+
if (signal) {
|
|
58
|
+
process.kill(process.pid, signal);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
process.exit(code == null ? 1 : code);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
child.on('error', (error) => {
|
|
65
|
+
console.error(`[figma-mcp-launcher] Failed to start figma-developer-mcp: ${error.message}`);
|
|
66
|
+
process.exit(1);
|
|
67
|
+
});
|