kirograph 0.28.1 → 1.1.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 (177) hide show
  1. package/README.md +3 -2
  2. package/dist/architecture/index.js +4 -1
  3. package/dist/architecture/index.js.map +2 -2
  4. package/dist/architecture/manifest/index.js +13 -2
  5. package/dist/architecture/manifest/index.js.map +2 -2
  6. package/dist/architecture/manifest/python.js +2 -2
  7. package/dist/architecture/manifest/python.js.map +2 -2
  8. package/dist/bin/commands/help.js +3 -1
  9. package/dist/bin/commands/help.js.map +2 -2
  10. package/dist/bin/commands/install.js +2 -1
  11. package/dist/bin/commands/install.js.map +2 -2
  12. package/dist/bin/commands/memory.js +18 -8
  13. package/dist/bin/commands/memory.js.map +2 -2
  14. package/dist/bin/commands/reachability.js +7 -2
  15. package/dist/bin/commands/reachability.js.map +2 -2
  16. package/dist/bin/commands/status.js +2 -1
  17. package/dist/bin/commands/status.js.map +2 -2
  18. package/dist/bin/commands/uninit.js +2 -1
  19. package/dist/bin/commands/uninit.js.map +2 -2
  20. package/dist/bin/commands/vulns.js +26 -6
  21. package/dist/bin/commands/vulns.js.map +2 -2
  22. package/dist/bin/commands/wiki.js +56 -0
  23. package/dist/bin/commands/wiki.js.map +2 -2
  24. package/dist/bin/installer/common.js +7 -1
  25. package/dist/bin/installer/common.js.map +2 -2
  26. package/dist/bin/installer/detect.js +10 -0
  27. package/dist/bin/installer/detect.js.map +2 -2
  28. package/dist/bin/installer/hooks.js +13 -8
  29. package/dist/bin/installer/hooks.js.map +2 -2
  30. package/dist/bin/installer/steering.js +9 -0
  31. package/dist/bin/installer/steering.js.map +2 -2
  32. package/dist/bin/installer/targets/antigravity.js +1 -1
  33. package/dist/bin/installer/targets/antigravity.js.map +2 -2
  34. package/dist/bin/installer/targets/claude.js +1 -1
  35. package/dist/bin/installer/targets/claude.js.map +2 -2
  36. package/dist/bin/installer/targets/codex.js +1 -1
  37. package/dist/bin/installer/targets/codex.js.map +2 -2
  38. package/dist/bin/installer/targets/commandcode.js +84 -0
  39. package/dist/bin/installer/targets/commandcode.js.map +7 -0
  40. package/dist/bin/installer/targets/copilot.js +1 -1
  41. package/dist/bin/installer/targets/copilot.js.map +2 -2
  42. package/dist/bin/installer/targets/cursor.js +2 -2
  43. package/dist/bin/installer/targets/cursor.js.map +2 -2
  44. package/dist/bin/installer/targets/devin.js +1 -1
  45. package/dist/bin/installer/targets/devin.js.map +2 -2
  46. package/dist/bin/installer/targets/gemini-cli.js +1 -1
  47. package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
  48. package/dist/bin/installer/targets/index.js +10 -0
  49. package/dist/bin/installer/targets/index.js.map +2 -2
  50. package/dist/bin/installer/targets/opencode.js +1 -1
  51. package/dist/bin/installer/targets/opencode.js.map +2 -2
  52. package/dist/bin/installer/targets/windsurf.js +1 -1
  53. package/dist/bin/installer/targets/windsurf.js.map +2 -2
  54. package/dist/bin/kirograph.js +1 -1
  55. package/dist/bin/kirograph.js.map +1 -1
  56. package/dist/config.js +25 -1
  57. package/dist/config.js.map +2 -2
  58. package/dist/core/pipeline.js +18 -6
  59. package/dist/core/pipeline.js.map +2 -2
  60. package/dist/extraction/extractor.js +88 -26
  61. package/dist/extraction/extractor.js.map +2 -2
  62. package/dist/extraction/grammars.js +38 -3
  63. package/dist/extraction/grammars.js.map +2 -2
  64. package/dist/extraction/notebook.js +15 -7
  65. package/dist/extraction/notebook.js.map +2 -2
  66. package/dist/extraction/wasm/tree-sitter-bash.wasm +0 -0
  67. package/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
  68. package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  69. package/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
  70. package/dist/extraction/wasm/tree-sitter-csharp.wasm +0 -0
  71. package/dist/extraction/wasm/tree-sitter-css.wasm +0 -0
  72. package/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  73. package/dist/extraction/wasm/tree-sitter-elisp.wasm +0 -0
  74. package/dist/extraction/wasm/tree-sitter-elixir.wasm +0 -0
  75. package/dist/extraction/wasm/tree-sitter-elm.wasm +0 -0
  76. package/dist/extraction/wasm/tree-sitter-embedded_template.wasm +0 -0
  77. package/dist/extraction/wasm/tree-sitter-embeddedtemplate.wasm +0 -0
  78. package/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  79. package/dist/extraction/wasm/tree-sitter-html.wasm +0 -0
  80. package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  81. package/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  82. package/dist/extraction/wasm/tree-sitter-json.wasm +0 -0
  83. package/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  84. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  85. package/dist/extraction/wasm/tree-sitter-objc.wasm +0 -0
  86. package/dist/extraction/wasm/tree-sitter-ocaml.wasm +0 -0
  87. package/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
  88. package/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  89. package/dist/extraction/wasm/tree-sitter-ql.wasm +0 -0
  90. package/dist/extraction/wasm/tree-sitter-rescript.wasm +0 -0
  91. package/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
  92. package/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
  93. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  94. package/dist/extraction/wasm/tree-sitter-solidity.wasm +0 -0
  95. package/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  96. package/dist/extraction/wasm/tree-sitter-systemrdl.wasm +0 -0
  97. package/dist/extraction/wasm/tree-sitter-tlaplus.wasm +0 -0
  98. package/dist/extraction/wasm/tree-sitter-toml.wasm +0 -0
  99. package/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  100. package/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  101. package/dist/extraction/wasm/tree-sitter-vue.wasm +0 -0
  102. package/dist/extraction/wasm/tree-sitter-yaml.wasm +0 -0
  103. package/dist/extraction/wasm/tree-sitter-zig.wasm +0 -0
  104. package/dist/frameworks/index.js +68 -7
  105. package/dist/frameworks/index.js.map +2 -2
  106. package/dist/jev/client.js +99 -0
  107. package/dist/jev/client.js.map +7 -0
  108. package/dist/jev/types.js +17 -0
  109. package/dist/jev/types.js.map +7 -0
  110. package/dist/mcp/handlers/memory.js +14 -8
  111. package/dist/mcp/handlers/memory.js.map +2 -2
  112. package/dist/mcp/handlers/security.js +5 -3
  113. package/dist/mcp/handlers/security.js.map +2 -2
  114. package/dist/mcp/tools.js +1 -1
  115. package/dist/mcp/tools.js.map +1 -1
  116. package/dist/memory/index.js +13 -1
  117. package/dist/memory/index.js.map +3 -3
  118. package/dist/memory/relation-jev.js +59 -0
  119. package/dist/memory/relation-jev.js.map +7 -0
  120. package/dist/memory/schema.js +57 -0
  121. package/dist/memory/schema.js.map +7 -0
  122. package/dist/security/auth-detection-jev.js +47 -0
  123. package/dist/security/auth-detection-jev.js.map +7 -0
  124. package/dist/security/manifest/adapter.js +34 -5
  125. package/dist/security/manifest/adapter.js.map +3 -3
  126. package/dist/security/manifest/parser.js +2 -2
  127. package/dist/security/manifest/parser.js.map +2 -2
  128. package/dist/security/manifest/plugins/cargo.js +23 -0
  129. package/dist/security/manifest/plugins/cargo.js.map +2 -2
  130. package/dist/security/manifest/plugins/composer.js +12 -0
  131. package/dist/security/manifest/plugins/composer.js.map +2 -2
  132. package/dist/security/manifest/plugins/gradle.js +12 -0
  133. package/dist/security/manifest/plugins/gradle.js.map +2 -2
  134. package/dist/security/manifest/plugins/hex.js +12 -0
  135. package/dist/security/manifest/plugins/hex.js.map +2 -2
  136. package/dist/security/manifest/plugins/maven.js +68 -1
  137. package/dist/security/manifest/plugins/maven.js.map +2 -2
  138. package/dist/security/manifest/plugins/npm.js +86 -0
  139. package/dist/security/manifest/plugins/npm.js.map +2 -2
  140. package/dist/security/manifest/plugins/nuget.js +13 -0
  141. package/dist/security/manifest/plugins/nuget.js.map +2 -2
  142. package/dist/security/manifest/plugins/pubspec.js +12 -0
  143. package/dist/security/manifest/plugins/pubspec.js.map +2 -2
  144. package/dist/security/manifest/plugins/pyproject.js +12 -0
  145. package/dist/security/manifest/plugins/pyproject.js.map +2 -2
  146. package/dist/security/manifest/plugins/rubygems.js +12 -0
  147. package/dist/security/manifest/plugins/rubygems.js.map +2 -2
  148. package/dist/security/pipeline.js +5 -2
  149. package/dist/security/pipeline.js.map +2 -2
  150. package/dist/security/reachability.js +115 -50
  151. package/dist/security/reachability.js.map +2 -2
  152. package/dist/security/types.js.map +1 -1
  153. package/dist/security/vuln/client.js +45 -1
  154. package/dist/security/vuln/client.js.map +2 -2
  155. package/dist/security/vuln/epss-client.js +1 -1
  156. package/dist/security/vuln/epss-client.js.map +1 -1
  157. package/dist/security/vuln/osv-adapter.js +144 -32
  158. package/dist/security/vuln/osv-adapter.js.map +2 -2
  159. package/dist/sync/index.js +9 -2
  160. package/dist/sync/index.js.map +2 -2
  161. package/dist/vectors/libsql-index.js +287 -0
  162. package/dist/vectors/libsql-index.js.map +7 -0
  163. package/dist/vectors/turso-index.js +307 -0
  164. package/dist/vectors/turso-index.js.map +7 -0
  165. package/dist/wiki/contradiction-jev.js +49 -0
  166. package/dist/wiki/contradiction-jev.js.map +7 -0
  167. package/dist/wiki/index.js +13 -0
  168. package/dist/wiki/index.js.map +2 -2
  169. package/dist/wiki/ingest.js +2 -0
  170. package/dist/wiki/ingest.js.map +2 -2
  171. package/dist/wiki/links.js +53 -0
  172. package/dist/wiki/links.js.map +7 -0
  173. package/dist/wiki/lint.js +3 -6
  174. package/dist/wiki/lint.js.map +2 -2
  175. package/dist/wiki/rename.js +103 -0
  176. package/dist/wiki/rename.js.map +7 -0
  177. package/package.json +3 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/mcp/tools.ts"],
4
- "sourcesContent": ["/**\n * KiroGraph MCP Tool Definitions\n * Handler logic has been moved to src/mcp/handler.ts and src/mcp/handlers/*.ts\n */\n\nexport { KIROGRAPH_TOOL_NAMES } from './tool-names';\nexport { ToolHandler } from './handler';\n\nexport interface ToolDefinition {\n name: string;\n description: string;\n inputSchema: {\n type: 'object';\n properties: Record<string, { type: string; description?: string; enum?: string[]; default?: unknown; items?: unknown; properties?: unknown }>;\n required?: string[];\n };\n annotations?: Record<string, unknown>;\n}\n\nexport const tools: ToolDefinition[] = [\n {\n name: 'kirograph_search',\n description: 'Quick symbol search by name. Returns locations only (no code). Use kirograph_context for comprehensive task context.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Symbol name or partial name (e.g., \"auth\", \"signIn\", \"UserService\")' },\n mode: {\n type: 'string',\n description: 'Search mode: \"name\" (default, FTS prefix match) or \"similar\" (fuzzy substring match, broader results)',\n enum: ['name', 'similar'],\n default: 'name',\n },\n kind: {\n type: 'string',\n description: 'Filter by node kind',\n enum: ['function', 'method', 'class', 'interface', 'type_alias', 'variable', 'route', 'component'],\n },\n limit: { type: 'number', description: 'Max results 1-100 (default: 10)', default: 10 },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_context',\n description: 'Build comprehensive context for a task or feature request.',\n inputSchema: {\n type: 'object',\n properties: {\n task: { type: 'string', description: 'Task description or feature name' },\n maxNodes: { type: 'number', description: 'Max symbols to include', default: 20 },\n includeCode: { type: 'boolean', description: 'Include code snippets. Deprecated \u2014 prefer detail.', default: true },\n detail: {\n type: 'string',\n description: 'Code verbosity: full, signatures, or summary',\n enum: ['full', 'signatures', 'summary'],\n default: 'full',\n },\n projectPath: { type: 'string' },\n },\n required: ['task'],\n },\n },\n {\n name: 'kirograph_callers',\n description: 'Find all functions/methods that call a specific symbol.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find callers for' },\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_callees',\n description: 'Find all functions/methods that a specific symbol calls.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find callees for' },\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_impact',\n description: 'Analyze what code would be affected by changing a symbol.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to analyze impact for' },\n depth: { type: 'number', description: 'Traversal depth (default: 2)', default: 2 },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_node',\n description: 'Get details about a specific symbol.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name or fully-qualified name to look up' },\n qualified: { type: 'boolean', description: 'When true, treat symbol as a fully-qualified name (exact match, bypasses FTS \u2014 use when you have the exact qualifiedName from a previous result)', default: false },\n includeCode: { type: 'boolean', description: 'Include full source code. Deprecated \u2014 prefer detail.', default: false },\n detail: {\n type: 'string',\n description: 'Output level: summary, signatures, or full',\n enum: ['summary', 'signatures', 'full'],\n default: 'summary',\n },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_status',\n description: 'Check index health and statistics.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_files',\n description: 'List indexed file structure with optional filtering.',\n inputSchema: {\n type: 'object',\n properties: {\n filterPath: { type: 'string', description: 'Filter by directory path prefix (e.g., \"src/\")' },\n pattern: { type: 'string', description: 'Filter by glob pattern (e.g., \"**/*.ts\")' },\n maxDepth: { type: 'number', description: 'Max directory depth to traverse' },\n format: {\n type: 'string',\n description: 'Output format: \"tree\" (default, visual tree), \"flat\" (one path per line), \"grouped\" (grouped by directory), \"compact\" (rtk-style summary with counts)',\n enum: ['tree', 'flat', 'grouped', 'compact'],\n default: 'tree',\n },\n includeMetadata: { type: 'boolean', description: 'Include language and symbol count', default: true },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dead_code',\n description: 'Find symbols with no incoming references (potential dead code). Only includes unexported symbols.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results 1-100 (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_circular_deps',\n description: 'Find circular import dependencies in the codebase.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_path',\n description: 'Find the shortest path between two symbols in the graph.',\n inputSchema: {\n type: 'object',\n properties: {\n from: { type: 'string', description: 'Source symbol name' },\n to: { type: 'string', description: 'Target symbol name' },\n projectPath: { type: 'string' },\n },\n required: ['from', 'to'],\n },\n },\n {\n name: 'kirograph_architecture',\n description: 'Show high-level architecture: packages, layers, dependencies.',\n inputSchema: {\n type: 'object',\n properties: {\n level: {\n type: 'string',\n description: 'packages, layers, or both',\n enum: ['packages', 'layers', 'both'],\n default: 'both',\n },\n includeFiles: { type: 'boolean', description: 'Include per-file package/layer assignments', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_coupling',\n description: 'Package coupling metrics: Ca, Ce, and instability (Ce/(Ca+Ce)).',\n inputSchema: {\n type: 'object',\n properties: {\n sortBy: {\n type: 'string',\n description: 'Sort by instability, ca, ce, or name',\n enum: ['instability', 'afferent', 'efferent'],\n default: 'instability',\n },\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_package',\n description: 'Drill into a package: files, exports, and dependencies.',\n inputSchema: {\n type: 'object',\n properties: {\n package: { type: 'string', description: 'Package name or path (partial match accepted)' },\n includeFiles: { type: 'boolean', description: 'List files in the package (default: true)', default: true },\n projectPath: { type: 'string' },\n },\n required: ['package'],\n },\n },\n {\n name: 'kirograph_manifest',\n description: 'Workspace manifest summary: list all packages across ecosystems with versions, external dep counts, and license. Pass package= to drill into one package. Pass ecosystem= to filter (npm, cargo, go, python, maven, gradle, csproj). Pass showDrift=true to surface packages that appear in multiple manifest files with differing versions.',\n inputSchema: {\n type: 'object',\n properties: {\n package: { type: 'string', description: 'Package name or path for a focused view (partial match accepted)' },\n ecosystem: { type: 'string', description: 'Filter by ecosystem / language (e.g. \"npm\", \"cargo\", \"go\", \"python\")' },\n showDrift: { type: 'boolean', description: 'Highlight packages declared in multiple manifests with different versions (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_hotspots',\n description: 'Find the most-connected symbols in the codebase by total edge degree (incoming + outgoing). Useful for identifying load-bearing code, core abstractions, or blast-radius hot zones.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_surprising',\n description: 'Find non-obvious cross-file connections: direct edges between symbols in structurally distant parts of the codebase. High-score pairs indicate unexpected coupling worth investigating.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_diff',\n description: 'Compare current graph against a saved snapshot.',\n inputSchema: {\n type: 'object',\n properties: {\n snapshot: { type: 'string', description: 'Snapshot label; omit for latest' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_snapshot_save',\n description: 'Save a snapshot of the current graph state. Snapshots can be compared with kirograph_diff to track structural changes over time.',\n inputSchema: {\n type: 'object',\n properties: {\n label: { type: 'string', description: 'Label for the snapshot (default: timestamp-based label)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_snapshot_list',\n description: 'List all saved graph snapshots with their labels, timestamps, and symbol/edge counts.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_type_hierarchy',\n description: 'Traverse base and derived types of a class or interface.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Class or interface name' },\n direction: {\n type: 'string',\n description: 'up=base, down=derived, both=all',\n enum: ['up', 'down', 'both'],\n default: 'both',\n },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_module_api',\n description: 'List all exported symbols in a file or directory \u2014 the public API surface.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'File path (e.g. \"src/auth/service.ts\") or directory prefix (e.g. \"src/auth/\"). Omit for the whole project.' },\n limit: { type: 'number', description: 'Max results (default: 100)', default: 100 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_rename_preview',\n description: 'Show every reference site for a symbol \u2014 blast-radius preview before a rename.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find all references for' },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_doc_coverage',\n description: 'Find exported symbols that are missing docstrings.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_god_class',\n description: 'List classes ranked by member count to identify god classes.',\n inputSchema: {\n type: 'object',\n properties: {\n threshold: { type: 'number', description: 'Member count threshold for flagging (default: 10)', default: 10 },\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_inheritance_depth',\n description: 'Show the deepest inheritance chains (BFS on extends/implements edges).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_recursion',\n description: 'Find recursive and mutually-recursive functions (SCC on call edges).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_largest',\n description: 'List symbols ranked by lines of code (end_line \u2212 start_line).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_rank',\n description: 'Rank symbols by fan-in (callers) or fan-out (callees) edge count.',\n inputSchema: {\n type: 'object',\n properties: {\n by: { type: 'string', description: 'Ranking dimension: \"fan-in\" (default) or \"fan-out\"', enum: ['fan-in', 'fan-out'], default: 'fan-in' },\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_distribution',\n description: 'Symbol-kind breakdown (function, class, method\u2026) for a file, directory, or the whole project.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'Directory or file path prefix to scope. Omit for whole project.' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_annotations',\n description: 'Decorator/annotation histogram for the whole project, or list of symbols using a specific decorator.',\n inputSchema: {\n type: 'object',\n properties: {\n decorator: { type: 'string', description: 'Decorator name to filter (e.g. \"Injectable\"). Omit for full histogram.' },\n limit: { type: 'number', description: 'Max results (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_session_start',\n description: 'Save the current graph metrics as a session baseline.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_session_end',\n description: 'Diff current graph metrics against the session baseline and report per-dimension deltas.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_unused_imports',\n description: 'Find import nodes with zero resolved downstream edges (i.e. nothing in the codebase references the imported symbol).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 50)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_gini',\n description: 'Compute the Gini inequality coefficient for a size metric (loc, fan-in, or fan-out) across all function/method nodes. Returns the coefficient plus top/bottom 5.',\n inputSchema: {\n type: 'object',\n properties: {\n metric: {\n type: 'string',\n description: 'Metric to measure: \"loc\" (lines of code), \"fan-in\" (incoming calls), \"fan-out\" (outgoing calls)',\n enum: ['loc', 'fan-in', 'fan-out'],\n default: 'loc',\n },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dependency_depth',\n description: 'Run a Kahn topological sort on the file import graph and report each file\\'s longest path from a root (depth). Useful for spotting deeply layered dependency chains.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max files to show sorted by depth DESC (default: 20)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_exec',\n description: 'Run a shell command with token-optimized, noise-filtered output.',\n inputSchema: {\n type: 'object',\n properties: {\n command: { type: 'string', description: 'Shell command to execute' },\n cwd: { type: 'string', description: 'Working directory' },\n level: {\n type: 'string',\n description: 'Compression level: \"normal\" (balanced), \"aggressive\" (more compact), \"ultra\" (maximum compression)',\n enum: ['normal', 'aggressive', 'ultra'],\n default: 'normal',\n },\n timeout: { type: 'number', description: 'Timeout in seconds', default: 60 },\n projectPath: { type: 'string' },\n },\n required: ['command'],\n },\n },\n {\n name: 'kirograph_gain',\n description: 'Show token savings from graph tools and shell compression.',\n inputSchema: {\n type: 'object',\n properties: {\n period: {\n type: 'string',\n description: 'Time window: session, hour, day, week, all',\n enum: ['session', 'today', 'week', 'all'],\n default: 'session',\n },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_read',\n description: 'Read a file with caching; unchanged files return cache marker.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'File path to read (absolute or relative to project root)' },\n mode: {\n type: 'string',\n description: 'Read mode: \"full\" (default), \"map\" (structure overview), \"signatures\" (function signatures), \"diff\" (changes since last read), \"lines\" (line range), \"imports\", \"exports\"',\n enum: ['full', 'map', 'signatures', 'diff', 'lines', 'imports', 'exports'],\n default: 'full',\n },\n start: { type: 'number', description: 'Start line (for lines mode)' },\n end: { type: 'number', description: 'End line (for lines mode)' },\n noCache: { type: 'boolean', description: 'Force fresh read, bypass cache', default: false },\n projectPath: { type: 'string' },\n },\n required: ['path'],\n },\n },\n {\n name: 'kirograph_retrieve',\n description: 'Retrieve cached file content by path (CCR \u2014 Cached Content Retrieval). Returns the full content stored in the session cache, or reads and caches the file if not yet seen. Use after kirograph_read returns a \"[cached: file unchanged]\" marker to get the actual content without a redundant filesystem read.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'File path to retrieve (absolute or relative to project root)' },\n projectPath: { type: 'string' },\n },\n required: ['path'],\n },\n },\n {\n name: 'kirograph_compress',\n description: 'Compress text via rtk shell filters or caveman grammar engine.',\n inputSchema: {\n type: 'object',\n properties: {\n text: { type: 'string', description: 'Text to compress' },\n command: { type: 'string', description: 'Shell command text came from (selects rtk engine)' },\n level: {\n type: 'string',\n description: 'Compression intensity: \"lite\" / \"normal\" (light), \"full\" / \"aggressive\" (default), \"ultra\" (maximum)',\n enum: ['lite', 'normal', 'full', 'aggressive', 'ultra'],\n default: 'full',\n },\n },\n required: ['text'],\n },\n },\n {\n name: 'kirograph_budget',\n description: 'Show session context budget: tokens used, remaining, utilization.',\n inputSchema: {\n type: 'object',\n properties: {\n reset: { type: 'boolean', description: 'Reset session budget counters', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_flows',\n description: 'Trace execution flows from entry points through the call graph.',\n inputSchema: {\n type: 'object',\n properties: {\n entryPoint: { type: 'string', description: 'Symbol to trace; omit to auto-detect' },\n maxFlows: { type: 'number', description: 'Max number of flows to return (default 10)' },\n maxDepth: { type: 'number', description: 'Max call chain depth (default 10)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_communities',\n description: 'Detect clusters of related symbols via graph community detection.',\n inputSchema: {\n type: 'object',\n properties: {\n resolution: { type: 'number', description: 'Granularity 0.1\u20132.0; higher=more smaller clusters' },\n limit: { type: 'number', description: 'Max communities to return (default 15)' },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Complexity tools (require enableComplexity=true) \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 {\n name: 'kirograph_complexity',\n description: 'Rank symbols by cyclomatic complexity, cognitive complexity, or maintainability index. Requires enableComplexity: true and a re-index.',\n inputSchema: {\n type: 'object',\n properties: {\n metric: { type: 'string', description: 'Ranking metric: \"cyclomatic\" (default), \"cognitive\", or \"maintainability\"', enum: ['cyclomatic', 'cognitive', 'maintainability'], default: 'cyclomatic' },\n threshold: { type: 'number', description: 'Flag symbols above (CC/cog) or below (MI) this threshold' },\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_simplify_scan',\n description: 'Find functions/methods that exceed complexity, size, or maintainability thresholds \u2014 simplification candidates.',\n inputSchema: {\n type: 'object',\n properties: {\n thresholdCC: { type: 'number', description: 'Cyclomatic complexity threshold (default: 10)', default: 10 },\n thresholdMI: { type: 'number', description: 'Maintainability index lower bound \u2014 flag below this (default: 50)', default: 50 },\n thresholdLOC: { type: 'number', description: 'Lines of code threshold (default: 50)', default: 50 },\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Git context tools (require enableGitContext=true) \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 {\n name: 'kirograph_diff_context',\n description: 'Identify symbols changed in the working tree (or staged), with their callers and callees for immediate blast-radius context.',\n inputSchema: {\n type: 'object',\n properties: {\n staged: { type: 'boolean', description: 'If true, show staged changes (git diff --cached) instead of unstaged', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_commit_context',\n description: 'Structured summary of staged changes \u2014 affected symbols, diff stat, staged files. Use to craft precise commit messages.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_pr_context',\n description: 'Semantic diff between two git refs \u2014 changed symbols with callers/callees. Use to write PR descriptions.',\n inputSchema: {\n type: 'object',\n properties: {\n base: { type: 'string', description: 'Base ref (branch name, tag, or commit hash)' },\n head: { type: 'string', description: 'Head ref (default: HEAD)', default: 'HEAD' },\n projectPath: { type: 'string' },\n },\n required: ['base'],\n },\n },\n {\n name: 'kirograph_changelog',\n description: 'Human-readable semantic changelog between two git refs: commit log + affected symbols.',\n inputSchema: {\n type: 'object',\n properties: {\n ref1: { type: 'string', description: 'Start ref (older)' },\n ref2: { type: 'string', description: 'End ref (default: HEAD)', default: 'HEAD' },\n projectPath: { type: 'string' },\n },\n required: ['ref1'],\n },\n },\n {\n name: 'kirograph_test_map',\n description: 'Find test files covering a symbol, or list exported symbols with no test coverage.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find tests for. Omit to list all uncovered exported symbols.' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_refactor',\n description: 'Rename preview (all references) or function summarization.',\n inputSchema: {\n type: 'object',\n properties: {\n mode: { type: 'string', description: 'rename=preview references, summarize=summary', enum: ['rename', 'suggest'] },\n symbol: { type: 'string', description: 'Symbol name (required for rename mode)' },\n limit: { type: 'number', description: 'Max results (default 10)' },\n projectPath: { type: 'string' },\n },\n required: ['mode'],\n },\n },\n // \u2500\u2500 Edit primitives (require enableEditPrimitives=true) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n {\n name: 'kirograph_str_replace',\n description: 'Replace a unique string anchor in a file; fails if the anchor appears 0 or >1 times.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n old_str: { type: 'string', description: 'Exact string to find (must be unique in the file)' },\n new_str: { type: 'string', description: 'Replacement string' },\n projectPath: { type: 'string' },\n },\n required: ['file', 'old_str', 'new_str'],\n },\n },\n {\n name: 'kirograph_multi_str_replace',\n description: 'Apply N replacements as an all-or-nothing transaction; aborts if any anchor is ambiguous or missing.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n pairs: {\n type: 'array',\n description: 'Array of {old_str, new_str} replacement pairs applied in order',\n items: {\n type: 'object',\n properties: {\n old_str: { type: 'string', description: 'Exact string to find (must be unique)' },\n new_str: { type: 'string', description: 'Replacement string' },\n },\n },\n },\n projectPath: { type: 'string' },\n },\n required: ['file', 'pairs'],\n },\n },\n {\n name: 'kirograph_insert_at',\n description: 'Insert content before or after a unique anchor string or line number.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n anchor: { type: 'string', description: 'Unique string anchor to insert relative to (mutually exclusive with line)' },\n line: { type: 'number', description: '1-based line number to insert relative to (mutually exclusive with anchor)' },\n content: { type: 'string', description: 'Content to insert (include newline if needed)' },\n position: { type: 'string', description: '\"before\" or \"after\" the anchor/line (default: \"after\")', enum: ['before', 'after'], default: 'after' },\n projectPath: { type: 'string' },\n },\n required: ['file', 'content'],\n },\n },\n {\n name: 'kirograph_ast_grep_rewrite',\n description: 'Structural AST rewrite via ast-grep. Skipped if ast-grep is not installed.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n pattern: { type: 'string', description: 'ast-grep pattern to match' },\n rewrite: { type: 'string', description: 'ast-grep rewrite template' },\n projectPath: { type: 'string' },\n },\n required: ['file', 'pattern', 'rewrite'],\n },\n },\n // \u2500\u2500 Memory tools (require enableMemory=true) \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 {\n name: 'kirograph_mem_search',\n description: 'Search project memory for decisions, errors, patterns, context.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Natural language search query' },\n kind: {\n type: 'string',\n description: 'Filter by observation kind',\n enum: ['decision', 'error', 'pattern', 'architecture', 'summary', 'note'],\n },\n limit: { type: 'number', description: 'Max results (default: 10)', default: 10 },\n sessionId: { type: 'string', description: 'Filter to specific session' },\n asOf: { type: 'number', description: 'Query facts valid at this timestamp (epoch ms). Filters out expired/superseded observations.' },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_mem_store',\n description: 'Store an observation in project memory.',\n inputSchema: {\n type: 'object',\n properties: {\n content: { type: 'string', description: 'Observation text' },\n kind: {\n type: 'string',\n description: 'Observation kind',\n enum: ['decision', 'error', 'pattern', 'architecture', 'summary', 'note'],\n default: 'note',\n },\n projectPath: { type: 'string' },\n topicKey: { type: 'string', description: \"Stable semantic key for this observation (e.g. 'architecture/auth-model'). Enables addressing by concept.\" },\n reviewAfter: { type: 'number', description: 'ISO date to flag for review' },\n },\n required: ['content'],\n },\n },\n {\n name: 'kirograph_mem_timeline',\n description: 'List recent sessions and their observations chronologically.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Number of sessions to show', default: 5 },\n sessionId: { type: 'string', description: 'Show observations for a specific session' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_status',\n description: 'Memory subsystem health: sessions, observations, embeddings, size.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Engram-parity mem tools \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 {\n name: 'kirograph_mem_review',\n description: 'List observations past their review_after date.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_mark_reviewed',\n description: 'Clear review_after date on an observation.',\n inputSchema: {\n type: 'object',\n properties: {\n id: { type: 'string', description: 'Observation ID' },\n projectPath: { type: 'string' },\n },\n required: ['id'],\n },\n },\n {\n name: 'kirograph_mem_compare',\n description: 'Establish a typed relation between two observations (supersedes, conflicts_with, compatible, scoped, related, not_conflict). Accepts observation IDs or topic_key values.',\n inputSchema: {\n type: 'object',\n properties: {\n observationA: { type: 'string', description: 'First observation ID or topic_key' },\n observationB: { type: 'string', description: 'Second observation ID or topic_key' },\n relation: { type: 'string', enum: ['supersedes', 'conflicts_with', 'compatible', 'scoped', 'related', 'not_conflict'], description: 'Relation type' },\n confidence: { type: 'number', description: 'Confidence 0.0\u20131.0 (default: 1.0)' },\n reason: { type: 'string', description: 'Explanation of the relation' },\n evidence: { type: 'string', description: 'Supporting evidence text' },\n projectPath: { type: 'string' },\n },\n required: ['observationA', 'observationB', 'relation'],\n },\n },\n {\n name: 'kirograph_mem_judge',\n description: 'Finalize a pending conflict relation \u2014 confirm, revise, or dismiss it.',\n inputSchema: {\n type: 'object',\n properties: {\n relationId: { type: 'string', description: 'Relation ID (from kirograph_mem_compare or kirograph_mem_search)' },\n relation: { type: 'string', enum: ['supersedes', 'conflicts_with', 'compatible', 'scoped', 'related', 'not_conflict'], description: 'Final relation type' },\n confidence: { type: 'number', description: 'Final confidence 0.0\u20131.0' },\n reason: { type: 'string', description: 'Reasoning' },\n evidence: { type: 'string', description: 'Supporting evidence' },\n projectPath: { type: 'string' },\n },\n required: ['relationId', 'relation', 'confidence'],\n },\n },\n {\n name: 'kirograph_mem_capture',\n description: 'Extract and store structured learnings from freeform text.',\n inputSchema: {\n type: 'object',\n properties: {\n content: { type: 'string', description: 'Text block with structured sections' },\n projectPath: { type: 'string' },\n },\n required: ['content'],\n },\n },\n {\n name: 'kirograph_mem_save_prompt',\n description: 'Save the current user prompt to session memory.',\n inputSchema: {\n type: 'object',\n properties: {\n content: { type: 'string', description: 'The user prompt text to save' },\n projectPath: { type: 'string' },\n },\n required: ['content'],\n },\n },\n {\n name: 'kirograph_mem_suggest_topic_key',\n description: 'Suggest a stable topic_key slug for an observation.',\n inputSchema: {\n type: 'object',\n properties: {\n kind: { type: 'string', enum: ['decision', 'error', 'pattern', 'architecture', 'summary', 'note'], description: 'Observation kind' },\n title: { type: 'string', description: 'Short description of the observation' },\n projectPath: { type: 'string' },\n },\n required: ['kind', 'title'],\n },\n },\n {\n name: 'kirograph_mem_conflicts_scan',\n description: 'Scan recent observations for potential conflicts using FTS.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max observations to scan (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_prune',\n description: 'Remove memory observations older than a given duration.',\n inputSchema: {\n type: 'object',\n properties: {\n olderThan: { type: 'string', description: 'Duration threshold e.g. \"90d\" or \"6m\"', default: '90d' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_lint',\n description: 'Health check: stale links, model mismatch, orphaned sessions.',\n inputSchema: {\n type: 'object',\n properties: {\n fix: { type: 'boolean', description: 'Auto-remove stale links', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_conflicts_list',\n description: 'List pending conflict relations needing resolution.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_conflicts_ignore',\n description: 'Dismiss a pending conflict relation as not relevant.',\n inputSchema: {\n type: 'object',\n properties: {\n relationId: { type: 'string', description: 'Relation ID to ignore (from kirograph_mem_conflicts_list)' },\n projectPath: { type: 'string' },\n },\n required: ['relationId'],\n },\n },\n // \u2500\u2500 Wiki tools (require enableWiki=true) \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 {\n name: 'kirograph_wiki_ingest',\n description: 'Build ingest prompt for LLM to produce a WIKI_DIFF.',\n inputSchema: {\n type: 'object',\n properties: {\n source: { type: 'string', description: 'Source content to ingest (markdown, notes, ADR text, etc.)' },\n sourceName: { type: 'string', description: 'Name or path of the source', default: 'source' },\n projectPath: { type: 'string' },\n },\n required: ['source'],\n },\n },\n {\n name: 'kirograph_wiki_apply_diff',\n description: 'Apply a WIKI_DIFF to the wiki filesystem and SQLite index.',\n inputSchema: {\n type: 'object',\n properties: {\n diff: { type: 'string', description: 'WIKI_DIFF string with WIKI_DIFF_START/END blocks' },\n projectPath: { type: 'string' },\n },\n required: ['diff'],\n },\n },\n {\n name: 'kirograph_wiki_search',\n description: 'FTS over wiki pages; returns slugs, titles, previews.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Search query' },\n limit: { type: 'number', description: 'Max results (default: 5)', default: 5 },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_wiki_page',\n description: 'Retrieve full markdown of a wiki page by slug.',\n inputSchema: {\n type: 'object',\n properties: {\n slug: { type: 'string', description: 'Page slug (e.g. \"arch/auth-model\")' },\n projectPath: { type: 'string' },\n },\n required: ['slug'],\n },\n },\n {\n name: 'kirograph_wiki_lint',\n description: 'Check wiki for broken links, orphans, stale sources, contradictions.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_list',\n description: 'List all wiki pages with slug, title, source count, date.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_synthesize',\n description: 'Run local-model wiki synthesis: process the pending source queue (requires wikiSynthesisMode: \"local\").',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_init',\n description: 'Initialize the wiki: create SCHEMA.md and MANIFEST.md in .kirograph/wiki/.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_reindex',\n description: 'Rebuild the SQLite index from .kirograph/wiki/*.md files on disk.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_status',\n description: 'Show wiki subsystem stats: page count, total sources, oldest/newest page dates.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Docs tools (require enableDocs=true) \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 {\n name: 'kirograph_docs_toc',\n description: 'Get TOC for a doc file or whole project (IDs, titles, levels, summaries).',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'Filter to a specific doc file (relative path). Omit for project-wide TOC.' },\n tree: { type: 'boolean', description: 'Return nested tree structure.', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_docs_search',\n description: 'Search documentation sections by query, ranked by relevance.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Search query (natural language or keywords)' },\n file: { type: 'string', description: 'Limit search to a specific doc file.' },\n limit: { type: 'number', description: 'Max results (default: 10)', default: 10 },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_docs_section',\n description: 'Retrieve full content of a doc section by its stable ID.',\n inputSchema: {\n type: 'object',\n properties: {\n id: { type: 'string', description: 'Section ID.' },\n context: { type: 'boolean', description: 'Include ancestor headings and child summaries.', default: false },\n projectPath: { type: 'string' },\n },\n required: ['id'],\n },\n },\n {\n name: 'kirograph_docs_outline',\n description: 'Get heading hierarchy for a single documentation file.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'Documentation file path (relative to project root).' },\n projectPath: { type: 'string' },\n },\n required: ['file'],\n },\n },\n {\n name: 'kirograph_docs_refs',\n description: 'Bidirectional lookup: doc section\u2194code symbol references.',\n inputSchema: {\n type: 'object',\n properties: {\n sectionId: { type: 'string', description: 'Doc section ID to find referenced symbols.' },\n nodeId: { type: 'string', description: 'Code symbol ID to find referencing doc sections.' },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Data tools (require enableData=true) \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 {\n name: 'kirograph_data_list',\n description: 'List all indexed datasets with row/column counts and file sizes.',\n inputSchema: { type: 'object', properties: { projectPath: { type: 'string' } } },\n },\n {\n name: 'kirograph_data_describe',\n description: 'Full schema profile: types, cardinality, null%, sample values.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID (from kirograph_data_list)' },\n column: { type: 'string', description: 'Deep-dive on a single column.' },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_query',\n description: 'Filtered row retrieval with structured operators (max 500 rows).',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n filters: { type: 'array', description: 'Array of {column, op, value} filters. Ops: eq, neq, gt, gte, lt, lte, contains, in, is_null, between' },\n columns: { type: 'array', description: 'Column projection (only return these columns)' },\n limit: { type: 'number', description: 'Max rows (default: 100, hard cap: 500)', default: 100 },\n offset: { type: 'number', description: 'Pagination offset', default: 0 },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_aggregate',\n description: 'Server-side GROUP BY aggregation: count, sum, avg, min, max.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n groupBy: { type: 'array', description: 'Columns to group by' },\n metrics: { type: 'array', description: 'Array of {column, op} metrics. Ops: count, sum, avg, min, max, count_distinct' },\n filters: { type: 'array', description: 'Optional pre-filters (same format as kirograph_data_query)' },\n projectPath: { type: 'string' },\n },\n required: ['dataset', 'groupBy', 'metrics'],\n },\n },\n {\n name: 'kirograph_data_search',\n description: 'Search column names and sample values by keyword.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n query: { type: 'string', description: 'Search keyword' },\n projectPath: { type: 'string' },\n },\n required: ['dataset', 'query'],\n },\n },\n {\n name: 'kirograph_data_join',\n description: 'SQL JOIN across two indexed datasets.',\n inputSchema: {\n type: 'object',\n properties: {\n left: { type: 'string', description: 'Left dataset ID' },\n right: { type: 'string', description: 'Right dataset ID' },\n leftColumn: { type: 'string', description: 'Join column from left dataset' },\n rightColumn: { type: 'string', description: 'Join column from right dataset' },\n type: { type: 'string', description: 'Join type: inner (default), left, right', enum: ['inner', 'left', 'right'], default: 'inner' },\n columns: { type: 'array', description: 'Column projection (prefix with dataset ID)' },\n limit: { type: 'number', description: 'Max rows (default: 100, hard cap: 500)', default: 100 },\n projectPath: { type: 'string' },\n },\n required: ['left', 'right', 'leftColumn', 'rightColumn'],\n },\n },\n {\n name: 'kirograph_data_correlations',\n description: 'Pairwise Pearson correlations between numeric columns.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n threshold: { type: 'number', description: 'Min absolute correlation to include (default: 0.3)', default: 0.3 },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_quality',\n description: 'Rank columns by data quality risk: nulls, cardinality, type issues.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_drift',\n description: 'Schema drift between last two index runs: columns, types, row counts.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID (from kirograph_data_list)' },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_history',\n description: 'History of schema snapshots: timestamps, row/column counts, hashes.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID (from kirograph_data_list)' },\n limit: { type: 'number', description: 'Max snapshots to return (default: 10)', default: 10 },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n // \u2500\u2500 Watchmen tools (require enableMemory=true + enableWatchmen=true) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n {\n name: 'kirograph_watchmen_status',\n description: 'Show watchmen status: pending observation count, synthesis threshold, and which brief files would be written on next synthesis.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_watchmen_synthesize',\n description: 'Run watchmen synthesis immediately using the local model (requires watchmenSynthesisMode: \"local\"). Processes pending observations into a workspace brief.',\n inputSchema: {\n type: 'object',\n properties: {\n force: { type: 'boolean', description: 'Run even if below threshold (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_watchmen_reset',\n description: 'Reset the watchmen synthesis counter by storing a summary observation, without running full synthesis.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Affected tests \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\u2500\u2500\u2500\u2500\u2500\n {\n name: 'kirograph_affected',\n description: 'Find test files affected by a set of changed source files, by traversing the dependency graph.',\n inputSchema: {\n type: 'object',\n properties: {\n files: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of changed source file paths (relative to project root)',\n },\n depth: { type: 'number', description: 'Max dependency traversal depth (default: 5)', default: 5 },\n testPattern: { type: 'string', description: 'Custom glob to identify test files (optional)' },\n projectPath: { type: 'string' },\n },\n required: ['files'],\n },\n },\n // \u2500\u2500 Security tools (require enableSecurity=true) \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 {\n name: 'kirograph_security',\n description: 'Security overview: vuln counts, verdicts, stale data warnings.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_vulns',\n description: 'List vulns with reachability verdicts, severity, affected components.',\n inputSchema: {\n type: 'object',\n properties: {\n severity: { type: 'string', description: 'Filter by severity level', enum: ['critical', 'high', 'medium', 'low'] },\n verdict: { type: 'string', description: 'Filter by reachability verdict', enum: ['affected', 'not_affected', 'under_investigation'] },\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n refresh: { type: 'boolean', description: 'Trigger fresh vulnerability enrichment before listing (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_vuln_add',\n description: 'Manually register a CVE against a dependency.',\n inputSchema: {\n type: 'object',\n properties: {\n cveId: { type: 'string', description: 'CVE identifier (e.g., \"CVE-2023-12345\")' },\n package: { type: 'string', description: 'Package name to associate the CVE with' },\n severity: { type: 'number', description: 'CVSS v3.1 base score (optional)' },\n summary: { type: 'string', description: 'Vulnerability summary (optional)' },\n fixedVersion: { type: 'string', description: 'Version that fixes the vulnerability (optional)' },\n projectPath: { type: 'string' },\n },\n required: ['cveId', 'package'],\n },\n },\n {\n name: 'kirograph_vuln_suppress',\n description: 'Suppress a CVE from vulnerability reports.',\n inputSchema: {\n type: 'object',\n properties: {\n cveId: { type: 'string', description: 'CVE identifier to suppress (e.g., \"CVE-2024-1234\")' },\n reason: { type: 'string', description: 'Reason for suppression (optional)' },\n expires: { type: 'string', description: 'Expiry date in ISO format after which the suppression is removed (e.g. \"2026-12-31\", optional)' },\n projectPath: { type: 'string' },\n },\n required: ['cveId'],\n },\n },\n {\n name: 'kirograph_sbom',\n description: 'Generate CycloneDX 1.5 SBOM JSON for the project.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_vex',\n description: 'Generate CycloneDX 1.5 VEX JSON with reachability verdicts.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_reachability',\n description: 'Check reachability for a dependency or CVE.',\n inputSchema: {\n type: 'object',\n properties: {\n target: { type: 'string', description: 'Dependency name or CVE ID to check reachability for' },\n projectPath: { type: 'string' },\n },\n required: ['target'],\n },\n },\n {\n name: 'kirograph_staleness',\n description: 'Check dependency freshness against latest published versions.',\n inputSchema: {\n type: 'object',\n properties: {\n threshold: { type: 'number', description: 'Only return packages with staleness_score >= threshold (default: 0.3)', default: 0.3 },\n refresh: { type: 'boolean', description: 'Fetch latest version info from registries before listing (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_licenses',\n description: 'Show licenses and check against configured deny/warn policy.',\n inputSchema: {\n type: 'object',\n properties: {\n policy: { type: 'boolean', description: 'Return only policy violations (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_attack_surface',\n description: 'Map HTTP routes to vulnerable deps with hop count and auth status.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max routes to return (default: 20)', default: 20 },\n publicOnly: { type: 'boolean', description: 'Only return public/unauthenticated routes', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_secrets',\n description: 'Scan for hardcoded secrets with call-graph blast radius.',\n inputSchema: {\n type: 'object',\n properties: {\n includeTests: { type: 'boolean', description: 'Include test files in scan', default: false },\n severity: { type: 'string', description: 'Filter by severity: critical, high, medium, low', enum: ['critical', 'high', 'medium', 'low'] },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_security_flows',\n description: 'SAST-lite: detect SQL injection, eval, deserialize, path, crypto flows.',\n inputSchema: {\n type: 'object',\n properties: {\n type: { type: 'string', description: 'Filter by type: sql, eval, deserialize, path, crypto, all', default: 'all' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_supply_chain',\n description: 'OpenSSF Scorecard scores, maintainer count, abandoned package detection.',\n inputSchema: {\n type: 'object',\n properties: {\n threshold: { type: 'string', description: 'Minimum risk level: critical, high, medium', enum: ['critical', 'high', 'medium'] },\n refresh: { type: 'boolean', description: 'Re-fetch from APIs', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dep_confusion',\n description: 'Detect dependency confusion: internal names in public registries.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_remediation',\n description: 'Remediation SLA tracking: overdue vulns by severity thresholds.',\n inputSchema: {\n type: 'object',\n properties: {\n overdueOnly: { type: 'boolean', description: 'Show only overdue items', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Phase 3 complexity tools \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 {\n name: 'kirograph_health',\n description: 'Composite graph health score (0\u201310000) across complexity, dead code, coupling, and circular dependencies. Higher is better.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dsm',\n description: 'Design Structure Matrix \u2014 dependency counts between top-level modules. Reveals architectural coupling and layering violations.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max module groups to include (default 15)', default: 15 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_test_risk',\n description: 'Risk-ranked list of functions: complexity \u00D7 fan-in. Highest-risk functions are most likely to break when changed.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default 20)', default: 20 },\n threshold: { type: 'number', description: 'Min risk score to include (default 0)', default: 0 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Phase 3 git context tools \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 {\n name: 'kirograph_test_coverage',\n description: 'Parse lcov/Istanbul/Cobertura coverage files and show per-file coverage percentage. Sorted worst-first by default.',\n inputSchema: {\n type: 'object',\n properties: {\n sortBy: { type: 'string', description: 'Sort order: asc (worst first) or desc (best first)', enum: ['asc', 'desc'], default: 'asc' },\n limit: { type: 'number', description: 'Max results (default 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Phase 4 branch tools \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 {\n name: 'kirograph_branch_list',\n description: 'List tracked branches with their DB sizes and last sync times.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_branch_diff',\n description: 'Symbols added, removed, or changed between two tracked branches.',\n inputSchema: {\n type: 'object',\n required: ['branchA'],\n properties: {\n branchA: { type: 'string', description: 'First branch name (required)' },\n branchB: { type: 'string', description: 'Second branch name (default: main)', default: 'main' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_branch_search',\n description: 'Search for symbols in a specific tracked branch graph.',\n inputSchema: {\n type: 'object',\n required: ['query', 'branch'],\n properties: {\n query: { type: 'string', description: 'Search query (symbol name, partial match)' },\n branch: { type: 'string', description: 'Branch name to search in' },\n limit: { type: 'number', description: 'Max results (default 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Pattern tools (require enablePatterns=true) \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 {\n name: 'kirograph_pattern_coverage',\n description: 'OWASP Top 10 coverage report: categories covered and match counts.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_pattern_save_baseline',\n description: 'Save current pattern match counts as a baseline.',\n inputSchema: {\n type: 'object',\n properties: {\n label: { type: 'string', description: 'Baseline label (default: \"default\")', default: 'default' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_pattern_diff',\n description: 'Diff pattern matches against a saved baseline.',\n inputSchema: {\n type: 'object',\n properties: {\n label: { type: 'string', description: 'Baseline label (default: \"default\")', default: 'default' },\n projectPath: { type: 'string' },\n },\n },\n },\n];\n\n/**\n * Dynamic tool definition for kirograph_live_search.\n * NOT included in the static `tools` array \u2014 injected into tools/list at runtime\n * only when config.enablePatterns === true AND @ast-grep/napi is available.\n * NOT added to KIROGRAPH_TOOL_NAMES (which is a static list for Kiro autoApprove).\n */\nexport const LIVE_SEARCH_TOOL_DEFINITION: ToolDefinition = {\n name: 'kirograph_live_search',\n description:\n 'Run a live AST pattern search against the indexed file list using @ast-grep/napi. Finds structural code patterns (SQL injection, eval, path traversal, etc.) without needing the codebase to be re-indexed. Only available when enablePatterns: true.',\n inputSchema: {\n type: 'object' as const,\n required: ['pattern', 'language'],\n properties: {\n pattern: { type: 'string', description: 'ast-grep inline pattern (e.g. \"eval($X)\")' },\n language: { type: 'string', description: 'Language to search: javascript, typescript, python, go, rust, java, etc.' },\n limit: { type: 'number', description: 'Max results (default 20, max 100)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n};\n"],
4
+ "sourcesContent": ["/**\n * KiroGraph MCP Tool Definitions\n * Handler logic has been moved to src/mcp/handler.ts and src/mcp/handlers/*.ts\n */\n\nexport { KIROGRAPH_TOOL_NAMES } from './tool-names';\nexport { ToolHandler } from './handler';\n\nexport interface ToolDefinition {\n name: string;\n description: string;\n inputSchema: {\n type: 'object';\n properties: Record<string, { type: string; description?: string; enum?: string[]; default?: unknown; items?: unknown; properties?: unknown }>;\n required?: string[];\n };\n annotations?: Record<string, unknown>;\n}\n\nexport const tools: ToolDefinition[] = [\n {\n name: 'kirograph_search',\n description: 'Quick symbol search by name. Returns locations only (no code). Use kirograph_context for comprehensive task context.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Symbol name or partial name (e.g., \"auth\", \"signIn\", \"UserService\")' },\n mode: {\n type: 'string',\n description: 'Search mode: \"name\" (default, FTS prefix match) or \"similar\" (fuzzy substring match, broader results)',\n enum: ['name', 'similar'],\n default: 'name',\n },\n kind: {\n type: 'string',\n description: 'Filter by node kind',\n enum: ['function', 'method', 'class', 'interface', 'type_alias', 'variable', 'route', 'component'],\n },\n limit: { type: 'number', description: 'Max results 1-100 (default: 10)', default: 10 },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_context',\n description: 'Build comprehensive context for a task or feature request.',\n inputSchema: {\n type: 'object',\n properties: {\n task: { type: 'string', description: 'Task description or feature name' },\n maxNodes: { type: 'number', description: 'Max symbols to include', default: 20 },\n includeCode: { type: 'boolean', description: 'Include code snippets. Deprecated \u2014 prefer detail.', default: true },\n detail: {\n type: 'string',\n description: 'Code verbosity: full, signatures, or summary',\n enum: ['full', 'signatures', 'summary'],\n default: 'full',\n },\n projectPath: { type: 'string' },\n },\n required: ['task'],\n },\n },\n {\n name: 'kirograph_callers',\n description: 'Find all functions/methods that call a specific symbol.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find callers for' },\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_callees',\n description: 'Find all functions/methods that a specific symbol calls.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find callees for' },\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_impact',\n description: 'Analyze what code would be affected by changing a symbol.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to analyze impact for' },\n depth: { type: 'number', description: 'Traversal depth (default: 2)', default: 2 },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_node',\n description: 'Get details about a specific symbol.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name or fully-qualified name to look up' },\n qualified: { type: 'boolean', description: 'When true, treat symbol as a fully-qualified name (exact match, bypasses FTS \u2014 use when you have the exact qualifiedName from a previous result)', default: false },\n includeCode: { type: 'boolean', description: 'Include full source code. Deprecated \u2014 prefer detail.', default: false },\n detail: {\n type: 'string',\n description: 'Output level: summary, signatures, or full',\n enum: ['summary', 'signatures', 'full'],\n default: 'summary',\n },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_status',\n description: 'Check index health and statistics.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_files',\n description: 'List indexed file structure with optional filtering.',\n inputSchema: {\n type: 'object',\n properties: {\n filterPath: { type: 'string', description: 'Filter by directory path prefix (e.g., \"src/\")' },\n pattern: { type: 'string', description: 'Filter by glob pattern (e.g., \"**/*.ts\")' },\n maxDepth: { type: 'number', description: 'Max directory depth to traverse' },\n format: {\n type: 'string',\n description: 'Output format: \"tree\" (default, visual tree), \"flat\" (one path per line), \"grouped\" (grouped by directory), \"compact\" (rtk-style summary with counts)',\n enum: ['tree', 'flat', 'grouped', 'compact'],\n default: 'tree',\n },\n includeMetadata: { type: 'boolean', description: 'Include language and symbol count', default: true },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dead_code',\n description: 'Find symbols with no incoming references (potential dead code). Only includes unexported symbols.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results 1-100 (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_circular_deps',\n description: 'Find circular import dependencies in the codebase.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_path',\n description: 'Find the shortest path between two symbols in the graph.',\n inputSchema: {\n type: 'object',\n properties: {\n from: { type: 'string', description: 'Source symbol name' },\n to: { type: 'string', description: 'Target symbol name' },\n projectPath: { type: 'string' },\n },\n required: ['from', 'to'],\n },\n },\n {\n name: 'kirograph_architecture',\n description: 'Show high-level architecture: packages, layers, dependencies.',\n inputSchema: {\n type: 'object',\n properties: {\n level: {\n type: 'string',\n description: 'packages, layers, or both',\n enum: ['packages', 'layers', 'both'],\n default: 'both',\n },\n includeFiles: { type: 'boolean', description: 'Include per-file package/layer assignments', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_coupling',\n description: 'Package coupling metrics: Ca, Ce, and instability (Ce/(Ca+Ce)).',\n inputSchema: {\n type: 'object',\n properties: {\n sortBy: {\n type: 'string',\n description: 'Sort by instability, ca, ce, or name',\n enum: ['instability', 'afferent', 'efferent'],\n default: 'instability',\n },\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_package',\n description: 'Drill into a package: files, exports, and dependencies.',\n inputSchema: {\n type: 'object',\n properties: {\n package: { type: 'string', description: 'Package name or path (partial match accepted)' },\n includeFiles: { type: 'boolean', description: 'List files in the package (default: true)', default: true },\n projectPath: { type: 'string' },\n },\n required: ['package'],\n },\n },\n {\n name: 'kirograph_manifest',\n description: 'Workspace manifest summary: list all packages across ecosystems with versions, external dep counts, and license. Pass package= to drill into one package. Pass ecosystem= to filter (npm, cargo, go, python, maven, gradle, csproj). Pass showDrift=true to surface packages that appear in multiple manifest files with differing versions.',\n inputSchema: {\n type: 'object',\n properties: {\n package: { type: 'string', description: 'Package name or path for a focused view (partial match accepted)' },\n ecosystem: { type: 'string', description: 'Filter by ecosystem / language (e.g. \"npm\", \"cargo\", \"go\", \"python\")' },\n showDrift: { type: 'boolean', description: 'Highlight packages declared in multiple manifests with different versions (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_hotspots',\n description: 'Find the most-connected symbols in the codebase by total edge degree (incoming + outgoing). Useful for identifying load-bearing code, core abstractions, or blast-radius hot zones.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_surprising',\n description: 'Find non-obvious cross-file connections: direct edges between symbols in structurally distant parts of the codebase. High-score pairs indicate unexpected coupling worth investigating.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results 1-100 (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_diff',\n description: 'Compare current graph against a saved snapshot.',\n inputSchema: {\n type: 'object',\n properties: {\n snapshot: { type: 'string', description: 'Snapshot label; omit for latest' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_snapshot_save',\n description: 'Save a snapshot of the current graph state. Snapshots can be compared with kirograph_diff to track structural changes over time.',\n inputSchema: {\n type: 'object',\n properties: {\n label: { type: 'string', description: 'Label for the snapshot (default: timestamp-based label)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_snapshot_list',\n description: 'List all saved graph snapshots with their labels, timestamps, and symbol/edge counts.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_type_hierarchy',\n description: 'Traverse base and derived types of a class or interface.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Class or interface name' },\n direction: {\n type: 'string',\n description: 'up=base, down=derived, both=all',\n enum: ['up', 'down', 'both'],\n default: 'both',\n },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_module_api',\n description: 'List all exported symbols in a file or directory \u2014 the public API surface.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'File path (e.g. \"src/auth/service.ts\") or directory prefix (e.g. \"src/auth/\"). Omit for the whole project.' },\n limit: { type: 'number', description: 'Max results (default: 100)', default: 100 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_rename_preview',\n description: 'Show every reference site for a symbol \u2014 blast-radius preview before a rename.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find all references for' },\n projectPath: { type: 'string' },\n },\n required: ['symbol'],\n },\n },\n {\n name: 'kirograph_doc_coverage',\n description: 'Find exported symbols that are missing docstrings.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_god_class',\n description: 'List classes ranked by member count to identify god classes.',\n inputSchema: {\n type: 'object',\n properties: {\n threshold: { type: 'number', description: 'Member count threshold for flagging (default: 10)', default: 10 },\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_inheritance_depth',\n description: 'Show the deepest inheritance chains (BFS on extends/implements edges).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_recursion',\n description: 'Find recursive and mutually-recursive functions (SCC on call edges).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_largest',\n description: 'List symbols ranked by lines of code (end_line \u2212 start_line).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_rank',\n description: 'Rank symbols by fan-in (callers) or fan-out (callees) edge count.',\n inputSchema: {\n type: 'object',\n properties: {\n by: { type: 'string', description: 'Ranking dimension: \"fan-in\" (default) or \"fan-out\"', enum: ['fan-in', 'fan-out'], default: 'fan-in' },\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_distribution',\n description: 'Symbol-kind breakdown (function, class, method\u2026) for a file, directory, or the whole project.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'Directory or file path prefix to scope. Omit for whole project.' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_annotations',\n description: 'Decorator/annotation histogram for the whole project, or list of symbols using a specific decorator.',\n inputSchema: {\n type: 'object',\n properties: {\n decorator: { type: 'string', description: 'Decorator name to filter (e.g. \"Injectable\"). Omit for full histogram.' },\n limit: { type: 'number', description: 'Max results (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_session_start',\n description: 'Save the current graph metrics as a session baseline.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_session_end',\n description: 'Diff current graph metrics against the session baseline and report per-dimension deltas.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_unused_imports',\n description: 'Find import nodes with zero resolved downstream edges (i.e. nothing in the codebase references the imported symbol).',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 50)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_gini',\n description: 'Compute the Gini inequality coefficient for a size metric (loc, fan-in, or fan-out) across all function/method nodes. Returns the coefficient plus top/bottom 5.',\n inputSchema: {\n type: 'object',\n properties: {\n metric: {\n type: 'string',\n description: 'Metric to measure: \"loc\" (lines of code), \"fan-in\" (incoming calls), \"fan-out\" (outgoing calls)',\n enum: ['loc', 'fan-in', 'fan-out'],\n default: 'loc',\n },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dependency_depth',\n description: 'Run a Kahn topological sort on the file import graph and report each file\\'s longest path from a root (depth). Useful for spotting deeply layered dependency chains.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max files to show sorted by depth DESC (default: 20)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_exec',\n description: 'Run a shell command with token-optimized, noise-filtered output.',\n inputSchema: {\n type: 'object',\n properties: {\n command: { type: 'string', description: 'Shell command to execute' },\n cwd: { type: 'string', description: 'Working directory' },\n level: {\n type: 'string',\n description: 'Compression level: \"normal\" (balanced), \"aggressive\" (more compact), \"ultra\" (maximum compression)',\n enum: ['normal', 'aggressive', 'ultra'],\n default: 'normal',\n },\n timeout: { type: 'number', description: 'Timeout in seconds', default: 60 },\n projectPath: { type: 'string' },\n },\n required: ['command'],\n },\n },\n {\n name: 'kirograph_gain',\n description: 'Show token savings from graph tools and shell compression.',\n inputSchema: {\n type: 'object',\n properties: {\n period: {\n type: 'string',\n description: 'Time window: session, hour, day, week, all',\n enum: ['session', 'today', 'week', 'all'],\n default: 'session',\n },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_read',\n description: 'Read a file with caching; unchanged files return cache marker.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'File path to read (absolute or relative to project root)' },\n mode: {\n type: 'string',\n description: 'Read mode: \"full\" (default), \"map\" (structure overview), \"signatures\" (function signatures), \"diff\" (changes since last read), \"lines\" (line range), \"imports\", \"exports\"',\n enum: ['full', 'map', 'signatures', 'diff', 'lines', 'imports', 'exports'],\n default: 'full',\n },\n start: { type: 'number', description: 'Start line (for lines mode)' },\n end: { type: 'number', description: 'End line (for lines mode)' },\n noCache: { type: 'boolean', description: 'Force fresh read, bypass cache', default: false },\n projectPath: { type: 'string' },\n },\n required: ['path'],\n },\n },\n {\n name: 'kirograph_retrieve',\n description: 'Retrieve cached file content by path (CCR \u2014 Cached Content Retrieval). Returns the full content stored in the session cache, or reads and caches the file if not yet seen. Use after kirograph_read returns a \"[cached: file unchanged]\" marker to get the actual content without a redundant filesystem read.',\n inputSchema: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'File path to retrieve (absolute or relative to project root)' },\n projectPath: { type: 'string' },\n },\n required: ['path'],\n },\n },\n {\n name: 'kirograph_compress',\n description: 'Compress text via rtk shell filters or caveman grammar engine.',\n inputSchema: {\n type: 'object',\n properties: {\n text: { type: 'string', description: 'Text to compress' },\n command: { type: 'string', description: 'Shell command text came from (selects rtk engine)' },\n level: {\n type: 'string',\n description: 'Compression intensity: \"lite\" / \"normal\" (light), \"full\" / \"aggressive\" (default), \"ultra\" (maximum)',\n enum: ['lite', 'normal', 'full', 'aggressive', 'ultra'],\n default: 'full',\n },\n },\n required: ['text'],\n },\n },\n {\n name: 'kirograph_budget',\n description: 'Show session context budget: tokens used, remaining, utilization.',\n inputSchema: {\n type: 'object',\n properties: {\n reset: { type: 'boolean', description: 'Reset session budget counters', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_flows',\n description: 'Trace execution flows from entry points through the call graph.',\n inputSchema: {\n type: 'object',\n properties: {\n entryPoint: { type: 'string', description: 'Symbol to trace; omit to auto-detect' },\n maxFlows: { type: 'number', description: 'Max number of flows to return (default 10)' },\n maxDepth: { type: 'number', description: 'Max call chain depth (default 10)' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_communities',\n description: 'Detect clusters of related symbols via graph community detection.',\n inputSchema: {\n type: 'object',\n properties: {\n resolution: { type: 'number', description: 'Granularity 0.1\u20132.0; higher=more smaller clusters' },\n limit: { type: 'number', description: 'Max communities to return (default 15)' },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Complexity tools (require enableComplexity=true) \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 {\n name: 'kirograph_complexity',\n description: 'Rank symbols by cyclomatic complexity, cognitive complexity, or maintainability index. Requires enableComplexity: true and a re-index.',\n inputSchema: {\n type: 'object',\n properties: {\n metric: { type: 'string', description: 'Ranking metric: \"cyclomatic\" (default), \"cognitive\", or \"maintainability\"', enum: ['cyclomatic', 'cognitive', 'maintainability'], default: 'cyclomatic' },\n threshold: { type: 'number', description: 'Flag symbols above (CC/cog) or below (MI) this threshold' },\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_simplify_scan',\n description: 'Find functions/methods that exceed complexity, size, or maintainability thresholds \u2014 simplification candidates.',\n inputSchema: {\n type: 'object',\n properties: {\n thresholdCC: { type: 'number', description: 'Cyclomatic complexity threshold (default: 10)', default: 10 },\n thresholdMI: { type: 'number', description: 'Maintainability index lower bound \u2014 flag below this (default: 50)', default: 50 },\n thresholdLOC: { type: 'number', description: 'Lines of code threshold (default: 50)', default: 50 },\n limit: { type: 'number', description: 'Max results (default: 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Git context tools (require enableGitContext=true) \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 {\n name: 'kirograph_diff_context',\n description: 'Identify symbols changed in the working tree (or staged), with their callers and callees for immediate blast-radius context.',\n inputSchema: {\n type: 'object',\n properties: {\n staged: { type: 'boolean', description: 'If true, show staged changes (git diff --cached) instead of unstaged', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_commit_context',\n description: 'Structured summary of staged changes \u2014 affected symbols, diff stat, staged files. Use to craft precise commit messages.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_pr_context',\n description: 'Semantic diff between two git refs \u2014 changed symbols with callers/callees. Use to write PR descriptions.',\n inputSchema: {\n type: 'object',\n properties: {\n base: { type: 'string', description: 'Base ref (branch name, tag, or commit hash)' },\n head: { type: 'string', description: 'Head ref (default: HEAD)', default: 'HEAD' },\n projectPath: { type: 'string' },\n },\n required: ['base'],\n },\n },\n {\n name: 'kirograph_changelog',\n description: 'Human-readable semantic changelog between two git refs: commit log + affected symbols.',\n inputSchema: {\n type: 'object',\n properties: {\n ref1: { type: 'string', description: 'Start ref (older)' },\n ref2: { type: 'string', description: 'End ref (default: HEAD)', default: 'HEAD' },\n projectPath: { type: 'string' },\n },\n required: ['ref1'],\n },\n },\n {\n name: 'kirograph_test_map',\n description: 'Find test files covering a symbol, or list exported symbols with no test coverage.',\n inputSchema: {\n type: 'object',\n properties: {\n symbol: { type: 'string', description: 'Symbol name to find tests for. Omit to list all uncovered exported symbols.' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_refactor',\n description: 'Rename preview (all references) or function summarization.',\n inputSchema: {\n type: 'object',\n properties: {\n mode: { type: 'string', description: 'rename=preview references, summarize=summary', enum: ['rename', 'suggest'] },\n symbol: { type: 'string', description: 'Symbol name (required for rename mode)' },\n limit: { type: 'number', description: 'Max results (default 10)' },\n projectPath: { type: 'string' },\n },\n required: ['mode'],\n },\n },\n // \u2500\u2500 Edit primitives (require enableEditPrimitives=true) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n {\n name: 'kirograph_str_replace',\n description: 'Replace a unique string anchor in a file; fails if the anchor appears 0 or >1 times.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n old_str: { type: 'string', description: 'Exact string to find (must be unique in the file)' },\n new_str: { type: 'string', description: 'Replacement string' },\n projectPath: { type: 'string' },\n },\n required: ['file', 'old_str', 'new_str'],\n },\n },\n {\n name: 'kirograph_multi_str_replace',\n description: 'Apply N replacements as an all-or-nothing transaction; aborts if any anchor is ambiguous or missing.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n pairs: {\n type: 'array',\n description: 'Array of {old_str, new_str} replacement pairs applied in order',\n items: {\n type: 'object',\n properties: {\n old_str: { type: 'string', description: 'Exact string to find (must be unique)' },\n new_str: { type: 'string', description: 'Replacement string' },\n },\n },\n },\n projectPath: { type: 'string' },\n },\n required: ['file', 'pairs'],\n },\n },\n {\n name: 'kirograph_insert_at',\n description: 'Insert content before or after a unique anchor string or line number.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n anchor: { type: 'string', description: 'Unique string anchor to insert relative to (mutually exclusive with line)' },\n line: { type: 'number', description: '1-based line number to insert relative to (mutually exclusive with anchor)' },\n content: { type: 'string', description: 'Content to insert (include newline if needed)' },\n position: { type: 'string', description: '\"before\" or \"after\" the anchor/line (default: \"after\")', enum: ['before', 'after'], default: 'after' },\n projectPath: { type: 'string' },\n },\n required: ['file', 'content'],\n },\n },\n {\n name: 'kirograph_ast_grep_rewrite',\n description: 'Structural AST rewrite via ast-grep. Skipped if ast-grep is not installed.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'File path relative to project root' },\n pattern: { type: 'string', description: 'ast-grep pattern to match' },\n rewrite: { type: 'string', description: 'ast-grep rewrite template' },\n projectPath: { type: 'string' },\n },\n required: ['file', 'pattern', 'rewrite'],\n },\n },\n // \u2500\u2500 Memory tools (require enableMemory=true) \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 {\n name: 'kirograph_mem_search',\n description: 'Search project memory for decisions, errors, patterns, context.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Natural language search query' },\n kind: {\n type: 'string',\n description: 'Filter by observation kind',\n enum: ['decision', 'error', 'pattern', 'architecture', 'summary', 'note'],\n },\n limit: { type: 'number', description: 'Max results (default: 10)', default: 10 },\n sessionId: { type: 'string', description: 'Filter to specific session' },\n asOf: { type: 'number', description: 'Query facts valid at this timestamp (epoch ms). Filters out expired/superseded observations.' },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_mem_store',\n description: 'Store an observation in project memory.',\n inputSchema: {\n type: 'object',\n properties: {\n content: { type: 'string', description: 'Observation text' },\n kind: {\n type: 'string',\n description: 'Observation kind',\n enum: ['decision', 'error', 'pattern', 'architecture', 'summary', 'note'],\n default: 'note',\n },\n projectPath: { type: 'string' },\n topicKey: { type: 'string', description: \"Stable semantic key for this observation (e.g. 'architecture/auth-model'). Enables addressing by concept.\" },\n reviewAfter: { type: 'number', description: 'ISO date to flag for review' },\n },\n required: ['content'],\n },\n },\n {\n name: 'kirograph_mem_timeline',\n description: 'List recent sessions and their observations chronologically.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Number of sessions to show', default: 5 },\n sessionId: { type: 'string', description: 'Show observations for a specific session' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_status',\n description: 'Memory subsystem health: sessions, observations, embeddings, size.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Engram-parity mem tools \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 {\n name: 'kirograph_mem_review',\n description: 'List observations past their review_after date.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_mark_reviewed',\n description: 'Clear review_after date on an observation.',\n inputSchema: {\n type: 'object',\n properties: {\n id: { type: 'string', description: 'Observation ID' },\n projectPath: { type: 'string' },\n },\n required: ['id'],\n },\n },\n {\n name: 'kirograph_mem_compare',\n description: 'Establish a typed relation between two observations (supersedes, conflicts_with, compatible, scoped, related, not_conflict). Accepts observation IDs or topic_key values.',\n inputSchema: {\n type: 'object',\n properties: {\n observationA: { type: 'string', description: 'First observation ID or topic_key' },\n observationB: { type: 'string', description: 'Second observation ID or topic_key' },\n relation: { type: 'string', enum: ['supersedes', 'conflicts_with', 'compatible', 'scoped', 'related', 'not_conflict'], description: 'Relation type' },\n confidence: { type: 'number', description: 'Confidence 0.0\u20131.0 (default: 1.0)' },\n reason: { type: 'string', description: 'Explanation of the relation' },\n evidence: { type: 'string', description: 'Supporting evidence text' },\n projectPath: { type: 'string' },\n },\n required: ['observationA', 'observationB', 'relation'],\n },\n },\n {\n name: 'kirograph_mem_judge',\n description: 'Finalize a pending conflict relation \u2014 confirm, revise, or dismiss it.',\n inputSchema: {\n type: 'object',\n properties: {\n relationId: { type: 'string', description: 'Relation ID (from kirograph_mem_compare or kirograph_mem_search)' },\n relation: { type: 'string', enum: ['supersedes', 'conflicts_with', 'compatible', 'scoped', 'related', 'not_conflict'], description: 'Final relation type' },\n confidence: { type: 'number', description: 'Final confidence 0.0\u20131.0' },\n reason: { type: 'string', description: 'Reasoning' },\n evidence: { type: 'string', description: 'Supporting evidence' },\n projectPath: { type: 'string' },\n },\n required: ['relationId', 'relation', 'confidence'],\n },\n },\n {\n name: 'kirograph_mem_capture',\n description: 'Extract and store structured learnings from freeform text.',\n inputSchema: {\n type: 'object',\n properties: {\n content: { type: 'string', description: 'Text block with structured sections' },\n projectPath: { type: 'string' },\n },\n required: ['content'],\n },\n },\n {\n name: 'kirograph_mem_save_prompt',\n description: 'Save the current user prompt to session memory.',\n inputSchema: {\n type: 'object',\n properties: {\n content: { type: 'string', description: 'The user prompt text to save' },\n projectPath: { type: 'string' },\n },\n required: ['content'],\n },\n },\n {\n name: 'kirograph_mem_suggest_topic_key',\n description: 'Suggest a stable topic_key slug for an observation.',\n inputSchema: {\n type: 'object',\n properties: {\n kind: { type: 'string', enum: ['decision', 'error', 'pattern', 'architecture', 'summary', 'note'], description: 'Observation kind' },\n title: { type: 'string', description: 'Short description of the observation' },\n projectPath: { type: 'string' },\n },\n required: ['kind', 'title'],\n },\n },\n {\n name: 'kirograph_mem_conflicts_scan',\n description: 'Scan recent observations for potential conflicts using FTS.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max observations to scan (default: 50)', default: 50 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_prune',\n description: 'Remove memory observations older than a given duration.',\n inputSchema: {\n type: 'object',\n properties: {\n olderThan: { type: 'string', description: 'Duration threshold e.g. \"90d\" or \"6m\"', default: '90d' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_lint',\n description: 'Health check: stale links, model mismatch, orphaned sessions.',\n inputSchema: {\n type: 'object',\n properties: {\n fix: { type: 'boolean', description: 'Auto-remove stale links', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_conflicts_list',\n description: 'List pending conflict relations needing resolution.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_mem_conflicts_ignore',\n description: 'Dismiss a pending conflict relation as not relevant.',\n inputSchema: {\n type: 'object',\n properties: {\n relationId: { type: 'string', description: 'Relation ID to ignore (from kirograph_mem_conflicts_list)' },\n projectPath: { type: 'string' },\n },\n required: ['relationId'],\n },\n },\n // \u2500\u2500 Wiki tools (require enableWiki=true) \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 {\n name: 'kirograph_wiki_ingest',\n description: 'Build ingest prompt for LLM to produce a WIKI_DIFF.',\n inputSchema: {\n type: 'object',\n properties: {\n source: { type: 'string', description: 'Source content to ingest (markdown, notes, ADR text, etc.)' },\n sourceName: { type: 'string', description: 'Name or path of the source', default: 'source' },\n projectPath: { type: 'string' },\n },\n required: ['source'],\n },\n },\n {\n name: 'kirograph_wiki_apply_diff',\n description: 'Apply a WIKI_DIFF to the wiki filesystem and SQLite index.',\n inputSchema: {\n type: 'object',\n properties: {\n diff: { type: 'string', description: 'WIKI_DIFF string with WIKI_DIFF_START/END blocks' },\n projectPath: { type: 'string' },\n },\n required: ['diff'],\n },\n },\n {\n name: 'kirograph_wiki_search',\n description: 'FTS over wiki pages; returns slugs, titles, previews.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Search query' },\n limit: { type: 'number', description: 'Max results (default: 5)', default: 5 },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_wiki_page',\n description: 'Retrieve full markdown of a wiki page by slug.',\n inputSchema: {\n type: 'object',\n properties: {\n slug: { type: 'string', description: 'Page slug (e.g. \"arch/auth-model\")' },\n projectPath: { type: 'string' },\n },\n required: ['slug'],\n },\n },\n {\n name: 'kirograph_wiki_lint',\n description: 'Check wiki for broken links, orphans, stale sources, contradictions.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_list',\n description: 'List all wiki pages with slug, title, source count, date.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_synthesize',\n description: 'Run local-model wiki synthesis: process the pending source queue (requires wikiSynthesisMode: \"local\").',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_init',\n description: 'Initialize the wiki: create SCHEMA.md and MANIFEST.md in .kirograph/wiki/.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_reindex',\n description: 'Rebuild the SQLite index from .kirograph/wiki/*.md files on disk.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_wiki_status',\n description: 'Show wiki subsystem stats: page count, total sources, oldest/newest page dates.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Docs tools (require enableDocs=true) \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 {\n name: 'kirograph_docs_toc',\n description: 'Get TOC for a doc file or whole project (IDs, titles, levels, summaries).',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'Filter to a specific doc file (relative path). Omit for project-wide TOC.' },\n tree: { type: 'boolean', description: 'Return nested tree structure.', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_docs_search',\n description: 'Search documentation sections by query, ranked by relevance.',\n inputSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Search query (natural language or keywords)' },\n file: { type: 'string', description: 'Limit search to a specific doc file.' },\n limit: { type: 'number', description: 'Max results (default: 10)', default: 10 },\n projectPath: { type: 'string' },\n },\n required: ['query'],\n },\n },\n {\n name: 'kirograph_docs_section',\n description: 'Retrieve full content of a doc section by its stable ID.',\n inputSchema: {\n type: 'object',\n properties: {\n id: { type: 'string', description: 'Section ID.' },\n context: { type: 'boolean', description: 'Include ancestor headings and child summaries.', default: false },\n projectPath: { type: 'string' },\n },\n required: ['id'],\n },\n },\n {\n name: 'kirograph_docs_outline',\n description: 'Get heading hierarchy for a single documentation file.',\n inputSchema: {\n type: 'object',\n properties: {\n file: { type: 'string', description: 'Documentation file path (relative to project root).' },\n projectPath: { type: 'string' },\n },\n required: ['file'],\n },\n },\n {\n name: 'kirograph_docs_refs',\n description: 'Bidirectional lookup: doc section\u2194code symbol references.',\n inputSchema: {\n type: 'object',\n properties: {\n sectionId: { type: 'string', description: 'Doc section ID to find referenced symbols.' },\n nodeId: { type: 'string', description: 'Code symbol ID to find referencing doc sections.' },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Data tools (require enableData=true) \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 {\n name: 'kirograph_data_list',\n description: 'List all indexed datasets with row/column counts and file sizes.',\n inputSchema: { type: 'object', properties: { projectPath: { type: 'string' } } },\n },\n {\n name: 'kirograph_data_describe',\n description: 'Full schema profile: types, cardinality, null%, sample values.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID (from kirograph_data_list)' },\n column: { type: 'string', description: 'Deep-dive on a single column.' },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_query',\n description: 'Filtered row retrieval with structured operators (max 500 rows).',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n filters: { type: 'array', description: 'Array of {column, op, value} filters. Ops: eq, neq, gt, gte, lt, lte, contains, in, is_null, between' },\n columns: { type: 'array', description: 'Column projection (only return these columns)' },\n limit: { type: 'number', description: 'Max rows (default: 100, hard cap: 500)', default: 100 },\n offset: { type: 'number', description: 'Pagination offset', default: 0 },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_aggregate',\n description: 'Server-side GROUP BY aggregation: count, sum, avg, min, max.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n groupBy: { type: 'array', description: 'Columns to group by' },\n metrics: { type: 'array', description: 'Array of {column, op} metrics. Ops: count, sum, avg, min, max, count_distinct' },\n filters: { type: 'array', description: 'Optional pre-filters (same format as kirograph_data_query)' },\n projectPath: { type: 'string' },\n },\n required: ['dataset', 'groupBy', 'metrics'],\n },\n },\n {\n name: 'kirograph_data_search',\n description: 'Search column names and sample values by keyword.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n query: { type: 'string', description: 'Search keyword' },\n projectPath: { type: 'string' },\n },\n required: ['dataset', 'query'],\n },\n },\n {\n name: 'kirograph_data_join',\n description: 'SQL JOIN across two indexed datasets.',\n inputSchema: {\n type: 'object',\n properties: {\n left: { type: 'string', description: 'Left dataset ID' },\n right: { type: 'string', description: 'Right dataset ID' },\n leftColumn: { type: 'string', description: 'Join column from left dataset' },\n rightColumn: { type: 'string', description: 'Join column from right dataset' },\n type: { type: 'string', description: 'Join type: inner (default), left, right', enum: ['inner', 'left', 'right'], default: 'inner' },\n columns: { type: 'array', description: 'Column projection (prefix with dataset ID)' },\n limit: { type: 'number', description: 'Max rows (default: 100, hard cap: 500)', default: 100 },\n projectPath: { type: 'string' },\n },\n required: ['left', 'right', 'leftColumn', 'rightColumn'],\n },\n },\n {\n name: 'kirograph_data_correlations',\n description: 'Pairwise Pearson correlations between numeric columns.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n threshold: { type: 'number', description: 'Min absolute correlation to include (default: 0.3)', default: 0.3 },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_quality',\n description: 'Rank columns by data quality risk: nulls, cardinality, type issues.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID' },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_drift',\n description: 'Schema drift between last two index runs: columns, types, row counts.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID (from kirograph_data_list)' },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n {\n name: 'kirograph_data_history',\n description: 'History of schema snapshots: timestamps, row/column counts, hashes.',\n inputSchema: {\n type: 'object',\n properties: {\n dataset: { type: 'string', description: 'Dataset ID (from kirograph_data_list)' },\n limit: { type: 'number', description: 'Max snapshots to return (default: 10)', default: 10 },\n projectPath: { type: 'string' },\n },\n required: ['dataset'],\n },\n },\n // \u2500\u2500 Watchmen tools (require enableMemory=true + enableWatchmen=true) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n {\n name: 'kirograph_watchmen_status',\n description: 'Show watchmen status: pending observation count, synthesis threshold, and which brief files would be written on next synthesis.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_watchmen_synthesize',\n description: 'Run watchmen synthesis immediately using the local model (requires watchmenSynthesisMode: \"local\"). Processes pending observations into a workspace brief.',\n inputSchema: {\n type: 'object',\n properties: {\n force: { type: 'boolean', description: 'Run even if below threshold (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_watchmen_reset',\n description: 'Reset the watchmen synthesis counter by storing a summary observation, without running full synthesis.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Affected tests \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\u2500\u2500\u2500\u2500\u2500\n {\n name: 'kirograph_affected',\n description: 'Find test files affected by a set of changed source files, by traversing the dependency graph.',\n inputSchema: {\n type: 'object',\n properties: {\n files: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of changed source file paths (relative to project root)',\n },\n depth: { type: 'number', description: 'Max dependency traversal depth (default: 5)', default: 5 },\n testPattern: { type: 'string', description: 'Custom glob to identify test files (optional)' },\n projectPath: { type: 'string' },\n },\n required: ['files'],\n },\n },\n // \u2500\u2500 Security tools (require enableSecurity=true) \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 {\n name: 'kirograph_security',\n description: 'Security overview: vuln counts, verdicts, stale data warnings.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_vulns',\n description: 'List vulns with reachability verdicts, severity, affected components.',\n inputSchema: {\n type: 'object',\n properties: {\n severity: { type: 'string', description: 'Filter by severity level', enum: ['critical', 'high', 'medium', 'low'] },\n verdict: { type: 'string', description: 'Filter by reachability verdict', enum: ['affected', 'not_affected', 'under_investigation'] },\n limit: { type: 'number', description: 'Max results (default: 20)', default: 20 },\n refresh: { type: 'boolean', description: 'Trigger fresh vulnerability enrichment before listing (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_vuln_add',\n description: 'Manually register a CVE against a dependency.',\n inputSchema: {\n type: 'object',\n properties: {\n cveId: { type: 'string', description: 'CVE identifier (e.g., \"CVE-2023-12345\")' },\n package: { type: 'string', description: 'Package name to associate the CVE with' },\n severity: { type: 'number', description: 'CVSS v3.1 base score (optional)' },\n summary: { type: 'string', description: 'Vulnerability summary (optional)' },\n fixedVersion: { type: 'string', description: 'Version that fixes the vulnerability (optional)' },\n projectPath: { type: 'string' },\n },\n required: ['cveId', 'package'],\n },\n },\n {\n name: 'kirograph_vuln_suppress',\n description: 'Suppress a CVE from vulnerability reports.',\n inputSchema: {\n type: 'object',\n properties: {\n cveId: { type: 'string', description: 'CVE identifier to suppress (e.g., \"CVE-2024-1234\")' },\n reason: { type: 'string', description: 'Reason for suppression (optional)' },\n expires: { type: 'string', description: 'Expiry date in ISO format after which the suppression is removed (e.g. \"2026-12-31\", optional)' },\n projectPath: { type: 'string' },\n },\n required: ['cveId'],\n },\n },\n {\n name: 'kirograph_sbom',\n description: 'Generate CycloneDX 1.5 SBOM JSON for the project.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_vex',\n description: 'Generate CycloneDX 1.5 VEX JSON with reachability verdicts.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_reachability',\n description: 'Check reachability for a dependency or CVE \u2014 verdict, call paths (or why none was found), and impact summary.',\n inputSchema: {\n type: 'object',\n properties: {\n target: { type: 'string', description: 'Dependency name or CVE ID to check reachability for' },\n projectPath: { type: 'string' },\n },\n required: ['target'],\n },\n },\n {\n name: 'kirograph_staleness',\n description: 'Check dependency freshness against latest published versions.',\n inputSchema: {\n type: 'object',\n properties: {\n threshold: { type: 'number', description: 'Only return packages with staleness_score >= threshold (default: 0.3)', default: 0.3 },\n refresh: { type: 'boolean', description: 'Fetch latest version info from registries before listing (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_licenses',\n description: 'Show licenses and check against configured deny/warn policy.',\n inputSchema: {\n type: 'object',\n properties: {\n policy: { type: 'boolean', description: 'Return only policy violations (default: false)', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_attack_surface',\n description: 'Map HTTP routes to vulnerable deps with hop count and auth status.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max routes to return (default: 20)', default: 20 },\n publicOnly: { type: 'boolean', description: 'Only return public/unauthenticated routes', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_secrets',\n description: 'Scan for hardcoded secrets with call-graph blast radius.',\n inputSchema: {\n type: 'object',\n properties: {\n includeTests: { type: 'boolean', description: 'Include test files in scan', default: false },\n severity: { type: 'string', description: 'Filter by severity: critical, high, medium, low', enum: ['critical', 'high', 'medium', 'low'] },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_security_flows',\n description: 'SAST-lite: detect SQL injection, eval, deserialize, path, crypto flows.',\n inputSchema: {\n type: 'object',\n properties: {\n type: { type: 'string', description: 'Filter by type: sql, eval, deserialize, path, crypto, all', default: 'all' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_supply_chain',\n description: 'OpenSSF Scorecard scores, maintainer count, abandoned package detection.',\n inputSchema: {\n type: 'object',\n properties: {\n threshold: { type: 'string', description: 'Minimum risk level: critical, high, medium', enum: ['critical', 'high', 'medium'] },\n refresh: { type: 'boolean', description: 'Re-fetch from APIs', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dep_confusion',\n description: 'Detect dependency confusion: internal names in public registries.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_remediation',\n description: 'Remediation SLA tracking: overdue vulns by severity thresholds.',\n inputSchema: {\n type: 'object',\n properties: {\n overdueOnly: { type: 'boolean', description: 'Show only overdue items', default: false },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Phase 3 complexity tools \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 {\n name: 'kirograph_health',\n description: 'Composite graph health score (0\u201310000) across complexity, dead code, coupling, and circular dependencies. Higher is better.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_dsm',\n description: 'Design Structure Matrix \u2014 dependency counts between top-level modules. Reveals architectural coupling and layering violations.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max module groups to include (default 15)', default: 15 },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_test_risk',\n description: 'Risk-ranked list of functions: complexity \u00D7 fan-in. Highest-risk functions are most likely to break when changed.',\n inputSchema: {\n type: 'object',\n properties: {\n limit: { type: 'number', description: 'Max results (default 20)', default: 20 },\n threshold: { type: 'number', description: 'Min risk score to include (default 0)', default: 0 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Phase 3 git context tools \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 {\n name: 'kirograph_test_coverage',\n description: 'Parse lcov/Istanbul/Cobertura coverage files and show per-file coverage percentage. Sorted worst-first by default.',\n inputSchema: {\n type: 'object',\n properties: {\n sortBy: { type: 'string', description: 'Sort order: asc (worst first) or desc (best first)', enum: ['asc', 'desc'], default: 'asc' },\n limit: { type: 'number', description: 'Max results (default 30)', default: 30 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Phase 4 branch tools \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 {\n name: 'kirograph_branch_list',\n description: 'List tracked branches with their DB sizes and last sync times.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_branch_diff',\n description: 'Symbols added, removed, or changed between two tracked branches.',\n inputSchema: {\n type: 'object',\n required: ['branchA'],\n properties: {\n branchA: { type: 'string', description: 'First branch name (required)' },\n branchB: { type: 'string', description: 'Second branch name (default: main)', default: 'main' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_branch_search',\n description: 'Search for symbols in a specific tracked branch graph.',\n inputSchema: {\n type: 'object',\n required: ['query', 'branch'],\n properties: {\n query: { type: 'string', description: 'Search query (symbol name, partial match)' },\n branch: { type: 'string', description: 'Branch name to search in' },\n limit: { type: 'number', description: 'Max results (default 20)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n },\n // \u2500\u2500 Pattern tools (require enablePatterns=true) \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 {\n name: 'kirograph_pattern_coverage',\n description: 'OWASP Top 10 coverage report: categories covered and match counts.',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_pattern_save_baseline',\n description: 'Save current pattern match counts as a baseline.',\n inputSchema: {\n type: 'object',\n properties: {\n label: { type: 'string', description: 'Baseline label (default: \"default\")', default: 'default' },\n projectPath: { type: 'string' },\n },\n },\n },\n {\n name: 'kirograph_pattern_diff',\n description: 'Diff pattern matches against a saved baseline.',\n inputSchema: {\n type: 'object',\n properties: {\n label: { type: 'string', description: 'Baseline label (default: \"default\")', default: 'default' },\n projectPath: { type: 'string' },\n },\n },\n },\n];\n\n/**\n * Dynamic tool definition for kirograph_live_search.\n * NOT included in the static `tools` array \u2014 injected into tools/list at runtime\n * only when config.enablePatterns === true AND @ast-grep/napi is available.\n * NOT added to KIROGRAPH_TOOL_NAMES (which is a static list for Kiro autoApprove).\n */\nexport const LIVE_SEARCH_TOOL_DEFINITION: ToolDefinition = {\n name: 'kirograph_live_search',\n description:\n 'Run a live AST pattern search against the indexed file list using @ast-grep/napi. Finds structural code patterns (SQL injection, eval, path traversal, etc.) without needing the codebase to be re-indexed. Only available when enablePatterns: true.',\n inputSchema: {\n type: 'object' as const,\n required: ['pattern', 'language'],\n properties: {\n pattern: { type: 'string', description: 'ast-grep inline pattern (e.g. \"eval($X)\")' },\n language: { type: 'string', description: 'Language to search: javascript, typescript, python, go, rust, java, etc.' },\n limit: { type: 'number', description: 'Max results (default 20, max 100)', default: 20 },\n projectPath: { type: 'string' },\n },\n },\n};\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,wBAAqC;AACrC,qBAA4B;AAarB,MAAM,QAA0B;AAAA,EACrC;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,MACX,MAAM;AAAA,MACN,YAAY;AAAA,QACV,OAAO,EAAE,MAAM,UAAU,aAAa,sEAAsE;AAAA,QAC5G,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,UACb,MAAM,CAAC,QAAQ,SAAS;AAAA,UACxB,SAAS;AAAA,QACX;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,UACN,aAAa;AAAA,UACb,MAAM,CAAC,YAAY,UAAU,SAAS,aAAa,cAAc,YAAY,SAAS,WAAW;AAAA,QACnG;AAAA,QACA,OAAO,EAAE,MAAM,UAAU,aAAa,m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AA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,MACX,MAAM;AAAA,MACN,YAAY;AAAA,QACV,OAAO,EAAE,MAAM,UAAU,aAAa,uCAAuC,SAAS,UAAU;AAAA,QAChG,aAAa,EAAE,MAAM,SAAS;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,MACX,MAAM;AAAA,MACN,YAAY;AAAA,QACV,OAAO,EAAE,MAAM,UAAU,aAAa,uCAAuC,SAAS,UAAU;AAAA,QAChG,aAAa,EAAE,MAAM,SAAS;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AACF;AAQO,MAAM,8BAA8C;AAAA,EACzD,MAAM;AAAA,EACN,aACE;AAAA,EACF,aAAa;AAAA,IACX,MAAM;AAAA,IACN,UAAU,CAAC,WAAW,UAAU;AAAA,IAChC,YAAY;AAAA,MACV,SAAS,EAAE,MAAM,UAAU,aAAa,4CAA4C;AAAA,MACpF,UAAU,EAAE,MAAM,UAAU,aAAa,2EAA2E;AAAA,MACpH,OAAO,EAAE,MAAM,UAAU,aAAa,qCAAqC,SAAS,GAAG;AAAA,MACvF,aAAa,EAAE,MAAM,SAAS;AAAA,IAChC;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -21,10 +21,13 @@ var memory_exports = {};
21
21
  __export(memory_exports, {
22
22
  MemoryDatabase: () => import_database2.MemoryDatabase,
23
23
  MemoryManager: () => MemoryManager,
24
+ MemorySchemaError: () => import_schema2.MemorySchemaError,
24
25
  MemoryVectorManager: () => import_vectors2.MemoryVectorManager,
26
+ OBSERVATION_KINDS: () => import_schema2.OBSERVATION_KINDS,
25
27
  compressObservation: () => import_compress2.compressObservation,
26
28
  detectSymbols: () => import_symbols2.detectSymbols,
27
- extractIdentifiers: () => import_compress2.extractIdentifiers
29
+ extractIdentifiers: () => import_compress2.extractIdentifiers,
30
+ validateObservationInput: () => import_schema2.validateObservationInput
28
31
  });
29
32
  module.exports = __toCommonJS(memory_exports);
30
33
  var import_database = require("./database");
@@ -33,10 +36,12 @@ var import_symbols = require("./symbols");
33
36
  var import_vectors = require("./vectors");
34
37
  var import_watchmen = require("../watchmen");
35
38
  var import_errors = require("../errors");
39
+ var import_schema = require("./schema");
36
40
  var import_database2 = require("./database");
37
41
  var import_compress2 = require("./compress");
38
42
  var import_symbols2 = require("./symbols");
39
43
  var import_vectors2 = require("./vectors");
44
+ var import_schema2 = require("./schema");
40
45
  __reExport(memory_exports, require("./types"), module.exports);
41
46
  class MemoryManager {
42
47
  constructor(config, db, projectRoot = process.cwd()) {
@@ -74,8 +79,12 @@ class MemoryManager {
74
79
  * 7. Watchmen threshold check (if enabled) — returns WatchmenReadyResult when synthesis should run
75
80
  *
76
81
  * Returns the observation ID, a WatchmenReadyResult, or null if skipped (duplicate or excluded).
82
+ * @throws MemorySchemaError if `memoryStrictWrites` is enabled and the input doesn't conform.
77
83
  */
78
84
  async store(input, ide = "kiro") {
85
+ if (this.config.memoryStrictWrites) {
86
+ (0, import_schema.validateObservationInput)(input);
87
+ }
79
88
  let text = input.content;
80
89
  text = import_database.MemoryDatabase.stripPrivate(text);
81
90
  if (!text.trim()) return null;
@@ -367,10 +376,13 @@ class MemoryManager {
367
376
  0 && (module.exports = {
368
377
  MemoryDatabase,
369
378
  MemoryManager,
379
+ MemorySchemaError,
370
380
  MemoryVectorManager,
381
+ OBSERVATION_KINDS,
371
382
  compressObservation,
372
383
  detectSymbols,
373
384
  extractIdentifiers,
385
+ validateObservationInput,
374
386
  ...require("./types")
375
387
  });
376
388
  //# sourceMappingURL=index.js.map