kirograph 0.14.1 → 0.16.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 (125) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +239 -20
  3. package/dist/assets/logo.png +0 -0
  4. package/dist/bin/commands/docs.js +357 -0
  5. package/dist/bin/commands/docs.js.map +7 -0
  6. package/dist/bin/commands/help.js +3 -0
  7. package/dist/bin/commands/help.js.map +2 -2
  8. package/dist/bin/commands/uninit.js +10 -13
  9. package/dist/bin/commands/uninit.js.map +2 -2
  10. package/dist/bin/installer/config-prompt.js +53 -23
  11. package/dist/bin/installer/config-prompt.js.map +2 -2
  12. package/dist/bin/installer/hooks.js +20 -1
  13. package/dist/bin/installer/hooks.js.map +2 -2
  14. package/dist/bin/installer/index.js +14 -4
  15. package/dist/bin/installer/index.js.map +2 -2
  16. package/dist/bin/installer/prompts.js +37 -6
  17. package/dist/bin/installer/prompts.js.map +2 -2
  18. package/dist/bin/installer/steering.js +40 -0
  19. package/dist/bin/installer/steering.js.map +2 -2
  20. package/dist/bin/installer/targets/aider.js +72 -0
  21. package/dist/bin/installer/targets/aider.js.map +7 -0
  22. package/dist/bin/installer/targets/amp.js +91 -0
  23. package/dist/bin/installer/targets/amp.js.map +7 -0
  24. package/dist/bin/installer/targets/antigravity.js +109 -0
  25. package/dist/bin/installer/targets/antigravity.js.map +7 -0
  26. package/dist/bin/installer/targets/augment.js +81 -0
  27. package/dist/bin/installer/targets/augment.js.map +7 -0
  28. package/dist/bin/installer/targets/claude.js +1 -1
  29. package/dist/bin/installer/targets/claude.js.map +2 -2
  30. package/dist/bin/installer/targets/cline.js +91 -0
  31. package/dist/bin/installer/targets/cline.js.map +7 -0
  32. package/dist/bin/installer/targets/codex.js +1 -1
  33. package/dist/bin/installer/targets/codex.js.map +2 -2
  34. package/dist/bin/installer/targets/continue.js +107 -0
  35. package/dist/bin/installer/targets/continue.js.map +7 -0
  36. package/dist/bin/installer/targets/copilot.js +123 -0
  37. package/dist/bin/installer/targets/copilot.js.map +7 -0
  38. package/dist/bin/installer/targets/cursor.js +143 -0
  39. package/dist/bin/installer/targets/cursor.js.map +7 -0
  40. package/dist/bin/installer/targets/devin.js +148 -0
  41. package/dist/bin/installer/targets/devin.js.map +7 -0
  42. package/dist/bin/installer/targets/gemini-cli.js +126 -0
  43. package/dist/bin/installer/targets/gemini-cli.js.map +7 -0
  44. package/dist/bin/installer/targets/generic.js +120 -0
  45. package/dist/bin/installer/targets/generic.js.map +7 -0
  46. package/dist/bin/installer/targets/goose.js +72 -0
  47. package/dist/bin/installer/targets/goose.js.map +7 -0
  48. package/dist/bin/installer/targets/index.js.map +1 -1
  49. package/dist/bin/installer/targets/junie.js +105 -0
  50. package/dist/bin/installer/targets/junie.js.map +7 -0
  51. package/dist/bin/installer/targets/kilo.js +122 -0
  52. package/dist/bin/installer/targets/kilo.js.map +7 -0
  53. package/dist/bin/installer/targets/kiro.js +3 -3
  54. package/dist/bin/installer/targets/kiro.js.map +2 -2
  55. package/dist/bin/installer/targets/opencode.js +135 -0
  56. package/dist/bin/installer/targets/opencode.js.map +7 -0
  57. package/dist/bin/installer/targets/openhands.js +90 -0
  58. package/dist/bin/installer/targets/openhands.js.map +7 -0
  59. package/dist/bin/installer/targets/replit.js +72 -0
  60. package/dist/bin/installer/targets/replit.js.map +7 -0
  61. package/dist/bin/installer/targets/roo.js +96 -0
  62. package/dist/bin/installer/targets/roo.js.map +7 -0
  63. package/dist/bin/installer/targets/tabnine.js +82 -0
  64. package/dist/bin/installer/targets/tabnine.js.map +7 -0
  65. package/dist/bin/installer/targets/trae.js +84 -0
  66. package/dist/bin/installer/targets/trae.js.map +7 -0
  67. package/dist/bin/installer/targets/warp.js +97 -0
  68. package/dist/bin/installer/targets/warp.js.map +7 -0
  69. package/dist/bin/installer/targets/windsurf.js +141 -0
  70. package/dist/bin/installer/targets/windsurf.js.map +7 -0
  71. package/dist/bin/kirograph.js +5 -1
  72. package/dist/bin/kirograph.js.map +3 -3
  73. package/dist/compression/naive-cost.js +33 -0
  74. package/dist/compression/naive-cost.js.map +2 -2
  75. package/dist/compression/tracker.js +27 -4
  76. package/dist/compression/tracker.js.map +2 -2
  77. package/dist/compression/types.js.map +1 -1
  78. package/dist/config.js +66 -1
  79. package/dist/config.js.map +2 -2
  80. package/dist/core/pipeline.js +23 -0
  81. package/dist/core/pipeline.js.map +2 -2
  82. package/dist/db/database.js +28 -0
  83. package/dist/db/database.js.map +2 -2
  84. package/dist/db/docs-schema.sql +50 -0
  85. package/dist/docs/formats/asciidoc.js +108 -0
  86. package/dist/docs/formats/asciidoc.js.map +7 -0
  87. package/dist/docs/formats/html.js +100 -0
  88. package/dist/docs/formats/html.js.map +7 -0
  89. package/dist/docs/formats/index.js +81 -0
  90. package/dist/docs/formats/index.js.map +7 -0
  91. package/dist/docs/formats/markdown.js +146 -0
  92. package/dist/docs/formats/markdown.js.map +7 -0
  93. package/dist/docs/formats/openapi.js +228 -0
  94. package/dist/docs/formats/openapi.js.map +7 -0
  95. package/dist/docs/formats/org.js +117 -0
  96. package/dist/docs/formats/org.js.map +7 -0
  97. package/dist/docs/formats/plaintext.js +119 -0
  98. package/dist/docs/formats/plaintext.js.map +7 -0
  99. package/dist/docs/formats/rdoc.js +105 -0
  100. package/dist/docs/formats/rdoc.js.map +7 -0
  101. package/dist/docs/formats/rst.js +121 -0
  102. package/dist/docs/formats/rst.js.map +7 -0
  103. package/dist/docs/indexer.js +340 -0
  104. package/dist/docs/indexer.js.map +7 -0
  105. package/dist/docs/linker.js +151 -0
  106. package/dist/docs/linker.js.map +7 -0
  107. package/dist/docs/lint.js +92 -0
  108. package/dist/docs/lint.js.map +7 -0
  109. package/dist/docs/queries.js +295 -0
  110. package/dist/docs/queries.js.map +7 -0
  111. package/dist/docs/section-id.js +57 -0
  112. package/dist/docs/section-id.js.map +7 -0
  113. package/dist/docs/summarizer.js +55 -0
  114. package/dist/docs/summarizer.js.map +7 -0
  115. package/dist/docs/types.js +17 -0
  116. package/dist/docs/types.js.map +7 -0
  117. package/dist/docs/vectors.js +217 -0
  118. package/dist/docs/vectors.js.map +7 -0
  119. package/dist/index.js +3 -0
  120. package/dist/index.js.map +2 -2
  121. package/dist/mcp/tool-names.js +10 -1
  122. package/dist/mcp/tool-names.js.map +2 -2
  123. package/dist/mcp/tools.js +476 -3
  124. package/dist/mcp/tools.js.map +2 -2
  125. package/package.json +1 -1
@@ -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 in .devin/hooks.v1.json');\n console.log(' KiroGraph instructions are in AGENTS.md\\n');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AAEtB,oBAUO;AACP,0BAAuC;AAEvC,MAAM,iBAAiB;AAEvB,SAAS,kBAA0B;AACjC,SAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,QACJ;AAAA,UACE,SAAS;AAAA,UACT,OAAO;AAAA,YACL;AAAA,cACE,MAAM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,OAAO,MAAM,KAAK,GAAG,WAAW,OAAQ,WAAU;AAAA,MACxD;AACA,UAAI,OAAO,KAAK,OAAO,KAAK,EAAE,WAAW,EAAG,QAAO,OAAO;AAC1D,UAAI,SAAS;AACX,qCAAU,WAAW,MAAM;AAC3B,gBAAQ,IAAI,4DAAuD;AAAA,MACrE;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,sBAA4B;AAC1C,UAAQ,IAAI,4EAA4E;AACxF,UAAQ,IAAI,gCAAgC;AAC5C,UAAQ,IAAI,6CAA6C;AACzD,UAAQ,IAAI,6CAA6C;AAC3D;",
6
+ "names": []
7
+ }
@@ -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,U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G;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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ict";
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, enableDocs?: 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
  }