kirograph 0.12.2 → 0.13.1

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 (92) hide show
  1. package/README.md +197 -87
  2. package/dist/architecture/layers/index.js +9 -1
  3. package/dist/architecture/layers/index.js.map +2 -2
  4. package/dist/architecture/layers/ocaml.js +105 -0
  5. package/dist/architecture/layers/ocaml.js.map +7 -0
  6. package/dist/architecture/layers/scala.js +120 -0
  7. package/dist/architecture/layers/scala.js.map +7 -0
  8. package/dist/architecture/layers/solidity.js +105 -0
  9. package/dist/architecture/layers/solidity.js.map +7 -0
  10. package/dist/architecture/layers/vue.js +111 -0
  11. package/dist/architecture/layers/vue.js.map +7 -0
  12. package/dist/architecture/manifest/elm.js +91 -0
  13. package/dist/architecture/manifest/elm.js.map +7 -0
  14. package/dist/architecture/manifest/index.js +13 -2
  15. package/dist/architecture/manifest/index.js.map +2 -2
  16. package/dist/architecture/manifest/ocaml.js +166 -0
  17. package/dist/architecture/manifest/ocaml.js.map +7 -0
  18. package/dist/architecture/manifest/scala.js +117 -0
  19. package/dist/architecture/manifest/scala.js.map +7 -0
  20. package/dist/bin/commands/caveman.js +12 -0
  21. package/dist/bin/commands/caveman.js.map +2 -2
  22. package/dist/bin/commands/help.js +6 -4
  23. package/dist/bin/commands/help.js.map +2 -2
  24. package/dist/bin/commands/install.js +8 -2
  25. package/dist/bin/commands/install.js.map +2 -2
  26. package/dist/bin/commands/serve.js +2 -2
  27. package/dist/bin/commands/serve.js.map +2 -2
  28. package/dist/bin/commands/uninit.js +65 -41
  29. package/dist/bin/commands/uninit.js.map +2 -2
  30. package/dist/bin/installer/cli-agent.js +5 -25
  31. package/dist/bin/installer/cli-agent.js.map +2 -2
  32. package/dist/bin/installer/common.js +154 -0
  33. package/dist/bin/installer/common.js.map +7 -0
  34. package/dist/bin/installer/hooks.js +21 -1
  35. package/dist/bin/installer/hooks.js.map +2 -2
  36. package/dist/bin/installer/index.js +99 -86
  37. package/dist/bin/installer/index.js.map +2 -2
  38. package/dist/bin/installer/instructions.js +60 -0
  39. package/dist/bin/installer/instructions.js.map +7 -0
  40. package/dist/bin/installer/mcp.js +6 -36
  41. package/dist/bin/installer/mcp.js.map +2 -2
  42. package/dist/bin/installer/targets/claude.js +79 -0
  43. package/dist/bin/installer/targets/claude.js.map +7 -0
  44. package/dist/bin/installer/targets/codex.js +77 -0
  45. package/dist/bin/installer/targets/codex.js.map +7 -0
  46. package/dist/bin/installer/targets/index.js +57 -0
  47. package/dist/bin/installer/targets/index.js.map +7 -0
  48. package/dist/bin/installer/targets/kiro.js +61 -0
  49. package/dist/bin/installer/targets/kiro.js.map +7 -0
  50. package/dist/bin/kirograph.js +1 -1
  51. package/dist/extraction/extractor.js +65 -2
  52. package/dist/extraction/extractor.js.map +2 -2
  53. package/dist/extraction/grammars.js +22 -0
  54. package/dist/extraction/grammars.js.map +2 -2
  55. package/dist/extraction/languages.js +39 -1
  56. package/dist/extraction/languages.js.map +2 -2
  57. package/dist/extraction/wasm/tree-sitter-hcl.wasm +0 -0
  58. package/dist/extraction/wasm/tree-sitter-scss.wasm +0 -0
  59. package/dist/frameworks/amplify.js +175 -0
  60. package/dist/frameworks/amplify.js.map +7 -0
  61. package/dist/frameworks/angular.js +132 -0
  62. package/dist/frameworks/angular.js.map +7 -0
  63. package/dist/frameworks/ansible.js +151 -0
  64. package/dist/frameworks/ansible.js.map +7 -0
  65. package/dist/frameworks/cloudformation.js +148 -0
  66. package/dist/frameworks/cloudformation.js.map +7 -0
  67. package/dist/frameworks/docker.js +149 -0
  68. package/dist/frameworks/docker.js.map +7 -0
  69. package/dist/frameworks/iac.js +401 -0
  70. package/dist/frameworks/iac.js.map +7 -0
  71. package/dist/frameworks/index.js +81 -3
  72. package/dist/frameworks/index.js.map +3 -3
  73. package/dist/frameworks/kubernetes.js +176 -0
  74. package/dist/frameworks/kubernetes.js.map +7 -0
  75. package/dist/frameworks/pulumi.js +93 -0
  76. package/dist/frameworks/pulumi.js.map +7 -0
  77. package/dist/frameworks/scala.js +124 -0
  78. package/dist/frameworks/scala.js.map +7 -0
  79. package/dist/frameworks/solidity.js +93 -0
  80. package/dist/frameworks/solidity.js.map +7 -0
  81. package/dist/frameworks/terraform.js +278 -0
  82. package/dist/frameworks/terraform.js.map +7 -0
  83. package/dist/frameworks/vue.js +163 -0
  84. package/dist/frameworks/vue.js.map +7 -0
  85. package/dist/graph/queries.js +1 -1
  86. package/dist/graph/queries.js.map +1 -1
  87. package/dist/mcp/tool-names.js +48 -0
  88. package/dist/mcp/tool-names.js.map +7 -0
  89. package/dist/mcp/tools.js +3 -0
  90. package/dist/mcp/tools.js.map +2 -2
  91. package/dist/types.js.map +2 -2
  92. package/package.json +2 -2
@@ -0,0 +1,79 @@
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 claude_exports = {};
30
+ __export(claude_exports, {
31
+ installClaudeEarly: () => installClaudeEarly,
32
+ installClaudeLate: () => installClaudeLate,
33
+ printClaudeNextSteps: () => printClaudeNextSteps,
34
+ uninitClaude: () => uninitClaude
35
+ });
36
+ module.exports = __toCommonJS(claude_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 CLAUDE_IMPORT = "@.kirograph/claude.md";
42
+ function installClaudeEarly(projectRoot) {
43
+ const mcpPath = path.join(projectRoot, ".mcp.json");
44
+ (0, import_common.writeMcpServersConfig)(mcpPath, {
45
+ command: import_common.KIROGRAPH_COMMAND,
46
+ args: import_common.KIROGRAPH_MCP_ARGS
47
+ });
48
+ console.log(` \u2713 Claude MCP server registered in ${mcpPath}`);
49
+ }
50
+ function installClaudeLate(projectRoot, cavemanMode) {
51
+ const instructionsPath = path.join(projectRoot, ".kirograph", "claude.md");
52
+ (0, import_common.ensureDir)(path.dirname(instructionsPath));
53
+ fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(cavemanMode));
54
+ console.log(` \u2713 Claude instructions written to ${instructionsPath}`);
55
+ const memoryPath = path.join(projectRoot, "CLAUDE.md");
56
+ const changed = (0, import_common.appendImportLine)(memoryPath, CLAUDE_IMPORT, "## KiroGraph");
57
+ console.log(changed ? ` \u2713 Claude project memory updated in ${memoryPath}` : ` \u2713 Claude project memory already imports ${CLAUDE_IMPORT}`);
58
+ }
59
+ function uninitClaude(projectRoot) {
60
+ const mcpPath = path.join(projectRoot, ".mcp.json");
61
+ if ((0, import_common.removeMcpServersConfig)(mcpPath)) {
62
+ console.log(` \u2713 Removed kirograph from .mcp.json`);
63
+ }
64
+ const memoryPath = path.join(projectRoot, "CLAUDE.md");
65
+ if ((0, import_common.removeImportLine)(memoryPath, CLAUDE_IMPORT)) {
66
+ console.log(` \u2713 Removed KiroGraph import from CLAUDE.md`);
67
+ }
68
+ }
69
+ function printClaudeNextSteps() {
70
+ console.log("\n Done! Restart Claude Code for the MCP server and project memory to load.\n");
71
+ }
72
+ // Annotate the CommonJS export names for ESM import in node:
73
+ 0 && (module.exports = {
74
+ installClaudeEarly,
75
+ installClaudeLate,
76
+ printClaudeNextSteps,
77
+ uninitClaude
78
+ });
79
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/bin/installer/targets/claude.ts"],
4
+ "sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n appendImportLine,\n ensureDir,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n removeMcpServersConfig,\n removeImportLine,\n writeMcpServersConfig,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst CLAUDE_IMPORT = '@.kirograph/claude.md';\n\nexport function installClaudeEarly(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.mcp.json');\n writeMcpServersConfig(mcpPath, {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n });\n console.log(` \u2713 Claude MCP server registered in ${mcpPath}`);\n}\n\nexport function installClaudeLate(projectRoot: string, cavemanMode?: CavemanMode | 'off'): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'claude.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(cavemanMode));\n console.log(` \u2713 Claude instructions written to ${instructionsPath}`);\n\n const memoryPath = path.join(projectRoot, 'CLAUDE.md');\n const changed = appendImportLine(memoryPath, CLAUDE_IMPORT, '## KiroGraph');\n console.log(changed\n ? ` \u2713 Claude project memory updated in ${memoryPath}`\n : ` \u2713 Claude project memory already imports ${CLAUDE_IMPORT}`);\n}\n\nexport function uninitClaude(projectRoot: string): void {\n const mcpPath = path.join(projectRoot, '.mcp.json');\n if (removeMcpServersConfig(mcpPath)) {\n console.log(` \u2713 Removed kirograph from .mcp.json`);\n }\n\n const memoryPath = path.join(projectRoot, 'CLAUDE.md');\n if (removeImportLine(memoryPath, CLAUDE_IMPORT)) {\n console.log(` \u2713 Removed KiroGraph import from CLAUDE.md`);\n }\n}\n\nexport function printClaudeNextSteps(): void {\n console.log('\\n Done! Restart Claude Code for the MCP server and project memory to load.\\n');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAQO;AACP,0BAAuC;AAEvC,MAAM,gBAAgB;AAEf,SAAS,mBAAmB,aAA2B;AAC5D,QAAM,UAAU,KAAK,KAAK,aAAa,WAAW;AAClD,2CAAsB,SAAS;AAAA,IAC7B,SAAS;AAAA,IACT,MAAM;AAAA,EACR,CAAC;AACD,UAAQ,IAAI,4CAAuC,OAAO,EAAE;AAC9D;AAEO,SAAS,kBAAkB,aAAqB,aAAyC;AAC9F,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,WAAW;AACzE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,4CAAuB,WAAW,CAAC;AACtE,UAAQ,IAAI,2CAAsC,gBAAgB,EAAE;AAEpE,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,QAAM,cAAU,gCAAiB,YAAY,eAAe,cAAc;AAC1E,UAAQ,IAAI,UACR,6CAAwC,UAAU,KAClD,kDAA6C,aAAa,EAAE;AAClE;AAEO,SAAS,aAAa,aAA2B;AACtD,QAAM,UAAU,KAAK,KAAK,aAAa,WAAW;AAClD,UAAI,sCAAuB,OAAO,GAAG;AACnC,YAAQ,IAAI,2CAAsC;AAAA,EACpD;AAEA,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,UAAI,gCAAiB,YAAY,aAAa,GAAG;AAC/C,YAAQ,IAAI,kDAA6C;AAAA,EAC3D;AACF;AAEO,SAAS,uBAA6B;AAC3C,UAAQ,IAAI,gFAAgF;AAC9F;",
6
+ "names": []
7
+ }
@@ -0,0 +1,77 @@
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 codex_exports = {};
30
+ __export(codex_exports, {
31
+ installCodexEarly: () => installCodexEarly,
32
+ installCodexLate: () => installCodexLate,
33
+ printCodexNextSteps: () => printCodexNextSteps,
34
+ uninitCodex: () => uninitCodex
35
+ });
36
+ module.exports = __toCommonJS(codex_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 CODEX_BLOCK_ID = "codex";
42
+ function installCodexEarly(_projectRoot) {
43
+ }
44
+ function installCodexLate(projectRoot, cavemanMode) {
45
+ const instructionsPath = path.join(projectRoot, ".kirograph", "codex.md");
46
+ (0, import_common.ensureDir)(path.dirname(instructionsPath));
47
+ fs.writeFileSync(instructionsPath, (0, import_instructions.buildAgentInstructions)(cavemanMode));
48
+ console.log(` \u2713 Codex instructions written to ${instructionsPath}`);
49
+ const agentsPath = path.join(projectRoot, "AGENTS.md");
50
+ const changed = (0, import_common.upsertGeneratedBlock)(agentsPath, CODEX_BLOCK_ID, "## KiroGraph", (0, import_instructions.buildAgentInstructions)(cavemanMode));
51
+ console.log(changed ? ` \u2713 Codex project instructions updated in ${agentsPath}` : ` \u2713 Codex project instructions already up to date`);
52
+ }
53
+ function uninitCodex(projectRoot) {
54
+ const agentsPath = path.join(projectRoot, "AGENTS.md");
55
+ if ((0, import_common.removeGeneratedBlock)(agentsPath, CODEX_BLOCK_ID)) {
56
+ console.log(` \u2713 Removed KiroGraph block from AGENTS.md`);
57
+ }
58
+ }
59
+ function printCodexNextSteps(projectRoot) {
60
+ const escapedPath = projectRoot.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
61
+ console.log("\n Done! Codex project instructions are installed.");
62
+ console.log(" Add the MCP server to Codex with:");
63
+ console.log(` codex mcp add kirograph -- kirograph serve --mcp --path "${escapedPath}"`);
64
+ console.log("\n Or add this to ~/.codex/config.toml:");
65
+ console.log(" [mcp_servers.kirograph]");
66
+ console.log(' command = "kirograph"');
67
+ console.log(` args = ["serve", "--mcp", "--path", "${escapedPath}"]
68
+ `);
69
+ }
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ installCodexEarly,
73
+ installCodexLate,
74
+ printCodexNextSteps,
75
+ uninitCodex
76
+ });
77
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/bin/installer/targets/codex.ts"],
4
+ "sourcesContent": ["import * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport { ensureDir, removeGeneratedBlock, upsertGeneratedBlock } from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst CODEX_BLOCK_ID = 'codex';\n\nexport function installCodexEarly(_projectRoot: string): void {\n // Codex MCP config is user-scoped. We print the exact config in next steps\n // instead of writing outside the project from an installer command.\n}\n\nexport function installCodexLate(projectRoot: string, cavemanMode?: CavemanMode | 'off'): void {\n const instructionsPath = path.join(projectRoot, '.kirograph', 'codex.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(cavemanMode));\n console.log(` \u2713 Codex instructions written to ${instructionsPath}`);\n\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n const changed = upsertGeneratedBlock(agentsPath, CODEX_BLOCK_ID, '## KiroGraph', buildAgentInstructions(cavemanMode));\n console.log(changed\n ? ` \u2713 Codex project instructions updated in ${agentsPath}`\n : ` \u2713 Codex project instructions already up to date`);\n}\n\nexport function uninitCodex(projectRoot: string): void {\n const agentsPath = path.join(projectRoot, 'AGENTS.md');\n if (removeGeneratedBlock(agentsPath, CODEX_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from AGENTS.md`);\n }\n}\n\nexport function printCodexNextSteps(projectRoot: string): void {\n const escapedPath = projectRoot.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n console.log('\\n Done! Codex project instructions are installed.');\n console.log(' Add the MCP server to Codex with:');\n console.log(` codex mcp add kirograph -- kirograph serve --mcp --path \"${escapedPath}\"`);\n console.log('\\n Or add this to ~/.codex/config.toml:');\n console.log(' [mcp_servers.kirograph]');\n console.log(' command = \"kirograph\"');\n console.log(` args = [\"serve\", \"--mcp\", \"--path\", \"${escapedPath}\"]\\n`);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,WAAsB;AAEtB,oBAAsE;AACtE,0BAAuC;AAEvC,MAAM,iBAAiB;AAEhB,SAAS,kBAAkB,cAA4B;AAG9D;AAEO,SAAS,iBAAiB,aAAqB,aAAyC;AAC7F,QAAM,mBAAmB,KAAK,KAAK,aAAa,cAAc,UAAU;AACxE,+BAAU,KAAK,QAAQ,gBAAgB,CAAC;AACxC,KAAG,cAAc,sBAAkB,4CAAuB,WAAW,CAAC;AACtE,UAAQ,IAAI,0CAAqC,gBAAgB,EAAE;AAEnE,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,QAAM,cAAU,oCAAqB,YAAY,gBAAgB,oBAAgB,4CAAuB,WAAW,CAAC;AACpH,UAAQ,IAAI,UACR,kDAA6C,UAAU,KACvD,wDAAmD;AACzD;AAEO,SAAS,YAAY,aAA2B;AACrD,QAAM,aAAa,KAAK,KAAK,aAAa,WAAW;AACrD,UAAI,oCAAqB,YAAY,cAAc,GAAG;AACpD,YAAQ,IAAI,iDAA4C;AAAA,EAC1D;AACF;AAEO,SAAS,oBAAoB,aAA2B;AAC7D,QAAM,cAAc,YAAY,QAAQ,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAK;AAC1E,UAAQ,IAAI,qDAAqD;AACjE,UAAQ,IAAI,qCAAqC;AACjD,UAAQ,IAAI,gEAAgE,WAAW,GAAG;AAC1F,UAAQ,IAAI,0CAA0C;AACtD,UAAQ,IAAI,6BAA6B;AACzC,UAAQ,IAAI,2BAA2B;AACvC,UAAQ,IAAI,4CAA4C,WAAW;AAAA,CAAM;AAC3E;",
6
+ "names": []
7
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var targets_exports = {};
20
+ __export(targets_exports, {
21
+ getTargetInstaller: () => getTargetInstaller
22
+ });
23
+ module.exports = __toCommonJS(targets_exports);
24
+ var import_kiro = require("./kiro");
25
+ var import_claude = require("./claude");
26
+ var import_codex = require("./codex");
27
+ function getTargetInstaller(target) {
28
+ if (target === "claude") {
29
+ return {
30
+ label: "Claude Code",
31
+ installEarly: import_claude.installClaudeEarly,
32
+ installLate: import_claude.installClaudeLate,
33
+ printNextSteps: import_claude.printClaudeNextSteps,
34
+ uninit: import_claude.uninitClaude
35
+ };
36
+ }
37
+ if (target === "codex") {
38
+ return {
39
+ label: "Codex",
40
+ installEarly: import_codex.installCodexEarly,
41
+ installLate: import_codex.installCodexLate,
42
+ printNextSteps: import_codex.printCodexNextSteps,
43
+ uninit: import_codex.uninitCodex
44
+ };
45
+ }
46
+ return {
47
+ label: "Kiro",
48
+ installEarly: import_kiro.installKiroEarly,
49
+ installLate: import_kiro.installKiroLate,
50
+ printNextSteps: import_kiro.printKiroNextSteps
51
+ };
52
+ }
53
+ // Annotate the CommonJS export names for ESM import in node:
54
+ 0 && (module.exports = {
55
+ getTargetInstaller
56
+ });
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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'): 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
+ "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
+ "names": []
7
+ }
@@ -0,0 +1,61 @@
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 kiro_exports = {};
30
+ __export(kiro_exports, {
31
+ installKiroEarly: () => installKiroEarly,
32
+ installKiroLate: () => installKiroLate,
33
+ printKiroNextSteps: () => printKiroNextSteps
34
+ });
35
+ module.exports = __toCommonJS(kiro_exports);
36
+ var path = __toESM(require("path"));
37
+ var import_cli_agent = require("../cli-agent");
38
+ var import_hooks = require("../hooks");
39
+ var import_mcp = require("../mcp");
40
+ var import_steering = require("../steering");
41
+ function installKiroEarly(projectRoot) {
42
+ const kiroDir = path.join(projectRoot, ".kiro");
43
+ (0, import_mcp.writeMcpConfig)(kiroDir);
44
+ (0, import_hooks.writeHooks)(kiroDir);
45
+ }
46
+ function installKiroLate(projectRoot, cavemanMode) {
47
+ const kiroDir = path.join(projectRoot, ".kiro");
48
+ (0, import_steering.writeSteering)(kiroDir, cavemanMode);
49
+ (0, import_cli_agent.writeCliAgent)(kiroDir);
50
+ }
51
+ function printKiroNextSteps() {
52
+ console.log("\n Done! Restart Kiro IDE for the MCP server to load.");
53
+ console.log(' For Kiro CLI, use the "kirograph" agent: kiro-cli --agent kirograph\n');
54
+ }
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ installKiroEarly,
58
+ installKiroLate,
59
+ printKiroNextSteps
60
+ });
61
+ //# sourceMappingURL=kiro.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/bin/installer/targets/kiro.ts"],
4
+ "sourcesContent": ["import * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport { writeCliAgent } from '../cli-agent';\nimport { writeHooks } from '../hooks';\nimport { writeMcpConfig } from '../mcp';\nimport { writeSteering } from '../steering';\n\nexport function installKiroEarly(projectRoot: string): void {\n const kiroDir = path.join(projectRoot, '.kiro');\n writeMcpConfig(kiroDir);\n writeHooks(kiroDir);\n}\n\nexport function installKiroLate(projectRoot: string, cavemanMode?: CavemanMode | 'off'): void {\n const kiroDir = path.join(projectRoot, '.kiro');\n writeSteering(kiroDir, cavemanMode);\n writeCliAgent(kiroDir);\n}\n\nexport function printKiroNextSteps(): void {\n console.log('\\n Done! Restart Kiro IDE for the MCP server to load.');\n console.log(' For Kiro CLI, use the \"kirograph\" agent: kiro-cli --agent kirograph\\n');\n}\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAsB;AAEtB,uBAA8B;AAC9B,mBAA2B;AAC3B,iBAA+B;AAC/B,sBAA8B;AAEvB,SAAS,iBAAiB,aAA2B;AAC1D,QAAM,UAAU,KAAK,KAAK,aAAa,OAAO;AAC9C,iCAAe,OAAO;AACtB,+BAAW,OAAO;AACpB;AAEO,SAAS,gBAAgB,aAAqB,aAAyC;AAC5F,QAAM,UAAU,KAAK,KAAK,aAAa,OAAO;AAC9C,qCAAc,SAAS,WAAW;AAClC,sCAAc,OAAO;AACvB;AAEO,SAAS,qBAA2B;AACzC,UAAQ,IAAI,wDAAwD;AACpE,UAAQ,IAAI,yEAAyE;AACvF;",
6
+ "names": []
7
+ }
@@ -56,7 +56,7 @@ process.on("uncaughtException", (err) => {
56
56
  process.exit(1);
57
57
  });
58
58
  const program = new import_commander.Command();
59
- program.name("kirograph").description("Semantic code knowledge graph for Kiro").version("0.12.2").addHelpCommand(true).hook("preAction", (thisCommand) => {
59
+ program.name("kirograph").description("Semantic code knowledge graph for Kiro").version("0.13.1").addHelpCommand(true).hook("preAction", (thisCommand) => {
60
60
  const name = thisCommand.name();
61
61
  if (name === "init") (0, import_banner.printBanner)();
62
62
  });
@@ -214,7 +214,7 @@ const KIND_MAP = {
214
214
  function_expression: "function",
215
215
  arrow_function: "function",
216
216
  function_definition: "function",
217
- // Python
217
+ // Python, Scala
218
218
  function_item: "function",
219
219
  // Rust
220
220
  function_declaration_go: "function",
@@ -228,15 +228,19 @@ const KIND_MAP = {
228
228
  class_declaration: "class",
229
229
  class_expression: "class",
230
230
  class_definition: "class",
231
- // Python
231
+ // Python, Scala
232
232
  impl_item: "class",
233
233
  // Rust (impl blocks)
234
234
  struct_item: "struct",
235
235
  // Rust
236
+ struct_definition: "struct",
237
+ // Zig
236
238
  // Interfaces / traits
237
239
  interface_declaration: "interface",
238
240
  trait_item: "trait",
239
241
  // Rust
242
+ trait_definition: "trait",
243
+ // Scala
240
244
  protocol_declaration: "interface",
241
245
  // Swift
242
246
  // Enums
@@ -255,6 +259,8 @@ const KIND_MAP = {
255
259
  // Kotlin
256
260
  // Namespaces / modules
257
261
  namespace_declaration: "namespace",
262
+ module_definition: "namespace",
263
+ // OCaml
258
264
  // Variables / constants (language-specific, see extractVariableKind)
259
265
  lexical_declaration: "variable",
260
266
  // TS/JS (const/let/var) — refined below
@@ -394,6 +400,63 @@ function getLanguageSpecificKind(type, lang) {
394
400
  case "ruby":
395
401
  if (type === "singleton_method") return "method";
396
402
  break;
403
+ case "scala":
404
+ if (type === "object_definition") return "class";
405
+ if (type === "val_definition") return "variable";
406
+ if (type === "var_definition") return "variable";
407
+ if (type === "type_definition") return "type_alias";
408
+ break;
409
+ case "lua":
410
+ if (type === "local_function") return "function";
411
+ if (type === "local_variable_declaration") return "variable";
412
+ if (type === "variable_assignment") return "variable";
413
+ break;
414
+ case "zig":
415
+ if (type === "VarDecl") return "variable";
416
+ if (type === "ContainerDecl") return "struct";
417
+ break;
418
+ case "bash":
419
+ if (type === "variable_assignment") return "variable";
420
+ break;
421
+ case "ocaml":
422
+ if (type === "let_binding") return "variable";
423
+ if (type === "type_binding") return "type_alias";
424
+ if (type === "module_binding") return "namespace";
425
+ break;
426
+ case "elm":
427
+ if (type === "function_declaration_left") return "function";
428
+ if (type === "type_alias_declaration") return "type_alias";
429
+ break;
430
+ case "solidity":
431
+ if (type === "contract_declaration") return "class";
432
+ if (type === "event_definition") return "function";
433
+ if (type === "modifier_definition") return "function";
434
+ if (type === "state_variable_declaration") return "variable";
435
+ break;
436
+ case "objc":
437
+ if (type === "class_interface") return "class";
438
+ if (type === "class_implementation") return "class";
439
+ if (type === "protocol_declaration") return "interface";
440
+ if (type === "method_declaration") return "method";
441
+ if (type === "property_declaration") return "property";
442
+ break;
443
+ case "hcl":
444
+ if (type === "block") return "namespace";
445
+ if (type === "attribute") return "variable";
446
+ break;
447
+ case "scss":
448
+ if (type === "mixin_statement") return "function";
449
+ if (type === "function_statement") return "function";
450
+ if (type === "variable_declaration") return "variable";
451
+ if (type === "include_statement") return "import";
452
+ if (type === "use_statement") return "import";
453
+ if (type === "forward_statement") return "import";
454
+ if (type === "placeholder") return "class";
455
+ break;
456
+ case "css":
457
+ if (type === "rule_set") return "class";
458
+ if (type === "declaration") return "variable";
459
+ break;
397
460
  }
398
461
  return null;
399
462
  }