kirograph 0.27.1 → 0.27.2
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 +27 -1
- package/dist/bin/commands/callees.js +76 -0
- package/dist/bin/commands/callees.js.map +7 -0
- package/dist/bin/commands/callers.js +76 -0
- package/dist/bin/commands/callers.js.map +7 -0
- package/dist/bin/commands/circular-deps.js +68 -0
- package/dist/bin/commands/circular-deps.js.map +7 -0
- package/dist/bin/commands/impact.js +76 -0
- package/dist/bin/commands/impact.js.map +7 -0
- package/dist/bin/commands/type-hierarchy.js +76 -0
- package/dist/bin/commands/type-hierarchy.js.map +7 -0
- package/dist/bin/installer/common.js +15 -9
- package/dist/bin/installer/common.js.map +2 -2
- package/dist/bin/installer/config-prompt.js +8 -2
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/index.js +25 -1
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/installer/instructions.js +14 -21
- package/dist/bin/installer/instructions.js.map +2 -2
- package/dist/bin/installer/mcp.js.map +2 -2
- package/dist/bin/installer/steering.js +38 -0
- package/dist/bin/installer/steering.js.map +2 -2
- package/dist/bin/installer/targets/aider.js +3 -3
- package/dist/bin/installer/targets/aider.js.map +2 -2
- package/dist/bin/installer/targets/amp.js +3 -3
- package/dist/bin/installer/targets/amp.js.map +2 -2
- package/dist/bin/installer/targets/antigravity.js +4 -4
- package/dist/bin/installer/targets/antigravity.js.map +2 -2
- package/dist/bin/installer/targets/augment.js +3 -3
- package/dist/bin/installer/targets/augment.js.map +2 -2
- package/dist/bin/installer/targets/claude.js +3 -3
- package/dist/bin/installer/targets/claude.js.map +2 -2
- package/dist/bin/installer/targets/cline.js +4 -4
- package/dist/bin/installer/targets/cline.js.map +2 -2
- package/dist/bin/installer/targets/codex.js +4 -4
- package/dist/bin/installer/targets/codex.js.map +2 -2
- package/dist/bin/installer/targets/continue.js +4 -4
- package/dist/bin/installer/targets/continue.js.map +2 -2
- package/dist/bin/installer/targets/copilot-cli.js +4 -4
- package/dist/bin/installer/targets/copilot-cli.js.map +2 -2
- package/dist/bin/installer/targets/copilot.js +4 -4
- package/dist/bin/installer/targets/copilot.js.map +2 -2
- package/dist/bin/installer/targets/cursor.js +5 -5
- package/dist/bin/installer/targets/cursor.js.map +2 -2
- package/dist/bin/installer/targets/devin.js +4 -4
- package/dist/bin/installer/targets/devin.js.map +2 -2
- package/dist/bin/installer/targets/gemini-cli.js +4 -4
- package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
- package/dist/bin/installer/targets/generic.js +2 -2
- package/dist/bin/installer/targets/generic.js.map +2 -2
- package/dist/bin/installer/targets/goose.js +3 -4
- package/dist/bin/installer/targets/goose.js.map +3 -3
- package/dist/bin/installer/targets/index.js.map +1 -1
- package/dist/bin/installer/targets/junie.js +4 -4
- package/dist/bin/installer/targets/junie.js.map +2 -2
- package/dist/bin/installer/targets/kilo.js +4 -4
- package/dist/bin/installer/targets/kilo.js.map +2 -2
- package/dist/bin/installer/targets/kiro.js +23 -3
- package/dist/bin/installer/targets/kiro.js.map +2 -2
- package/dist/bin/installer/targets/opencode.js +3 -3
- package/dist/bin/installer/targets/opencode.js.map +2 -2
- package/dist/bin/installer/targets/openhands.js +3 -3
- package/dist/bin/installer/targets/openhands.js.map +2 -2
- package/dist/bin/installer/targets/qoder.js +2 -2
- package/dist/bin/installer/targets/qoder.js.map +2 -2
- package/dist/bin/installer/targets/qwen.js +2 -2
- package/dist/bin/installer/targets/qwen.js.map +2 -2
- package/dist/bin/installer/targets/replit.js +3 -3
- package/dist/bin/installer/targets/replit.js.map +2 -2
- package/dist/bin/installer/targets/roo.js +4 -4
- package/dist/bin/installer/targets/roo.js.map +2 -2
- package/dist/bin/installer/targets/tabnine.js +3 -3
- package/dist/bin/installer/targets/tabnine.js.map +2 -2
- package/dist/bin/installer/targets/trae.js +3 -3
- package/dist/bin/installer/targets/trae.js.map +2 -2
- package/dist/bin/installer/targets/warp.js +4 -4
- package/dist/bin/installer/targets/warp.js.map +2 -2
- package/dist/bin/installer/targets/windsurf.js +4 -4
- package/dist/bin/installer/targets/windsurf.js.map +2 -2
- package/dist/bin/kirograph.js +11 -1
- package/dist/bin/kirograph.js.map +3 -3
- package/dist/config.js +4 -0
- package/dist/config.js.map +2 -2
- package/dist/mcp/cache.js +1 -1
- package/dist/mcp/cache.js.map +2 -2
- package/dist/mcp/tool-names.js +43 -4
- package/dist/mcp/tool-names.js.map +2 -2
- package/dist/mcp/tools.js +774 -182
- package/dist/mcp/tools.js.map +3 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/devin.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Devin for Terminal target.\n *\n * MCP: .devin/config.json (project-level, standard mcpServers format)\n * Hooks: .devin/hooks.v1.json (Claude Code compatible format)\n * Instructions: AGENTS.md (upsert block)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;
|
|
4
|
+
"sourcesContent": ["/**\n * Devin for Terminal target.\n *\n * MCP: .devin/config.json (project-level, standard mcpServers format)\n * Hooks: .devin/hooks.v1.json (Claude Code compatible format)\n * Instructions: AGENTS.md (upsert block)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst DEVIN_BLOCK_ID = 'devin';\n\nfunction buildDevinHooks(): object {\n return {\n hooks: {\n Stop: [\n {\n matcher: '',\n hooks: [\n {\n type: 'command',\n command: 'kirograph sync --quiet 2>/dev/null || true',\n timeout: 30,\n },\n ],\n },\n ],\n },\n };\n}\n\nexport function installDevinEarly(projectRoot: string): void {\n // Write MCP to .devin/config.json\n const configPath = path.join(projectRoot, '.devin', 'config.json');\n ensureDir(path.dirname(configPath));\n const config = readJson(configPath);\n config.mcpServers = config.mcpServers ?? {};\n config.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(configPath, config);\n console.log(` \u2713 Devin MCP server registered in ${configPath}`);\n}\n\nexport function installDevinLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionOpts = buildInstructionOpts(opts, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'devin.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 Devin instructions written to ${instructionsPath}`);\n\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n const changed = upsertGeneratedBlock(agentsPath, DEVIN_BLOCK_ID, '## KiroGraph', buildAgentInstructions(instructionOpts));\n console.log(changed\n ? ` \u2713 AGENTS.md updated with KiroGraph instructions (Devin)`\n : ` \u2713 AGENTS.md already up to date`);\n\n // Write hooks to .devin/hooks.v1.json (Claude Code compatible)\n const hooksPath = path.join(projectRoot, '.devin', 'hooks.v1.json');\n const existing = readJson(hooksPath);\n const kgHooks = buildDevinHooks() as any;\n existing.hooks = existing.hooks ?? {};\n for (const [event, matchers] of Object.entries(kgHooks.hooks)) {\n existing.hooks[event] = existing.hooks[event] ?? [];\n const hasKirograph = existing.hooks[event].some((m: any) =>\n m.hooks?.some((h: any) => h.command?.includes('kirograph'))\n );\n if (!hasKirograph) {\n for (const matcher of matchers as any[]) {\n existing.hooks[event].push(matcher);\n }\n }\n }\n writeJson(hooksPath, existing);\n console.log(` \u2713 Devin hooks written to ${hooksPath}`);\n}\n\nexport function uninitDevin(projectRoot: string): void {\n // Remove MCP\n const configPath = path.join(projectRoot, '.devin', 'config.json');\n if (fs.existsSync(configPath)) {\n const config = readJson(configPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;\n writeJson(configPath, config);\n console.log(` \u2713 Removed kirograph from .devin/config.json`);\n }\n }\n\n // Remove AGENTS.md block\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n if (removeGeneratedBlock(agentsPath, DEVIN_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from AGENTS.md (Devin)`);\n }\n\n // Remove hooks\n const hooksPath = path.join(projectRoot, '.devin', 'hooks.v1.json');\n if (fs.existsSync(hooksPath)) {\n const config = readJson(hooksPath);\n if (config.hooks) {\n let changed = false;\n for (const event of Object.keys(config.hooks)) {\n const before = config.hooks[event].length;\n config.hooks[event] = config.hooks[event].filter((m: any) =>\n !m.hooks?.some((h: any) => h.command?.includes('kirograph'))\n );\n if (config.hooks[event].length === 0) delete config.hooks[event];\n if (config.hooks[event]?.length !== before) changed = true;\n }\n if (Object.keys(config.hooks).length === 0) delete config.hooks;\n if (changed) {\n writeJson(hooksPath, config);\n console.log(` \u2713 Removed kirograph hooks from .devin/hooks.v1.json`);\n }\n }\n }\n}\n\nexport function printDevinNextSteps(): void {\n console.log('\\n Done! Restart Devin for Terminal for the MCP server and hooks to load.');\n console.log(' MCP is in .devin/config.json');\n console.log(' Auto-sync hook is in .devin/hooks.v1.json');\n console.log(' KiroGraph instructions are in AGENTS.md\\n');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AACtB,oBAWO;AACP,0BAAuC;AAEvC,MAAM,iBAAiB;AAEvB,SAAS,kBAA0B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QAC7D;AACA,YAAI,OAAO,MAAM,KAAK,EAAE,WAAW,EAAG,QAAO,OAAO,MAAM,KAAK;AAC/D,YAAI,OAAO,MAAM,KAAK,GAAG,WAAW,OAAQ,WAAU;AAAA,MACxD;AACA,UAAI,OAAO,KAAK,OAAO,KAAK,EAAE,WAAW,EAAG,QAAO,OAAO;AAC1D,UAAI,SAAS;AACX,qCAAU,WAAW,MAAM;AAC3B,gBAAQ,IAAI,4DAAuD;AAAA,MACrE;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,sBAA4B;AAC1C,UAAQ,IAAI,4EAA4E;AACxF,UAAQ,IAAI,gCAAgC;AAC5C,UAAQ,IAAI,6CAA6C;AACzD,UAAQ,IAAI,6CAA6C;AAC3D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -51,14 +51,14 @@ function installGeminiCliEarly(projectRoot) {
|
|
|
51
51
|
(0, import_common.writeJson)(settingsPath, settings);
|
|
52
52
|
console.log(` \u2713 Gemini CLI MCP server registered in ${settingsPath}`);
|
|
53
53
|
}
|
|
54
|
-
function installGeminiCliLate(projectRoot,
|
|
55
|
-
const
|
|
54
|
+
function installGeminiCliLate(projectRoot, opts) {
|
|
55
|
+
const instructionOpts = (0, import_common.buildInstructionOpts)(opts, true);
|
|
56
56
|
const instructionsPath = path.join(projectRoot, ".kirograph", "gemini-cli.md");
|
|
57
57
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
58
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(
|
|
58
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(instructionOpts));
|
|
59
59
|
console.log(` \u2713 Gemini CLI instructions written to ${instructionsPath}`);
|
|
60
60
|
const geminiPath = path.join(projectRoot, "GEMINI.md");
|
|
61
|
-
const changed = (0, import_common.upsertGeneratedBlock)(geminiPath, GEMINI_CLI_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(
|
|
61
|
+
const changed = (0, import_common.upsertGeneratedBlock)(geminiPath, GEMINI_CLI_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(instructionOpts));
|
|
62
62
|
console.log(changed ? ` \u2713 GEMINI.md updated with KiroGraph instructions` : ` \u2713 GEMINI.md already up to date`);
|
|
63
63
|
const settingsPath = path.join(projectRoot, ".gemini", "settings.json");
|
|
64
64
|
const settings = (0, import_common.readJson)(settingsPath);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/gemini-cli.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Gemini CLI target.\n *\n * MCP: .gemini/settings.json (project-level, mcpServers format)\n * Hooks: .gemini/settings.json (hooks section with SessionEnd event)\n * Instructions: GEMINI.md (upsert block)\n *\n * NOTE: This is NOT an alias for Antigravity. Gemini CLI and Antigravity IDE\n * use different config paths and hook formats.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,SAAoB;AACpB,WAAsB;
|
|
4
|
+
"sourcesContent": ["/**\n * Gemini CLI target.\n *\n * MCP: .gemini/settings.json (project-level, mcpServers format)\n * Hooks: .gemini/settings.json (hooks section with SessionEnd event)\n * Instructions: GEMINI.md (upsert block)\n *\n * NOTE: This is NOT an alias for Antigravity. Gemini CLI and Antigravity IDE\n * use different config paths and hook formats.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst GEMINI_CLI_BLOCK_ID = 'gemini-cli';\n\nexport function installGeminiCliEarly(projectRoot: string): void {\n // Write MCP + hooks to .gemini/settings.json\n const settingsPath = path.join(projectRoot, '.gemini', 'settings.json');\n ensureDir(path.dirname(settingsPath));\n const settings = readJson(settingsPath);\n\n // MCP server\n settings.mcpServers = settings.mcpServers ?? {};\n settings.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n\n writeJson(settingsPath, settings);\n console.log(` \u2713 Gemini CLI MCP server registered in ${settingsPath}`);\n}\n\nexport function installGeminiCliLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionOpts = buildInstructionOpts(opts, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'gemini-cli.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 Gemini CLI instructions written to ${instructionsPath}`);\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n const changed = upsertGeneratedBlock(geminiPath, GEMINI_CLI_BLOCK_ID, '## KiroGraph', buildAgentInstructions(instructionOpts));\n console.log(changed\n ? ` \u2713 GEMINI.md updated with KiroGraph instructions`\n : ` \u2713 GEMINI.md already up to date`);\n\n // Write hooks to .gemini/settings.json\n const settingsPath = path.join(projectRoot, '.gemini', 'settings.json');\n const settings = readJson(settingsPath);\n settings.hooks = settings.hooks ?? {};\n settings.hooks.SessionEnd = settings.hooks.SessionEnd ?? [];\n\n const hasKirograph = settings.hooks.SessionEnd.some((m: any) =>\n m.hooks?.some((h: any) => h.command?.includes('kirograph'))\n );\n if (!hasKirograph) {\n settings.hooks.SessionEnd.push({\n hooks: [\n {\n type: 'command',\n command: 'kirograph sync --quiet 2>/dev/null || true',\n timeout: 5000,\n },\n ],\n });\n }\n\n writeJson(settingsPath, settings);\n console.log(` \u2713 Gemini CLI hooks written to ${settingsPath}`);\n}\n\nexport function uninitGeminiCli(projectRoot: string): void {\n const settingsPath = path.join(projectRoot, '.gemini', 'settings.json');\n if (fs.existsSync(settingsPath)) {\n const settings = readJson(settingsPath);\n let changed = false;\n\n // Remove MCP\n if (settings.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete settings.mcpServers[KIROGRAPH_SERVER_NAME];\n if (Object.keys(settings.mcpServers).length === 0) delete settings.mcpServers;\n changed = true;\n console.log(` \u2713 Removed kirograph from .gemini/settings.json mcpServers`);\n }\n\n // Remove hooks\n if (settings.hooks?.SessionEnd) {\n const before = settings.hooks.SessionEnd.length;\n settings.hooks.SessionEnd = settings.hooks.SessionEnd.filter((m: any) =>\n !m.hooks?.some((h: any) => h.command?.includes('kirograph'))\n );\n if (settings.hooks.SessionEnd.length === 0) delete settings.hooks.SessionEnd;\n if (Object.keys(settings.hooks).length === 0) delete settings.hooks;\n if (settings.hooks?.SessionEnd?.length !== before) {\n changed = true;\n console.log(` \u2713 Removed kirograph hooks from .gemini/settings.json`);\n }\n }\n\n if (changed) writeJson(settingsPath, settings);\n }\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n if (removeGeneratedBlock(geminiPath, GEMINI_CLI_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from GEMINI.md`);\n }\n}\n\nexport function printGeminiCliNextSteps(): void {\n console.log('\\n Done! Restart Gemini CLI for the MCP server and hooks to load.');\n console.log(' MCP and hooks are in .gemini/settings.json');\n console.log(' KiroGraph instructions are in GEMINI.md\\n');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,SAAoB;AACpB,WAAsB;AACtB,oBAWO;AACP,0BAAuC;AAEvC,MAAM,sBAAsB;AAErB,SAAS,sBAAsB,aAA2B;AAE/D,QAAM,eAAe,KAAK,KAAK,aAAa,WAAW,eAAe;AACtE,+BAAU,KAAK,QAAQ,YAAY,CAAC;AACpC,QAAM,eAAW,w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a,WAAW,eAAe;AACtE,MAAI,GAAG,WAAW,YAAY,GAAG;AAC/B,UAAM,eAAW,wBAAS,YAAY;AACtC,QAAI,UAAU;AAGd,QAAI,SAAS,aAAa,mCAAqB,GAAG;AAChD,aAAO,SAAS,WAAW,mCAAqB;AAChD,UAAI,OAAO,KAAK,SAAS,UAAU,EAAE,WAAW,EAAG,QAAO,SAAS;AACnE,gBAAU;AACV,cAAQ,IAAI,kEAA6D;AAAA,IAC3E;AAGA,QAAI,SAAS,OAAO,YAAY;AAC9B,YAAM,SAAS,SAAS,MAAM,WAAW;AACzC,eAAS,MAAM,aAAa,SAAS,MAAM,WAAW;AAAA,QAAO,CAAC,MAC5D,CAAC,EAAE,OAAO,KAAK,CAAC,MAAW,EAAE,SAAS,SAAS,WAAW,CAAC;AAAA,MAC7D;AACA,UAAI,SAAS,MAAM,WAAW,WAAW,EAAG,QAAO,SAAS,MAAM;AAClE,UAAI,OAAO,KAAK,SAAS,KAAK,EAAE,WAAW,EAAG,QAAO,SAAS;AAC9D,UAAI,SAAS,OAAO,YAAY,WAAW,QAAQ;AACjD,kBAAU;AACV,gBAAQ,IAAI,6DAAwD;AAAA,MACtE;AAAA,IACF;AAEA,QAAI,QAAS,8BAAU,cAAc,QAAQ;AAAA,EAC/C;AAEA,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,UAAI,oCAAqB,YAAY,mBAAmB,GAAG;AACzD,YAAQ,IAAI,iDAA4C;AAAA,EAC1D;AACF;AAEO,SAAS,0BAAgC;AAC9C,UAAQ,IAAI,oEAAoE;AAChF,UAAQ,IAAI,8CAA8C;AAC1D,UAAQ,IAAI,6CAA6C;AAC3D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -45,10 +45,10 @@ var import_instructions = require("../instructions");
|
|
|
45
45
|
function makeGenericInstaller(config) {
|
|
46
46
|
function installEarly(_projectRoot) {
|
|
47
47
|
}
|
|
48
|
-
function installLate(projectRoot,
|
|
48
|
+
function installLate(projectRoot, opts) {
|
|
49
49
|
const instructionsPath = path.join(projectRoot, ".kirograph", `${config.id}.md`);
|
|
50
50
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
51
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common.buildInstructionOpts)(
|
|
51
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common.buildInstructionOpts)(opts)));
|
|
52
52
|
console.log(` \u2713 ${config.label} instructions written to ${instructionsPath}`);
|
|
53
53
|
}
|
|
54
54
|
function uninit(projectRoot) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/generic.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Generic print-only targets.\n * These tools don't have a well-known project-level MCP config path,\n * so we write .kirograph/<target>.md and print setup instructions.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAoB;AACpB,WAAsB;
|
|
4
|
+
"sourcesContent": ["/**\n * Generic print-only targets.\n * These tools don't have a well-known project-level MCP config path,\n * so we write .kirograph/<target>.md and print setup instructions.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { ensureDir, buildInstructionOpts, printMcpCommand, type LateInstallOptions } from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nexport interface GenericTargetConfig {\n id: string;\n label: string;\n}\n\nexport function makeGenericInstaller(config: GenericTargetConfig) {\n function installEarly(_projectRoot: string): void {\n // No project-level MCP config for these targets.\n }\n\n function installLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', `${config.id}.md`);\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(opts)));\n console.log(` \u2713 ${config.label} instructions written to ${instructionsPath}`);\n }\n\n function uninit(projectRoot: string): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', `${config.id}.md`);\n if (fs.existsSync(instructionsPath)) {\n fs.unlinkSync(instructionsPath);\n console.log(` \u2713 Removed .kirograph/${config.id}.md`);\n }\n }\n\n function printNextSteps(projectRoot: string): void {\n const escapedPath = projectRoot.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n console.log(`\\n Done! ${config.label} instructions written to .kirograph/${config.id}.md`);\n printMcpCommand(`kirograph serve --mcp --path \"${escapedPath}\"`);\n }\n\n return { installEarly, installLate, uninit, printNextSteps };\n}\n\n// \u2500\u2500 Target definitions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport const mistralVibe = makeGenericInstaller({\n id: 'mistral-vibe',\n label: 'Mistral Vibe',\n});\n\nexport const ibmBob = makeGenericInstaller({\n id: 'ibm-bob',\n label: 'IBM Bob',\n});\n\nexport const crush = makeGenericInstaller({\n id: 'crush',\n label: 'Crush',\n});\n\nexport const droidFactory = makeGenericInstaller({\n id: 'droid-factory',\n label: 'Droid Factory',\n});\n\nexport const forgeCode = makeGenericInstaller({\n id: 'forgecode',\n label: 'ForgeCode',\n});\n\nexport const iflowCli = makeGenericInstaller({\n id: 'iflow',\n label: 'iFlow CLI',\n});\n\nexport const rovoDev = makeGenericInstaller({\n id: 'rovo',\n label: 'Atlassian Rovo Dev',\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;A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;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,YAAY,qBAAqB;AAAA,EAC5C,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,WAAW,qBAAqB;AAAA,EAC3C,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,UAAU,qBAAqB;AAAA,EAC1C,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -38,17 +38,16 @@ var fs = __toESM(require("fs"));
|
|
|
38
38
|
var path = __toESM(require("path"));
|
|
39
39
|
var import_common = require("../common");
|
|
40
40
|
var import_instructions = require("../instructions");
|
|
41
|
-
var import_common2 = require("../common");
|
|
42
41
|
const GOOSE_BLOCK_ID = "goose";
|
|
43
42
|
function installGooseEarly(_projectRoot) {
|
|
44
43
|
}
|
|
45
|
-
function installGooseLate(projectRoot,
|
|
44
|
+
function installGooseLate(projectRoot, opts) {
|
|
46
45
|
const instructionsPath = path.join(projectRoot, ".kirograph", "goose.md");
|
|
47
46
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
48
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0,
|
|
47
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common.buildInstructionOpts)(opts, false)));
|
|
49
48
|
console.log(` \u2713 Goose instructions written to ${instructionsPath}`);
|
|
50
49
|
const agentsPath = path.join(projectRoot, "AGENTS.md");
|
|
51
|
-
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, GOOSE_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0,
|
|
50
|
+
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, GOOSE_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common.buildInstructionOpts)(opts, false)));
|
|
52
51
|
console.log(changed ? ` \u2713 AGENTS.md updated with KiroGraph instructions (Goose)` : ` \u2713 AGENTS.md already up to date`);
|
|
53
52
|
}
|
|
54
53
|
function uninitGoose(projectRoot) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/goose.ts"],
|
|
4
|
-
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport {\n ensureDir,\n printMcpCommand,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n buildInstructionOpts,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst GOOSE_BLOCK_ID = 'goose';\n\nexport function installGooseEarly(_projectRoot: string): void {\n // Block Goose MCP is configured via `goose mcp add` command.\n // We print the command in next steps.\n}\n\nexport function installGooseLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'goose.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(opts, false)));\n console.log(` \u2713 Goose instructions written to ${instructionsPath}`);\n\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n const changed = upsertGeneratedBlock(agentsPath, GOOSE_BLOCK_ID, '## KiroGraph', buildAgentInstructions(buildInstructionOpts(opts, false)));\n console.log(changed\n ? ` \u2713 AGENTS.md updated with KiroGraph instructions (Goose)`\n : ` \u2713 AGENTS.md already up to date`);\n}\n\nexport function uninitGoose(projectRoot: string): void {\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n if (removeGeneratedBlock(agentsPath, GOOSE_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from AGENTS.md (Goose)`);\n }\n}\n\nexport function printGooseNextSteps(projectRoot: string): void {\n const escapedPath = projectRoot.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n console.log('\\n Done! KiroGraph instructions are in AGENTS.md.');\n printMcpCommand(`goose mcp add kirograph -- kirograph serve --mcp --path \"${escapedPath}\"`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AACtB,oBAOO;AACP,0BAAuC;AAEvC,MAAM,iBAAiB;AAEhB,SAAS,kBAAkB,cAA4B;AAG9D;AAEO,SAAS,iBAAiB,aAAqB,MAAgC;AACpF,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,UAAU;AACxE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,gDAAuB,oCAAqB,MAAM,KAAK,CAAC,CAAC;AAC5F,UAAQ,IAAI,0CAAqC,gBAAgB,EAAE;AAEnE,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,QAAM,cAAU,oCAAqB,YAAY,gBAAgB,oBAAgB,gDAAuB,oCAAqB,MAAM,KAAK,CAAC,CAAC;AAC1I,UAAQ,IAAI,UACR,mEACA,uCAAkC;AACxC;AAEO,SAAS,YAAY,aAA2B;AACrD,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,UAAI,oCAAqB,YAAY,cAAc,GAAG;AACpD,YAAQ,IAAI,yDAAoD;AAAA,EAClE;AACF;AAEO,SAAS,oBAAoB,aAA2B;AAC7D,QAAM,cAAc,YAAY,QAAQ,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAK;AAC1E,UAAQ,IAAI,oDAAoD;AAChE,qCAAgB,4DAA4D,WAAW,GAAG;AAC5F;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { CavemanMode } from '../caveman';\nimport type { InstallTarget } from '../common';\nimport { installKiroEarly, installKiroLate, printKiroNextSteps } from './kiro';\nimport { installClaudeEarly, installClaudeLate, printClaudeNextSteps, uninitClaude } from './claude';\nimport { installCodexEarly, installCodexLate, printCodexNextSteps, uninitCodex } from './codex';\nimport { installCursorEarly, installCursorLate, printCursorNextSteps, uninitCursor } from './cursor';\nimport { installAntigravityEarly, installAntigravityLate, printAntigravityNextSteps, uninitAntigravity } from './antigravity';\nimport { installOpenCodeEarly, installOpenCodeLate, printOpenCodeNextSteps, uninitOpenCode } from './opencode';\nimport { installWindsurfEarly, installWindsurfLate, printWindsurfNextSteps, uninitWindsurf } from './windsurf';\nimport { installClineEarly, installClineLate, printClineNextSteps, uninitCline } from './cline';\nimport { installCopilotEarly, installCopilotLate, printCopilotNextSteps, uninitCopilot } from './copilot';\nimport { installCopilotCliEarly, installCopilotCliLate, printCopilotCliNextSteps, uninitCopilotCli } from './copilot-cli';\nimport { installJunieEarly, installJunieLate, printJunieNextSteps, uninitJunie } from './junie';\nimport { installGeminiCliEarly, installGeminiCliLate, printGeminiCliNextSteps, uninitGeminiCli } from './gemini-cli';\nimport { installContinueEarly, installContinueLate, printContinueNextSteps, uninitContinue } from './continue';\nimport { installRooEarly, installRooLate, printRooNextSteps, uninitRoo } from './roo';\nimport { installWarpEarly, installWarpLate, printWarpNextSteps, uninitWarp } from './warp';\nimport { installAiderEarly, installAiderLate, printAiderNextSteps, uninitAider } from './aider';\nimport { installTraeEarly, installTraeLate, printTraeNextSteps, uninitTrae } from './trae';\nimport { installAugmentEarly, installAugmentLate, printAugmentNextSteps, uninitAugment } from './augment';\nimport { installKiloEarly, installKiloLate, printKiloNextSteps, uninitKilo } from './kilo';\nimport { installAmpEarly, installAmpLate, printAmpNextSteps, uninitAmp } from './amp';\nimport { installDevinEarly, installDevinLate, printDevinNextSteps, uninitDevin } from './devin';\nimport { installReplitEarly, installReplitLate, printReplitNextSteps, uninitReplit } from './replit';\nimport { installGooseEarly, installGooseLate, printGooseNextSteps, uninitGoose } from './goose';\nimport { installOpenHandsEarly, installOpenHandsLate, printOpenHandsNextSteps, uninitOpenHands } from './openhands';\nimport { installTabnineEarly, installTabnineLate, printTabnineNextSteps, uninitTabnine } from './tabnine';\nimport { mistralVibe, ibmBob, crush, droidFactory, forgeCode, iflowCli, rovoDev } from './generic';\nimport { installQoderEarly, installQoderLate, printQoderNextSteps, uninitQoder } from './qoder';\nimport { installQwenEarly, installQwenLate, printQwenNextSteps, uninitQwen } from './qwen';\n\nexport interface TargetInstaller {\n label: string;\n installEarly(projectRoot: string, kiroHookFormat?: 'v1-legacy' | 'v2'): void;\n installLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean, enableDocs?: boolean, enableData?: boolean, enableSecurity?: boolean, enableArchitecture?: boolean, enablePatterns?: boolean, enableWatchmen?: boolean, watchmenSynthesisMode?: 'local' | 'agent', enableWiki?: boolean, wikiSynthesisMode?: 'local' | 'agent', wikiLocalModel?: string, enableCodeHealth?: boolean, enableAdvancedAnalysis?: boolean, enableAgentUtils?: boolean, trackCallSites?: boolean, kiroHookFormat?: 'v1-legacy' | 'v2'): void;\n printNextSteps(projectRoot: string): void;\n uninit?(projectRoot: string): void;\n}\n\nexport function getTargetInstaller(target: InstallTarget): TargetInstaller {\n if (target === 'claude') {\n return {\n label: 'Claude Code',\n installEarly: installClaudeEarly,\n installLate: installClaudeLate,\n printNextSteps: printClaudeNextSteps,\n uninit: uninitClaude,\n };\n }\n\n if (target === 'codex') {\n return {\n label: 'Codex',\n installEarly: installCodexEarly,\n installLate: installCodexLate,\n printNextSteps: printCodexNextSteps,\n uninit: uninitCodex,\n };\n }\n\n if (target === 'cursor') {\n return {\n label: 'Cursor',\n installEarly: installCursorEarly,\n installLate: installCursorLate,\n printNextSteps: printCursorNextSteps,\n uninit: uninitCursor,\n };\n }\n\n if (target === 'antigravity') {\n return {\n label: 'Antigravity',\n installEarly: installAntigravityEarly,\n installLate: installAntigravityLate,\n printNextSteps: printAntigravityNextSteps,\n uninit: uninitAntigravity,\n };\n }\n\n if (target === 'opencode') {\n return {\n label: 'OpenCode',\n installEarly: installOpenCodeEarly,\n installLate: installOpenCodeLate,\n printNextSteps: printOpenCodeNextSteps,\n uninit: uninitOpenCode,\n };\n }\n\n if (target === 'windsurf') {\n return {\n label: 'Windsurf',\n installEarly: installWindsurfEarly,\n installLate: installWindsurfLate,\n printNextSteps: printWindsurfNextSteps,\n uninit: uninitWindsurf,\n };\n }\n\n if (target === 'cline') {\n return {\n label: 'Cline',\n installEarly: installClineEarly,\n installLate: installClineLate,\n printNextSteps: printClineNextSteps,\n uninit: uninitCline,\n };\n }\n\n if (target === 'copilot') {\n return {\n label: 'GitHub Copilot',\n installEarly: installCopilotEarly,\n installLate: installCopilotLate,\n printNextSteps: printCopilotNextSteps,\n uninit: uninitCopilot,\n };\n }\n\n if (target === 'copilot-cli') {\n return {\n label: 'GitHub Copilot CLI',\n installEarly: installCopilotCliEarly,\n installLate: installCopilotCliLate,\n printNextSteps: printCopilotCliNextSteps,\n uninit: uninitCopilotCli,\n };\n }\n\n if (target === 'junie') {\n return {\n label: 'JetBrains Junie',\n installEarly: installJunieEarly,\n installLate: installJunieLate,\n printNextSteps: printJunieNextSteps,\n uninit: uninitJunie,\n };\n }\n\n if (target === 'gemini-cli') {\n return {\n label: 'Gemini CLI',\n installEarly: installGeminiCliEarly,\n installLate: installGeminiCliLate,\n printNextSteps: printGeminiCliNextSteps,\n uninit: uninitGeminiCli,\n };\n }\n\n if (target === 'continue') {\n return {\n label: 'Continue',\n installEarly: installContinueEarly,\n installLate: installContinueLate,\n printNextSteps: printContinueNextSteps,\n uninit: uninitContinue,\n };\n }\n\n if (target === 'roo') {\n return {\n label: 'Roo Code',\n installEarly: installRooEarly,\n installLate: installRooLate,\n printNextSteps: printRooNextSteps,\n uninit: uninitRoo,\n };\n }\n\n if (target === 'warp') {\n return {\n label: 'Warp',\n installEarly: installWarpEarly,\n installLate: installWarpLate,\n printNextSteps: printWarpNextSteps,\n uninit: uninitWarp,\n };\n }\n\n if (target === 'aider') {\n return {\n label: 'Aider',\n installEarly: installAiderEarly,\n installLate: installAiderLate,\n printNextSteps: printAiderNextSteps,\n uninit: uninitAider,\n };\n }\n\n if (target === 'trae') {\n return {\n label: 'Trae',\n installEarly: installTraeEarly,\n installLate: installTraeLate,\n printNextSteps: printTraeNextSteps,\n uninit: uninitTrae,\n };\n }\n\n if (target === 'augment') {\n return {\n label: 'Augment Code',\n installEarly: installAugmentEarly,\n installLate: installAugmentLate,\n printNextSteps: printAugmentNextSteps,\n uninit: uninitAugment,\n };\n }\n\n if (target === 'kilo') {\n return {\n label: 'Kilo Code',\n installEarly: installKiloEarly,\n installLate: installKiloLate,\n printNextSteps: printKiloNextSteps,\n uninit: uninitKilo,\n };\n }\n\n if (target === 'amp') {\n return {\n label: 'Sourcegraph Amp',\n installEarly: installAmpEarly,\n installLate: installAmpLate,\n printNextSteps: printAmpNextSteps,\n uninit: uninitAmp,\n };\n }\n\n if (target === 'devin') {\n return {\n label: 'Devin',\n installEarly: installDevinEarly,\n installLate: installDevinLate,\n printNextSteps: printDevinNextSteps,\n uninit: uninitDevin,\n };\n }\n\n if (target === 'replit') {\n return {\n label: 'Replit Agent',\n installEarly: installReplitEarly,\n installLate: installReplitLate,\n printNextSteps: printReplitNextSteps,\n uninit: uninitReplit,\n };\n }\n\n if (target === 'goose') {\n return {\n label: 'Block Goose',\n installEarly: installGooseEarly,\n installLate: installGooseLate,\n printNextSteps: printGooseNextSteps,\n uninit: uninitGoose,\n };\n }\n\n if (target === 'openhands') {\n return {\n label: 'OpenHands',\n installEarly: installOpenHandsEarly,\n installLate: installOpenHandsLate,\n printNextSteps: printOpenHandsNextSteps,\n uninit: uninitOpenHands,\n };\n }\n\n if (target === 'tabnine') {\n return {\n label: 'Tabnine',\n installEarly: installTabnineEarly,\n installLate: installTabnineLate,\n printNextSteps: printTabnineNextSteps,\n uninit: uninitTabnine,\n };\n }\n\n if (target === 'mistral-vibe') {\n return { label: 'Mistral Vibe', installEarly: mistralVibe.installEarly, installLate: mistralVibe.installLate, printNextSteps: mistralVibe.printNextSteps, uninit: mistralVibe.uninit };\n }\n if (target === 'ibm-bob') {\n return { label: 'IBM Bob', installEarly: ibmBob.installEarly, installLate: ibmBob.installLate, printNextSteps: ibmBob.printNextSteps, uninit: ibmBob.uninit };\n }\n if (target === 'crush') {\n return { label: 'Crush', installEarly: crush.installEarly, installLate: crush.installLate, printNextSteps: crush.printNextSteps, uninit: crush.uninit };\n }\n if (target === 'droid-factory') {\n return { label: 'Droid Factory', installEarly: droidFactory.installEarly, installLate: droidFactory.installLate, printNextSteps: droidFactory.printNextSteps, uninit: droidFactory.uninit };\n }\n if (target === 'forgecode') {\n return { label: 'ForgeCode', installEarly: forgeCode.installEarly, installLate: forgeCode.installLate, printNextSteps: forgeCode.printNextSteps, uninit: forgeCode.uninit };\n }\n if (target === 'iflow') {\n return { label: 'iFlow CLI', installEarly: iflowCli.installEarly, installLate: iflowCli.installLate, printNextSteps: iflowCli.printNextSteps, uninit: iflowCli.uninit };\n }\n if (target === 'qwen') {\n return { label: 'Qwen Code', installEarly: installQwenEarly, installLate: installQwenLate, printNextSteps: printQwenNextSteps, uninit: uninitQwen };\n }\n if (target === 'rovo') {\n return { label: 'Atlassian Rovo Dev', installEarly: rovoDev.installEarly, installLate: rovoDev.installLate, printNextSteps: rovoDev.printNextSteps, uninit: rovoDev.uninit };\n }\n if (target === 'qoder') {\n return { label: 'Qoder', installEarly: installQoderEarly, installLate: installQoderLate, printNextSteps: printQoderNextSteps, uninit: uninitQoder };\n }\n\n return {\n label: 'Kiro',\n installEarly: installKiroEarly,\n installLate: installKiroLate,\n printNextSteps: printKiroNextSteps,\n };\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type { CavemanMode } from '../caveman';\nimport type { InstallTarget, LateInstallOptions } from '../common';\nimport { installKiroEarly, installKiroLate, printKiroNextSteps } from './kiro';\nimport { installClaudeEarly, installClaudeLate, printClaudeNextSteps, uninitClaude } from './claude';\nimport { installCodexEarly, installCodexLate, printCodexNextSteps, uninitCodex } from './codex';\nimport { installCursorEarly, installCursorLate, printCursorNextSteps, uninitCursor } from './cursor';\nimport { installAntigravityEarly, installAntigravityLate, printAntigravityNextSteps, uninitAntigravity } from './antigravity';\nimport { installOpenCodeEarly, installOpenCodeLate, printOpenCodeNextSteps, uninitOpenCode } from './opencode';\nimport { installWindsurfEarly, installWindsurfLate, printWindsurfNextSteps, uninitWindsurf } from './windsurf';\nimport { installClineEarly, installClineLate, printClineNextSteps, uninitCline } from './cline';\nimport { installCopilotEarly, installCopilotLate, printCopilotNextSteps, uninitCopilot } from './copilot';\nimport { installCopilotCliEarly, installCopilotCliLate, printCopilotCliNextSteps, uninitCopilotCli } from './copilot-cli';\nimport { installJunieEarly, installJunieLate, printJunieNextSteps, uninitJunie } from './junie';\nimport { installGeminiCliEarly, installGeminiCliLate, printGeminiCliNextSteps, uninitGeminiCli } from './gemini-cli';\nimport { installContinueEarly, installContinueLate, printContinueNextSteps, uninitContinue } from './continue';\nimport { installRooEarly, installRooLate, printRooNextSteps, uninitRoo } from './roo';\nimport { installWarpEarly, installWarpLate, printWarpNextSteps, uninitWarp } from './warp';\nimport { installAiderEarly, installAiderLate, printAiderNextSteps, uninitAider } from './aider';\nimport { installTraeEarly, installTraeLate, printTraeNextSteps, uninitTrae } from './trae';\nimport { installAugmentEarly, installAugmentLate, printAugmentNextSteps, uninitAugment } from './augment';\nimport { installKiloEarly, installKiloLate, printKiloNextSteps, uninitKilo } from './kilo';\nimport { installAmpEarly, installAmpLate, printAmpNextSteps, uninitAmp } from './amp';\nimport { installDevinEarly, installDevinLate, printDevinNextSteps, uninitDevin } from './devin';\nimport { installReplitEarly, installReplitLate, printReplitNextSteps, uninitReplit } from './replit';\nimport { installGooseEarly, installGooseLate, printGooseNextSteps, uninitGoose } from './goose';\nimport { installOpenHandsEarly, installOpenHandsLate, printOpenHandsNextSteps, uninitOpenHands } from './openhands';\nimport { installTabnineEarly, installTabnineLate, printTabnineNextSteps, uninitTabnine } from './tabnine';\nimport { mistralVibe, ibmBob, crush, droidFactory, forgeCode, iflowCli, rovoDev } from './generic';\nimport { installQoderEarly, installQoderLate, printQoderNextSteps, uninitQoder } from './qoder';\nimport { installQwenEarly, installQwenLate, printQwenNextSteps, uninitQwen } from './qwen';\n\nexport interface TargetInstaller {\n label: string;\n installEarly(projectRoot: string, kiroHookFormat?: 'v1-legacy' | 'v2'): void;\n installLate(projectRoot: string, opts: LateInstallOptions): void;\n printNextSteps(projectRoot: string): void;\n uninit?(projectRoot: string): void;\n}\n\nexport function getTargetInstaller(target: InstallTarget): TargetInstaller {\n if (target === 'claude') {\n return {\n label: 'Claude Code',\n installEarly: installClaudeEarly,\n installLate: installClaudeLate,\n printNextSteps: printClaudeNextSteps,\n uninit: uninitClaude,\n };\n }\n\n if (target === 'codex') {\n return {\n label: 'Codex',\n installEarly: installCodexEarly,\n installLate: installCodexLate,\n printNextSteps: printCodexNextSteps,\n uninit: uninitCodex,\n };\n }\n\n if (target === 'cursor') {\n return {\n label: 'Cursor',\n installEarly: installCursorEarly,\n installLate: installCursorLate,\n printNextSteps: printCursorNextSteps,\n uninit: uninitCursor,\n };\n }\n\n if (target === 'antigravity') {\n return {\n label: 'Antigravity',\n installEarly: installAntigravityEarly,\n installLate: installAntigravityLate,\n printNextSteps: printAntigravityNextSteps,\n uninit: uninitAntigravity,\n };\n }\n\n if (target === 'opencode') {\n return {\n label: 'OpenCode',\n installEarly: installOpenCodeEarly,\n installLate: installOpenCodeLate,\n printNextSteps: printOpenCodeNextSteps,\n uninit: uninitOpenCode,\n };\n }\n\n if (target === 'windsurf') {\n return {\n label: 'Windsurf',\n installEarly: installWindsurfEarly,\n installLate: installWindsurfLate,\n printNextSteps: printWindsurfNextSteps,\n uninit: uninitWindsurf,\n };\n }\n\n if (target === 'cline') {\n return {\n label: 'Cline',\n installEarly: installClineEarly,\n installLate: installClineLate,\n printNextSteps: printClineNextSteps,\n uninit: uninitCline,\n };\n }\n\n if (target === 'copilot') {\n return {\n label: 'GitHub Copilot',\n installEarly: installCopilotEarly,\n installLate: installCopilotLate,\n printNextSteps: printCopilotNextSteps,\n uninit: uninitCopilot,\n };\n }\n\n if (target === 'copilot-cli') {\n return {\n label: 'GitHub Copilot CLI',\n installEarly: installCopilotCliEarly,\n installLate: installCopilotCliLate,\n printNextSteps: printCopilotCliNextSteps,\n uninit: uninitCopilotCli,\n };\n }\n\n if (target === 'junie') {\n return {\n label: 'JetBrains Junie',\n installEarly: installJunieEarly,\n installLate: installJunieLate,\n printNextSteps: printJunieNextSteps,\n uninit: uninitJunie,\n };\n }\n\n if (target === 'gemini-cli') {\n return {\n label: 'Gemini CLI',\n installEarly: installGeminiCliEarly,\n installLate: installGeminiCliLate,\n printNextSteps: printGeminiCliNextSteps,\n uninit: uninitGeminiCli,\n };\n }\n\n if (target === 'continue') {\n return {\n label: 'Continue',\n installEarly: installContinueEarly,\n installLate: installContinueLate,\n printNextSteps: printContinueNextSteps,\n uninit: uninitContinue,\n };\n }\n\n if (target === 'roo') {\n return {\n label: 'Roo Code',\n installEarly: installRooEarly,\n installLate: installRooLate,\n printNextSteps: printRooNextSteps,\n uninit: uninitRoo,\n };\n }\n\n if (target === 'warp') {\n return {\n label: 'Warp',\n installEarly: installWarpEarly,\n installLate: installWarpLate,\n printNextSteps: printWarpNextSteps,\n uninit: uninitWarp,\n };\n }\n\n if (target === 'aider') {\n return {\n label: 'Aider',\n installEarly: installAiderEarly,\n installLate: installAiderLate,\n printNextSteps: printAiderNextSteps,\n uninit: uninitAider,\n };\n }\n\n if (target === 'trae') {\n return {\n label: 'Trae',\n installEarly: installTraeEarly,\n installLate: installTraeLate,\n printNextSteps: printTraeNextSteps,\n uninit: uninitTrae,\n };\n }\n\n if (target === 'augment') {\n return {\n label: 'Augment Code',\n installEarly: installAugmentEarly,\n installLate: installAugmentLate,\n printNextSteps: printAugmentNextSteps,\n uninit: uninitAugment,\n };\n }\n\n if (target === 'kilo') {\n return {\n label: 'Kilo Code',\n installEarly: installKiloEarly,\n installLate: installKiloLate,\n printNextSteps: printKiloNextSteps,\n uninit: uninitKilo,\n };\n }\n\n if (target === 'amp') {\n return {\n label: 'Sourcegraph Amp',\n installEarly: installAmpEarly,\n installLate: installAmpLate,\n printNextSteps: printAmpNextSteps,\n uninit: uninitAmp,\n };\n }\n\n if (target === 'devin') {\n return {\n label: 'Devin',\n installEarly: installDevinEarly,\n installLate: installDevinLate,\n printNextSteps: printDevinNextSteps,\n uninit: uninitDevin,\n };\n }\n\n if (target === 'replit') {\n return {\n label: 'Replit Agent',\n installEarly: installReplitEarly,\n installLate: installReplitLate,\n printNextSteps: printReplitNextSteps,\n uninit: uninitReplit,\n };\n }\n\n if (target === 'goose') {\n return {\n label: 'Block Goose',\n installEarly: installGooseEarly,\n installLate: installGooseLate,\n printNextSteps: printGooseNextSteps,\n uninit: uninitGoose,\n };\n }\n\n if (target === 'openhands') {\n return {\n label: 'OpenHands',\n installEarly: installOpenHandsEarly,\n installLate: installOpenHandsLate,\n printNextSteps: printOpenHandsNextSteps,\n uninit: uninitOpenHands,\n };\n }\n\n if (target === 'tabnine') {\n return {\n label: 'Tabnine',\n installEarly: installTabnineEarly,\n installLate: installTabnineLate,\n printNextSteps: printTabnineNextSteps,\n uninit: uninitTabnine,\n };\n }\n\n if (target === 'mistral-vibe') {\n return { label: 'Mistral Vibe', installEarly: mistralVibe.installEarly, installLate: mistralVibe.installLate, printNextSteps: mistralVibe.printNextSteps, uninit: mistralVibe.uninit };\n }\n if (target === 'ibm-bob') {\n return { label: 'IBM Bob', installEarly: ibmBob.installEarly, installLate: ibmBob.installLate, printNextSteps: ibmBob.printNextSteps, uninit: ibmBob.uninit };\n }\n if (target === 'crush') {\n return { label: 'Crush', installEarly: crush.installEarly, installLate: crush.installLate, printNextSteps: crush.printNextSteps, uninit: crush.uninit };\n }\n if (target === 'droid-factory') {\n return { label: 'Droid Factory', installEarly: droidFactory.installEarly, installLate: droidFactory.installLate, printNextSteps: droidFactory.printNextSteps, uninit: droidFactory.uninit };\n }\n if (target === 'forgecode') {\n return { label: 'ForgeCode', installEarly: forgeCode.installEarly, installLate: forgeCode.installLate, printNextSteps: forgeCode.printNextSteps, uninit: forgeCode.uninit };\n }\n if (target === 'iflow') {\n return { label: 'iFlow CLI', installEarly: iflowCli.installEarly, installLate: iflowCli.installLate, printNextSteps: iflowCli.printNextSteps, uninit: iflowCli.uninit };\n }\n if (target === 'qwen') {\n return { label: 'Qwen Code', installEarly: installQwenEarly, installLate: installQwenLate, printNextSteps: printQwenNextSteps, uninit: uninitQwen };\n }\n if (target === 'rovo') {\n return { label: 'Atlassian Rovo Dev', installEarly: rovoDev.installEarly, installLate: rovoDev.installLate, printNextSteps: rovoDev.printNextSteps, uninit: rovoDev.uninit };\n }\n if (target === 'qoder') {\n return { label: 'Qoder', installEarly: installQoderEarly, installLate: installQoderLate, printNextSteps: printQoderNextSteps, uninit: uninitQoder };\n }\n\n return {\n label: 'Kiro',\n installEarly: installKiroEarly,\n installLate: installKiroLate,\n printNextSteps: printKiroNextSteps,\n };\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,kBAAsE;AACtE,oBAA0F;AAC1F,mBAAsF;AACtF,oBAA0F;AAC1F,yBAA8G;AAC9G,sBAAkG;AAClG,sBAAkG;AAClG,mBAAsF;AACtF,qBAA8F;AAC9F,yBAA0G;AAC1G,mBAAsF;AACtF,wBAAsG;AACtG,sBAAkG;AAClG,iBAA8E;AAC9E,kBAAkF;AAClF,mBAAsF;AACtF,kBAAkF;AAClF,qBAA8F;AAC9F,kBAAkF;AAClF,iBAA8E;AAC9E,mBAAsF;AACtF,oBAA0F;AA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,kCAAqB,QAAQ,yBAAY;AAAA,EACpJ;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,cAAc;AAAA,IACd,aAAa;AAAA,IACb,gBAAgB;AAAA,EAClB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -51,15 +51,15 @@ function installJunieEarly(projectRoot) {
|
|
|
51
51
|
(0, import_common.writeJson)(mcpPath, config);
|
|
52
52
|
console.log(` \u2713 Junie MCP server registered in ${mcpPath}`);
|
|
53
53
|
}
|
|
54
|
-
function installJunieLate(projectRoot,
|
|
55
|
-
const
|
|
54
|
+
function installJunieLate(projectRoot, opts) {
|
|
55
|
+
const instructionOpts = (0, import_common.buildInstructionOpts)(opts, false);
|
|
56
56
|
const instructionsPath = path.join(projectRoot, ".kirograph", "junie.md");
|
|
57
57
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
58
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(
|
|
58
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(instructionOpts));
|
|
59
59
|
console.log(` \u2713 Junie instructions written to ${instructionsPath}`);
|
|
60
60
|
const agentsPath = path.join(projectRoot, ".junie", "AGENTS.md");
|
|
61
61
|
(0, import_common.ensureDir)(path.dirname(agentsPath));
|
|
62
|
-
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, JUNIE_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(
|
|
62
|
+
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, JUNIE_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(instructionOpts));
|
|
63
63
|
console.log(changed ? ` \u2713 .junie/AGENTS.md updated with KiroGraph instructions` : ` \u2713 .junie/AGENTS.md already up to date`);
|
|
64
64
|
const legacyPath = path.join(projectRoot, ".junie", "guidelines.md");
|
|
65
65
|
if (fs.existsSync(legacyPath)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/junie.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * JetBrains Junie target.\n *\n * MCP: .junie/mcp/mcp.json (project-level, standard mcpServers format)\n * Rules: .junie/AGENTS.md (preferred guidelines location)\n * Hooks: Only SessionStart (EAP, user-level only) \u2014 not useful for auto-sync\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;
|
|
4
|
+
"sourcesContent": ["/**\n * JetBrains Junie target.\n *\n * MCP: .junie/mcp/mcp.json (project-level, standard mcpServers format)\n * Rules: .junie/AGENTS.md (preferred guidelines location)\n * Hooks: Only SessionStart (EAP, user-level only) \u2014 not useful for auto-sync\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst JUNIE_BLOCK_ID = 'junie';\n\nexport function installJunieEarly(projectRoot: string): void {\n // Write MCP to .junie/mcp/mcp.json (project-level)\n const mcpPath = path.join(projectRoot, '.junie', 'mcp', 'mcp.json');\n ensureDir(path.dirname(mcpPath));\n const config = readJson(mcpPath);\n config.mcpServers = config.mcpServers ?? {};\n config.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(mcpPath, config);\n console.log(` \u2713 Junie MCP server registered in ${mcpPath}`);\n}\n\nexport function installJunieLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionOpts = buildInstructionOpts(opts, false);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'junie.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 Junie instructions written to ${instructionsPath}`);\n\n // Write to .junie/AGENTS.md (preferred guidelines location)\n const agentsPath = path.join(projectRoot, '.junie', 'AGENTS.md');\n ensureDir(path.dirname(agentsPath));\n const changed = upsertGeneratedBlock(agentsPath, JUNIE_BLOCK_ID, '## KiroGraph', buildAgentInstructions(instructionOpts));\n console.log(changed\n ? ` \u2713 .junie/AGENTS.md updated with KiroGraph instructions`\n : ` \u2713 .junie/AGENTS.md already up to date`);\n\n // Remove legacy .junie/guidelines.md if it was created by us\n const legacyPath = path.join(projectRoot, '.junie', 'guidelines.md');\n if (fs.existsSync(legacyPath)) {\n const content = fs.readFileSync(legacyPath, 'utf8');\n if (content.includes('kirograph') || content.includes('KiroGraph')) {\n fs.unlinkSync(legacyPath);\n console.log(` \u2713 Removed legacy .junie/guidelines.md (migrated to .junie/AGENTS.md)`);\n }\n }\n}\n\nexport function uninitJunie(projectRoot: string): void {\n // Remove MCP entry\n const mcpPath = path.join(projectRoot, '.junie', 'mcp', 'mcp.json');\n if (fs.existsSync(mcpPath)) {\n const config = readJson(mcpPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;\n writeJson(mcpPath, config);\n console.log(` \u2713 Removed kirograph from .junie/mcp/mcp.json`);\n }\n }\n\n // Remove guidelines block\n const agentsPath = path.join(projectRoot, '.junie', 'AGENTS.md');\n if (removeGeneratedBlock(agentsPath, JUNIE_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from .junie/AGENTS.md`);\n }\n\n // Also check legacy path\n const legacyPath = path.join(projectRoot, '.junie', 'guidelines.md');\n if (removeGeneratedBlock(legacyPath, JUNIE_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from .junie/guidelines.md`);\n }\n}\n\nexport function printJunieNextSteps(): void {\n console.log('\\n Done! Restart Junie for the MCP server to load.');\n console.log(' MCP is in .junie/mcp/mcp.json');\n console.log(' KiroGraph guidelines are in .junie/AGENTS.md\\n');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AACtB,oBAWO;AACP,0BAAuC;AAEvC,MAAM,iBAAiB;AAEhB,SAAS,kBAAkB,aAA2B;AAE3D,QAAM,UAAU,KAAK,KAAK,aAAa,UAAU,OAAO,UAAU;AAClE,+BAAU,KAAK,QAAQ,OAAO,CAAC;AAC/B,QAAM,aAAS,wBAAS,OAAO;AAC/B,SAAO,aAAa,OAAO,cAAc,CAAC;AAC1C,SAAO,WAAW,mCAAqB,IAAI;AAAA,IACzC,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACA,+BAAU,SAAS,MAAM;AACzB,UAAQ,IAAI,2CAAsC,OAAO,EAAE;AAC7D;AAEO,SAAS,iBAAiB,aAAqB,MAAgC;AACpF,QAAM,sBAAkB,oCAAqB,MAAM,KAAK;AAExD,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,UAAU;AACxE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,4CAAuB,eAAe,CAAC;AAC1E,UAAQ,IAAI,0CAAqC,gBAAgB,EAAE;AAGnE,QAAM,aAAa,KAAK,KAAK,aAAa,UAAU,WAAW;AAC/D,+BAAU,KAAK,QAAQ,UAAU,CAAC;AAClC,QAAM,cAAU,oCAAqB,YAAY,gBAAgB,oBAAgB,4CAAuB,eAAe,CAAC;AACxH,UAAQ,IAAI,UACR,kEACA,8CAAyC;AAG7C,QAAM,aAAa,KAAK,KAAK,aAAa,UAAU,eAAe;AACnE,MAAI,GAAG,WAAW,UAAU,GAAG;AAC7B,UAAM,UAAU,GAAG,aAAa,YAAY,MAAM;AAClD,QAAI,QAAQ,SAAS,WAAW,KAAK,QAAQ,SAAS,WAAW,GAAG;AAClE,SAAG,WAAW,UAAU;AACxB,cAAQ,IAAI,6EAAwE;AAAA,IACtF;AAAA,EACF;AACF;AAEO,SAAS,YAAY,aAA2B;AAErD,QAAM,UAAU,KAAK,KAAK,aAAa,UAAU,OAAO,UAAU;AAClE,MAAI,GAAG,WAAW,OAAO,GAAG;AAC1B,UAAM,aAAS,wBAAS,OAAO;AAC/B,QAAI,OAAO,aAAa,mCAAqB,GAAG;AAC9C,aAAO,OAAO,WAAW,mCAAqB;AAC9C,UAAI,OAAO,KAAK,OAAO,UAAU,EAAE,WAAW,EAAG,QAAO,OAAO;AAC/D,mCAAU,SAAS,MAAM;AACzB,cAAQ,IAAI,qDAAgD;AAAA,IAC9D;AAAA,EACF;AAGA,QAAM,aAAa,KAAK,KAAK,aAAa,UAAU,WAAW;AAC/D,UAAI,oCAAqB,YAAY,cAAc,GAAG;AACpD,YAAQ,IAAI,wDAAmD;AAAA,EACjE;AAGA,QAAM,aAAa,KAAK,KAAK,aAAa,UAAU,eAAe;AACnE,UAAI,oCAAqB,YAAY,cAAc,GAAG;AACpD,YAAQ,IAAI,4DAAuD;AAAA,EACrE;AACF;AAEO,SAAS,sBAA4B;AAC1C,UAAQ,IAAI,qDAAqD;AACjE,UAAQ,IAAI,iCAAiC;AAC7C,UAAQ,IAAI,kDAAkD;AAChE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -52,16 +52,16 @@ function installKiloEarly(projectRoot) {
|
|
|
52
52
|
(0, import_common.writeJson)(configPath, config);
|
|
53
53
|
console.log(` \u2713 Kilo Code MCP server registered in ${configPath}`);
|
|
54
54
|
}
|
|
55
|
-
function installKiloLate(projectRoot,
|
|
56
|
-
const
|
|
55
|
+
function installKiloLate(projectRoot, opts) {
|
|
56
|
+
const instructionOpts = (0, import_common.buildInstructionOpts)(opts, false);
|
|
57
57
|
const instructionsPath = path.join(projectRoot, ".kirograph", "kilo.md");
|
|
58
58
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
59
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(
|
|
59
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(instructionOpts));
|
|
60
60
|
console.log(` \u2713 Kilo Code instructions written to ${instructionsPath}`);
|
|
61
61
|
const rulesDir = path.join(projectRoot, ".kilo", "rules");
|
|
62
62
|
(0, import_common.ensureDir)(rulesDir);
|
|
63
63
|
const rulePath = path.join(rulesDir, "kirograph.md");
|
|
64
|
-
fs.writeFileSync(rulePath, (0, import_instructions.buildAgentInstructions)(
|
|
64
|
+
fs.writeFileSync(rulePath, (0, import_instructions.buildAgentInstructions)(instructionOpts));
|
|
65
65
|
console.log(` \u2713 Kilo Code rule written to ${rulePath}`);
|
|
66
66
|
const jsoncPath = path.join(projectRoot, "kilo.jsonc");
|
|
67
67
|
const jsonPath = path.join(projectRoot, "kilo.json");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/kilo.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Kilo Code target.\n *\n * MCP: kilo.json or .kilo/kilo.json (project-level, \"mcp\" key with type: \"local\")\n * Rules: .kilo/rules/kirograph.md + referenced in kilo.jsonc \"instructions\" array\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAoB;AACpB,WAAsB;
|
|
4
|
+
"sourcesContent": ["/**\n * Kilo Code target.\n *\n * MCP: kilo.json or .kilo/kilo.json (project-level, \"mcp\" key with type: \"local\")\n * Rules: .kilo/rules/kirograph.md + referenced in kilo.jsonc \"instructions\" array\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst KILO_MCP_NAME = 'kirograph';\nconst KILO_RULES_FILE = '.kilo/rules/kirograph.md';\n\nexport function installKiloEarly(projectRoot: string): void {\n // Write MCP to kilo.json (project-level)\n const configPath = path.join(projectRoot, 'kilo.json');\n const config = readJson(configPath);\n config.mcp = config.mcp ?? {};\n config.mcp[KILO_MCP_NAME] = {\n type: 'local',\n command: [KIROGRAPH_COMMAND, ...KIROGRAPH_MCP_ARGS],\n enabled: true,\n };\n writeJson(configPath, config);\n console.log(` \u2713 Kilo Code MCP server registered in ${configPath}`);\n}\n\nexport function installKiloLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionOpts = buildInstructionOpts(opts, false);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'kilo.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 Kilo Code instructions written to ${instructionsPath}`);\n\n // Write rules file inside .kilo/rules/\n const rulesDir = path.join(projectRoot, '.kilo', 'rules');\n ensureDir(rulesDir);\n const rulePath = path.join(rulesDir, 'kirograph.md');\n fs.writeFileSync(rulePath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 Kilo Code rule written to ${rulePath}`);\n\n // Add to instructions array in kilo.jsonc (or kilo.json)\n const jsoncPath = path.join(projectRoot, 'kilo.jsonc');\n const jsonPath = path.join(projectRoot, 'kilo.json');\n const cfgPath = fs.existsSync(jsoncPath) ? jsoncPath : jsonPath;\n const cfg = readJson(cfgPath);\n const instructions: string[] = cfg.instructions ?? [];\n if (!instructions.includes(KILO_RULES_FILE)) {\n instructions.push(KILO_RULES_FILE);\n }\n cfg.instructions = instructions;\n writeJson(cfgPath, cfg);\n console.log(` \u2713 Kilo Code instructions referenced in ${cfgPath}`);\n}\n\nexport function uninitKilo(projectRoot: string): void {\n // Remove MCP entry\n const configPath = path.join(projectRoot, 'kilo.json');\n if (fs.existsSync(configPath)) {\n const config = readJson(configPath);\n if (config.mcp?.[KILO_MCP_NAME]) {\n delete config.mcp[KILO_MCP_NAME];\n if (Object.keys(config.mcp).length === 0) delete config.mcp;\n writeJson(configPath, config);\n console.log(` \u2713 Removed kirograph from kilo.json mcp`);\n }\n }\n\n // Remove instructions reference\n const jsoncPath = path.join(projectRoot, 'kilo.jsonc');\n const jsonPath = path.join(projectRoot, 'kilo.json');\n const cfgPath = fs.existsSync(jsoncPath) ? jsoncPath : jsonPath;\n if (fs.existsSync(cfgPath)) {\n const cfg = readJson(cfgPath);\n if (Array.isArray(cfg.instructions)) {\n const idx = cfg.instructions.indexOf(KILO_RULES_FILE);\n if (idx !== -1) {\n cfg.instructions.splice(idx, 1);\n if (cfg.instructions.length === 0) delete cfg.instructions;\n writeJson(cfgPath, cfg);\n console.log(` \u2713 Removed kirograph instructions from ${cfgPath}`);\n }\n }\n }\n\n // Remove rule file\n const rulePath = path.join(projectRoot, '.kilo', 'rules', 'kirograph.md');\n if (fs.existsSync(rulePath)) {\n fs.unlinkSync(rulePath);\n console.log(` \u2713 Removed .kilo/rules/kirograph.md`);\n }\n}\n\nexport function printKiloNextSteps(): void {\n console.log('\\n Done! Restart Kilo Code for the MCP server to load.');\n console.log(' MCP is in kilo.json');\n console.log(' KiroGraph rule is in .kilo/rules/kirograph.md\\n');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAoB;AACpB,WAAsB;AACtB,oBAQO;AACP,0BAAuC;AAEvC,MAAM,gBAAgB;AACtB,MAAM,kBAAkB;AAEjB,SAAS,iBAAiB,aAA2B;AAE1D,Q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AAC7B,UAAM,aAAS,wBAAS,UAAU;AAClC,QAAI,OAAO,MAAM,aAAa,GAAG;AAC/B,aAAO,OAAO,IAAI,aAAa;AAC/B,UAAI,OAAO,KAAK,OAAO,GAAG,EAAE,WAAW,EAAG,QAAO,OAAO;AACxD,mCAAU,YAAY,MAAM;AAC5B,cAAQ,IAAI,+CAA0C;AAAA,IACxD;AAAA,EACF;AAGA,QAAM,YAAY,KAAK,KAAK,aAAa,YAAY;AACrD,QAAM,WAAW,KAAK,KAAK,aAAa,WAAW;AACnD,QAAM,UAAU,GAAG,WAAW,SAAS,IAAI,YAAY;AACvD,MAAI,GAAG,WAAW,OAAO,GAAG;AAC1B,UAAM,UAAM,wBAAS,OAAO;AAC5B,QAAI,MAAM,QAAQ,IAAI,YAAY,GAAG;AACnC,YAAM,MAAM,IAAI,aAAa,QAAQ,eAAe;AACpD,UAAI,QAAQ,IAAI;AACd,YAAI,aAAa,OAAO,KAAK,CAAC;AAC9B,YAAI,IAAI,aAAa,WAAW,EAAG,QAAO,IAAI;AAC9C,qCAAU,SAAS,GAAG;AACtB,gBAAQ,IAAI,gDAA2C,OAAO,EAAE;AAAA,MAClE;AAAA,IACF;AAAA,EACF;AAGA,QAAM,WAAW,KAAK,KAAK,aAAa,SAAS,SAAS,cAAc;AACxE,MAAI,GAAG,WAAW,QAAQ,GAAG;AAC3B,OAAG,WAAW,QAAQ;AACtB,YAAQ,IAAI,2CAAsC;AAAA,EACpD;AACF;AAEO,SAAS,qBAA2B;AACzC,UAAQ,IAAI,yDAAyD;AACrE,UAAQ,IAAI,uBAAuB;AACnC,UAAQ,IAAI,mDAAmD;AACjE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -42,13 +42,33 @@ function installKiroEarly(projectRoot, kiroHookFormat = "v2") {
|
|
|
42
42
|
const kiroDir = path.join(projectRoot, ".kiro");
|
|
43
43
|
(0, import_hooks.writeHooks)(kiroDir, { kiroHookFormat });
|
|
44
44
|
}
|
|
45
|
-
function installKiroLate(projectRoot,
|
|
45
|
+
function installKiroLate(projectRoot, opts) {
|
|
46
|
+
const {
|
|
47
|
+
cavemanMode,
|
|
48
|
+
shellCompressionLevel,
|
|
49
|
+
enableMemory,
|
|
50
|
+
enableDocs,
|
|
51
|
+
enableData,
|
|
52
|
+
enableSecurity,
|
|
53
|
+
enableArchitecture,
|
|
54
|
+
enablePatterns,
|
|
55
|
+
enableWatchmen,
|
|
56
|
+
watchmenSynthesisMode,
|
|
57
|
+
enableWiki,
|
|
58
|
+
wikiSynthesisMode,
|
|
59
|
+
enableCodeHealth,
|
|
60
|
+
enableAdvancedAnalysis,
|
|
61
|
+
enableAgentUtils,
|
|
62
|
+
enableGeneralCompression,
|
|
63
|
+
trackCallSites
|
|
64
|
+
} = opts;
|
|
65
|
+
const kiroHookFormat = opts.kiroHookFormat ?? "v2";
|
|
46
66
|
const kiroDir = path.join(projectRoot, ".kiro");
|
|
47
67
|
const enableCompression = shellCompressionLevel !== "off";
|
|
48
68
|
const enableShellExec = shellCompressionLevel !== "off";
|
|
49
|
-
(0, import_mcp.writeMcpConfigFinal)(kiroDir, projectRoot, { enableArchitecture, enableMemory, enableDocs, enableData, enableSecurity, enablePatterns, enableWiki, enableCodeHealth, enableAdvancedAnalysis, enableAgentUtils, enableShellExec, trackCallSites });
|
|
69
|
+
(0, import_mcp.writeMcpConfigFinal)(kiroDir, projectRoot, { enableArchitecture, enableMemory, enableWatchmen, enableDocs, enableData, enableSecurity, enablePatterns, enableWiki, enableCodeHealth, enableAdvancedAnalysis, enableAgentUtils, enableGeneralCompression, enableShellExec, trackCallSites });
|
|
50
70
|
(0, import_hooks.writeHooks)(kiroDir, { enableCompression, enableMemory, enableWatchmen, watchmenSynthesisMode, enableWiki, wikiSynthesisMode, kiroHookFormat });
|
|
51
|
-
(0, import_steering.writeSteering)(kiroDir, { cavemanMode, enableCompression, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns, enableWiki, enableCodeHealth, enableAdvancedAnalysis, enableAgentUtils, trackCallSites });
|
|
71
|
+
(0, import_steering.writeSteering)(kiroDir, { cavemanMode, enableCompression, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns, enableWiki, enableCodeHealth, enableAdvancedAnalysis, enableAgentUtils, enableGeneralCompression, trackCallSites });
|
|
52
72
|
(0, import_cli_agent.writeCliAgent)(kiroDir, { enableSecurity, enableArchitecture, enablePatterns });
|
|
53
73
|
}
|
|
54
74
|
function printKiroNextSteps() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/kiro.ts"],
|
|
4
|
-
"sourcesContent": ["import * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAsB;
|
|
4
|
+
"sourcesContent": ["import * as path from 'path';\nimport { writeCliAgent } from '../cli-agent';\nimport { writeHooks, KiroHookFormat } from '../hooks';\nimport { writeMcpConfigFinal } from '../mcp';\nimport { writeSteering } from '../steering';\nimport type { LateInstallOptions } from '../common';\n\nexport function installKiroEarly(projectRoot: string, kiroHookFormat: KiroHookFormat = 'v2'): void {\n const kiroDir = path.join(projectRoot, '.kiro');\n writeHooks(kiroDir, { kiroHookFormat });\n}\n\nexport function installKiroLate(projectRoot: string, opts: LateInstallOptions): void {\n const { cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity,\n enableArchitecture, enablePatterns, enableWatchmen, watchmenSynthesisMode, enableWiki,\n wikiSynthesisMode, enableCodeHealth, enableAdvancedAnalysis, enableAgentUtils,\n enableGeneralCompression, trackCallSites } = opts;\n const kiroHookFormat = (opts.kiroHookFormat ?? 'v2') as KiroHookFormat;\n const kiroDir = path.join(projectRoot, '.kiro');\n const enableCompression = shellCompressionLevel !== 'off';\n const enableShellExec = shellCompressionLevel !== 'off';\n writeMcpConfigFinal(kiroDir, projectRoot, { enableArchitecture, enableMemory, enableWatchmen, enableDocs, enableData, enableSecurity, enablePatterns, enableWiki, enableCodeHealth, enableAdvancedAnalysis, enableAgentUtils, enableGeneralCompression, enableShellExec, trackCallSites });\n writeHooks(kiroDir, { enableCompression, enableMemory, enableWatchmen, watchmenSynthesisMode, enableWiki, wikiSynthesisMode, kiroHookFormat });\n writeSteering(kiroDir, { cavemanMode, enableCompression, shellCompressionLevel: shellCompressionLevel as any, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns, enableWiki, enableCodeHealth, enableAdvancedAnalysis, enableAgentUtils, enableGeneralCompression, trackCallSites });\n writeCliAgent(kiroDir, { enableSecurity, enableArchitecture, enablePatterns });\n}\n\nexport function printKiroNextSteps(): void {\n console.log('\\n Done! Restart Kiro IDE for the MCP server to load.');\n console.log(' For Kiro CLI, use the \"kirograph\" agent: kiro-cli --agent kirograph\\n');\n}\n\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAsB;AACtB,uBAA8B;AAC9B,mBAA2C;AAC3C,iBAAoC;AACpC,sBAA8B;AAGvB,SAAS,iBAAiB,aAAqB,iBAAiC,MAAY;AACjG,QAAM,UAAU,KAAK,KAAK,aAAa,OAAO;AAC9C,+BAAW,SAAS,EAAE,eAAe,CAAC;AACxC;AAEO,SAAS,gBAAgB,aAAqB,MAAgC;AACnF,QAAM;AAAA,IAAE;AAAA,IAAa;AAAA,IAAuB;AAAA,IAAc;AAAA,IAAY;AAAA,IAAY;AAAA,IAChF;AAAA,IAAoB;AAAA,IAAgB;AAAA,IAAgB;AAAA,IAAuB;AAAA,IAC3E;AAAA,IAAmB;AAAA,IAAkB;AAAA,IAAwB;AAAA,IAC7D;AAAA,IAA0B;AAAA,EAAe,IAAI;AAC/C,QAAM,iBAAkB,KAAK,kBAAkB;AAC/C,QAAM,UAAU,KAAK,KAAK,aAAa,OAAO;AAC9C,QAAM,oBAAoB,0BAA0B;AACpD,QAAM,kBAAkB,0BAA0B;AAClD,sCAAoB,SAAS,aAAa,EAAE,oBAAoB,cAAc,gBAAgB,YAAY,YAAY,gBAAgB,gBAAgB,YAAY,kBAAkB,wBAAwB,kBAAkB,0BAA0B,iBAAiB,eAAe,CAAC;AACzR,+BAAW,SAAS,EAAE,mBAAmB,cAAc,gBAAgB,uBAAuB,YAAY,mBAAmB,eAAe,CAAC;AAC7I,qCAAc,SAAS,EAAE,aAAa,mBAAmB,uBAAqD,cAAc,YAAY,YAAY,gBAAgB,oBAAoB,gBAAgB,YAAY,kBAAkB,wBAAwB,kBAAkB,0BAA0B,eAAe,CAAC;AAC1T,sCAAc,SAAS,EAAE,gBAAgB,oBAAoB,eAAe,CAAC;AAC/E;AAEO,SAAS,qBAA2B;AACzC,UAAQ,IAAI,wDAAwD;AACpE,UAAQ,IAAI,yEAAyE;AACvF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -71,11 +71,11 @@ function installOpenCodeEarly(projectRoot) {
|
|
|
71
71
|
(0, import_common.writeJson)(configPath, config);
|
|
72
72
|
console.log(` \u2713 OpenCode MCP server registered in ${configPath}`);
|
|
73
73
|
}
|
|
74
|
-
function installOpenCodeLate(projectRoot,
|
|
75
|
-
const
|
|
74
|
+
function installOpenCodeLate(projectRoot, opts) {
|
|
75
|
+
const instructionOpts = (0, import_common.buildInstructionOpts)(opts, true);
|
|
76
76
|
const instructionsPath = path.join(projectRoot, ".kirograph", "opencode.md");
|
|
77
77
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
78
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(
|
|
78
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(instructionOpts));
|
|
79
79
|
console.log(` \u2713 OpenCode instructions written to ${instructionsPath}`);
|
|
80
80
|
const configPath = path.join(projectRoot, OPENCODE_CONFIG);
|
|
81
81
|
const config = (0, import_common.readJson)(configPath);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/opencode.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * OpenCode target.\n *\n * MCP: .opencode.json (mcp field with type: \"local\")\n * Hooks: .opencode/plugins/kirograph-sync.js (JS plugin)\n * Instructions: .opencode.json (instructions field)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;
|
|
4
|
+
"sourcesContent": ["/**\n * OpenCode target.\n *\n * MCP: .opencode.json (mcp field with type: \"local\")\n * Hooks: .opencode/plugins/kirograph-sync.js (JS plugin)\n * Instructions: .opencode.json (instructions field)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { ensureDir, buildInstructionOpts, readJson, writeJson, LateInstallOptions } from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst OPENCODE_CONFIG = '.opencode.json';\nconst OPENCODE_MCP_NAME = 'kirograph';\nconst OPENCODE_INSTRUCTIONS_PATH = '.kirograph/opencode.md';\nconst OPENCODE_PLUGIN_FILE = 'kirograph-sync.js';\n\nconst OPENCODE_PLUGIN_CONTENT = `/**\n * KiroGraph auto-sync plugin for OpenCode.\n * Syncs the KiroGraph index when the agent session goes idle.\n */\nexport const KirographSync = async ({ $ }) => {\n return {\n event: async ({ event }) => {\n if (event.type === \"session.idle\") {\n await $\\`kirograph sync --quiet 2>/dev/null || true\\`\n }\n },\n }\n}\n`;\n\nexport function installOpenCodeEarly(projectRoot: string): void {\n const configPath = path.join(projectRoot, OPENCODE_CONFIG);\n const config = readJson(configPath);\n\n config.mcp = config.mcp ?? {};\n config.mcp[OPENCODE_MCP_NAME] = {\n type: 'local',\n command: ['kirograph', 'serve', '--mcp'],\n enabled: true,\n };\n\n if (!config.$schema) {\n config.$schema = 'https://opencode.ai/config.json';\n }\n\n writeJson(configPath, config);\n console.log(` \u2713 OpenCode MCP server registered in ${configPath}`);\n}\n\nexport function installOpenCodeLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionOpts = buildInstructionOpts(opts, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'opencode.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 OpenCode instructions written to ${instructionsPath}`);\n\n // Add instructions reference to .opencode.json\n const configPath = path.join(projectRoot, OPENCODE_CONFIG);\n const config = readJson(configPath);\n\n const instructions: string[] = config.instructions ?? [];\n if (!instructions.includes(OPENCODE_INSTRUCTIONS_PATH)) {\n instructions.push(OPENCODE_INSTRUCTIONS_PATH);\n }\n config.instructions = instructions;\n writeJson(configPath, config);\n console.log(` \u2713 OpenCode instructions referenced in ${configPath}`);\n\n // Write sync plugin\n const pluginsDir = path.join(projectRoot, '.opencode', 'plugins');\n ensureDir(pluginsDir);\n const pluginPath = path.join(pluginsDir, OPENCODE_PLUGIN_FILE);\n fs.writeFileSync(pluginPath, OPENCODE_PLUGIN_CONTENT);\n console.log(` \u2713 OpenCode sync plugin written to ${pluginPath}`);\n}\n\nexport function uninitOpenCode(projectRoot: string): void {\n const configPath = path.join(projectRoot, OPENCODE_CONFIG);\n if (fs.existsSync(configPath)) {\n const config = readJson(configPath);\n let changed = false;\n\n // Remove MCP entry\n if (config.mcp?.[OPENCODE_MCP_NAME]) {\n delete config.mcp[OPENCODE_MCP_NAME];\n if (Object.keys(config.mcp).length === 0) delete config.mcp;\n changed = true;\n console.log(` \u2713 Removed kirograph from .opencode.json mcp`);\n }\n\n // Remove instructions reference\n if (Array.isArray(config.instructions)) {\n const idx = config.instructions.indexOf(OPENCODE_INSTRUCTIONS_PATH);\n if (idx !== -1) {\n config.instructions.splice(idx, 1);\n if (config.instructions.length === 0) delete config.instructions;\n changed = true;\n console.log(` \u2713 Removed kirograph instructions from .opencode.json`);\n }\n }\n\n if (changed) writeJson(configPath, config);\n }\n\n // Remove plugin\n const pluginPath = path.join(projectRoot, '.opencode', 'plugins', OPENCODE_PLUGIN_FILE);\n if (fs.existsSync(pluginPath)) {\n fs.unlinkSync(pluginPath);\n console.log(` \u2713 Removed OpenCode sync plugin`);\n }\n}\n\nexport function printOpenCodeNextSteps(): void {\n console.log('\\n Done! Restart OpenCode for the MCP server and sync plugin to load.');\n console.log(' MCP and instructions are in .opencode.json');\n console.log(' Auto-sync plugin is in .opencode/plugins/kirograph-sync.js\\n');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AACtB,oBAAyF;AACzF,0BAAuC;AAEvC,MAAM,kBAAkB;AACxB,MAAM,oBAAoB;AAC1B,MAAM,6BAA6B;AACnC,MAAM,uBAAuB;AAE7B,MAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezB,SAAS,qBAAqB,aAA2B;AAC9D,QAAM,aAAa,KAAK,KAAK,aAAa,eAAe;AACzD,QAAM,aAAS,wBAAS,UAAU;AAElC,SAAO,MAAM,OAAO,OAAO,CAAC;AAC5B,SAAO,IAAI,iBAAiB,IAAI;AAAA,IAC9B,MAAM;AAAA,IACN,SAAS,CAAC,aAAa,SAAS,OAAO;AAAA,IACvC,SAAS;AAAA,EACX;AAEA,MAAI,CAAC,OAAO,SAAS;AACnB,WAAO,UAAU;AAAA,EACnB;AAEA,+BAAU,YAAY,MAAM;AAC5B,UAAQ,IAAI,8CAAyC,UAAU,EAAE;AACnE;AAEO,SAAS,oBAAoB,aAAqB,MAAgC;AACvF,Q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O;AACpD,kBAAU;AACV,gBAAQ,IAAI,6DAAwD;AAAA,MACtE;AAAA,IACF;AAEA,QAAI,QAAS,8BAAU,YAAY,MAAM;AAAA,EAC3C;AAGA,QAAM,aAAa,KAAK,KAAK,aAAa,aAAa,WAAW,oBAAoB;AACtF,MAAI,GAAG,WAAW,UAAU,GAAG;AAC7B,OAAG,WAAW,UAAU;AACxB,YAAQ,IAAI,uCAAkC;AAAA,EAChD;AACF;AAEO,SAAS,yBAA+B;AAC7C,UAAQ,IAAI,wEAAwE;AACpF,UAAQ,IAAI,8CAA8C;AAC1D,UAAQ,IAAI,gEAAgE;AAC9E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -52,13 +52,13 @@ function installOpenHandsEarly(projectRoot) {
|
|
|
52
52
|
(0, import_common.writeJson)(configPath, config);
|
|
53
53
|
console.log(` \u2713 OpenHands MCP server registered in ${configPath}`);
|
|
54
54
|
}
|
|
55
|
-
function installOpenHandsLate(projectRoot,
|
|
55
|
+
function installOpenHandsLate(projectRoot, opts) {
|
|
56
56
|
const instructionsPath = path.join(projectRoot, ".kirograph", "openhands.md");
|
|
57
57
|
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
58
|
-
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(
|
|
58
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(opts, false)));
|
|
59
59
|
console.log(` \u2713 OpenHands instructions written to ${instructionsPath}`);
|
|
60
60
|
const agentsPath = path.join(projectRoot, "AGENTS.md");
|
|
61
|
-
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, OPENHANDS_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(
|
|
61
|
+
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, OPENHANDS_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(opts, false)));
|
|
62
62
|
console.log(changed ? ` \u2713 AGENTS.md updated with KiroGraph instructions (OpenHands)` : ` \u2713 AGENTS.md already up to date`);
|
|
63
63
|
}
|
|
64
64
|
function uninitOpenHands(projectRoot) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/bin/installer/targets/openhands.ts"],
|
|
4
|
-
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n readJson,\n writeJson,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nconst OPENHANDS_BLOCK_ID = 'openhands';\n\nexport function installOpenHandsEarly(projectRoot: string): void {\n const configPath = path.join(projectRoot, '.openhands', 'config.json');\n ensureDir(path.dirname(configPath));\n const config = readJson(configPath);\n config.mcpServers = config.mcpServers ?? {};\n config.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(configPath, config);\n console.log(` \u2713 OpenHands MCP server registered in ${configPath}`);\n}\n\nexport function installOpenHandsLate(projectRoot: string,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,
|
|
4
|
+
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n readJson,\n writeJson,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\n\nconst OPENHANDS_BLOCK_ID = 'openhands';\n\nexport function installOpenHandsEarly(projectRoot: string): void {\n const configPath = path.join(projectRoot, '.openhands', 'config.json');\n ensureDir(path.dirname(configPath));\n const config = readJson(configPath);\n config.mcpServers = config.mcpServers ?? {};\n config.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(configPath, config);\n console.log(` \u2713 OpenHands MCP server registered in ${configPath}`);\n}\n\nexport function installOpenHandsLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'openhands.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(opts, false)));\n console.log(` \u2713 OpenHands instructions written to ${instructionsPath}`);\n\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n const changed = upsertGeneratedBlock(agentsPath, OPENHANDS_BLOCK_ID, '## KiroGraph', buildAgentInstructions(buildInstructionOpts(opts, false)));\n console.log(changed\n ? ` \u2713 AGENTS.md updated with KiroGraph instructions (OpenHands)`\n : ` \u2713 AGENTS.md already up to date`);\n}\n\nexport function uninitOpenHands(projectRoot: string): void {\n const configPath = path.join(projectRoot, '.openhands', 'config.json');\n if (fs.existsSync(configPath)) {\n const config = readJson(configPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n writeJson(configPath, config);\n console.log(` \u2713 Removed kirograph from .openhands/config.json`);\n }\n }\n\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n if (removeGeneratedBlock(agentsPath, OPENHANDS_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from AGENTS.md (OpenHands)`);\n }\n}\n\nexport function printOpenHandsNextSteps(): void {\n console.log('\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