kirograph 0.14.1 → 0.15.0
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 +128 -20
- package/dist/assets/logo.png +0 -0
- package/dist/bin/commands/help.js +3 -0
- package/dist/bin/commands/help.js.map +2 -2
- package/dist/bin/commands/uninit.js +10 -13
- package/dist/bin/commands/uninit.js.map +2 -2
- package/dist/bin/installer/config-prompt.js +37 -23
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/hooks.js +20 -1
- package/dist/bin/installer/hooks.js.map +2 -2
- package/dist/bin/installer/index.js +9 -4
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/installer/prompts.js +37 -6
- package/dist/bin/installer/prompts.js.map +2 -2
- package/dist/bin/installer/steering.js +19 -0
- package/dist/bin/installer/steering.js.map +2 -2
- package/dist/bin/installer/targets/aider.js +72 -0
- package/dist/bin/installer/targets/aider.js.map +7 -0
- package/dist/bin/installer/targets/amp.js +91 -0
- package/dist/bin/installer/targets/amp.js.map +7 -0
- package/dist/bin/installer/targets/antigravity.js +109 -0
- package/dist/bin/installer/targets/antigravity.js.map +7 -0
- package/dist/bin/installer/targets/augment.js +81 -0
- package/dist/bin/installer/targets/augment.js.map +7 -0
- package/dist/bin/installer/targets/claude.js +1 -1
- package/dist/bin/installer/targets/claude.js.map +2 -2
- package/dist/bin/installer/targets/cline.js +91 -0
- package/dist/bin/installer/targets/cline.js.map +7 -0
- package/dist/bin/installer/targets/codex.js +1 -1
- package/dist/bin/installer/targets/codex.js.map +2 -2
- package/dist/bin/installer/targets/continue.js +107 -0
- package/dist/bin/installer/targets/continue.js.map +7 -0
- package/dist/bin/installer/targets/copilot.js +123 -0
- package/dist/bin/installer/targets/copilot.js.map +7 -0
- package/dist/bin/installer/targets/cursor.js +143 -0
- package/dist/bin/installer/targets/cursor.js.map +7 -0
- package/dist/bin/installer/targets/devin.js +148 -0
- package/dist/bin/installer/targets/devin.js.map +7 -0
- package/dist/bin/installer/targets/gemini-cli.js +126 -0
- package/dist/bin/installer/targets/gemini-cli.js.map +7 -0
- package/dist/bin/installer/targets/generic.js +120 -0
- package/dist/bin/installer/targets/generic.js.map +7 -0
- package/dist/bin/installer/targets/goose.js +72 -0
- package/dist/bin/installer/targets/goose.js.map +7 -0
- package/dist/bin/installer/targets/index.js.map +1 -1
- package/dist/bin/installer/targets/junie.js +105 -0
- package/dist/bin/installer/targets/junie.js.map +7 -0
- package/dist/bin/installer/targets/kilo.js +122 -0
- package/dist/bin/installer/targets/kilo.js.map +7 -0
- package/dist/bin/installer/targets/kiro.js +3 -3
- package/dist/bin/installer/targets/kiro.js.map +2 -2
- package/dist/bin/installer/targets/opencode.js +135 -0
- package/dist/bin/installer/targets/opencode.js.map +7 -0
- package/dist/bin/installer/targets/openhands.js +90 -0
- package/dist/bin/installer/targets/openhands.js.map +7 -0
- package/dist/bin/installer/targets/replit.js +72 -0
- package/dist/bin/installer/targets/replit.js.map +7 -0
- package/dist/bin/installer/targets/roo.js +96 -0
- package/dist/bin/installer/targets/roo.js.map +7 -0
- package/dist/bin/installer/targets/tabnine.js +82 -0
- package/dist/bin/installer/targets/tabnine.js.map +7 -0
- package/dist/bin/installer/targets/trae.js +84 -0
- package/dist/bin/installer/targets/trae.js.map +7 -0
- package/dist/bin/installer/targets/warp.js +97 -0
- package/dist/bin/installer/targets/warp.js.map +7 -0
- package/dist/bin/installer/targets/windsurf.js +141 -0
- package/dist/bin/installer/targets/windsurf.js.map +7 -0
- package/dist/bin/kirograph.js +3 -1
- package/dist/bin/kirograph.js.map +3 -3
- package/dist/compression/naive-cost.js +14 -0
- package/dist/compression/naive-cost.js.map +2 -2
- package/dist/compression/tracker.js +18 -4
- package/dist/compression/tracker.js.map +2 -2
- package/dist/compression/types.js.map +1 -1
- package/dist/config.js +33 -1
- package/dist/config.js.map +2 -2
- package/dist/db/database.js +17 -0
- package/dist/db/database.js.map +2 -2
- package/dist/index.js +3 -0
- package/dist/index.js.map +2 -2
- package/dist/mcp/tool-names.js +5 -1
- package/dist/mcp/tool-names.js.map +2 -2
- package/dist/mcp/tools.js +232 -3
- package/dist/mcp/tools.js.map +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var gemini_cli_exports = {};
|
|
30
|
+
__export(gemini_cli_exports, {
|
|
31
|
+
installGeminiCliEarly: () => installGeminiCliEarly,
|
|
32
|
+
installGeminiCliLate: () => installGeminiCliLate,
|
|
33
|
+
printGeminiCliNextSteps: () => printGeminiCliNextSteps,
|
|
34
|
+
uninitGeminiCli: () => uninitGeminiCli
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(gemini_cli_exports);
|
|
37
|
+
var fs = __toESM(require("fs"));
|
|
38
|
+
var path = __toESM(require("path"));
|
|
39
|
+
var import_common = require("../common");
|
|
40
|
+
var import_instructions = require("../instructions");
|
|
41
|
+
const GEMINI_CLI_BLOCK_ID = "gemini-cli";
|
|
42
|
+
function installGeminiCliEarly(projectRoot) {
|
|
43
|
+
const settingsPath = path.join(projectRoot, ".gemini", "settings.json");
|
|
44
|
+
(0, import_common.ensureDir)(path.dirname(settingsPath));
|
|
45
|
+
const settings = (0, import_common.readJson)(settingsPath);
|
|
46
|
+
settings.mcpServers = settings.mcpServers ?? {};
|
|
47
|
+
settings.mcpServers[import_common.KIROGRAPH_SERVER_NAME] = {
|
|
48
|
+
command: import_common.KIROGRAPH_COMMAND,
|
|
49
|
+
args: import_common.KIROGRAPH_MCP_ARGS
|
|
50
|
+
};
|
|
51
|
+
(0, import_common.writeJson)(settingsPath, settings);
|
|
52
|
+
console.log(` \u2713 Gemini CLI MCP server registered in ${settingsPath}`);
|
|
53
|
+
}
|
|
54
|
+
function installGeminiCliLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
|
|
55
|
+
const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, true);
|
|
56
|
+
const instructionsPath = path.join(projectRoot, ".kirograph", "gemini-cli.md");
|
|
57
|
+
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
58
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
|
|
59
|
+
console.log(` \u2713 Gemini CLI instructions written to ${instructionsPath}`);
|
|
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)(opts));
|
|
62
|
+
console.log(changed ? ` \u2713 GEMINI.md updated with KiroGraph instructions` : ` \u2713 GEMINI.md already up to date`);
|
|
63
|
+
const settingsPath = path.join(projectRoot, ".gemini", "settings.json");
|
|
64
|
+
const settings = (0, import_common.readJson)(settingsPath);
|
|
65
|
+
settings.hooks = settings.hooks ?? {};
|
|
66
|
+
settings.hooks.SessionEnd = settings.hooks.SessionEnd ?? [];
|
|
67
|
+
const hasKirograph = settings.hooks.SessionEnd.some(
|
|
68
|
+
(m) => m.hooks?.some((h) => h.command?.includes("kirograph"))
|
|
69
|
+
);
|
|
70
|
+
if (!hasKirograph) {
|
|
71
|
+
settings.hooks.SessionEnd.push({
|
|
72
|
+
hooks: [
|
|
73
|
+
{
|
|
74
|
+
type: "command",
|
|
75
|
+
command: "kirograph sync --quiet 2>/dev/null || true",
|
|
76
|
+
timeout: 5e3
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
(0, import_common.writeJson)(settingsPath, settings);
|
|
82
|
+
console.log(` \u2713 Gemini CLI hooks written to ${settingsPath}`);
|
|
83
|
+
}
|
|
84
|
+
function uninitGeminiCli(projectRoot) {
|
|
85
|
+
const settingsPath = path.join(projectRoot, ".gemini", "settings.json");
|
|
86
|
+
if (fs.existsSync(settingsPath)) {
|
|
87
|
+
const settings = (0, import_common.readJson)(settingsPath);
|
|
88
|
+
let changed = false;
|
|
89
|
+
if (settings.mcpServers?.[import_common.KIROGRAPH_SERVER_NAME]) {
|
|
90
|
+
delete settings.mcpServers[import_common.KIROGRAPH_SERVER_NAME];
|
|
91
|
+
if (Object.keys(settings.mcpServers).length === 0) delete settings.mcpServers;
|
|
92
|
+
changed = true;
|
|
93
|
+
console.log(` \u2713 Removed kirograph from .gemini/settings.json mcpServers`);
|
|
94
|
+
}
|
|
95
|
+
if (settings.hooks?.SessionEnd) {
|
|
96
|
+
const before = settings.hooks.SessionEnd.length;
|
|
97
|
+
settings.hooks.SessionEnd = settings.hooks.SessionEnd.filter(
|
|
98
|
+
(m) => !m.hooks?.some((h) => h.command?.includes("kirograph"))
|
|
99
|
+
);
|
|
100
|
+
if (settings.hooks.SessionEnd.length === 0) delete settings.hooks.SessionEnd;
|
|
101
|
+
if (Object.keys(settings.hooks).length === 0) delete settings.hooks;
|
|
102
|
+
if (settings.hooks?.SessionEnd?.length !== before) {
|
|
103
|
+
changed = true;
|
|
104
|
+
console.log(` \u2713 Removed kirograph hooks from .gemini/settings.json`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (changed) (0, import_common.writeJson)(settingsPath, settings);
|
|
108
|
+
}
|
|
109
|
+
const geminiPath = path.join(projectRoot, "GEMINI.md");
|
|
110
|
+
if ((0, import_common.removeGeneratedBlock)(geminiPath, GEMINI_CLI_BLOCK_ID)) {
|
|
111
|
+
console.log(` \u2713 Removed KiroGraph block from GEMINI.md`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function printGeminiCliNextSteps() {
|
|
115
|
+
console.log("\n Done! Restart Gemini CLI for the MCP server and hooks to load.");
|
|
116
|
+
console.log(" MCP and hooks are in .gemini/settings.json");
|
|
117
|
+
console.log(" KiroGraph instructions are in GEMINI.md\n");
|
|
118
|
+
}
|
|
119
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
+
0 && (module.exports = {
|
|
121
|
+
installGeminiCliEarly,
|
|
122
|
+
installGeminiCliLate,
|
|
123
|
+
printGeminiCliNextSteps,
|
|
124
|
+
uninitGeminiCli
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=gemini-cli.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 { CavemanMode } from '../caveman';\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} 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, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean): void {\n const opts = buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'gemini-cli.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\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(opts));\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;AAEtB,oBAUO;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,wBAAS,YAAY;AAGtC,WAAS,aAAa,SAAS,cAAc,CAAC;AAC9C,WAAS,WAAW,mCAAqB,IAAI;AAAA,IAC3C,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAEA,+BAAU,cAAc,QAAQ;AAChC,UAAQ,IAAI,gDAA2C,YAAY,EAAE;AACvE;AAEO,SAAS,qBAAqB,aAAqB,aAAmC,uBAAgC,cAA8B;AACzJ,QAAM,WAAO,oCAAqB,aAAa,uBAAuB,cAAc,IAAI;AAExF,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,eAAe;AAC7E,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,4CAAuB,IAAI,CAAC;AAC/D,UAAQ,IAAI,+CAA0C,gBAAgB,EAAE;AAExE,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,QAAM,cAAU,oCAAqB,YAAY,qBAAqB,oBAAgB,4CAAuB,IAAI,CAAC;AAClH,UAAQ,IAAI,UACR,2DACA,uCAAkC;AAGtC,QAAM,eAAe,KAAK,KAAK,aAAa,WAAW,eAAe;AACtE,QAAM,eAAW,wBAAS,YAAY;AACtC,WAAS,QAAQ,SAAS,SAAS,CAAC;AACpC,WAAS,MAAM,aAAa,SAAS,MAAM,cAAc,CAAC;AAE1D,QAAM,eAAe,SAAS,MAAM,WAAW;AAAA,IAAK,CAAC,MACnD,EAAE,OAAO,KAAK,CAAC,MAAW,EAAE,SAAS,SAAS,WAAW,CAAC;AAAA,EAC5D;AACA,MAAI,CAAC,cAAc;AACjB,aAAS,MAAM,WAAW,KAAK;AAAA,MAC7B,OAAO;AAAA,QACL;AAAA,UACE,MAAM;AAAA,UACN,SAAS;AAAA,UACT,SAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAEA,+BAAU,cAAc,QAAQ;AAChC,UAAQ,IAAI,wCAAmC,YAAY,EAAE;AAC/D;AAEO,SAAS,gBAAgB,aAA2B;AACzD,QAAM,eAAe,KAAK,KAAK,aAAa,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
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var generic_exports = {};
|
|
30
|
+
__export(generic_exports, {
|
|
31
|
+
crush: () => crush,
|
|
32
|
+
droidFactory: () => droidFactory,
|
|
33
|
+
forgeCode: () => forgeCode,
|
|
34
|
+
ibmBob: () => ibmBob,
|
|
35
|
+
iflowCli: () => iflowCli,
|
|
36
|
+
makeGenericInstaller: () => makeGenericInstaller,
|
|
37
|
+
mistralVibe: () => mistralVibe,
|
|
38
|
+
qoder: () => qoder,
|
|
39
|
+
qwenCode: () => qwenCode,
|
|
40
|
+
rovoDev: () => rovoDev
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(generic_exports);
|
|
43
|
+
var fs = __toESM(require("fs"));
|
|
44
|
+
var path = __toESM(require("path"));
|
|
45
|
+
var import_common = require("../common");
|
|
46
|
+
var import_instructions = require("../instructions");
|
|
47
|
+
function makeGenericInstaller(config) {
|
|
48
|
+
function installEarly(_projectRoot) {
|
|
49
|
+
}
|
|
50
|
+
function installLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
|
|
51
|
+
const instructionsPath = path.join(projectRoot, ".kirograph", `${config.id}.md`);
|
|
52
|
+
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
53
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory)));
|
|
54
|
+
console.log(` \u2713 ${config.label} instructions written to ${instructionsPath}`);
|
|
55
|
+
}
|
|
56
|
+
function uninit(projectRoot) {
|
|
57
|
+
const instructionsPath = path.join(projectRoot, ".kirograph", `${config.id}.md`);
|
|
58
|
+
if (fs.existsSync(instructionsPath)) {
|
|
59
|
+
fs.unlinkSync(instructionsPath);
|
|
60
|
+
console.log(` \u2713 Removed .kirograph/${config.id}.md`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function printNextSteps(projectRoot) {
|
|
64
|
+
const escapedPath = projectRoot.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
65
|
+
console.log(`
|
|
66
|
+
Done! ${config.label} instructions written to .kirograph/${config.id}.md`);
|
|
67
|
+
(0, import_common.printMcpCommand)(`kirograph serve --mcp --path "${escapedPath}"`);
|
|
68
|
+
}
|
|
69
|
+
return { installEarly, installLate, uninit, printNextSteps };
|
|
70
|
+
}
|
|
71
|
+
const mistralVibe = makeGenericInstaller({
|
|
72
|
+
id: "mistral-vibe",
|
|
73
|
+
label: "Mistral Vibe"
|
|
74
|
+
});
|
|
75
|
+
const ibmBob = makeGenericInstaller({
|
|
76
|
+
id: "ibm-bob",
|
|
77
|
+
label: "IBM Bob"
|
|
78
|
+
});
|
|
79
|
+
const crush = makeGenericInstaller({
|
|
80
|
+
id: "crush",
|
|
81
|
+
label: "Crush"
|
|
82
|
+
});
|
|
83
|
+
const droidFactory = makeGenericInstaller({
|
|
84
|
+
id: "droid-factory",
|
|
85
|
+
label: "Droid Factory"
|
|
86
|
+
});
|
|
87
|
+
const forgeCode = makeGenericInstaller({
|
|
88
|
+
id: "forgecode",
|
|
89
|
+
label: "ForgeCode"
|
|
90
|
+
});
|
|
91
|
+
const iflowCli = makeGenericInstaller({
|
|
92
|
+
id: "iflow",
|
|
93
|
+
label: "iFlow CLI"
|
|
94
|
+
});
|
|
95
|
+
const qwenCode = makeGenericInstaller({
|
|
96
|
+
id: "qwen",
|
|
97
|
+
label: "Qwen Code"
|
|
98
|
+
});
|
|
99
|
+
const rovoDev = makeGenericInstaller({
|
|
100
|
+
id: "rovo",
|
|
101
|
+
label: "Atlassian Rovo Dev"
|
|
102
|
+
});
|
|
103
|
+
const qoder = makeGenericInstaller({
|
|
104
|
+
id: "qoder",
|
|
105
|
+
label: "Qoder"
|
|
106
|
+
});
|
|
107
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
108
|
+
0 && (module.exports = {
|
|
109
|
+
crush,
|
|
110
|
+
droidFactory,
|
|
111
|
+
forgeCode,
|
|
112
|
+
ibmBob,
|
|
113
|
+
iflowCli,
|
|
114
|
+
makeGenericInstaller,
|
|
115
|
+
mistralVibe,
|
|
116
|
+
qoder,
|
|
117
|
+
qwenCode,
|
|
118
|
+
rovoDev
|
|
119
|
+
});
|
|
120
|
+
//# sourceMappingURL=generic.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 { CavemanMode } from '../caveman';\nimport { ensureDir, buildInstructionOpts, printMcpCommand } 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, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', `${config.id}.md`);\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory)));\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 qwenCode = makeGenericInstaller({\n id: 'qwen',\n label: 'Qwen Code',\n});\n\nexport const rovoDev = makeGenericInstaller({\n id: 'rovo',\n label: 'Atlassian Rovo Dev',\n});\n\nexport const qoder = makeGenericInstaller({\n id: 'qoder',\n label: 'Qoder',\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAoB;AACpB,WAAsB;AAEtB,oBAAiE;AACjE,0BAAuC;AAOhC,SAAS,qBAAqB,QAA6B;AAChE,WAAS,aAAa,cAA4B;AAAA,EAElD;AAEA,WAAS,YAAY,aAAqB,aAAmC,uBAAgC,cAA8B;AACzI,UAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,GAAG,OAAO,EAAE,KAAK;AAC/E,iCAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,OAAG,cAAc,sBAAkB,gDAAuB,oCAAqB,aAAa,uBAAuB,YAAY,CAAC,CAAC;AACjI,YAAQ,IAAI,YAAO,OAAO,KAAK,4BAA4B,gBAAgB,EAAE;AAAA,EAC/E;AAEA,WAAS,OAAO,aAA2B;AACzC,UAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,GAAG,OAAO,EAAE,KAAK;AAC/E,QAAI,GAAG,WAAW,gBAAgB,GAAG;AACnC,SAAG,WAAW,gBAAgB;AAC9B,cAAQ,IAAI,+BAA0B,OAAO,EAAE,KAAK;AAAA,IACtD;AAAA,EACF;AAEA,WAAS,eAAe,aAA2B;AACjD,UAAM,cAAc,YAAY,QAAQ,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAK;AAC1E,YAAQ,IAAI;AAAA,UAAa,OAAO,KAAK,uCAAuC,OAAO,EAAE,KAAK;AAC1F,uCAAgB,iCAAiC,WAAW,GAAG;AAAA,EACjE;AAEA,SAAO,EAAE,cAAc,aAAa,QAAQ,eAAe;AAC7D;AAIO,MAAM,cAAc,qBAAqB;AAAA,EAC9C,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,SAAS,qBAAqB;AAAA,EACzC,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,QAAQ,qBAAqB;AAAA,EACxC,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,eAAe,qBAAqB;AAAA,EAC/C,IAAI;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,WAAW,qBAAqB;AAAA,EAC3C,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,UAAU,qBAAqB;AAAA,EAC1C,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;AAEM,MAAM,QAAQ,qBAAqB;AAAA,EACxC,IAAI;AAAA,EACJ,OAAO;AACT,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var goose_exports = {};
|
|
30
|
+
__export(goose_exports, {
|
|
31
|
+
installGooseEarly: () => installGooseEarly,
|
|
32
|
+
installGooseLate: () => installGooseLate,
|
|
33
|
+
printGooseNextSteps: () => printGooseNextSteps,
|
|
34
|
+
uninitGoose: () => uninitGoose
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(goose_exports);
|
|
37
|
+
var fs = __toESM(require("fs"));
|
|
38
|
+
var path = __toESM(require("path"));
|
|
39
|
+
var import_common = require("../common");
|
|
40
|
+
var import_instructions = require("../instructions");
|
|
41
|
+
var import_common2 = require("../common");
|
|
42
|
+
const GOOSE_BLOCK_ID = "goose";
|
|
43
|
+
function installGooseEarly(_projectRoot) {
|
|
44
|
+
}
|
|
45
|
+
function installGooseLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
|
|
46
|
+
const instructionsPath = path.join(projectRoot, ".kirograph", "goose.md");
|
|
47
|
+
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
48
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory)));
|
|
49
|
+
console.log(` \u2713 Goose instructions written to ${instructionsPath}`);
|
|
50
|
+
const agentsPath = path.join(projectRoot, "AGENTS.md");
|
|
51
|
+
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, GOOSE_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)((0, import_common2.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory)));
|
|
52
|
+
console.log(changed ? ` \u2713 AGENTS.md updated with KiroGraph instructions (Goose)` : ` \u2713 AGENTS.md already up to date`);
|
|
53
|
+
}
|
|
54
|
+
function uninitGoose(projectRoot) {
|
|
55
|
+
const agentsPath = path.join(projectRoot, "AGENTS.md");
|
|
56
|
+
if ((0, import_common.removeGeneratedBlock)(agentsPath, GOOSE_BLOCK_ID)) {
|
|
57
|
+
console.log(` \u2713 Removed KiroGraph block from AGENTS.md (Goose)`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function printGooseNextSteps(projectRoot) {
|
|
61
|
+
const escapedPath = projectRoot.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
62
|
+
console.log("\n Done! KiroGraph instructions are in AGENTS.md.");
|
|
63
|
+
(0, import_common.printMcpCommand)(`goose mcp add kirograph -- kirograph serve --mcp --path "${escapedPath}"`);
|
|
64
|
+
}
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
installGooseEarly,
|
|
68
|
+
installGooseLate,
|
|
69
|
+
printGooseNextSteps,
|
|
70
|
+
uninitGoose
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=goose.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/bin/installer/targets/goose.ts"],
|
|
4
|
+
"sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n printMcpCommand,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\nimport { buildInstructionOpts } from '../common';\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, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'goose.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory)));\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(cavemanMode, shellCompressionLevel, enableMemory)));\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;AAEtB,oBAKO;AACP,0BAAuC;AACvC,IAAAA,iBAAqC;AAErC,MAAM,iBAAiB;AAEhB,SAAS,kBAAkB,cAA4B;AAG9D;AAEO,SAAS,iBAAiB,aAAqB,aAAmC,uBAAgC,cAA8B;AACrJ,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,UAAU;AACxE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,gDAAuB,qCAAqB,aAAa,uBAAuB,YAAY,CAAC,CAAC;AACjI,UAAQ,IAAI,0CAAqC,gBAAgB,EAAE;AAEnE,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,QAAM,cAAU,oCAAqB,YAAY,gBAAgB,oBAAgB,gDAAuB,qCAAqB,aAAa,uBAAuB,YAAY,CAAC,CAAC;AAC/K,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": ["import_common"]
|
|
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';\n\nexport interface TargetInstaller {\n label: string;\n installEarly(projectRoot: string): void;\n installLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string): 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 return {\n label: 'Kiro',\n installEarly: installKiroEarly,\n installLate: installKiroLate,\n printNextSteps: printKiroNextSteps,\n };\n}\n\n"],
|
|
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';\n\nexport interface TargetInstaller {\n label: string;\n installEarly(projectRoot: string): void;\n installLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean): 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 return {\n label: 'Kiro',\n installEarly: installKiroEarly,\n installLate: installKiroLate,\n printNextSteps: printKiroNextSteps,\n };\n}\n\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,kBAAsE;AACtE,oBAA0F;AAC1F,mBAAsF;AAU/E,SAAS,mBAAmB,QAAwC;AACzE,MAAI,WAAW,UAAU;AACvB,WAAO;AAAA,MACL,OAAO;AAAA,MACP,cAAc;AAAA,MACd,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,WAAW,SAAS;AACtB,WAAO;AAAA,MACL,OAAO;AAAA,MACP,cAAc;AAAA,MACd,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,cAAc;AAAA,IACd,aAAa;AAAA,IACb,gBAAgB;AAAA,EAClB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var junie_exports = {};
|
|
30
|
+
__export(junie_exports, {
|
|
31
|
+
installJunieEarly: () => installJunieEarly,
|
|
32
|
+
installJunieLate: () => installJunieLate,
|
|
33
|
+
printJunieNextSteps: () => printJunieNextSteps,
|
|
34
|
+
uninitJunie: () => uninitJunie
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(junie_exports);
|
|
37
|
+
var fs = __toESM(require("fs"));
|
|
38
|
+
var path = __toESM(require("path"));
|
|
39
|
+
var import_common = require("../common");
|
|
40
|
+
var import_instructions = require("../instructions");
|
|
41
|
+
const JUNIE_BLOCK_ID = "junie";
|
|
42
|
+
function installJunieEarly(projectRoot) {
|
|
43
|
+
const mcpPath = path.join(projectRoot, ".junie", "mcp", "mcp.json");
|
|
44
|
+
(0, import_common.ensureDir)(path.dirname(mcpPath));
|
|
45
|
+
const config = (0, import_common.readJson)(mcpPath);
|
|
46
|
+
config.mcpServers = config.mcpServers ?? {};
|
|
47
|
+
config.mcpServers[import_common.KIROGRAPH_SERVER_NAME] = {
|
|
48
|
+
command: import_common.KIROGRAPH_COMMAND,
|
|
49
|
+
args: import_common.KIROGRAPH_MCP_ARGS
|
|
50
|
+
};
|
|
51
|
+
(0, import_common.writeJson)(mcpPath, config);
|
|
52
|
+
console.log(` \u2713 Junie MCP server registered in ${mcpPath}`);
|
|
53
|
+
}
|
|
54
|
+
function installJunieLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
|
|
55
|
+
const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory);
|
|
56
|
+
const instructionsPath = path.join(projectRoot, ".kirograph", "junie.md");
|
|
57
|
+
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
58
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
|
|
59
|
+
console.log(` \u2713 Junie instructions written to ${instructionsPath}`);
|
|
60
|
+
const agentsPath = path.join(projectRoot, ".junie", "AGENTS.md");
|
|
61
|
+
(0, import_common.ensureDir)(path.dirname(agentsPath));
|
|
62
|
+
const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, JUNIE_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(opts));
|
|
63
|
+
console.log(changed ? ` \u2713 .junie/AGENTS.md updated with KiroGraph instructions` : ` \u2713 .junie/AGENTS.md already up to date`);
|
|
64
|
+
const legacyPath = path.join(projectRoot, ".junie", "guidelines.md");
|
|
65
|
+
if (fs.existsSync(legacyPath)) {
|
|
66
|
+
const content = fs.readFileSync(legacyPath, "utf8");
|
|
67
|
+
if (content.includes("kirograph") || content.includes("KiroGraph")) {
|
|
68
|
+
fs.unlinkSync(legacyPath);
|
|
69
|
+
console.log(` \u2713 Removed legacy .junie/guidelines.md (migrated to .junie/AGENTS.md)`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function uninitJunie(projectRoot) {
|
|
74
|
+
const mcpPath = path.join(projectRoot, ".junie", "mcp", "mcp.json");
|
|
75
|
+
if (fs.existsSync(mcpPath)) {
|
|
76
|
+
const config = (0, import_common.readJson)(mcpPath);
|
|
77
|
+
if (config.mcpServers?.[import_common.KIROGRAPH_SERVER_NAME]) {
|
|
78
|
+
delete config.mcpServers[import_common.KIROGRAPH_SERVER_NAME];
|
|
79
|
+
if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;
|
|
80
|
+
(0, import_common.writeJson)(mcpPath, config);
|
|
81
|
+
console.log(` \u2713 Removed kirograph from .junie/mcp/mcp.json`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const agentsPath = path.join(projectRoot, ".junie", "AGENTS.md");
|
|
85
|
+
if ((0, import_common.removeGeneratedBlock)(agentsPath, JUNIE_BLOCK_ID)) {
|
|
86
|
+
console.log(` \u2713 Removed KiroGraph block from .junie/AGENTS.md`);
|
|
87
|
+
}
|
|
88
|
+
const legacyPath = path.join(projectRoot, ".junie", "guidelines.md");
|
|
89
|
+
if ((0, import_common.removeGeneratedBlock)(legacyPath, JUNIE_BLOCK_ID)) {
|
|
90
|
+
console.log(` \u2713 Removed KiroGraph block from .junie/guidelines.md`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function printJunieNextSteps() {
|
|
94
|
+
console.log("\n Done! Restart Junie for the MCP server to load.");
|
|
95
|
+
console.log(" MCP is in .junie/mcp/mcp.json");
|
|
96
|
+
console.log(" KiroGraph guidelines are in .junie/AGENTS.md\n");
|
|
97
|
+
}
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
installJunieEarly,
|
|
101
|
+
installJunieLate,
|
|
102
|
+
printJunieNextSteps,
|
|
103
|
+
uninitJunie
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=junie.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 { CavemanMode } from '../caveman';\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} 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, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean): void {\n const opts = buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'junie.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\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(opts));\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;AAEtB,oBAUO;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,aAAmC,uBAAgC,cAA8B;AACrJ,QAAM,WAAO,oCAAqB,aAAa,uBAAuB,YAAY;AAElF,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,UAAU;AACxE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,4CAAuB,IAAI,CAAC;AAC/D,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,IAAI,CAAC;AAC7G,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
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var kilo_exports = {};
|
|
30
|
+
__export(kilo_exports, {
|
|
31
|
+
installKiloEarly: () => installKiloEarly,
|
|
32
|
+
installKiloLate: () => installKiloLate,
|
|
33
|
+
printKiloNextSteps: () => printKiloNextSteps,
|
|
34
|
+
uninitKilo: () => uninitKilo
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(kilo_exports);
|
|
37
|
+
var fs = __toESM(require("fs"));
|
|
38
|
+
var path = __toESM(require("path"));
|
|
39
|
+
var import_common = require("../common");
|
|
40
|
+
var import_instructions = require("../instructions");
|
|
41
|
+
const KILO_MCP_NAME = "kirograph";
|
|
42
|
+
const KILO_RULES_FILE = ".kilo/rules/kirograph.md";
|
|
43
|
+
function installKiloEarly(projectRoot) {
|
|
44
|
+
const configPath = path.join(projectRoot, "kilo.json");
|
|
45
|
+
const config = (0, import_common.readJson)(configPath);
|
|
46
|
+
config.mcp = config.mcp ?? {};
|
|
47
|
+
config.mcp[KILO_MCP_NAME] = {
|
|
48
|
+
type: "local",
|
|
49
|
+
command: [import_common.KIROGRAPH_COMMAND, ...import_common.KIROGRAPH_MCP_ARGS],
|
|
50
|
+
enabled: true
|
|
51
|
+
};
|
|
52
|
+
(0, import_common.writeJson)(configPath, config);
|
|
53
|
+
console.log(` \u2713 Kilo Code MCP server registered in ${configPath}`);
|
|
54
|
+
}
|
|
55
|
+
function installKiloLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
|
|
56
|
+
const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory);
|
|
57
|
+
const instructionsPath = path.join(projectRoot, ".kirograph", "kilo.md");
|
|
58
|
+
(0, import_common.ensureDir)(path.dirname(instructionsPath));
|
|
59
|
+
fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
|
|
60
|
+
console.log(` \u2713 Kilo Code instructions written to ${instructionsPath}`);
|
|
61
|
+
const rulesDir = path.join(projectRoot, ".kilo", "rules");
|
|
62
|
+
(0, import_common.ensureDir)(rulesDir);
|
|
63
|
+
const rulePath = path.join(rulesDir, "kirograph.md");
|
|
64
|
+
fs.writeFileSync(rulePath, (0, import_instructions.buildAgentInstructions)(opts));
|
|
65
|
+
console.log(` \u2713 Kilo Code rule written to ${rulePath}`);
|
|
66
|
+
const jsoncPath = path.join(projectRoot, "kilo.jsonc");
|
|
67
|
+
const jsonPath = path.join(projectRoot, "kilo.json");
|
|
68
|
+
const cfgPath = fs.existsSync(jsoncPath) ? jsoncPath : jsonPath;
|
|
69
|
+
const cfg = (0, import_common.readJson)(cfgPath);
|
|
70
|
+
const instructions = cfg.instructions ?? [];
|
|
71
|
+
if (!instructions.includes(KILO_RULES_FILE)) {
|
|
72
|
+
instructions.push(KILO_RULES_FILE);
|
|
73
|
+
}
|
|
74
|
+
cfg.instructions = instructions;
|
|
75
|
+
(0, import_common.writeJson)(cfgPath, cfg);
|
|
76
|
+
console.log(` \u2713 Kilo Code instructions referenced in ${cfgPath}`);
|
|
77
|
+
}
|
|
78
|
+
function uninitKilo(projectRoot) {
|
|
79
|
+
const configPath = path.join(projectRoot, "kilo.json");
|
|
80
|
+
if (fs.existsSync(configPath)) {
|
|
81
|
+
const config = (0, import_common.readJson)(configPath);
|
|
82
|
+
if (config.mcp?.[KILO_MCP_NAME]) {
|
|
83
|
+
delete config.mcp[KILO_MCP_NAME];
|
|
84
|
+
if (Object.keys(config.mcp).length === 0) delete config.mcp;
|
|
85
|
+
(0, import_common.writeJson)(configPath, config);
|
|
86
|
+
console.log(` \u2713 Removed kirograph from kilo.json mcp`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const jsoncPath = path.join(projectRoot, "kilo.jsonc");
|
|
90
|
+
const jsonPath = path.join(projectRoot, "kilo.json");
|
|
91
|
+
const cfgPath = fs.existsSync(jsoncPath) ? jsoncPath : jsonPath;
|
|
92
|
+
if (fs.existsSync(cfgPath)) {
|
|
93
|
+
const cfg = (0, import_common.readJson)(cfgPath);
|
|
94
|
+
if (Array.isArray(cfg.instructions)) {
|
|
95
|
+
const idx = cfg.instructions.indexOf(KILO_RULES_FILE);
|
|
96
|
+
if (idx !== -1) {
|
|
97
|
+
cfg.instructions.splice(idx, 1);
|
|
98
|
+
if (cfg.instructions.length === 0) delete cfg.instructions;
|
|
99
|
+
(0, import_common.writeJson)(cfgPath, cfg);
|
|
100
|
+
console.log(` \u2713 Removed kirograph instructions from ${cfgPath}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const rulePath = path.join(projectRoot, ".kilo", "rules", "kirograph.md");
|
|
105
|
+
if (fs.existsSync(rulePath)) {
|
|
106
|
+
fs.unlinkSync(rulePath);
|
|
107
|
+
console.log(` \u2713 Removed .kilo/rules/kirograph.md`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function printKiloNextSteps() {
|
|
111
|
+
console.log("\n Done! Restart Kilo Code for the MCP server to load.");
|
|
112
|
+
console.log(" MCP is in kilo.json");
|
|
113
|
+
console.log(" KiroGraph rule is in .kilo/rules/kirograph.md\n");
|
|
114
|
+
}
|
|
115
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
116
|
+
0 && (module.exports = {
|
|
117
|
+
installKiloEarly,
|
|
118
|
+
installKiloLate,
|
|
119
|
+
printKiloNextSteps,
|
|
120
|
+
uninitKilo
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=kilo.js.map
|