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.
Files changed (85) hide show
  1. package/README.md +128 -20
  2. package/dist/assets/logo.png +0 -0
  3. package/dist/bin/commands/help.js +3 -0
  4. package/dist/bin/commands/help.js.map +2 -2
  5. package/dist/bin/commands/uninit.js +10 -13
  6. package/dist/bin/commands/uninit.js.map +2 -2
  7. package/dist/bin/installer/config-prompt.js +37 -23
  8. package/dist/bin/installer/config-prompt.js.map +2 -2
  9. package/dist/bin/installer/hooks.js +20 -1
  10. package/dist/bin/installer/hooks.js.map +2 -2
  11. package/dist/bin/installer/index.js +9 -4
  12. package/dist/bin/installer/index.js.map +2 -2
  13. package/dist/bin/installer/prompts.js +37 -6
  14. package/dist/bin/installer/prompts.js.map +2 -2
  15. package/dist/bin/installer/steering.js +19 -0
  16. package/dist/bin/installer/steering.js.map +2 -2
  17. package/dist/bin/installer/targets/aider.js +72 -0
  18. package/dist/bin/installer/targets/aider.js.map +7 -0
  19. package/dist/bin/installer/targets/amp.js +91 -0
  20. package/dist/bin/installer/targets/amp.js.map +7 -0
  21. package/dist/bin/installer/targets/antigravity.js +109 -0
  22. package/dist/bin/installer/targets/antigravity.js.map +7 -0
  23. package/dist/bin/installer/targets/augment.js +81 -0
  24. package/dist/bin/installer/targets/augment.js.map +7 -0
  25. package/dist/bin/installer/targets/claude.js +1 -1
  26. package/dist/bin/installer/targets/claude.js.map +2 -2
  27. package/dist/bin/installer/targets/cline.js +91 -0
  28. package/dist/bin/installer/targets/cline.js.map +7 -0
  29. package/dist/bin/installer/targets/codex.js +1 -1
  30. package/dist/bin/installer/targets/codex.js.map +2 -2
  31. package/dist/bin/installer/targets/continue.js +107 -0
  32. package/dist/bin/installer/targets/continue.js.map +7 -0
  33. package/dist/bin/installer/targets/copilot.js +123 -0
  34. package/dist/bin/installer/targets/copilot.js.map +7 -0
  35. package/dist/bin/installer/targets/cursor.js +143 -0
  36. package/dist/bin/installer/targets/cursor.js.map +7 -0
  37. package/dist/bin/installer/targets/devin.js +148 -0
  38. package/dist/bin/installer/targets/devin.js.map +7 -0
  39. package/dist/bin/installer/targets/gemini-cli.js +126 -0
  40. package/dist/bin/installer/targets/gemini-cli.js.map +7 -0
  41. package/dist/bin/installer/targets/generic.js +120 -0
  42. package/dist/bin/installer/targets/generic.js.map +7 -0
  43. package/dist/bin/installer/targets/goose.js +72 -0
  44. package/dist/bin/installer/targets/goose.js.map +7 -0
  45. package/dist/bin/installer/targets/index.js.map +1 -1
  46. package/dist/bin/installer/targets/junie.js +105 -0
  47. package/dist/bin/installer/targets/junie.js.map +7 -0
  48. package/dist/bin/installer/targets/kilo.js +122 -0
  49. package/dist/bin/installer/targets/kilo.js.map +7 -0
  50. package/dist/bin/installer/targets/kiro.js +3 -3
  51. package/dist/bin/installer/targets/kiro.js.map +2 -2
  52. package/dist/bin/installer/targets/opencode.js +135 -0
  53. package/dist/bin/installer/targets/opencode.js.map +7 -0
  54. package/dist/bin/installer/targets/openhands.js +90 -0
  55. package/dist/bin/installer/targets/openhands.js.map +7 -0
  56. package/dist/bin/installer/targets/replit.js +72 -0
  57. package/dist/bin/installer/targets/replit.js.map +7 -0
  58. package/dist/bin/installer/targets/roo.js +96 -0
  59. package/dist/bin/installer/targets/roo.js.map +7 -0
  60. package/dist/bin/installer/targets/tabnine.js +82 -0
  61. package/dist/bin/installer/targets/tabnine.js.map +7 -0
  62. package/dist/bin/installer/targets/trae.js +84 -0
  63. package/dist/bin/installer/targets/trae.js.map +7 -0
  64. package/dist/bin/installer/targets/warp.js +97 -0
  65. package/dist/bin/installer/targets/warp.js.map +7 -0
  66. package/dist/bin/installer/targets/windsurf.js +141 -0
  67. package/dist/bin/installer/targets/windsurf.js.map +7 -0
  68. package/dist/bin/kirograph.js +3 -1
  69. package/dist/bin/kirograph.js.map +3 -3
  70. package/dist/compression/naive-cost.js +14 -0
  71. package/dist/compression/naive-cost.js.map +2 -2
  72. package/dist/compression/tracker.js +18 -4
  73. package/dist/compression/tracker.js.map +2 -2
  74. package/dist/compression/types.js.map +1 -1
  75. package/dist/config.js +33 -1
  76. package/dist/config.js.map +2 -2
  77. package/dist/db/database.js +17 -0
  78. package/dist/db/database.js.map +2 -2
  79. package/dist/index.js +3 -0
  80. package/dist/index.js.map +2 -2
  81. package/dist/mcp/tool-names.js +5 -1
  82. package/dist/mcp/tool-names.js.map +2 -2
  83. package/dist/mcp/tools.js +232 -3
  84. package/dist/mcp/tools.js.map +2 -2
  85. package/package.json +1 -1
@@ -0,0 +1,107 @@
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 continue_exports = {};
30
+ __export(continue_exports, {
31
+ installContinueEarly: () => installContinueEarly,
32
+ installContinueLate: () => installContinueLate,
33
+ printContinueNextSteps: () => printContinueNextSteps,
34
+ uninitContinue: () => uninitContinue
35
+ });
36
+ module.exports = __toCommonJS(continue_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 MCP_FILE = "kirograph.json";
42
+ const RULES_FILE = "kirograph.md";
43
+ function installContinueEarly(projectRoot) {
44
+ const mcpDir = path.join(projectRoot, ".continue", "mcpServers");
45
+ (0, import_common.ensureDir)(mcpDir);
46
+ const mcpPath = path.join(mcpDir, MCP_FILE);
47
+ const config = {
48
+ mcpServers: {
49
+ kirograph: {
50
+ command: import_common.KIROGRAPH_COMMAND,
51
+ args: import_common.KIROGRAPH_MCP_ARGS
52
+ }
53
+ }
54
+ };
55
+ (0, import_common.writeJson)(mcpPath, config);
56
+ console.log(` \u2713 Continue MCP server registered in ${mcpPath}`);
57
+ }
58
+ function installContinueLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
59
+ const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory);
60
+ const instructionsPath = path.join(projectRoot, ".kirograph", "continue.md");
61
+ (0, import_common.ensureDir)(path.dirname(instructionsPath));
62
+ fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
63
+ console.log(` \u2713 Continue instructions written to ${instructionsPath}`);
64
+ const rulesDir = path.join(projectRoot, ".continue", "rules");
65
+ (0, import_common.ensureDir)(rulesDir);
66
+ const rulePath = path.join(rulesDir, RULES_FILE);
67
+ fs.writeFileSync(rulePath, (0, import_instructions.buildAgentInstructions)(opts));
68
+ console.log(` \u2713 Continue rule written to ${rulePath}`);
69
+ }
70
+ function uninitContinue(projectRoot) {
71
+ const mcpPath = path.join(projectRoot, ".continue", "mcpServers", MCP_FILE);
72
+ if (fs.existsSync(mcpPath)) {
73
+ fs.unlinkSync(mcpPath);
74
+ console.log(` \u2713 Removed .continue/mcpServers/${MCP_FILE}`);
75
+ }
76
+ const rulePath = path.join(projectRoot, ".continue", "rules", RULES_FILE);
77
+ if (fs.existsSync(rulePath)) {
78
+ fs.unlinkSync(rulePath);
79
+ console.log(` \u2713 Removed .continue/rules/${RULES_FILE}`);
80
+ }
81
+ const legacyPath = path.join(projectRoot, ".continue", "config.json");
82
+ if (fs.existsSync(legacyPath)) {
83
+ try {
84
+ const config = JSON.parse(fs.readFileSync(legacyPath, "utf8"));
85
+ if (config.mcpServers?.kirograph) {
86
+ delete config.mcpServers.kirograph;
87
+ if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;
88
+ fs.writeFileSync(legacyPath, JSON.stringify(config, null, 2) + "\n");
89
+ console.log(` \u2713 Removed legacy kirograph from .continue/config.json`);
90
+ }
91
+ } catch {
92
+ }
93
+ }
94
+ }
95
+ function printContinueNextSteps() {
96
+ console.log("\n Done! Restart Continue for the MCP server to load.");
97
+ console.log(" MCP is in .continue/mcpServers/kirograph.json");
98
+ console.log(" KiroGraph rule is in .continue/rules/kirograph.md\n");
99
+ }
100
+ // Annotate the CommonJS export names for ESM import in node:
101
+ 0 && (module.exports = {
102
+ installContinueEarly,
103
+ installContinueLate,
104
+ printContinueNextSteps,
105
+ uninitContinue
106
+ });
107
+ //# sourceMappingURL=continue.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/bin/installer/targets/continue.ts"],
4
+ "sourcesContent": ["/**\n * Continue target.\n *\n * MCP: .continue/mcpServers/kirograph.json (project-level, JSON format)\n * Rules: .continue/rules/kirograph.md\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n buildInstructionOpts,\n writeJson,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst MCP_FILE = 'kirograph.json';\nconst RULES_FILE = 'kirograph.md';\n\nexport function installContinueEarly(projectRoot: string): void {\n // Write MCP config as a JSON file in .continue/mcpServers/\n const mcpDir = path.join(projectRoot, '.continue', 'mcpServers');\n ensureDir(mcpDir);\n const mcpPath = path.join(mcpDir, MCP_FILE);\n const config = {\n mcpServers: {\n kirograph: {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n },\n },\n };\n writeJson(mcpPath, config);\n console.log(` \u2713 Continue MCP server registered in ${mcpPath}`);\n}\n\nexport function installContinueLate(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', 'continue.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\n console.log(` \u2713 Continue instructions written to ${instructionsPath}`);\n\n // Write rules file in .continue/rules/\n const rulesDir = path.join(projectRoot, '.continue', 'rules');\n ensureDir(rulesDir);\n const rulePath = path.join(rulesDir, RULES_FILE);\n fs.writeFileSync(rulePath, buildAgentInstructions(opts));\n console.log(` \u2713 Continue rule written to ${rulePath}`);\n}\n\nexport function uninitContinue(projectRoot: string): void {\n // Remove MCP file\n const mcpPath = path.join(projectRoot, '.continue', 'mcpServers', MCP_FILE);\n if (fs.existsSync(mcpPath)) {\n fs.unlinkSync(mcpPath);\n console.log(` \u2713 Removed .continue/mcpServers/${MCP_FILE}`);\n }\n\n // Remove rule file\n const rulePath = path.join(projectRoot, '.continue', 'rules', RULES_FILE);\n if (fs.existsSync(rulePath)) {\n fs.unlinkSync(rulePath);\n console.log(` \u2713 Removed .continue/rules/${RULES_FILE}`);\n }\n\n // Remove legacy config.json entry if it exists\n const legacyPath = path.join(projectRoot, '.continue', 'config.json');\n if (fs.existsSync(legacyPath)) {\n try {\n const config = JSON.parse(fs.readFileSync(legacyPath, 'utf8'));\n if (config.mcpServers?.kirograph) {\n delete config.mcpServers.kirograph;\n if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;\n fs.writeFileSync(legacyPath, JSON.stringify(config, null, 2) + '\\n');\n console.log(` \u2713 Removed legacy kirograph from .continue/config.json`);\n }\n } catch {}\n }\n}\n\nexport function printContinueNextSteps(): void {\n console.log('\\n Done! Restart Continue for the MCP server to load.');\n console.log(' MCP is in .continue/mcpServers/kirograph.json');\n console.log(' KiroGraph rule is in .continue/rules/kirograph.md\\n');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAoB;AACpB,WAAsB;AAEtB,oBAMO;AACP,0BAAuC;AAEvC,MAAM,WAAW;AACjB,MAAM,aAAa;AAEZ,SAAS,qBAAqB,aAA2B;AAE9D,QAAM,SAAS,KAAK,KAAK,aAAa,aAAa,YAAY;AAC/D,+BAAU,MAAM;AAChB,QAAM,UAAU,KAAK,KAAK,QAAQ,QAAQ;AAC1C,QAAM,SAAS;AAAA,IACb,YAAY;AAAA,MACV,WAAW;AAAA,QACT,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,+BAAU,SAAS,MAAM;AACzB,UAAQ,IAAI,8CAAyC,OAAO,EAAE;AAChE;AAEO,SAAS,oBAAoB,aAAqB,aAAmC,uBAAgC,cAA8B;AACxJ,QAAM,WAAO,oCAAqB,aAAa,uBAAuB,YAAY;AAElF,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,aAAa;AAC3E,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,4CAAuB,IAAI,CAAC;AAC/D,UAAQ,IAAI,6CAAwC,gBAAgB,EAAE;AAGtE,QAAM,WAAW,KAAK,KAAK,aAAa,aAAa,OAAO;AAC5D,+BAAU,QAAQ;AAClB,QAAM,WAAW,KAAK,KAAK,UAAU,UAAU;AAC/C,KAAG,cAAc,cAAU,4CAAuB,IAAI,CAAC;AACvD,UAAQ,IAAI,qCAAgC,QAAQ,EAAE;AACxD;AAEO,SAAS,eAAe,aAA2B;AAExD,QAAM,UAAU,KAAK,KAAK,aAAa,aAAa,cAAc,QAAQ;AAC1E,MAAI,GAAG,WAAW,OAAO,GAAG;AAC1B,OAAG,WAAW,OAAO;AACrB,YAAQ,IAAI,yCAAoC,QAAQ,EAAE;AAAA,EAC5D;AAGA,QAAM,WAAW,KAAK,KAAK,aAAa,aAAa,SAAS,UAAU;AACxE,MAAI,GAAG,WAAW,QAAQ,GAAG;AAC3B,OAAG,WAAW,QAAQ;AACtB,YAAQ,IAAI,oCAA+B,UAAU,EAAE;AAAA,EACzD;AAGA,QAAM,aAAa,KAAK,KAAK,aAAa,aAAa,aAAa;AACpE,MAAI,GAAG,WAAW,UAAU,GAAG;AAC7B,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,GAAG,aAAa,YAAY,MAAM,CAAC;AAC7D,UAAI,OAAO,YAAY,WAAW;AAChC,eAAO,OAAO,WAAW;AACzB,YAAI,OAAO,KAAK,OAAO,UAAU,EAAE,WAAW,EAAG,QAAO,OAAO;AAC/D,WAAG,cAAc,YAAY,KAAK,UAAU,QAAQ,MAAM,CAAC,IAAI,IAAI;AACnE,gBAAQ,IAAI,8DAAyD;AAAA,MACvE;AAAA,IACF,QAAQ;AAAA,IAAC;AAAA,EACX;AACF;AAEO,SAAS,yBAA+B;AAC7C,UAAQ,IAAI,wDAAwD;AACpE,UAAQ,IAAI,iDAAiD;AAC7D,UAAQ,IAAI,uDAAuD;AACrE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,123 @@
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 copilot_exports = {};
30
+ __export(copilot_exports, {
31
+ installCopilotEarly: () => installCopilotEarly,
32
+ installCopilotLate: () => installCopilotLate,
33
+ printCopilotNextSteps: () => printCopilotNextSteps,
34
+ uninitCopilot: () => uninitCopilot
35
+ });
36
+ module.exports = __toCommonJS(copilot_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 COPILOT_BLOCK_ID = "copilot";
42
+ function buildCopilotHooks() {
43
+ return {
44
+ hooks: {
45
+ "session-end": [
46
+ { command: "kirograph sync --quiet 2>/dev/null || true" }
47
+ ]
48
+ }
49
+ };
50
+ }
51
+ function installCopilotEarly(projectRoot) {
52
+ const mcpPath = path.join(projectRoot, ".github", "copilot-mcp.json");
53
+ (0, import_common.writeMcpServersConfig)(mcpPath, {
54
+ command: import_common.KIROGRAPH_COMMAND,
55
+ args: import_common.KIROGRAPH_MCP_ARGS
56
+ });
57
+ console.log(` \u2713 GitHub Copilot MCP server registered in ${mcpPath}`);
58
+ }
59
+ function installCopilotLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
60
+ const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, true);
61
+ const instructionsPath = path.join(projectRoot, ".kirograph", "copilot.md");
62
+ (0, import_common.ensureDir)(path.dirname(instructionsPath));
63
+ fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
64
+ console.log(` \u2713 Copilot instructions written to ${instructionsPath}`);
65
+ const rulesPath = path.join(projectRoot, ".github", "copilot-instructions.md");
66
+ (0, import_common.ensureDir)(path.dirname(rulesPath));
67
+ const changed = (0, import_common.upsertGeneratedBlock)(rulesPath, COPILOT_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(opts));
68
+ console.log(changed ? ` \u2713 .github/copilot-instructions.md updated with KiroGraph instructions` : ` \u2713 .github/copilot-instructions.md already up to date`);
69
+ const hooksPath = path.join(projectRoot, ".github", "hooks.json");
70
+ const existing = (0, import_common.readJson)(hooksPath);
71
+ const kgHooks = buildCopilotHooks();
72
+ existing.hooks = existing.hooks ?? {};
73
+ for (const [event, commands] of Object.entries(kgHooks.hooks)) {
74
+ existing.hooks[event] = existing.hooks[event] ?? [];
75
+ for (const cmd of commands) {
76
+ if (!existing.hooks[event].some((h) => h.command === cmd.command)) {
77
+ existing.hooks[event].push(cmd);
78
+ }
79
+ }
80
+ }
81
+ (0, import_common.writeJson)(hooksPath, existing);
82
+ console.log(` \u2713 Copilot hooks written to ${hooksPath}`);
83
+ }
84
+ function uninitCopilot(projectRoot) {
85
+ const mcpPath = path.join(projectRoot, ".github", "copilot-mcp.json");
86
+ if ((0, import_common.removeMcpServersConfig)(mcpPath)) {
87
+ console.log(` \u2713 Removed kirograph from .github/copilot-mcp.json`);
88
+ }
89
+ const rulesPath = path.join(projectRoot, ".github", "copilot-instructions.md");
90
+ if ((0, import_common.removeGeneratedBlock)(rulesPath, COPILOT_BLOCK_ID)) {
91
+ console.log(` \u2713 Removed KiroGraph block from .github/copilot-instructions.md`);
92
+ }
93
+ const hooksPath = path.join(projectRoot, ".github", "hooks.json");
94
+ if (fs.existsSync(hooksPath)) {
95
+ const config = (0, import_common.readJson)(hooksPath);
96
+ if (config.hooks) {
97
+ let changed = false;
98
+ for (const event of Object.keys(config.hooks)) {
99
+ const before = config.hooks[event].length;
100
+ config.hooks[event] = config.hooks[event].filter((h) => !h.command?.includes("kirograph"));
101
+ if (config.hooks[event].length === 0) delete config.hooks[event];
102
+ if (config.hooks[event]?.length !== before) changed = true;
103
+ }
104
+ if (Object.keys(config.hooks).length === 0) delete config.hooks;
105
+ if (changed) {
106
+ (0, import_common.writeJson)(hooksPath, config);
107
+ console.log(` \u2713 Removed kirograph hooks from .github/hooks.json`);
108
+ }
109
+ }
110
+ }
111
+ }
112
+ function printCopilotNextSteps() {
113
+ console.log("\n Done! Restart your editor for the Copilot MCP server and hooks to load.");
114
+ console.log(" Auto-sync hook runs on session end.\n");
115
+ }
116
+ // Annotate the CommonJS export names for ESM import in node:
117
+ 0 && (module.exports = {
118
+ installCopilotEarly,
119
+ installCopilotLate,
120
+ printCopilotNextSteps,
121
+ uninitCopilot
122
+ });
123
+ //# sourceMappingURL=copilot.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/bin/installer/targets/copilot.ts"],
4
+ "sourcesContent": ["import * 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 removeMcpServersConfig,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n writeMcpServersConfig,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst COPILOT_BLOCK_ID = 'copilot';\n\nfunction buildCopilotHooks(): object {\n return {\n hooks: {\n 'session-end': [\n { command: 'kirograph sync --quiet 2>/dev/null || true' },\n ],\n },\n };\n}\n\nexport function installCopilotEarly(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.github', 'copilot-mcp.json');\n writeMcpServersConfig(mcpPath, {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n });\n console.log(` \u2713 GitHub Copilot MCP server registered in ${mcpPath}`);\n}\n\nexport function installCopilotLate(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', 'copilot.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\n console.log(` \u2713 Copilot instructions written to ${instructionsPath}`);\n\n const rulesPath = path.join(projectRoot, '.github', 'copilot-instructions.md');\n ensureDir(path.dirname(rulesPath));\n const changed = upsertGeneratedBlock(rulesPath, COPILOT_BLOCK_ID, '## KiroGraph', buildAgentInstructions(opts));\n console.log(changed\n ? ` \u2713 .github/copilot-instructions.md updated with KiroGraph instructions`\n : ` \u2713 .github/copilot-instructions.md already up to date`);\n\n // Write hooks\n const hooksPath = path.join(projectRoot, '.github', 'hooks.json');\n const existing = readJson(hooksPath);\n const kgHooks = buildCopilotHooks() as any;\n existing.hooks = existing.hooks ?? {};\n for (const [event, commands] of Object.entries(kgHooks.hooks)) {\n existing.hooks[event] = existing.hooks[event] ?? [];\n for (const cmd of commands as Array<{ command: string }>) {\n if (!existing.hooks[event].some((h: any) => h.command === cmd.command)) {\n existing.hooks[event].push(cmd);\n }\n }\n }\n writeJson(hooksPath, existing);\n console.log(` \u2713 Copilot hooks written to ${hooksPath}`);\n}\n\nexport function uninitCopilot(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.github', 'copilot-mcp.json');\n if (removeMcpServersConfig(mcpPath)) {\n console.log(` \u2713 Removed kirograph from .github/copilot-mcp.json`);\n }\n\n const rulesPath = path.join(projectRoot, '.github', 'copilot-instructions.md');\n if (removeGeneratedBlock(rulesPath, COPILOT_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from .github/copilot-instructions.md`);\n }\n\n const hooksPath = path.join(projectRoot, '.github', 'hooks.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((h: any) => !h.command?.includes('kirograph'));\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 .github/hooks.json`);\n }\n }\n }\n}\n\nexport function printCopilotNextSteps(): void {\n console.log('\\n Done! Restart your editor for the Copilot MCP server and hooks to load.');\n console.log(' Auto-sync hook runs on session end.\\n');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAWO;AACP,0BAAuC;AAEvC,MAAM,mBAAmB;AAEzB,SAAS,oBAA4B;AACnC,SAAO;AAAA,IACL,OAAO;AAAA,MACL,eAAe;AAAA,QACb,EAAE,SAAS,6CAA6C;AAAA,MAC1D;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,oBAAoB,aAA2B;AAC7D,QAAM,UAAU,KAAK,KAAK,aAAa,WAAW,kBAAkB;AACpE,2CAAsB,SAAS;AAAA,IAC7B,SAAS;AAAA,IACT,MAAM;AAAA,EACR,CAAC;AACD,UAAQ,IAAI,oDAA+C,OAAO,EAAE;AACtE;AAEO,SAAS,mBAAmB,aAAqB,aAAmC,uBAAgC,cAA8B;AACvJ,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AAkE;AAAA,EAChF;AAEA,QAAM,YAAY,KAAK,KAAK,aAAa,WAAW,YAAY;AAChE,MAAI,GAAG,WAAW,SAAS,GAAG;AAC5B,UAAM,aAAS,wBAAS,SAAS;AACjC,QAAI,OAAO,OAAO;AAChB,UAAI,UAAU;AACd,iBAAW,SAAS,OAAO,KAAK,OAAO,KAAK,GAAG;AAC7C,cAAM,SAAS,OAAO,MAAM,KAAK,EAAE;AACnC,eAAO,MAAM,KAAK,IAAI,OAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAW,CAAC,EAAE,SAAS,SAAS,WAAW,CAAC;AAC9F,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,0DAAqD;AAAA,MACnE;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,wBAA8B;AAC5C,UAAQ,IAAI,6EAA6E;AACzF,UAAQ,IAAI,yCAAyC;AACvD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,143 @@
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 cursor_exports = {};
30
+ __export(cursor_exports, {
31
+ installCursorEarly: () => installCursorEarly,
32
+ installCursorLate: () => installCursorLate,
33
+ printCursorNextSteps: () => printCursorNextSteps,
34
+ uninitCursor: () => uninitCursor
35
+ });
36
+ module.exports = __toCommonJS(cursor_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 CURSOR_RULES_FILE = "kirograph.mdc";
42
+ const CURSOR_HOOKS_FILE = "hooks.json";
43
+ function buildCursorHooks(enableCompression) {
44
+ const hooks = {
45
+ stop: [
46
+ { command: "kirograph sync --quiet 2>/dev/null || true" }
47
+ ]
48
+ };
49
+ if (enableCompression) {
50
+ hooks.beforeShellExecution = [
51
+ { command: "kirograph compress-hint 2>/dev/null || true" }
52
+ ];
53
+ }
54
+ return { version: 1, hooks };
55
+ }
56
+ function installCursorEarly(projectRoot) {
57
+ const mcpPath = path.join(projectRoot, ".cursor", "mcp.json");
58
+ (0, import_common.writeMcpServersConfig)(mcpPath, {
59
+ command: import_common.KIROGRAPH_COMMAND,
60
+ args: import_common.KIROGRAPH_MCP_ARGS
61
+ });
62
+ console.log(` \u2713 Cursor MCP server registered in ${mcpPath}`);
63
+ }
64
+ function installCursorLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
65
+ const enableCompression = shellCompressionLevel !== void 0 && shellCompressionLevel !== "off";
66
+ const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, true);
67
+ const instructionsPath = path.join(projectRoot, ".kirograph", "cursor.md");
68
+ (0, import_common.ensureDir)(path.dirname(instructionsPath));
69
+ fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
70
+ console.log(` \u2713 Cursor instructions written to ${instructionsPath}`);
71
+ const rulesDir = path.join(projectRoot, ".cursor", "rules");
72
+ (0, import_common.ensureDir)(rulesDir);
73
+ const rulePath = path.join(rulesDir, CURSOR_RULES_FILE);
74
+ const frontmatter = [
75
+ "---",
76
+ "description: KiroGraph semantic code knowledge graph \u2014 use graph tools instead of grep/glob",
77
+ "alwaysApply: true",
78
+ "---",
79
+ ""
80
+ ].join("\n");
81
+ fs.writeFileSync(rulePath, frontmatter + (0, import_instructions.buildAgentInstructions)(opts));
82
+ console.log(` \u2713 Cursor rule written to ${rulePath}`);
83
+ const hooksPath = path.join(projectRoot, ".cursor", CURSOR_HOOKS_FILE);
84
+ const existing = (0, import_common.readJson)(hooksPath);
85
+ const kirographHooks = buildCursorHooks(enableCompression);
86
+ const merged = { ...existing, ...kirographHooks };
87
+ if (existing.hooks) {
88
+ merged.hooks = { ...existing.hooks };
89
+ const kgHooks = kirographHooks.hooks;
90
+ for (const [event, commands] of Object.entries(kgHooks)) {
91
+ merged.hooks[event] = merged.hooks[event] ?? [];
92
+ for (const cmd of commands) {
93
+ if (!merged.hooks[event].some((h) => h.command === cmd.command)) {
94
+ merged.hooks[event].push(cmd);
95
+ }
96
+ }
97
+ }
98
+ }
99
+ (0, import_common.writeJson)(hooksPath, merged);
100
+ console.log(` \u2713 Cursor hooks written to ${hooksPath}`);
101
+ }
102
+ function uninitCursor(projectRoot) {
103
+ const mcpPath = path.join(projectRoot, ".cursor", "mcp.json");
104
+ if ((0, import_common.removeMcpServersConfig)(mcpPath)) {
105
+ console.log(` \u2713 Removed kirograph from .cursor/mcp.json`);
106
+ }
107
+ const rulePath = path.join(projectRoot, ".cursor", "rules", CURSOR_RULES_FILE);
108
+ if (fs.existsSync(rulePath)) {
109
+ fs.unlinkSync(rulePath);
110
+ console.log(` \u2713 Removed .cursor/rules/${CURSOR_RULES_FILE}`);
111
+ }
112
+ const hooksPath = path.join(projectRoot, ".cursor", CURSOR_HOOKS_FILE);
113
+ if (fs.existsSync(hooksPath)) {
114
+ const config = (0, import_common.readJson)(hooksPath);
115
+ if (config.hooks) {
116
+ let changed = false;
117
+ for (const event of Object.keys(config.hooks)) {
118
+ const before = config.hooks[event].length;
119
+ config.hooks[event] = config.hooks[event].filter((h) => !h.command?.includes("kirograph"));
120
+ if (config.hooks[event].length === 0) delete config.hooks[event];
121
+ if (config.hooks[event]?.length !== before) changed = true;
122
+ }
123
+ if (Object.keys(config.hooks).length === 0) delete config.hooks;
124
+ if (changed) {
125
+ (0, import_common.writeJson)(hooksPath, config);
126
+ console.log(` \u2713 Removed kirograph hooks from .cursor/hooks.json`);
127
+ }
128
+ }
129
+ }
130
+ }
131
+ function printCursorNextSteps() {
132
+ console.log("\n Done! Restart Cursor for the MCP server and hooks to load.");
133
+ console.log(" The kirograph rule is active in .cursor/rules/kirograph.mdc");
134
+ console.log(" Auto-sync hook runs on task completion.\n");
135
+ }
136
+ // Annotate the CommonJS export names for ESM import in node:
137
+ 0 && (module.exports = {
138
+ installCursorEarly,
139
+ installCursorLate,
140
+ printCursorNextSteps,
141
+ uninitCursor
142
+ });
143
+ //# sourceMappingURL=cursor.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/bin/installer/targets/cursor.ts"],
4
+ "sourcesContent": ["import * 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 removeMcpServersConfig,\n writeMcpServersConfig,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst CURSOR_RULES_FILE = 'kirograph.mdc';\nconst CURSOR_HOOKS_FILE = 'hooks.json';\n\nfunction buildCursorHooks(enableCompression?: boolean): object {\n const hooks: Record<string, Array<{ command: string }>> = {\n stop: [\n { command: 'kirograph sync --quiet 2>/dev/null || true' },\n ],\n };\n\n if (enableCompression) {\n hooks.beforeShellExecution = [\n { command: 'kirograph compress-hint 2>/dev/null || true' },\n ];\n }\n\n return { version: 1, hooks };\n}\n\nexport function installCursorEarly(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.cursor', 'mcp.json');\n writeMcpServersConfig(mcpPath, {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n });\n console.log(` \u2713 Cursor MCP server registered in ${mcpPath}`);\n}\n\nexport function installCursorLate(projectRoot: string, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean): void {\n const enableCompression = shellCompressionLevel !== undefined && shellCompressionLevel !== 'off';\n const opts = buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'cursor.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\n console.log(` \u2713 Cursor instructions written to ${instructionsPath}`);\n\n const rulesDir = path.join(projectRoot, '.cursor', 'rules');\n ensureDir(rulesDir);\n const rulePath = path.join(rulesDir, CURSOR_RULES_FILE);\n const frontmatter = [\n '---',\n 'description: KiroGraph semantic code knowledge graph \u2014 use graph tools instead of grep/glob',\n 'alwaysApply: true',\n '---',\n '',\n ].join('\\n');\n fs.writeFileSync(rulePath, frontmatter + buildAgentInstructions(opts));\n console.log(` \u2713 Cursor rule written to ${rulePath}`);\n\n // Write hooks\n const hooksPath = path.join(projectRoot, '.cursor', CURSOR_HOOKS_FILE);\n const existing = readJson(hooksPath);\n const kirographHooks = buildCursorHooks(enableCompression);\n // Merge: add kirograph hooks without overwriting user's existing hooks\n const merged = { ...existing, ...kirographHooks };\n if (existing.hooks) {\n merged.hooks = { ...existing.hooks };\n const kgHooks = (kirographHooks as any).hooks;\n for (const [event, commands] of Object.entries(kgHooks)) {\n merged.hooks[event] = merged.hooks[event] ?? [];\n // Avoid duplicates\n for (const cmd of commands as Array<{ command: string }>) {\n if (!merged.hooks[event].some((h: any) => h.command === cmd.command)) {\n merged.hooks[event].push(cmd);\n }\n }\n }\n }\n writeJson(hooksPath, merged);\n console.log(` \u2713 Cursor hooks written to ${hooksPath}`);\n}\n\nexport function uninitCursor(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.cursor', 'mcp.json');\n if (removeMcpServersConfig(mcpPath)) {\n console.log(` \u2713 Removed kirograph from .cursor/mcp.json`);\n }\n\n const rulePath = path.join(projectRoot, '.cursor', 'rules', CURSOR_RULES_FILE);\n if (fs.existsSync(rulePath)) {\n fs.unlinkSync(rulePath);\n console.log(` \u2713 Removed .cursor/rules/${CURSOR_RULES_FILE}`);\n }\n\n // Remove kirograph hooks from hooks.json\n const hooksPath = path.join(projectRoot, '.cursor', CURSOR_HOOKS_FILE);\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((h: any) => !h.command?.includes('kirograph'));\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 .cursor/hooks.json`);\n }\n }\n }\n}\n\nexport function printCursorNextSteps(): void {\n console.log('\\n Done! Restart Cursor for the MCP server and hooks to load.');\n console.log(' The kirograph rule is active in .cursor/rules/kirograph.mdc');\n console.log(' Auto-sync hook runs on task completion.\\n');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,SAAS,OAAO,KAAK,OAAO,KAAK,GAAG;AAC7C,cAAM,SAAS,OAAO,MAAM,KAAK,EAAE;AACnC,eAAO,MAAM,KAAK,IAAI,OAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAW,CAAC,EAAE,SAAS,SAAS,WAAW,CAAC;AAC9F,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,0DAAqD;AAAA,MACnE;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,uBAA6B;AAC3C,UAAQ,IAAI,gEAAgE;AAC5E,UAAQ,IAAI,+DAA+D;AAC3E,UAAQ,IAAI,6CAA6C;AAC3D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,148 @@
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 devin_exports = {};
30
+ __export(devin_exports, {
31
+ installDevinEarly: () => installDevinEarly,
32
+ installDevinLate: () => installDevinLate,
33
+ printDevinNextSteps: () => printDevinNextSteps,
34
+ uninitDevin: () => uninitDevin
35
+ });
36
+ module.exports = __toCommonJS(devin_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 DEVIN_BLOCK_ID = "devin";
42
+ function buildDevinHooks() {
43
+ return {
44
+ hooks: {
45
+ Stop: [
46
+ {
47
+ matcher: "",
48
+ hooks: [
49
+ {
50
+ type: "command",
51
+ command: "kirograph sync --quiet 2>/dev/null || true",
52
+ timeout: 30
53
+ }
54
+ ]
55
+ }
56
+ ]
57
+ }
58
+ };
59
+ }
60
+ function installDevinEarly(projectRoot) {
61
+ const configPath = path.join(projectRoot, ".devin", "config.json");
62
+ (0, import_common.ensureDir)(path.dirname(configPath));
63
+ const config = (0, import_common.readJson)(configPath);
64
+ config.mcpServers = config.mcpServers ?? {};
65
+ config.mcpServers[import_common.KIROGRAPH_SERVER_NAME] = {
66
+ command: import_common.KIROGRAPH_COMMAND,
67
+ args: import_common.KIROGRAPH_MCP_ARGS
68
+ };
69
+ (0, import_common.writeJson)(configPath, config);
70
+ console.log(` \u2713 Devin MCP server registered in ${configPath}`);
71
+ }
72
+ function installDevinLate(projectRoot, cavemanMode, shellCompressionLevel, enableMemory) {
73
+ const opts = (0, import_common.buildInstructionOpts)(cavemanMode, shellCompressionLevel, enableMemory, true);
74
+ const instructionsPath = path.join(projectRoot, ".kirograph", "devin.md");
75
+ (0, import_common.ensureDir)(path.dirname(instructionsPath));
76
+ fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(opts));
77
+ console.log(` \u2713 Devin instructions written to ${instructionsPath}`);
78
+ const agentsPath = path.join(projectRoot, "AGENTS.md");
79
+ const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, DEVIN_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(opts));
80
+ console.log(changed ? ` \u2713 AGENTS.md updated with KiroGraph instructions (Devin)` : ` \u2713 AGENTS.md already up to date`);
81
+ const hooksPath = path.join(projectRoot, ".devin", "hooks.v1.json");
82
+ const existing = (0, import_common.readJson)(hooksPath);
83
+ const kgHooks = buildDevinHooks();
84
+ existing.hooks = existing.hooks ?? {};
85
+ for (const [event, matchers] of Object.entries(kgHooks.hooks)) {
86
+ existing.hooks[event] = existing.hooks[event] ?? [];
87
+ const hasKirograph = existing.hooks[event].some(
88
+ (m) => m.hooks?.some((h) => h.command?.includes("kirograph"))
89
+ );
90
+ if (!hasKirograph) {
91
+ for (const matcher of matchers) {
92
+ existing.hooks[event].push(matcher);
93
+ }
94
+ }
95
+ }
96
+ (0, import_common.writeJson)(hooksPath, existing);
97
+ console.log(` \u2713 Devin hooks written to ${hooksPath}`);
98
+ }
99
+ function uninitDevin(projectRoot) {
100
+ const configPath = path.join(projectRoot, ".devin", "config.json");
101
+ if (fs.existsSync(configPath)) {
102
+ const config = (0, import_common.readJson)(configPath);
103
+ if (config.mcpServers?.[import_common.KIROGRAPH_SERVER_NAME]) {
104
+ delete config.mcpServers[import_common.KIROGRAPH_SERVER_NAME];
105
+ if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;
106
+ (0, import_common.writeJson)(configPath, config);
107
+ console.log(` \u2713 Removed kirograph from .devin/config.json`);
108
+ }
109
+ }
110
+ const agentsPath = path.join(projectRoot, "AGENTS.md");
111
+ if ((0, import_common.removeGeneratedBlock)(agentsPath, DEVIN_BLOCK_ID)) {
112
+ console.log(` \u2713 Removed KiroGraph block from AGENTS.md (Devin)`);
113
+ }
114
+ const hooksPath = path.join(projectRoot, ".devin", "hooks.v1.json");
115
+ if (fs.existsSync(hooksPath)) {
116
+ const config = (0, import_common.readJson)(hooksPath);
117
+ if (config.hooks) {
118
+ let changed = false;
119
+ for (const event of Object.keys(config.hooks)) {
120
+ const before = config.hooks[event].length;
121
+ config.hooks[event] = config.hooks[event].filter(
122
+ (m) => !m.hooks?.some((h) => h.command?.includes("kirograph"))
123
+ );
124
+ if (config.hooks[event].length === 0) delete config.hooks[event];
125
+ if (config.hooks[event]?.length !== before) changed = true;
126
+ }
127
+ if (Object.keys(config.hooks).length === 0) delete config.hooks;
128
+ if (changed) {
129
+ (0, import_common.writeJson)(hooksPath, config);
130
+ console.log(` \u2713 Removed kirograph hooks from .devin/hooks.v1.json`);
131
+ }
132
+ }
133
+ }
134
+ }
135
+ function printDevinNextSteps() {
136
+ console.log("\n Done! Restart Devin for Terminal for the MCP server and hooks to load.");
137
+ console.log(" MCP is in .devin/config.json");
138
+ console.log(" Auto-sync hook is in .devin/hooks.v1.json");
139
+ console.log(" KiroGraph instructions are in AGENTS.md\n");
140
+ }
141
+ // Annotate the CommonJS export names for ESM import in node:
142
+ 0 && (module.exports = {
143
+ installDevinEarly,
144
+ installDevinLate,
145
+ printDevinNextSteps,
146
+ uninitDevin
147
+ });
148
+ //# sourceMappingURL=devin.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 { 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 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, cavemanMode?: CavemanMode | 'off', shellCompressionLevel?: string, enableMemory?: boolean): void {\n const opts = buildInstructionOpts(cavemanMode, shellCompressionLevel, enableMemory, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'devin.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(opts));\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(opts));\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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