sdl-mcp 0.10.5 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +207 -78
- package/config/sdlmcp.config.example.json +19 -5
- package/config/sdlmcp.config.json +15 -3
- package/config/sdlmcp.config.schema.json +46 -13
- package/dist/.tsbuildinfo +1 -1
- package/dist/agent/context-engine.d.ts.map +1 -1
- package/dist/agent/context-engine.js +67 -21
- package/dist/agent/context-engine.js.map +1 -1
- package/dist/agent/context-seeding.d.ts.map +1 -1
- package/dist/agent/context-seeding.js +57 -39
- package/dist/agent/context-seeding.js.map +1 -1
- package/dist/agent/executor.d.ts.map +1 -1
- package/dist/agent/executor.js +57 -17
- package/dist/agent/executor.js.map +1 -1
- package/dist/agent/types.d.ts +10 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/benchmark/regression.js +9 -9
- package/dist/benchmark/regression.js.map +1 -1
- package/dist/cli/argParsing.d.ts.map +1 -1
- package/dist/cli/argParsing.js +16 -3
- package/dist/cli/argParsing.js.map +1 -1
- package/dist/cli/commands/benchmark.d.ts.map +1 -1
- package/dist/cli/commands/benchmark.js +3 -5
- package/dist/cli/commands/benchmark.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +68 -10
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +10 -7
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +98 -12
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +53 -20
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/serve.d.ts.map +1 -1
- package/dist/cli/commands/serve.js +46 -4
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/index.js +8 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/transport/http.d.ts.map +1 -1
- package/dist/cli/transport/http.js +24 -28
- package/dist/cli/transport/http.js.map +1 -1
- package/dist/cli/types.d.ts +1 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/code/redact.d.ts +2 -1
- package/dist/code/redact.d.ts.map +1 -1
- package/dist/code-mode/index.d.ts +1 -0
- package/dist/code-mode/index.d.ts.map +1 -1
- package/dist/code-mode/index.js +27 -6
- package/dist/code-mode/index.js.map +1 -1
- package/dist/code-mode/types.d.ts +6 -0
- package/dist/code-mode/types.d.ts.map +1 -1
- package/dist/code-mode/types.js +2 -0
- package/dist/code-mode/types.js.map +1 -1
- package/dist/code-mode/workflow-executor.d.ts.map +1 -1
- package/dist/code-mode/workflow-executor.js +58 -31
- package/dist/code-mode/workflow-executor.js.map +1 -1
- package/dist/code-mode/workflow-parser.d.ts +2 -0
- package/dist/code-mode/workflow-parser.d.ts.map +1 -1
- package/dist/code-mode/workflow-parser.js +4 -3
- package/dist/code-mode/workflow-parser.js.map +1 -1
- package/dist/code-mode/workflow-truncation.d.ts.map +1 -1
- package/dist/code-mode/workflow-truncation.js +12 -5
- package/dist/code-mode/workflow-truncation.js.map +1 -1
- package/dist/config/constants.d.ts +24 -3
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +24 -3
- package/dist/config/constants.js.map +1 -1
- package/dist/config/loadConfig.d.ts.map +1 -1
- package/dist/config/loadConfig.js +59 -5
- package/dist/config/loadConfig.js.map +1 -1
- package/dist/config/types.d.ts +19 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +70 -10
- package/dist/config/types.js.map +1 -1
- package/dist/db/extension-caps.d.ts +27 -0
- package/dist/db/extension-caps.d.ts.map +1 -0
- package/dist/db/extension-caps.js +34 -0
- package/dist/db/extension-caps.js.map +1 -0
- package/dist/db/ladybug-core.d.ts +14 -0
- package/dist/db/ladybug-core.d.ts.map +1 -1
- package/dist/db/ladybug-core.js +69 -10
- package/dist/db/ladybug-core.js.map +1 -1
- package/dist/db/ladybug-derived-state.d.ts +45 -0
- package/dist/db/ladybug-derived-state.d.ts.map +1 -0
- package/dist/db/ladybug-derived-state.js +113 -0
- package/dist/db/ladybug-derived-state.js.map +1 -0
- package/dist/db/ladybug-edges.d.ts +12 -1
- package/dist/db/ladybug-edges.d.ts.map +1 -1
- package/dist/db/ladybug-edges.js +8 -11
- package/dist/db/ladybug-edges.js.map +1 -1
- package/dist/db/ladybug-file-summaries.d.ts +11 -0
- package/dist/db/ladybug-file-summaries.d.ts.map +1 -1
- package/dist/db/ladybug-file-summaries.js +43 -1
- package/dist/db/ladybug-file-summaries.js.map +1 -1
- package/dist/db/ladybug-schema.d.ts +2 -0
- package/dist/db/ladybug-schema.d.ts.map +1 -1
- package/dist/db/ladybug-schema.js +30 -8
- package/dist/db/ladybug-schema.js.map +1 -1
- package/dist/db/ladybug-slices.d.ts +1 -0
- package/dist/db/ladybug-slices.d.ts.map +1 -1
- package/dist/db/ladybug-slices.js +5 -2
- package/dist/db/ladybug-slices.js.map +1 -1
- package/dist/db/ladybug-symbols.d.ts +27 -0
- package/dist/db/ladybug-symbols.d.ts.map +1 -1
- package/dist/db/ladybug-symbols.js +181 -4
- package/dist/db/ladybug-symbols.js.map +1 -1
- package/dist/db/ladybug.d.ts +25 -19
- package/dist/db/ladybug.d.ts.map +1 -1
- package/dist/db/ladybug.js +215 -75
- package/dist/db/ladybug.js.map +1 -1
- package/dist/delta/blastRadius.d.ts.map +1 -1
- package/dist/delta/blastRadius.js +11 -9
- package/dist/delta/blastRadius.js.map +1 -1
- package/dist/graph/graphSnapshotCache.d.ts +2 -2
- package/dist/graph/graphSnapshotCache.d.ts.map +1 -1
- package/dist/graph/graphSnapshotCache.js +17 -13
- package/dist/graph/graphSnapshotCache.js.map +1 -1
- package/dist/graph/metrics.d.ts +13 -2
- package/dist/graph/metrics.d.ts.map +1 -1
- package/dist/graph/metrics.js +70 -13
- package/dist/graph/metrics.js.map +1 -1
- package/dist/graph/overview.js +8 -14
- package/dist/graph/overview.js.map +1 -1
- package/dist/graph/slice/beam-search-engine.d.ts.map +1 -1
- package/dist/graph/slice/beam-search-engine.js +29 -31
- package/dist/graph/slice/beam-search-engine.js.map +1 -1
- package/dist/graph/slice.d.ts.map +1 -1
- package/dist/graph/slice.js +16 -18
- package/dist/graph/slice.js.map +1 -1
- package/dist/indexer/cluster-orchestrator.d.ts +11 -0
- package/dist/indexer/cluster-orchestrator.d.ts.map +1 -1
- package/dist/indexer/cluster-orchestrator.js +80 -29
- package/dist/indexer/cluster-orchestrator.js.map +1 -1
- package/dist/indexer/derived-refresh-queue.d.ts +34 -0
- package/dist/indexer/derived-refresh-queue.d.ts.map +1 -0
- package/dist/indexer/derived-refresh-queue.js +141 -0
- package/dist/indexer/derived-refresh-queue.js.map +1 -0
- package/dist/indexer/edge-builder/import-resolution.d.ts.map +1 -1
- package/dist/indexer/edge-builder/import-resolution.js +11 -2
- package/dist/indexer/edge-builder/import-resolution.js.map +1 -1
- package/dist/indexer/embeddings.d.ts +9 -1
- package/dist/indexer/embeddings.d.ts.map +1 -1
- package/dist/indexer/embeddings.js +122 -72
- package/dist/indexer/embeddings.js.map +1 -1
- package/dist/indexer/fileScanner.d.ts +1 -0
- package/dist/indexer/fileScanner.d.ts.map +1 -1
- package/dist/indexer/fileScanner.js +7 -12
- package/dist/indexer/fileScanner.js.map +1 -1
- package/dist/indexer/fileWalker.d.ts +21 -0
- package/dist/indexer/fileWalker.d.ts.map +1 -0
- package/dist/indexer/fileWalker.js +94 -0
- package/dist/indexer/fileWalker.js.map +1 -0
- package/dist/indexer/finalize-derived-state.d.ts +28 -0
- package/dist/indexer/finalize-derived-state.d.ts.map +1 -0
- package/dist/indexer/finalize-derived-state.js +92 -0
- package/dist/indexer/finalize-derived-state.js.map +1 -0
- package/dist/indexer/fingerprints.d.ts +1 -2
- package/dist/indexer/fingerprints.d.ts.map +1 -1
- package/dist/indexer/fingerprints.js +16 -8
- package/dist/indexer/fingerprints.js.map +1 -1
- package/dist/indexer/import-resolution/csharp-adapter.d.ts.map +1 -1
- package/dist/indexer/import-resolution/csharp-adapter.js +4 -5
- package/dist/indexer/import-resolution/csharp-adapter.js.map +1 -1
- package/dist/indexer/import-resolution/go-adapter.d.ts.map +1 -1
- package/dist/indexer/import-resolution/go-adapter.js +2 -5
- package/dist/indexer/import-resolution/go-adapter.js.map +1 -1
- package/dist/indexer/import-resolution/java-kotlin-adapter.d.ts.map +1 -1
- package/dist/indexer/import-resolution/java-kotlin-adapter.js +4 -5
- package/dist/indexer/import-resolution/java-kotlin-adapter.js.map +1 -1
- package/dist/indexer/indexer-init.d.ts +5 -0
- package/dist/indexer/indexer-init.d.ts.map +1 -1
- package/dist/indexer/indexer-init.js.map +1 -1
- package/dist/indexer/indexer-pass1.d.ts.map +1 -1
- package/dist/indexer/indexer-pass1.js +137 -70
- package/dist/indexer/indexer-pass1.js.map +1 -1
- package/dist/indexer/indexer-pass2.d.ts +2 -0
- package/dist/indexer/indexer-pass2.d.ts.map +1 -1
- package/dist/indexer/indexer-pass2.js +154 -33
- package/dist/indexer/indexer-pass2.js.map +1 -1
- package/dist/indexer/indexer.d.ts +1 -1
- package/dist/indexer/indexer.d.ts.map +1 -1
- package/dist/indexer/indexer.js +70 -43
- package/dist/indexer/indexer.js.map +1 -1
- package/dist/indexer/metrics-updater.d.ts +12 -1
- package/dist/indexer/metrics-updater.d.ts.map +1 -1
- package/dist/indexer/metrics-updater.js +81 -79
- package/dist/indexer/metrics-updater.js.map +1 -1
- package/dist/indexer/model-downloader.d.ts.map +1 -1
- package/dist/indexer/model-downloader.js +38 -5
- package/dist/indexer/model-downloader.js.map +1 -1
- package/dist/indexer/model-registry.d.ts +10 -0
- package/dist/indexer/model-registry.d.ts.map +1 -1
- package/dist/indexer/model-registry.js +19 -3
- package/dist/indexer/model-registry.js.map +1 -1
- package/dist/indexer/parser/batch-persist.d.ts +61 -0
- package/dist/indexer/parser/batch-persist.d.ts.map +1 -0
- package/dist/indexer/parser/batch-persist.js +170 -0
- package/dist/indexer/parser/batch-persist.js.map +1 -0
- package/dist/indexer/parser/process-file.d.ts.map +1 -1
- package/dist/indexer/parser/process-file.js +41 -20
- package/dist/indexer/parser/process-file.js.map +1 -1
- package/dist/indexer/parser/rust-process-file.d.ts +2 -0
- package/dist/indexer/parser/rust-process-file.d.ts.map +1 -1
- package/dist/indexer/parser/rust-process-file.js +56 -35
- package/dist/indexer/parser/rust-process-file.js.map +1 -1
- package/dist/indexer/parser/types.d.ts +2 -0
- package/dist/indexer/parser/types.d.ts.map +1 -1
- package/dist/indexer/pass2/resolvers/csharp-pass2-resolver.d.ts.map +1 -1
- package/dist/indexer/pass2/resolvers/csharp-pass2-resolver.js +12 -7
- package/dist/indexer/pass2/resolvers/csharp-pass2-resolver.js.map +1 -1
- package/dist/indexer/pass2/resolvers/java-pass2-resolver.d.ts.map +1 -1
- package/dist/indexer/pass2/resolvers/java-pass2-resolver.js +13 -3
- package/dist/indexer/pass2/resolvers/java-pass2-resolver.js.map +1 -1
- package/dist/indexer/pass2/resolvers/php-pass2-resolver.js +6 -1
- package/dist/indexer/pass2/resolvers/php-pass2-resolver.js.map +1 -1
- package/dist/indexer/pass2/resolvers/python-pass2-resolver.d.ts.map +1 -1
- package/dist/indexer/pass2/resolvers/python-pass2-resolver.js +20 -6
- package/dist/indexer/pass2/resolvers/python-pass2-resolver.js.map +1 -1
- package/dist/indexer/rustIndexer.d.ts +6 -0
- package/dist/indexer/rustIndexer.d.ts.map +1 -1
- package/dist/indexer/rustIndexer.js +67 -1
- package/dist/indexer/rustIndexer.js.map +1 -1
- package/dist/indexer/symbol-embedding-context.d.ts +61 -0
- package/dist/indexer/symbol-embedding-context.d.ts.map +1 -0
- package/dist/indexer/symbol-embedding-context.js +270 -0
- package/dist/indexer/symbol-embedding-context.js.map +1 -0
- package/dist/indexer/symbol-embedding-text.d.ts +59 -0
- package/dist/indexer/symbol-embedding-text.d.ts.map +1 -0
- package/dist/indexer/symbol-embedding-text.js +177 -0
- package/dist/indexer/symbol-embedding-text.js.map +1 -0
- package/dist/live-index/reconcile-worker.d.ts.map +1 -1
- package/dist/live-index/reconcile-worker.js +32 -11
- package/dist/live-index/reconcile-worker.js.map +1 -1
- package/dist/main.js +21 -1
- package/dist/main.js.map +1 -1
- package/dist/mcp/context-response-projection.d.ts.map +1 -1
- package/dist/mcp/context-response-projection.js +1 -0
- package/dist/mcp/context-response-projection.js.map +1 -1
- package/dist/mcp/dispatch-limiter.d.ts +4 -0
- package/dist/mcp/dispatch-limiter.d.ts.map +1 -1
- package/dist/mcp/dispatch-limiter.js +45 -5
- package/dist/mcp/dispatch-limiter.js.map +1 -1
- package/dist/mcp/indexing-gate.d.ts +40 -0
- package/dist/mcp/indexing-gate.d.ts.map +1 -0
- package/dist/mcp/indexing-gate.js +76 -0
- package/dist/mcp/indexing-gate.js.map +1 -0
- package/dist/mcp/session-manager.d.ts +7 -0
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +38 -7
- package/dist/mcp/session-manager.js.map +1 -1
- package/dist/mcp/telemetry.d.ts +1 -0
- package/dist/mcp/telemetry.d.ts.map +1 -1
- package/dist/mcp/telemetry.js +22 -7
- package/dist/mcp/telemetry.js.map +1 -1
- package/dist/mcp/tools/context.d.ts.map +1 -1
- package/dist/mcp/tools/context.js +3 -5
- package/dist/mcp/tools/context.js.map +1 -1
- package/dist/mcp/tools/delta.d.ts.map +1 -1
- package/dist/mcp/tools/delta.js +2 -5
- package/dist/mcp/tools/delta.js.map +1 -1
- package/dist/mcp/tools/file-read.d.ts +1 -0
- package/dist/mcp/tools/file-read.d.ts.map +1 -1
- package/dist/mcp/tools/file-read.js +68 -19
- package/dist/mcp/tools/file-read.js.map +1 -1
- package/dist/mcp/tools/file-write.d.ts.map +1 -1
- package/dist/mcp/tools/file-write.js +42 -2
- package/dist/mcp/tools/file-write.js.map +1 -1
- package/dist/mcp/tools/memory.d.ts.map +1 -1
- package/dist/mcp/tools/memory.js +11 -4
- package/dist/mcp/tools/memory.js.map +1 -1
- package/dist/mcp/tools/prRisk.d.ts.map +1 -1
- package/dist/mcp/tools/prRisk.js +54 -20
- package/dist/mcp/tools/prRisk.js.map +1 -1
- package/dist/mcp/tools/repo.d.ts.map +1 -1
- package/dist/mcp/tools/repo.js +56 -18
- package/dist/mcp/tools/repo.js.map +1 -1
- package/dist/mcp/tools/runtime.d.ts.map +1 -1
- package/dist/mcp/tools/runtime.js +10 -2
- package/dist/mcp/tools/runtime.js.map +1 -1
- package/dist/mcp/tools/slice.d.ts.map +1 -1
- package/dist/mcp/tools/slice.js +40 -20
- package/dist/mcp/tools/slice.js.map +1 -1
- package/dist/mcp/tools/symbol.d.ts.map +1 -1
- package/dist/mcp/tools/symbol.js +39 -20
- package/dist/mcp/tools/symbol.js.map +1 -1
- package/dist/mcp/tools.d.ts +30 -18
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +255 -54
- package/dist/mcp/tools.js.map +1 -1
- package/dist/retrieval/index-lifecycle.d.ts.map +1 -1
- package/dist/retrieval/index-lifecycle.js +8 -6
- package/dist/retrieval/index-lifecycle.js.map +1 -1
- package/dist/retrieval/orchestrator.d.ts.map +1 -1
- package/dist/retrieval/orchestrator.js +89 -12
- package/dist/retrieval/orchestrator.js.map +1 -1
- package/dist/runtime/artifacts.d.ts.map +1 -1
- package/dist/runtime/artifacts.js +28 -4
- package/dist/runtime/artifacts.js.map +1 -1
- package/dist/runtime/executor.d.ts.map +1 -1
- package/dist/runtime/executor.js +1 -0
- package/dist/runtime/executor.js.map +1 -1
- package/dist/runtime/runtimes.d.ts.map +1 -1
- package/dist/runtime/runtimes.js +8 -20
- package/dist/runtime/runtimes.js.map +1 -1
- package/dist/services/card-builder.d.ts.map +1 -1
- package/dist/services/card-builder.js +71 -42
- package/dist/services/card-builder.js.map +1 -1
- package/dist/util/concurrency.d.ts +15 -0
- package/dist/util/concurrency.d.ts.map +1 -1
- package/dist/util/concurrency.js +26 -0
- package/dist/util/concurrency.js.map +1 -1
- package/dist/util/cpu-detect.d.ts +48 -0
- package/dist/util/cpu-detect.d.ts.map +1 -0
- package/dist/util/cpu-detect.js +40 -0
- package/dist/util/cpu-detect.js.map +1 -0
- package/dist/util/cpu-presets.d.ts +74 -0
- package/dist/util/cpu-presets.d.ts.map +1 -0
- package/dist/util/cpu-presets.js +83 -0
- package/dist/util/cpu-presets.js.map +1 -0
- package/dist/util/safeRegex.d.ts.map +1 -1
- package/dist/util/safeRegex.js +12 -2
- package/dist/util/safeRegex.js.map +1 -1
- package/dist/util/shutdown.d.ts +3 -0
- package/dist/util/shutdown.d.ts.map +1 -1
- package/dist/util/shutdown.js +11 -0
- package/dist/util/shutdown.js.map +1 -1
- package/dist/util/sse-client.d.ts.map +1 -1
- package/dist/util/sse-client.js +1 -0
- package/dist/util/sse-client.js.map +1 -1
- package/package.json +7 -6
- package/scripts/postinstall-models.mjs +197 -0
- package/scripts/postinstall.mjs +44 -0
package/README.md
CHANGED
|
@@ -38,20 +38,31 @@ SDL-MCP fixes this. It indexes your codebase into a searchable **symbol graph**
|
|
|
38
38
|
## How it works — in 30 seconds
|
|
39
39
|
|
|
40
40
|
```mermaid
|
|
41
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
41
42
|
flowchart TD
|
|
42
43
|
Codebase["Your Codebase"]
|
|
43
44
|
Indexer["Indexer<br/>12 languages<br/>Rust native or Tree-sitter fallback"]
|
|
44
45
|
Graph["LadybugDB graph<br/>symbols, edges, metrics, versions"]
|
|
45
|
-
MCP["
|
|
46
|
+
MCP["Current MCP surfaces<br/>33 flat, 6 gateway, 4 Code Mode"]
|
|
46
47
|
CLI["13 CLI commands"]
|
|
47
48
|
HTTP["HTTP API and graph UI"]
|
|
48
49
|
Agent["AI coding agent<br/>Claude Code, Claude Desktop, Cursor, Windsurf, Codex, Gemini"]
|
|
49
50
|
|
|
50
|
-
Codebase
|
|
51
|
-
|
|
52
|
-
Graph
|
|
53
|
-
Graph
|
|
54
|
-
|
|
51
|
+
Codebase e1@--> Indexer
|
|
52
|
+
Indexer e2@--> Graph
|
|
53
|
+
Graph e3@--> MCP
|
|
54
|
+
Graph e4@--> CLI
|
|
55
|
+
Graph e5@--> HTTP
|
|
56
|
+
MCP e6@--> Agent
|
|
57
|
+
|
|
58
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
59
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
60
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
61
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
62
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
63
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
64
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
65
|
+
class e1,e2,e3,e4,e5,e6 animate;
|
|
55
66
|
```
|
|
56
67
|
|
|
57
68
|
1. **Index once** — SDL-MCP parses every symbol in your repo and stores it as a compact metadata record (a "Symbol Card") in a graph database
|
|
@@ -64,10 +75,22 @@ flowchart TD
|
|
|
64
75
|
|
|
65
76
|
<br/>
|
|
66
77
|
|
|
78
|
+
## Prerequisites
|
|
79
|
+
|
|
80
|
+
- **Node.js 24+** is required ([download](https://nodejs.org/)). SDL-MCP uses Node.js features not available in earlier versions. Run `node -v` to check.
|
|
81
|
+
|
|
82
|
+
> **Peer dependency warnings during install?** The tree-sitter grammar packages may produce `ERESOLVE` warnings about peer dependencies. These are harmless — the install succeeds and everything works correctly. Add `--legacy-peer-deps` to suppress them: `npm install -g sdl-mcp --legacy-peer-deps`
|
|
83
|
+
|
|
84
|
+
<br/>
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
<br/>
|
|
89
|
+
|
|
67
90
|
## Quick Start
|
|
68
91
|
|
|
69
92
|
```bash
|
|
70
|
-
# Install
|
|
93
|
+
# Install (requires Node.js 24+)
|
|
71
94
|
npm install -g sdl-mcp
|
|
72
95
|
|
|
73
96
|
# Initialize, auto-detect languages, index your repo, and run health checks
|
|
@@ -77,7 +100,7 @@ sdl-mcp init -y --auto-index
|
|
|
77
100
|
sdl-mcp serve --stdio
|
|
78
101
|
```
|
|
79
102
|
|
|
80
|
-
Point your MCP client at the server and the agent gains access to
|
|
103
|
+
Point your MCP client at the server and the agent gains access to SDL-MCP's current configured surface. By default that is exclusive Code Mode; set `codeMode.exclusive: false` when you want Code Mode plus the regular flat or gateway tools in one session.
|
|
81
104
|
|
|
82
105
|
> **npx users:** Replace `sdl-mcp` with `npx --yes sdl-mcp@latest` in all commands above.
|
|
83
106
|
|
|
@@ -94,13 +117,25 @@ Point your MCP client at the server and the agent gains access to all SDL-MCP to
|
|
|
94
117
|
The core innovation. Named after the adjustable aperture that controls light flow in optics, the Iris Gate Ladder lets agents dial their context "aperture" from a pinhole to wide-open.
|
|
95
118
|
|
|
96
119
|
```mermaid
|
|
120
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
97
121
|
flowchart TB
|
|
98
122
|
R1["~100 tokens<br/>Rung 1: Symbol Card<br/>Name, signature, summary, dependencies, metrics"]
|
|
99
123
|
R2["~300 tokens<br/>Rung 2: Skeleton IR<br/>Signatures and control flow with bodies elided"]
|
|
100
124
|
R3["~600 tokens<br/>Rung 3: Hot-Path Excerpt<br/>Identifier-focused lines with context"]
|
|
101
125
|
R4["~2,000 tokens<br/>Rung 4: Raw Code Window<br/>Policy-gated full source"]
|
|
102
126
|
|
|
103
|
-
R1
|
|
127
|
+
R1 e1@--> R2
|
|
128
|
+
R2 e2@--> R3
|
|
129
|
+
R3 e3@--> R4
|
|
130
|
+
|
|
131
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
132
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
133
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
134
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
135
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
136
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
137
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
138
|
+
class e1,e2,e3 animate;
|
|
104
139
|
```
|
|
105
140
|
|
|
106
141
|
> **Most questions are answered at Rungs 1-2** without ever reading raw code. That's where the token savings come from.
|
|
@@ -133,6 +168,7 @@ flowchart TB
|
|
|
133
168
|
Every function, class, interface, type, and variable becomes a **Symbol Card**: a compact metadata record (~100 tokens) containing everything an agent needs to _understand_ a symbol without reading its code.
|
|
134
169
|
|
|
135
170
|
```mermaid
|
|
171
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
136
172
|
flowchart TB
|
|
137
173
|
Card["Symbol Card: validateToken"]
|
|
138
174
|
Kind["Kind: function (exported)"]
|
|
@@ -146,7 +182,25 @@ flowchart TB
|
|
|
146
182
|
Context["Context: auth-module, request-pipeline, auth.test.ts"]
|
|
147
183
|
ETag["ETag: a7f3c2..."]
|
|
148
184
|
|
|
149
|
-
Card
|
|
185
|
+
Card e1@--> Kind
|
|
186
|
+
Kind e2@--> File
|
|
187
|
+
File e3@--> Signature
|
|
188
|
+
Signature e4@--> Summary
|
|
189
|
+
Summary e5@--> Invariants
|
|
190
|
+
Invariants e6@--> SideEffects
|
|
191
|
+
SideEffects e7@--> Deps
|
|
192
|
+
Deps e8@--> Metrics
|
|
193
|
+
Metrics e9@--> Context
|
|
194
|
+
Context e10@--> ETag
|
|
195
|
+
|
|
196
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
197
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
198
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
199
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
200
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
201
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
202
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
203
|
+
class e1,e2,e3,e4,e5,e6,e7,e8,e9,e10 animate;
|
|
150
204
|
```
|
|
151
205
|
|
|
152
206
|
Cards include **confidence-scored call resolution** (the pass-2 resolver traces imports, aliases, barrel re-exports, and tagged templates to produce accurate dependency edges), **community detection** (cluster membership), and **call-chain tracing** (process participation with entry/intermediate/exit roles).
|
|
@@ -168,15 +222,25 @@ Cards include **confidence-scored call resolution** (the pass-2 resolver traces
|
|
|
168
222
|
Instead of reading files in the same directory, SDL-MCP follows the _dependency graph_. Starting from symbols relevant to your task, it traverses weighted edges (call: 1.0, config: 0.8, import: 0.6), scores each symbol by relevance, and returns the N most important within a token budget.
|
|
169
223
|
|
|
170
224
|
```mermaid
|
|
225
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
171
226
|
flowchart TD
|
|
172
|
-
Task["Task: Fix the auth middleware"]
|
|
173
|
-
Slice
|
|
174
|
-
Slice
|
|
175
|
-
Slice
|
|
176
|
-
Auth
|
|
177
|
-
Validate
|
|
178
|
-
Config
|
|
179
|
-
Env
|
|
227
|
+
Task["Task: Fix the auth middleware"] e1@--> Slice["sdl.slice.build"]
|
|
228
|
+
Slice e2@--> Auth["authenticate"]
|
|
229
|
+
Slice e3@--> Validate["validateToken"]
|
|
230
|
+
Slice e4@--> Config["JwtConfig"]
|
|
231
|
+
Auth e5@--> Hash["hashPassword"]
|
|
232
|
+
Validate e6@--> User["getUserById"]
|
|
233
|
+
Config e7@--> Env["envLoader"]
|
|
234
|
+
Env e8@-. frontier outside budget .-> Frontier["spillover frontier"]
|
|
235
|
+
|
|
236
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
237
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
238
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
239
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
240
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
241
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
242
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
243
|
+
class e1,e2,e3,e4,e5,e6,e7,e8 animate;
|
|
180
244
|
```
|
|
181
245
|
|
|
182
246
|
Slices have handles, leases, refresh (delta-only updates), and spillover (paged overflow). You can also skip the symbol search entirely — pass a `taskText` string and SDL-MCP auto-discovers the relevant entry symbols.
|
|
@@ -197,6 +261,7 @@ Slices have handles, leases, refresh (delta-only updates), and spillover (paged
|
|
|
197
261
|
`git diff` tells you what lines changed. SDL-MCP tells you what that change _means_ and who's affected.
|
|
198
262
|
|
|
199
263
|
```mermaid
|
|
264
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
200
265
|
flowchart TD
|
|
201
266
|
Change["Modified validateToken() signature"]
|
|
202
267
|
Sig["signatureDiff<br/>added options?: object"]
|
|
@@ -208,16 +273,25 @@ flowchart TD
|
|
|
208
273
|
A3["AuthMiddleware<br/>distance 2"]
|
|
209
274
|
A4["auth.test.ts<br/>re-run recommended"]
|
|
210
275
|
|
|
211
|
-
Change
|
|
212
|
-
Change
|
|
213
|
-
Change
|
|
214
|
-
Sig
|
|
215
|
-
Inv
|
|
216
|
-
Fx
|
|
217
|
-
Blast
|
|
218
|
-
Blast
|
|
219
|
-
Blast
|
|
220
|
-
Blast
|
|
276
|
+
Change e1@--> Sig
|
|
277
|
+
Change e2@--> Inv
|
|
278
|
+
Change e3@--> Fx
|
|
279
|
+
Sig e4@--> Blast
|
|
280
|
+
Inv e5@--> Blast
|
|
281
|
+
Fx e6@--> Blast
|
|
282
|
+
Blast e7@--> A1
|
|
283
|
+
Blast e8@--> A2
|
|
284
|
+
Blast e9@--> A3
|
|
285
|
+
Blast e10@--> A4
|
|
286
|
+
|
|
287
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
288
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
289
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
290
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
291
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
292
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
293
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
294
|
+
class e1,e2,e3,e4,e5,e6,e7,e8,e9,e10 animate;
|
|
221
295
|
```
|
|
222
296
|
|
|
223
297
|
**PR risk analysis** (`sdl.pr.risk.analyze`) wraps this into a scored assessment with findings, evidence, and test recommendations. **Fan-in trend analysis** detects "amplifier" symbols whose growing dependency count means changes ripple further over time.
|
|
@@ -238,12 +312,22 @@ flowchart TD
|
|
|
238
312
|
SDL-MCP doesn't wait for you to save. As you type in your editor, buffer updates are pushed to an in-memory overlay store, parsed in the background, and merged with the durable database. Search, cards, and slices reflect your _current_ code, not your last save.
|
|
239
313
|
|
|
240
314
|
```mermaid
|
|
315
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
241
316
|
flowchart LR
|
|
242
|
-
Editor["Editor keystrokes"]
|
|
243
|
-
Push
|
|
244
|
-
Overlay
|
|
245
|
-
Overlay
|
|
246
|
-
Persist
|
|
317
|
+
Editor["Editor keystrokes"] e1@--> Push["sdl.buffer.push"]
|
|
318
|
+
Push e2@--> Overlay["Overlay store"]
|
|
319
|
+
Overlay e3@--> Reads["Merged reads<br/>search, cards, slices"]
|
|
320
|
+
Overlay e4@--> Persist["save / idle checkpoint"]
|
|
321
|
+
Persist e5@--> DB["LadybugDB durable graph"]
|
|
322
|
+
|
|
323
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
324
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
325
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
326
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
327
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
328
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
329
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
330
|
+
class e1,e2,e3,e4,e5 animate;
|
|
247
331
|
```
|
|
248
332
|
|
|
249
333
|
**Why it matters:**
|
|
@@ -285,7 +369,7 @@ The sandboxed runtime execution tool (`sdl.runtime.execute`) has its own governa
|
|
|
285
369
|
|
|
286
370
|
The feedback loop (`sdl.agent.feedback`) records which symbols were useful and which were missing, improving future slice quality.
|
|
287
371
|
|
|
288
|
-
|
|
372
|
+
For portable exports such as tickets and PR descriptions, use the CLI `sdl-mcp summary` command. It generates token-bounded context briefings in markdown, JSON, or clipboard format for use outside MCP environments.
|
|
289
373
|
|
|
290
374
|
**Why it matters:**
|
|
291
375
|
|
|
@@ -317,15 +401,25 @@ Run tests, linters, and scripts through SDL-MCP's governance layer instead of un
|
|
|
317
401
|
Agents forget everything between sessions. SDL-MCP fixes this with an **opt-in graph-backed memory system** that lets agents store decisions, bugfix context, and task notes linked directly to the symbols and files they relate to. Memory is **disabled by default** and must be explicitly enabled in the configuration. When enabled, memories are stored both in the graph database (for fast querying) and as checked-in markdown files (for version control and team sharing).
|
|
318
402
|
|
|
319
403
|
```mermaid
|
|
404
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
320
405
|
flowchart LR
|
|
321
|
-
Session1["Agent session 1<br/>records bugfix memory"]
|
|
322
|
-
Store
|
|
323
|
-
Store
|
|
324
|
-
Graph
|
|
325
|
-
Graph
|
|
326
|
-
Session2["Agent session 2"]
|
|
327
|
-
Surface
|
|
328
|
-
Graph
|
|
406
|
+
Session1["Agent session 1<br/>records bugfix memory"] e1@--> Store["sdl.memory.store"]
|
|
407
|
+
Store e2@--> Graph["LadybugDB memory node"]
|
|
408
|
+
Store e3@--> Files[".sdl-memory/bugfixes/<id>.md"]
|
|
409
|
+
Graph e4@--> Link1["MEMORY_OF -> authenticate()"]
|
|
410
|
+
Graph e5@--> Link2["HAS_MEMORY -> repo"]
|
|
411
|
+
Session2["Agent session 2"] e6@--> Surface["sdl.memory.surface"]
|
|
412
|
+
Surface e7@--> Graph
|
|
413
|
+
Graph e8@--> Recall["Relevant memory surfaced<br/>race condition fix in authenticate()"]
|
|
414
|
+
|
|
415
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
416
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
417
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
418
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
419
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
420
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
421
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
422
|
+
class e1,e2,e3,e4,e5,e6,e7,e8 animate;
|
|
329
423
|
```
|
|
330
424
|
|
|
331
425
|
When enabled, memories are **automatically surfaced** inside graph slices — when an agent builds a slice touching symbols with linked memories, those memories appear alongside the cards. During re-indexing, memories linked to changed symbols are **flagged as stale**, prompting agents to review and update them. Four MCP tools (`store`, `query`, `remove`, `surface`) provide full CRUD plus intelligent ranking by confidence, recency, and symbol overlap. Memory tools are only available when memory is enabled in the configuration.
|
|
@@ -344,15 +438,25 @@ When enabled, memories are **automatically surfaced** inside graph slices — wh
|
|
|
344
438
|
|
|
345
439
|
### SCIP Integration — Compiler-Grade Cross-References
|
|
346
440
|
|
|
347
|
-
Tree-sitter gives SDL-MCP fast, syntax-level symbol extraction across
|
|
441
|
+
Tree-sitter gives SDL-MCP fast, syntax-level symbol extraction across the supported TypeScript/JavaScript, Python, Go, Java, C#, C/C++, PHP, Rust, Kotlin, and Shell surface. SCIP (Source Code Intelligence Protocol) supplements this with **compiler-grade cross-references** from tools like scip-typescript, scip-go, and rust-analyzer. Generate a `.scip` index file, point SDL-MCP at it, and heuristic edges are upgraded to exact compiler-verified edges, external dependency symbols become first-class graph nodes, and new `implements` edges reveal interface/trait relationships that syntax analysis cannot discover.
|
|
348
442
|
|
|
349
443
|
```mermaid
|
|
444
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
350
445
|
flowchart LR
|
|
351
|
-
Compiler["Compiler / Type Checker"]
|
|
352
|
-
SCIP
|
|
353
|
-
Ingest
|
|
354
|
-
Ingest
|
|
355
|
-
Ingest
|
|
446
|
+
Compiler["Compiler / Type Checker"] e1@--> SCIP[".scip index file"]
|
|
447
|
+
SCIP e2@--> Ingest["sdl.scip.ingest"]
|
|
448
|
+
Ingest e3@--> Upgrade["Heuristic edges → exact edges"]
|
|
449
|
+
Ingest e4@--> External["External dependency nodes"]
|
|
450
|
+
Ingest e5@--> Implements["implements edges"]
|
|
451
|
+
|
|
452
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
453
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
454
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
455
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
456
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
457
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
458
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
459
|
+
class e1,e2,e3,e4,e5 animate;
|
|
356
460
|
```
|
|
357
461
|
|
|
358
462
|
**Why it matters:**
|
|
@@ -369,7 +473,7 @@ flowchart LR
|
|
|
369
473
|
|
|
370
474
|
### CLI Tool Access — No MCP Server Required
|
|
371
475
|
|
|
372
|
-
Access
|
|
476
|
+
Access 30 SDL-MCP action aliases directly from the command line with `sdl-mcp tool`. No MCP server, transport, or SDK is required.
|
|
373
477
|
|
|
374
478
|
```bash
|
|
375
479
|
# Search for symbols
|
|
@@ -386,7 +490,7 @@ Features include typed argument coercion (string, number, boolean, string[], jso
|
|
|
386
490
|
|
|
387
491
|
**Why it matters:**
|
|
388
492
|
|
|
389
|
-
-
|
|
493
|
+
- 30 direct action aliases accessible from **any terminal** — no server, transport, or SDK required
|
|
390
494
|
- Same code paths and Zod validation as the MCP server — identical behavior
|
|
391
495
|
- Four output formats (json, json-compact, pretty, table) for scripting and CI pipelines
|
|
392
496
|
- Auto-resolves repoId from cwd, supports stdin JSON piping and per-action `--help`
|
|
@@ -395,24 +499,34 @@ Features include typed argument coercion (string, number, boolean, string[], jso
|
|
|
395
499
|
|
|
396
500
|
---
|
|
397
501
|
|
|
398
|
-
### Tool Gateway —
|
|
502
|
+
### Tool Gateway — Compact Tool Registration
|
|
399
503
|
|
|
400
|
-
The tool gateway
|
|
504
|
+
The tool gateway projects the 30 gateway-routable SDL actions into **4 namespace-scoped tools** (`sdl.query`, `sdl.code`, `sdl.repo`, `sdl.agent`), reducing `tools/list` overhead from the full flat schema surface to a compact gateway surface.
|
|
401
505
|
|
|
402
506
|
```mermaid
|
|
507
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
403
508
|
flowchart LR
|
|
404
|
-
Before["Flat mode<br/>
|
|
405
|
-
After
|
|
509
|
+
Before["Flat mode<br/>33 tools<br/>2 universal + 31 flat"] e1@--> After["Gateway mode<br/>6 tools<br/>2 universal + 4 gateway"]
|
|
510
|
+
After e2@--> Savings["Smaller tools/list payload<br/>lower agent startup overhead"]
|
|
511
|
+
|
|
512
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
513
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
514
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
515
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
516
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
517
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
518
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
519
|
+
class e1,e2 animate;
|
|
406
520
|
```
|
|
407
521
|
|
|
408
|
-
Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "symbol.search", repoId: "x", query: "auth" }`) and routes to the same handlers with double Zod validation. Thin wire schemas in `tools/list` keep the registration compact while full validation happens server-side.
|
|
522
|
+
Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "symbol.search", repoId: "x", query: "auth" }`) and routes to the same handlers with double Zod validation. Thin wire schemas in `tools/list` keep the registration compact while full validation happens server-side. The flat-only `sdl.file.write` action remains outside gateway mode today.
|
|
409
523
|
|
|
410
524
|
**Why it matters:**
|
|
411
525
|
|
|
412
526
|
- Large reduction in `tools/list` overhead for gateway-first agents
|
|
413
|
-
-
|
|
527
|
+
- 30 gateway-routable actions consolidated into 4 namespace-scoped tools for simpler agent selection
|
|
414
528
|
- Fewer tool choices means faster and more accurate tool dispatch by the agent
|
|
415
|
-
-
|
|
529
|
+
- Choose Code Mode for task-shaped retrieval first; opt out of exclusive Code Mode when you also need regular flat or gateway tools
|
|
416
530
|
|
|
417
531
|
[Tool Gateway Deep Dive →](./docs/feature-deep-dives/tool-gateway.md)
|
|
418
532
|
|
|
@@ -422,7 +536,16 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
|
|
|
422
536
|
|
|
423
537
|
<br/>
|
|
424
538
|
|
|
425
|
-
##
|
|
539
|
+
## Current Tool Surface at a Glance
|
|
540
|
+
|
|
541
|
+
| Mode | Tool count | Composition |
|
|
542
|
+
| :--- | :--------- | :---------- |
|
|
543
|
+
| Flat | `33` | `2` universal + `31` flat tools |
|
|
544
|
+
| Gateway | `6` | `2` universal + `4` gateway tools |
|
|
545
|
+
| Gateway + legacy | `37` | `2` universal + `4` gateway + `31` flat tools |
|
|
546
|
+
| Code Mode exclusive | `4` | `sdl.action.search`, `sdl.context`, `sdl.manual`, `sdl.workflow` |
|
|
547
|
+
|
|
548
|
+
The generated source of truth is [`docs/generated/tool-inventory.md`](./docs/generated/tool-inventory.md).
|
|
426
549
|
|
|
427
550
|
<table>
|
|
428
551
|
<tr><th>Category</th><th>Tool</th><th>One-Line Description</th></tr>
|
|
@@ -437,10 +560,9 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
|
|
|
437
560
|
<tr><td><code>sdl.buffer.checkpoint</code></td><td>Force-write pending buffers to the durable database</td></tr>
|
|
438
561
|
<tr><td><code>sdl.buffer.status</code></td><td>Live indexing diagnostics and queue depth</td></tr>
|
|
439
562
|
|
|
440
|
-
<tr><td rowspan="
|
|
563
|
+
<tr><td rowspan="2"><strong>Symbols</strong></td>
|
|
441
564
|
<td><code>sdl.symbol.search</code></td><td>Search symbols by name (with optional semantic reranking)</td></tr>
|
|
442
|
-
<tr><td><code>sdl.symbol.getCard</code></td><td>Get
|
|
443
|
-
<tr><td><code>sdl.symbol.getCard</code></td><td>Batch-fetch up to 100 cards in one round trip</td></tr>
|
|
565
|
+
<tr><td><code>sdl.symbol.getCard</code></td><td>Get one card or batch-fetch up to 100 cards with ETag-based conditional support</td></tr>
|
|
444
566
|
|
|
445
567
|
<tr><td rowspan="3"><strong>Slices</strong></td>
|
|
446
568
|
<td><code>sdl.slice.build</code></td><td>Build a task-scoped dependency subgraph</td></tr>
|
|
@@ -462,12 +584,8 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
|
|
|
462
584
|
<tr><td><strong>Risk</strong></td>
|
|
463
585
|
<td><code>sdl.pr.risk.analyze</code></td><td>Scored PR risk with findings and test recommendations</td></tr>
|
|
464
586
|
|
|
465
|
-
<tr><td><strong>
|
|
466
|
-
<td><code
|
|
467
|
-
|
|
468
|
-
<tr><td rowspan="3"><strong>Agent</strong></td>
|
|
469
|
-
<td><code>sdl.context</code></td><td>Task-shaped context retrieval with budget-controlled rung planning and conditional ETag fetch support</td></tr>
|
|
470
|
-
<tr><td><code>sdl.agent.feedback</code></td><td>Record which symbols were useful or missing</td></tr>
|
|
587
|
+
<tr><td rowspan="2"><strong>Agent</strong></td>
|
|
588
|
+
<td><code>sdl.agent.feedback</code></td><td>Record which symbols were useful or missing</td></tr>
|
|
471
589
|
<tr><td><code>sdl.agent.feedback.query</code></td><td>Query aggregated feedback statistics</td></tr>
|
|
472
590
|
|
|
473
591
|
<tr><td rowspan="2"><strong>Runtime</strong></td>
|
|
@@ -488,8 +606,9 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
|
|
|
488
606
|
<tr><td><strong>SCIP</strong></td>
|
|
489
607
|
<td><code>sdl.scip.ingest</code></td><td>Ingest a pre-built SCIP index for compiler-grade cross-references (with dry-run support)</td></tr>
|
|
490
608
|
|
|
491
|
-
<tr><td><strong>File</strong></td>
|
|
609
|
+
<tr><td rowspan="2"><strong>File</strong></td>
|
|
492
610
|
<td><code>sdl.file.read</code></td><td>Read non-indexed files (configs, docs, templates) with line-range, search, or JSON-path modes</td></tr>
|
|
611
|
+
<tr><td><code>sdl.file.write</code></td><td>Policy-aware write helper for non-indexed files and templates</td></tr>
|
|
493
612
|
|
|
494
613
|
<tr><td rowspan="3"><strong>Meta</strong></td>
|
|
495
614
|
<td><code>sdl.info</code></td><td>Runtime diagnostics — version, Node.js, platform, database, config paths</td></tr>
|
|
@@ -513,7 +632,7 @@ Each gateway tool accepts an `action` discriminator field (e.g., `{ action: "sym
|
|
|
513
632
|
| `sdl-mcp doctor` | Validate runtime, config, DB, grammars, repo access |
|
|
514
633
|
| `sdl-mcp index` | Index repositories (with optional `--watch` mode) |
|
|
515
634
|
| `sdl-mcp serve` | Start MCP server (`--stdio` or `--http`) |
|
|
516
|
-
| `sdl-mcp tool` | Access
|
|
635
|
+
| `sdl-mcp tool` | Access 30 direct action aliases ([docs](./docs/feature-deep-dives/cli-tool-access.md)) |
|
|
517
636
|
| `sdl-mcp info` | Runtime diagnostics — version, Node.js, platform, database, config |
|
|
518
637
|
| `sdl-mcp summary` | Generate copy/paste context summaries from the CLI |
|
|
519
638
|
| `sdl-mcp health` | Compute composite health score with badge/JSON output |
|
|
@@ -575,6 +694,7 @@ A **VSCode extension** (`sdl-mcp-vscode/`) provides live buffer integration for
|
|
|
575
694
|
## System Architecture
|
|
576
695
|
|
|
577
696
|
```mermaid
|
|
697
|
+
%%{init: {"theme":"base","themeVariables":{"background":"#ffffff","primaryColor":"#E7F8F2","primaryBorderColor":"#0F766E","primaryTextColor":"#102A43","secondaryColor":"#E8F1FF","secondaryBorderColor":"#2563EB","secondaryTextColor":"#102A43","tertiaryColor":"#FFF4D6","tertiaryBorderColor":"#B45309","tertiaryTextColor":"#102A43","lineColor":"#0F766E","textColor":"#102A43","fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif"},"flowchart":{"curve":"basis","htmlLabels":true}}}%%
|
|
578
698
|
flowchart TD
|
|
579
699
|
Clients["MCP clients<br/>Claude Code, Claude Desktop, Cursor, Windsurf, Codex, Gemini"]
|
|
580
700
|
Gateway["Tool gateway<br/>sdl.query, sdl.code, sdl.repo, sdl.agent"]
|
|
@@ -583,12 +703,21 @@ flowchart TD
|
|
|
583
703
|
Graph["LadybugDB graph<br/>symbols, edges, files, versions, memories"]
|
|
584
704
|
Indexer["Indexer pipeline<br/>Rust native or Tree-sitter fallback<br/>pass 1, pass 2, semantic enrichment"]
|
|
585
705
|
|
|
586
|
-
Clients
|
|
587
|
-
Clients
|
|
588
|
-
Gateway
|
|
589
|
-
Flat
|
|
590
|
-
Policy
|
|
591
|
-
Indexer
|
|
706
|
+
Clients e1@--> Gateway
|
|
707
|
+
Clients e2@--> Flat
|
|
708
|
+
Gateway e3@--> Policy
|
|
709
|
+
Flat e4@--> Policy
|
|
710
|
+
Policy e5@--> Graph
|
|
711
|
+
Indexer e6@--> Graph
|
|
712
|
+
|
|
713
|
+
classDef source fill:#E7F8F2,stroke:#0F766E,stroke-width:2px,color:#102A43;
|
|
714
|
+
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
|
|
715
|
+
classDef decision fill:#FFF4D6,stroke:#B45309,stroke-width:2px,color:#102A43;
|
|
716
|
+
classDef storage fill:#F2E8FF,stroke:#7C3AED,stroke-width:2px,color:#102A43;
|
|
717
|
+
classDef output fill:#FFE8EF,stroke:#BE123C,stroke-width:2px,color:#102A43;
|
|
718
|
+
classDef muted fill:#F8FAFC,stroke:#64748B,stroke-width:1px,color:#102A43;
|
|
719
|
+
classDef animate stroke:#0F766E,stroke-width:2px,stroke-dasharray:10\,5,stroke-dashoffset:900,animation:dash 22s linear infinite;
|
|
720
|
+
class e1,e2,e3,e4,e5,e6 animate;
|
|
592
721
|
```
|
|
593
722
|
|
|
594
723
|
[Full Architecture Documentation →](./docs/architecture.md)
|
|
@@ -604,7 +733,7 @@ flowchart TD
|
|
|
604
733
|
| Document | Description |
|
|
605
734
|
| :---------------------------------------------------------------- | :------------------------------------------------------------------------------ |
|
|
606
735
|
| [Getting Started](./docs/getting-started.md) | Installation, 5-minute setup, MCP client config |
|
|
607
|
-
| [MCP Tools Reference](./docs/mcp-tools-detailed.md) | Detailed docs for
|
|
736
|
+
| [MCP Tools Reference](./docs/mcp-tools-detailed.md) | Detailed docs for the current flat, gateway, and Code Mode surfaces |
|
|
608
737
|
| [CLI Reference](./docs/cli-reference.md) | All CLI commands and options |
|
|
609
738
|
| [Configuration Reference](./docs/configuration-reference.md) | Every config option with defaults and guidance |
|
|
610
739
|
| [Agent Workflows](./docs/agent-workflows.md) | Workflow instructions for CLAUDE.md / AGENTS.md |
|
|
@@ -625,8 +754,8 @@ flowchart TD
|
|
|
625
754
|
| [Context Modes](./docs/feature-deep-dives/context-modes.md) | Precise vs broad retrieval, adaptive symbol ranking, benchmark trade-offs |
|
|
626
755
|
| [Indexing & Languages](./docs/feature-deep-dives/indexing-languages.md) | Rust/TS engines, two-pass architecture, 12-language support |
|
|
627
756
|
| [Runtime Execution](./docs/feature-deep-dives/runtime-execution.md) | Sandboxed subprocess execution with governance |
|
|
628
|
-
| [CLI Tool Access](./docs/feature-deep-dives/cli-tool-access.md) | Direct CLI access to
|
|
629
|
-
| [Tool Gateway](./docs/feature-deep-dives/tool-gateway.md) |
|
|
757
|
+
| [CLI Tool Access](./docs/feature-deep-dives/cli-tool-access.md) | Direct CLI access to 30 action aliases, output formats, stdin piping, scripting |
|
|
758
|
+
| [Tool Gateway](./docs/feature-deep-dives/tool-gateway.md) | 30 gateway-routable actions, 4 namespace tools, thin schemas, migration guide |
|
|
630
759
|
| [Semantic Engine](./docs/feature-deep-dives/semantic-engine.md) | Pass-2 call resolution, embedding search, LLM summaries, confidence scoring |
|
|
631
760
|
| [Semantic Embeddings Setup](./docs/feature-deep-dives/semantic-embeddings-setup.md) | Dependencies, model installation, provider configuration, tier-by-tier setup |
|
|
632
761
|
| [Code Mode](./docs/feature-deep-dives/code-mode.md) | `sdl.context`, `sdl.workflow`, action discovery, manual reference, one-call workflows |
|
|
@@ -5,12 +5,23 @@
|
|
|
5
5
|
"repoId": "my-repo",
|
|
6
6
|
"rootPath": ".",
|
|
7
7
|
"ignore": [
|
|
8
|
-
"
|
|
8
|
+
"**/.git/**",
|
|
9
9
|
"**/dist/**",
|
|
10
|
-
"
|
|
10
|
+
"**/dist-*/**",
|
|
11
11
|
"**/build/**",
|
|
12
|
-
"
|
|
13
|
-
"**/
|
|
12
|
+
"**/out/**",
|
|
13
|
+
"**/target/**",
|
|
14
|
+
"**/coverage/**",
|
|
15
|
+
"**/node_modules/**",
|
|
16
|
+
"**/vendor/**",
|
|
17
|
+
"**/.next/**",
|
|
18
|
+
"**/__pycache__/**",
|
|
19
|
+
"**/.venv/**",
|
|
20
|
+
"**/.tmp/**",
|
|
21
|
+
"**/.claude/**",
|
|
22
|
+
"**/.codex/**",
|
|
23
|
+
"**/.cursor/**",
|
|
24
|
+
"**/.sdl-memory/**"
|
|
14
25
|
],
|
|
15
26
|
"languages": [
|
|
16
27
|
"ts",
|
|
@@ -40,6 +51,7 @@
|
|
|
40
51
|
}
|
|
41
52
|
}
|
|
42
53
|
],
|
|
54
|
+
"performanceTier": "auto",
|
|
43
55
|
"graphDatabase": {
|
|
44
56
|
"path": "./data/sdl-mcp-graph.lbug"
|
|
45
57
|
},
|
|
@@ -61,7 +73,8 @@
|
|
|
61
73
|
"maxWatchedFiles": 25000,
|
|
62
74
|
"workerPoolSize": null,
|
|
63
75
|
"engine": "rust",
|
|
64
|
-
"watchDebounceMs": 300
|
|
76
|
+
"watchDebounceMs": 300,
|
|
77
|
+
"pass2Concurrency": 1
|
|
65
78
|
},
|
|
66
79
|
"liveIndex": {
|
|
67
80
|
"enabled": true,
|
|
@@ -111,6 +124,7 @@
|
|
|
111
124
|
"summaryApiBaseUrl": null,
|
|
112
125
|
"summaryMaxConcurrency": 5,
|
|
113
126
|
"summaryBatchSize": 20,
|
|
127
|
+
"embeddingConcurrency": 1,
|
|
114
128
|
"retrieval": {
|
|
115
129
|
"mode": "hybrid",
|
|
116
130
|
"extensionsOptional": true,
|
|
@@ -4,12 +4,24 @@
|
|
|
4
4
|
"repoId": "my-repo",
|
|
5
5
|
"rootPath": ".",
|
|
6
6
|
"ignore": [
|
|
7
|
-
"
|
|
7
|
+
"**/.git/**",
|
|
8
8
|
"**/dist/**",
|
|
9
|
-
"
|
|
9
|
+
"**/dist-*/**",
|
|
10
10
|
"**/build/**",
|
|
11
|
-
"
|
|
11
|
+
"**/out/**",
|
|
12
|
+
"**/target/**",
|
|
12
13
|
"**/coverage/**",
|
|
14
|
+
"**/node_modules/**",
|
|
15
|
+
"**/vendor/**",
|
|
16
|
+
"**/.next/**",
|
|
17
|
+
"**/__pycache__/**",
|
|
18
|
+
"**/.venv/**",
|
|
19
|
+
"**/.tmp/**",
|
|
20
|
+
"**/.claude/**",
|
|
21
|
+
"**/.codex/**",
|
|
22
|
+
"**/.cursor/**",
|
|
23
|
+
"**/.sdl-memory/**",
|
|
24
|
+
"**/.sisyphus/**",
|
|
13
25
|
"**/native/target/**"
|
|
14
26
|
],
|
|
15
27
|
"languages": [
|