sdl-mcp 0.8.6 → 0.8.9
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 +408 -183
- package/config/sdlmcp.config.example.json +4 -3
- package/config/sdlmcp.config.schema.json +104 -7
- package/dist/agent/orchestrator.d.ts.map +1 -1
- package/dist/agent/orchestrator.js +5 -1
- package/dist/agent/orchestrator.js.map +1 -1
- package/dist/benchmark/matrix-runner.d.ts +3 -0
- package/dist/benchmark/matrix-runner.d.ts.map +1 -0
- package/dist/benchmark/matrix-runner.js +18 -0
- package/dist/benchmark/matrix-runner.js.map +1 -0
- package/dist/cli/argParsing.d.ts +2 -1
- package/dist/cli/argParsing.d.ts.map +1 -1
- package/dist/cli/argParsing.js +37 -0
- package/dist/cli/argParsing.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +127 -33
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/serve.d.ts.map +1 -1
- package/dist/cli/commands/serve.js +15 -4
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/tool-actions.d.ts +38 -0
- package/dist/cli/commands/tool-actions.d.ts.map +1 -0
- package/dist/cli/commands/tool-actions.js +454 -0
- package/dist/cli/commands/tool-actions.js.map +1 -0
- package/dist/cli/commands/tool-arg-parser.d.ts +27 -0
- package/dist/cli/commands/tool-arg-parser.d.ts.map +1 -0
- package/dist/cli/commands/tool-arg-parser.js +135 -0
- package/dist/cli/commands/tool-arg-parser.js.map +1 -0
- package/dist/cli/commands/tool-dispatch.d.ts +28 -0
- package/dist/cli/commands/tool-dispatch.d.ts.map +1 -0
- package/dist/cli/commands/tool-dispatch.js +222 -0
- package/dist/cli/commands/tool-dispatch.js.map +1 -0
- package/dist/cli/commands/tool-output.d.ts +20 -0
- package/dist/cli/commands/tool-output.d.ts.map +1 -0
- package/dist/cli/commands/tool-output.js +205 -0
- package/dist/cli/commands/tool-output.js.map +1 -0
- package/dist/cli/index.js +12 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/transport/http.d.ts +4 -0
- package/dist/cli/transport/http.d.ts.map +1 -1
- package/dist/cli/transport/http.js +141 -26
- package/dist/cli/transport/http.js.map +1 -1
- package/dist/cli/transport/stdio.d.ts.map +1 -1
- package/dist/cli/transport/stdio.js.map +1 -1
- package/dist/cli/types.d.ts +12 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/code/gate.d.ts.map +1 -1
- package/dist/code/gate.js +4 -12
- package/dist/code/gate.js.map +1 -1
- package/dist/code/hotpath.d.ts.map +1 -1
- package/dist/code/hotpath.js +2 -2
- package/dist/code/hotpath.js.map +1 -1
- package/dist/code/redact.d.ts.map +1 -1
- package/dist/code/redact.js +3 -1
- package/dist/code/redact.js.map +1 -1
- package/dist/code/skeleton.d.ts +1 -1
- package/dist/code/skeleton.d.ts.map +1 -1
- package/dist/code/skeleton.js +4 -4
- package/dist/code/skeleton.js.map +1 -1
- package/dist/code/windows.d.ts.map +1 -1
- package/dist/code/windows.js +162 -17
- package/dist/code/windows.js.map +1 -1
- package/dist/config/constants.d.ts +104 -0
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +107 -0
- package/dist/config/constants.js.map +1 -1
- package/dist/config/loadConfig.js +5 -5
- package/dist/config/loadConfig.js.map +1 -1
- package/dist/config/types.d.ts +165 -8
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +60 -4
- package/dist/config/types.js.map +1 -1
- package/dist/db/ladybug-clusters.d.ts +4 -0
- package/dist/db/ladybug-clusters.d.ts.map +1 -1
- package/dist/db/ladybug-clusters.js +22 -15
- package/dist/db/ladybug-clusters.js.map +1 -1
- package/dist/db/ladybug-core.d.ts +8 -0
- package/dist/db/ladybug-core.d.ts.map +1 -1
- package/dist/db/ladybug-core.js +60 -5
- package/dist/db/ladybug-core.js.map +1 -1
- package/dist/db/ladybug-embeddings.d.ts +2 -0
- package/dist/db/ladybug-embeddings.d.ts.map +1 -1
- package/dist/db/ladybug-embeddings.js +34 -0
- package/dist/db/ladybug-embeddings.js.map +1 -1
- package/dist/db/ladybug-feedback.d.ts.map +1 -1
- package/dist/db/ladybug-feedback.js +4 -15
- package/dist/db/ladybug-feedback.js.map +1 -1
- package/dist/db/ladybug-metrics.d.ts +1 -0
- package/dist/db/ladybug-metrics.d.ts.map +1 -1
- package/dist/db/ladybug-metrics.js +24 -0
- package/dist/db/ladybug-metrics.js.map +1 -1
- package/dist/db/ladybug-processes.d.ts.map +1 -1
- package/dist/db/ladybug-processes.js +15 -13
- package/dist/db/ladybug-processes.js.map +1 -1
- package/dist/db/ladybug-repos.d.ts.map +1 -1
- package/dist/db/ladybug-repos.js +14 -7
- package/dist/db/ladybug-repos.js.map +1 -1
- package/dist/db/ladybug-schema.d.ts.map +1 -1
- package/dist/db/ladybug-schema.js +20 -1
- package/dist/db/ladybug-schema.js.map +1 -1
- package/dist/db/ladybug-slices.d.ts.map +1 -1
- package/dist/db/ladybug-slices.js +5 -3
- package/dist/db/ladybug-slices.js.map +1 -1
- package/dist/db/ladybug-symbols.d.ts.map +1 -1
- package/dist/db/ladybug-symbols.js +42 -18
- package/dist/db/ladybug-symbols.js.map +1 -1
- package/dist/db/ladybug.d.ts +5 -3
- package/dist/db/ladybug.d.ts.map +1 -1
- package/dist/db/ladybug.js +35 -15
- package/dist/db/ladybug.js.map +1 -1
- package/dist/delta/blastRadius.js +16 -10
- package/dist/delta/blastRadius.js.map +1 -1
- package/dist/delta/diff.d.ts +2 -0
- package/dist/delta/diff.d.ts.map +1 -1
- package/dist/delta/diff.js +19 -8
- package/dist/delta/diff.js.map +1 -1
- package/dist/domain/errors.d.ts +31 -1
- package/dist/domain/errors.d.ts.map +1 -1
- package/dist/domain/errors.js +66 -0
- package/dist/domain/errors.js.map +1 -1
- package/dist/experiments/event-log-replay.d.ts.map +1 -1
- package/dist/experiments/event-log-replay.js +3 -3
- package/dist/experiments/event-log-replay.js.map +1 -1
- package/dist/gateway/compact-schema.d.ts +9 -0
- package/dist/gateway/compact-schema.d.ts.map +1 -0
- package/dist/gateway/compact-schema.js +138 -0
- package/dist/gateway/compact-schema.js.map +1 -0
- package/dist/gateway/descriptions.d.ts +9 -0
- package/dist/gateway/descriptions.d.ts.map +1 -0
- package/dist/gateway/descriptions.js +26 -0
- package/dist/gateway/descriptions.js.map +1 -0
- package/dist/gateway/index.d.ts +20 -0
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +29 -0
- package/dist/gateway/index.js.map +1 -0
- package/dist/gateway/legacy.d.ts +16 -0
- package/dist/gateway/legacy.d.ts.map +1 -0
- package/dist/gateway/legacy.js +46 -0
- package/dist/gateway/legacy.js.map +1 -0
- package/dist/gateway/router.d.ts +34 -0
- package/dist/gateway/router.d.ts.map +1 -0
- package/dist/gateway/router.js +153 -0
- package/dist/gateway/router.js.map +1 -0
- package/dist/gateway/schemas.d.ts +697 -0
- package/dist/gateway/schemas.d.ts.map +1 -0
- package/dist/gateway/schemas.js +301 -0
- package/dist/gateway/schemas.js.map +1 -0
- package/dist/gateway/thin-schemas.d.ts +14 -0
- package/dist/gateway/thin-schemas.d.ts.map +1 -0
- package/dist/gateway/thin-schemas.js +35 -0
- package/dist/gateway/thin-schemas.js.map +1 -0
- package/dist/graph/buildGraph.d.ts +4 -1
- package/dist/graph/buildGraph.d.ts.map +1 -1
- package/dist/graph/buildGraph.js.map +1 -1
- package/dist/graph/cache.d.ts +5 -0
- package/dist/graph/cache.d.ts.map +1 -1
- package/dist/graph/cache.js +38 -10
- package/dist/graph/cache.js.map +1 -1
- package/dist/graph/graphSnapshotCache.d.ts +64 -0
- package/dist/graph/graphSnapshotCache.d.ts.map +1 -0
- package/dist/graph/graphSnapshotCache.js +254 -0
- package/dist/graph/graphSnapshotCache.js.map +1 -0
- package/dist/graph/metrics.d.ts.map +1 -1
- package/dist/graph/metrics.js +2 -1
- package/dist/graph/metrics.js.map +1 -1
- package/dist/graph/minHeap.d.ts +9 -0
- package/dist/graph/minHeap.d.ts.map +1 -1
- package/dist/graph/minHeap.js +29 -0
- package/dist/graph/minHeap.js.map +1 -1
- package/dist/graph/overview.d.ts.map +1 -1
- package/dist/graph/overview.js +8 -12
- package/dist/graph/overview.js.map +1 -1
- package/dist/graph/slice/beam-search-engine.d.ts +10 -0
- package/dist/graph/slice/beam-search-engine.d.ts.map +1 -1
- package/dist/graph/slice/beam-search-engine.js +134 -18
- package/dist/graph/slice/beam-search-engine.js.map +1 -1
- package/dist/graph/slice/truncation-handler.d.ts +1 -1
- package/dist/graph/slice/truncation-handler.d.ts.map +1 -1
- package/dist/graph/slice/truncation-handler.js +2 -2
- package/dist/graph/slice/truncation-handler.js.map +1 -1
- package/dist/graph/slice.d.ts.map +1 -1
- package/dist/graph/slice.js +48 -46
- package/dist/graph/slice.js.map +1 -1
- package/dist/graph/sliceCache.d.ts.map +1 -1
- package/dist/graph/sliceCache.js +9 -13
- package/dist/graph/sliceCache.js.map +1 -1
- package/dist/indexer/adapter/cpp.d.ts +2 -1
- package/dist/indexer/adapter/cpp.d.ts.map +1 -1
- package/dist/indexer/adapter/cpp.js +62 -1
- package/dist/indexer/adapter/cpp.js.map +1 -1
- package/dist/indexer/adapter/csharp.d.ts +2 -1
- package/dist/indexer/adapter/csharp.d.ts.map +1 -1
- package/dist/indexer/adapter/csharp.js +47 -1
- package/dist/indexer/adapter/csharp.js.map +1 -1
- package/dist/indexer/adapter/kotlin.d.ts +2 -1
- package/dist/indexer/adapter/kotlin.d.ts.map +1 -1
- package/dist/indexer/adapter/kotlin.js +43 -0
- package/dist/indexer/adapter/kotlin.js.map +1 -1
- package/dist/indexer/adapter/php.d.ts +2 -1
- package/dist/indexer/adapter/php.d.ts.map +1 -1
- package/dist/indexer/adapter/php.js +78 -4
- package/dist/indexer/adapter/php.js.map +1 -1
- package/dist/indexer/adapter/plugin/types.d.ts +1 -1
- package/dist/indexer/adapter/plugin/types.d.ts.map +1 -1
- package/dist/indexer/adapter/plugin/types.js.map +1 -1
- package/dist/indexer/adapter/rust.d.ts +2 -1
- package/dist/indexer/adapter/rust.d.ts.map +1 -1
- package/dist/indexer/adapter/rust.js +57 -0
- package/dist/indexer/adapter/rust.js.map +1 -1
- package/dist/indexer/ann-index.d.ts +1 -0
- package/dist/indexer/ann-index.d.ts.map +1 -1
- package/dist/indexer/ann-index.js +7 -2
- package/dist/indexer/ann-index.js.map +1 -1
- package/dist/indexer/configEdges.d.ts +1 -0
- package/dist/indexer/configEdges.d.ts.map +1 -1
- package/dist/indexer/configEdges.js +12 -0
- package/dist/indexer/configEdges.js.map +1 -1
- package/dist/indexer/edge-builder/cleanup.js +3 -2
- package/dist/indexer/edge-builder/cleanup.js.map +1 -1
- package/dist/indexer/edge-builder/pass2.d.ts.map +1 -1
- package/dist/indexer/edge-builder/pass2.js +9 -4
- package/dist/indexer/edge-builder/pass2.js.map +1 -1
- package/dist/indexer/embeddings-local.d.ts +21 -0
- package/dist/indexer/embeddings-local.d.ts.map +1 -1
- package/dist/indexer/embeddings-local.js +188 -4
- package/dist/indexer/embeddings-local.js.map +1 -1
- package/dist/indexer/embeddings.d.ts +4 -1
- package/dist/indexer/embeddings.d.ts.map +1 -1
- package/dist/indexer/embeddings.js +218 -17
- package/dist/indexer/embeddings.js.map +1 -1
- package/dist/indexer/fingerprints.d.ts +2 -0
- package/dist/indexer/fingerprints.d.ts.map +1 -1
- package/dist/indexer/fingerprints.js +10 -6
- package/dist/indexer/fingerprints.js.map +1 -1
- package/dist/indexer/import-resolution/c-include-adapter.d.ts +7 -0
- package/dist/indexer/import-resolution/c-include-adapter.d.ts.map +1 -0
- package/dist/indexer/import-resolution/c-include-adapter.js +47 -0
- package/dist/indexer/import-resolution/c-include-adapter.js.map +1 -0
- package/dist/indexer/import-resolution/csharp-adapter.d.ts +7 -0
- package/dist/indexer/import-resolution/csharp-adapter.d.ts.map +1 -0
- package/dist/indexer/import-resolution/csharp-adapter.js +47 -0
- package/dist/indexer/import-resolution/csharp-adapter.js.map +1 -0
- package/dist/indexer/import-resolution/python-adapter.d.ts +7 -0
- package/dist/indexer/import-resolution/python-adapter.d.ts.map +1 -0
- package/dist/indexer/import-resolution/python-adapter.js +58 -0
- package/dist/indexer/import-resolution/python-adapter.js.map +1 -0
- package/dist/indexer/import-resolution/registry.d.ts.map +1 -1
- package/dist/indexer/import-resolution/registry.js +8 -0
- package/dist/indexer/import-resolution/registry.js.map +1 -1
- package/dist/indexer/import-resolution/shell-adapter.d.ts +7 -0
- package/dist/indexer/import-resolution/shell-adapter.d.ts.map +1 -0
- package/dist/indexer/import-resolution/shell-adapter.js +35 -0
- package/dist/indexer/import-resolution/shell-adapter.js.map +1 -0
- package/dist/indexer/indexer.d.ts.map +1 -1
- package/dist/indexer/indexer.js +18 -6
- package/dist/indexer/indexer.js.map +1 -1
- package/dist/indexer/metrics-updater.d.ts.map +1 -1
- package/dist/indexer/metrics-updater.js +31 -12
- package/dist/indexer/metrics-updater.js.map +1 -1
- package/dist/indexer/model-downloader.d.ts +8 -0
- package/dist/indexer/model-downloader.d.ts.map +1 -0
- package/dist/indexer/model-downloader.js +69 -0
- package/dist/indexer/model-downloader.js.map +1 -0
- package/dist/indexer/model-registry.d.ts +54 -0
- package/dist/indexer/model-registry.d.ts.map +1 -0
- package/dist/indexer/model-registry.js +124 -0
- package/dist/indexer/model-registry.js.map +1 -0
- package/dist/indexer/parser/helpers.d.ts +32 -1
- package/dist/indexer/parser/helpers.d.ts.map +1 -1
- package/dist/indexer/parser/helpers.js +54 -0
- package/dist/indexer/parser/helpers.js.map +1 -1
- package/dist/indexer/parser/process-file.d.ts.map +1 -1
- package/dist/indexer/parser/process-file.js +39 -52
- package/dist/indexer/parser/process-file.js.map +1 -1
- package/dist/indexer/parser/rust-process-file.js.map +1 -1
- package/dist/indexer/pass2/registry.d.ts.map +1 -1
- package/dist/indexer/pass2/registry.js +18 -0
- package/dist/indexer/pass2/registry.js.map +1 -1
- package/dist/indexer/pass2/resolvers/c-pass2-resolver.d.ts +7 -0
- package/dist/indexer/pass2/resolvers/c-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/c-pass2-resolver.js +556 -0
- package/dist/indexer/pass2/resolvers/c-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/cpp-pass2-resolver.d.ts +67 -0
- package/dist/indexer/pass2/resolvers/cpp-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/cpp-pass2-resolver.js +744 -0
- package/dist/indexer/pass2/resolvers/cpp-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/csharp-pass2-resolver.d.ts +7 -0
- package/dist/indexer/pass2/resolvers/csharp-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/csharp-pass2-resolver.js +752 -0
- package/dist/indexer/pass2/resolvers/csharp-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/java-pass2-resolver.d.ts +7 -0
- package/dist/indexer/pass2/resolvers/java-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/java-pass2-resolver.js +687 -0
- package/dist/indexer/pass2/resolvers/java-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/kotlin-pass2-resolver.d.ts +7 -0
- package/dist/indexer/pass2/resolvers/kotlin-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/kotlin-pass2-resolver.js +622 -0
- package/dist/indexer/pass2/resolvers/kotlin-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/php-pass2-resolver.d.ts +7 -0
- package/dist/indexer/pass2/resolvers/php-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/php-pass2-resolver.js +825 -0
- package/dist/indexer/pass2/resolvers/php-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/python-pass2-resolver.d.ts +7 -0
- package/dist/indexer/pass2/resolvers/python-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/python-pass2-resolver.js +663 -0
- package/dist/indexer/pass2/resolvers/python-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/rust-pass2-resolver.d.ts +78 -0
- package/dist/indexer/pass2/resolvers/rust-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/rust-pass2-resolver.js +625 -0
- package/dist/indexer/pass2/resolvers/rust-pass2-resolver.js.map +1 -0
- package/dist/indexer/pass2/resolvers/shell-pass2-resolver.d.ts +7 -0
- package/dist/indexer/pass2/resolvers/shell-pass2-resolver.d.ts.map +1 -0
- package/dist/indexer/pass2/resolvers/shell-pass2-resolver.js +411 -0
- package/dist/indexer/pass2/resolvers/shell-pass2-resolver.js.map +1 -0
- package/dist/indexer/rustIndexer.d.ts +3 -0
- package/dist/indexer/rustIndexer.d.ts.map +1 -1
- package/dist/indexer/rustIndexer.js +118 -42
- package/dist/indexer/rustIndexer.js.map +1 -1
- package/dist/indexer/scanner.d.ts.map +1 -1
- package/dist/indexer/scanner.js +4 -2
- package/dist/indexer/scanner.js.map +1 -1
- package/dist/indexer/summary-generator.d.ts +2 -1
- package/dist/indexer/summary-generator.d.ts.map +1 -1
- package/dist/indexer/summary-generator.js +100 -11
- package/dist/indexer/summary-generator.js.map +1 -1
- package/dist/indexer/treesitter/extractCalls.d.ts.map +1 -1
- package/dist/indexer/treesitter/extractCalls.js +14 -10
- package/dist/indexer/treesitter/extractCalls.js.map +1 -1
- package/dist/indexer/treesitter/extractSymbols.d.ts.map +1 -1
- package/dist/indexer/treesitter/extractSymbols.js +7 -11
- package/dist/indexer/treesitter/extractSymbols.js.map +1 -1
- package/dist/indexer/watcher.d.ts.map +1 -1
- package/dist/indexer/watcher.js +12 -3
- package/dist/indexer/watcher.js.map +1 -1
- package/dist/indexer/workerPool.d.ts.map +1 -1
- package/dist/indexer/workerPool.js +5 -0
- package/dist/indexer/workerPool.js.map +1 -1
- package/dist/live-index/coordinator.d.ts +1 -0
- package/dist/live-index/coordinator.d.ts.map +1 -1
- package/dist/live-index/coordinator.js +6 -0
- package/dist/live-index/coordinator.js.map +1 -1
- package/dist/live-index/draft-parser.d.ts.map +1 -1
- package/dist/live-index/draft-parser.js +14 -6
- package/dist/live-index/draft-parser.js.map +1 -1
- package/dist/main.js +1 -2
- package/dist/main.js.map +1 -1
- package/dist/mcp/errors.d.ts +6 -5
- package/dist/mcp/errors.d.ts.map +1 -1
- package/dist/mcp/errors.js +14 -7
- package/dist/mcp/errors.js.map +1 -1
- package/dist/mcp/health.d.ts.map +1 -1
- package/dist/mcp/health.js +4 -9
- package/dist/mcp/health.js.map +1 -1
- package/dist/mcp/resources.d.ts.map +1 -1
- package/dist/mcp/resources.js +5 -12
- package/dist/mcp/resources.js.map +1 -1
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +3 -2
- package/dist/mcp/session-manager.js.map +1 -1
- package/dist/mcp/summary.d.ts.map +1 -1
- package/dist/mcp/summary.js +4 -5
- package/dist/mcp/summary.js.map +1 -1
- package/dist/mcp/telemetry.d.ts +18 -0
- package/dist/mcp/telemetry.d.ts.map +1 -1
- package/dist/mcp/telemetry.js +44 -8
- package/dist/mcp/telemetry.js.map +1 -1
- package/dist/mcp/tools/agent-feedback.d.ts.map +1 -1
- package/dist/mcp/tools/agent-feedback.js +4 -3
- package/dist/mcp/tools/agent-feedback.js.map +1 -1
- package/dist/mcp/tools/agent.d.ts +12 -12
- package/dist/mcp/tools/code.d.ts.map +1 -1
- package/dist/mcp/tools/code.js +46 -23
- package/dist/mcp/tools/code.js.map +1 -1
- package/dist/mcp/tools/delta.d.ts.map +1 -1
- package/dist/mcp/tools/delta.js +3 -2
- package/dist/mcp/tools/delta.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +4 -1
- package/dist/mcp/tools/index.d.ts.map +1 -1
- package/dist/mcp/tools/index.js +14 -2
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/policy.d.ts.map +1 -1
- package/dist/mcp/tools/policy.js +3 -22
- package/dist/mcp/tools/policy.js.map +1 -1
- package/dist/mcp/tools/prRisk.d.ts.map +1 -1
- package/dist/mcp/tools/prRisk.js +11 -9
- 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 +3 -0
- package/dist/mcp/tools/repo.js.map +1 -1
- package/dist/mcp/tools/runtime.d.ts +10 -0
- package/dist/mcp/tools/runtime.d.ts.map +1 -0
- package/dist/mcp/tools/runtime.js +300 -0
- package/dist/mcp/tools/runtime.js.map +1 -0
- package/dist/mcp/tools/slice-wire-format.d.ts +14 -0
- package/dist/mcp/tools/slice-wire-format.d.ts.map +1 -0
- package/dist/mcp/tools/slice-wire-format.js +482 -0
- package/dist/mcp/tools/slice-wire-format.js.map +1 -0
- package/dist/mcp/tools/slice.d.ts +2 -10
- package/dist/mcp/tools/slice.d.ts.map +1 -1
- package/dist/mcp/tools/slice.js +33 -549
- 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 +143 -28
- package/dist/mcp/tools/symbol.js.map +1 -1
- package/dist/mcp/tools.d.ts +206 -55
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +135 -37
- package/dist/mcp/tools.js.map +1 -1
- package/dist/policy/engine.d.ts +9 -2
- package/dist/policy/engine.d.ts.map +1 -1
- package/dist/policy/engine.js +205 -0
- package/dist/policy/engine.js.map +1 -1
- package/dist/policy/types.d.ts +35 -8
- package/dist/policy/types.d.ts.map +1 -1
- package/dist/policy/types.js +1 -1
- package/dist/policy/types.js.map +1 -1
- package/dist/runtime/artifacts.d.ts +28 -0
- package/dist/runtime/artifacts.d.ts.map +1 -0
- package/dist/runtime/artifacts.js +216 -0
- package/dist/runtime/artifacts.js.map +1 -0
- package/dist/runtime/executor.d.ts +9 -0
- package/dist/runtime/executor.d.ts.map +1 -0
- package/dist/runtime/executor.js +230 -0
- package/dist/runtime/executor.js.map +1 -0
- package/dist/runtime/runtimes.d.ts +26 -0
- package/dist/runtime/runtimes.d.ts.map +1 -0
- package/dist/runtime/runtimes.js +269 -0
- package/dist/runtime/runtimes.js.map +1 -0
- package/dist/runtime/types.d.ts +109 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +8 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/server.d.ts +18 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +43 -12
- package/dist/server.js.map +1 -1
- package/dist/sync/pull.d.ts.map +1 -1
- package/dist/sync/pull.js +5 -4
- package/dist/sync/pull.js.map +1 -1
- package/dist/sync/sync.js +1 -1
- package/dist/sync/sync.js.map +1 -1
- package/dist/ts/diagnostics.d.ts.map +1 -1
- package/dist/ts/diagnostics.js +1 -1
- package/dist/ts/diagnostics.js.map +1 -1
- package/dist/util/hashing.d.ts.map +1 -1
- package/dist/util/hashing.js +3 -2
- package/dist/util/hashing.js.map +1 -1
- package/dist/util/logger.d.ts.map +1 -1
- package/dist/util/logger.js +9 -2
- package/dist/util/logger.js.map +1 -1
- package/dist/util/safeJson.d.ts +6 -0
- package/dist/util/safeJson.d.ts.map +1 -1
- package/dist/util/safeJson.js +6 -0
- package/dist/util/safeJson.js.map +1 -1
- package/dist/util/safeRegex.d.ts.map +1 -1
- package/dist/util/safeRegex.js +24 -0
- package/dist/util/safeRegex.js.map +1 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -1,267 +1,492 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<img src="https://github.com/GlitterKill/sdl-mcp/blob/main/docs/Symbol_Delta_Ledger_MCP.jpg" alt="Symbol Delta Ledger MCP">
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
</div>
|
|
3
|
+
|
|
4
|
+
<br/>
|
|
6
5
|
|
|
7
6
|
# SDL-MCP
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
 
|
|
8
|
+
### **Cards-first code context for AI coding agents**
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
<details>
|
|
14
|
-
<summary><strong>Documentation</strong></summary>
|
|
10
|
+
*Stop feeding entire files into the context window.<br/>Start giving agents exactly the code intelligence they need.*
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- [Troubleshooting](./docs/troubleshooting.md)
|
|
24
|
-
- [Legacy User Guide](./docs/USER_GUIDE.md)
|
|
12
|
+
<br/>
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
25
19
|
|
|
26
|
-
</details>
|
|
27
20
|
</div>
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<br/>
|
|
25
|
+
|
|
26
|
+
## What's the problem?
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
using it."
|
|
28
|
+
Every time an AI coding agent reads a file to answer a question, it consumes thousands of tokens. Most of those tokens are irrelevant to the task. The agent doesn't need 500 lines of a file to know that `validateToken` takes a `string` and returns a `Promise<User>` — but it reads them anyway, because that's all it has.
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
**Multiply that across a debugging session touching 20 files and you've burned 40,000+ tokens on context gathering alone.**
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
token-efficient way to understand your codebase. Instead of feeding entire files into the context window, SDL-MCP
|
|
38
|
-
indexes your repository into a **searchable knowledge graph** of symbols and their relationships, then serves exactly
|
|
39
|
-
the right amount of context through a controlled escalation path.
|
|
32
|
+
SDL-MCP fixes this. It indexes your codebase into a searchable **symbol graph** and serves precisely the right amount of context through a controlled escalation path. An agent that uses SDL-MCP understands your code better while consuming a fraction of the tokens.
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
(Claude Code, Claude Desktop, etc.) can connect to.
|
|
34
|
+
<br/>
|
|
43
35
|
|
|
44
36
|
---
|
|
45
37
|
|
|
46
|
-
|
|
38
|
+
<br/>
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
This has three costs:
|
|
40
|
+
## How it works — in 30 seconds
|
|
50
41
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
```
|
|
43
|
+
Your Codebase
|
|
44
|
+
│
|
|
45
|
+
┌──────┴──────┐
|
|
46
|
+
│ Indexer │ Native Rust (fast) or Tree-sitter (universal)
|
|
47
|
+
│ 12 langs │ TS · JS · Python · Go · Java · C# · C · C++ · PHP · Rust · Kotlin · Shell
|
|
48
|
+
└──────┬──────┘
|
|
49
|
+
│
|
|
50
|
+
▼
|
|
51
|
+
┌───────────────────────┐
|
|
52
|
+
│ Symbol Graph (DB) │ Functions, classes, interfaces, types, edges, metrics
|
|
53
|
+
│ LadybugDB (graph) │ Persisted. Incremental. Versioned.
|
|
54
|
+
└───────────┬───────────┘
|
|
55
|
+
│
|
|
56
|
+
┌──────────┼──────────┐
|
|
57
|
+
│ │ │
|
|
58
|
+
▼ ▼ ▼
|
|
59
|
+
25 MCP 10 CLI HTTP API
|
|
60
|
+
Tools Commands + Graph UI
|
|
61
|
+
│
|
|
62
|
+
▼
|
|
63
|
+
AI Coding Agent
|
|
64
|
+
(Claude Code, Claude Desktop, Cursor, Windsurf, any MCP client)
|
|
65
|
+
```
|
|
54
66
|
|
|
55
|
-
SDL-MCP
|
|
56
|
-
|
|
67
|
+
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
|
|
68
|
+
2. **Query efficiently** — Agents use MCP tools to search, slice, and retrieve exactly the context they need
|
|
69
|
+
3. **Escalate only when necessary** — A four-rung ladder controls how much code the agent sees, from a 100-token card to full source (with justification required)
|
|
70
|
+
|
|
71
|
+
<br/>
|
|
57
72
|
|
|
58
73
|
---
|
|
59
74
|
|
|
60
|
-
|
|
75
|
+
<br/>
|
|
61
76
|
|
|
62
|
-
|
|
77
|
+
## Quick Start
|
|
63
78
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
```bash
|
|
80
|
+
# Install
|
|
81
|
+
npm install -g sdl-mcp
|
|
67
82
|
|
|
68
|
-
|
|
83
|
+
# Initialize, auto-detect languages, index your repo, and run health checks
|
|
84
|
+
sdl-mcp init -y --auto-index
|
|
69
85
|
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
# Start the MCP server for your coding agent
|
|
87
|
+
sdl-mcp serve --stdio
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Point your MCP client at the server and the agent gains access to all SDL-MCP tools. That's it.
|
|
72
91
|
|
|
73
|
-
|
|
92
|
+
> **npx users:** Replace `sdl-mcp` with `npx --yes sdl-mcp@latest` in all commands above.
|
|
74
93
|
|
|
75
|
-
|
|
94
|
+
[Full Getting Started Guide →](./docs/getting-started.md)
|
|
76
95
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| **2. Skeleton IR** | `sdl.code.getSkeleton` | 200–400 | Signatures + control flow, bodies elided |
|
|
81
|
-
| **3. Hot-Path Excerpt** | `sdl.code.getHotPath` | 400–800 | Lines matching specific identifiers + context |
|
|
82
|
-
| **4. Raw Code Window** | `sdl.code.needWindow` | 1,000–4,000 | Full source code (policy-gated, requires |
|
|
83
|
-
| justification) |
|
|
96
|
+
<br/>
|
|
97
|
+
|
|
98
|
+
---
|
|
84
99
|
|
|
85
|
-
|
|
86
|
-
> Most questions are answered at rungs 1–2 without ever reading raw code.
|
|
100
|
+
<br/>
|
|
87
101
|
|
|
88
|
-
|
|
102
|
+
## The Iris Gate Ladder
|
|
89
103
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
104
|
+
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.
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Token Cost What the Agent Sees
|
|
108
|
+
────────────────────────────────────────────────
|
|
109
|
+
~100 RUNG 1 ▸ Symbol Card
|
|
110
|
+
Name, signature, summary, dependencies, metrics
|
|
111
|
+
"What does this function do and what does it call?"
|
|
112
|
+
|
|
113
|
+
~300 RUNG 2 ▸ Skeleton IR
|
|
114
|
+
Signatures + control flow, bodies replaced with /* ... */
|
|
115
|
+
"What's the shape of this class?"
|
|
116
|
+
|
|
117
|
+
~600 RUNG 3 ▸ Hot-Path Excerpt
|
|
118
|
+
Only lines matching specific identifiers + context
|
|
119
|
+
"Where exactly is `this.cache` initialized?"
|
|
120
|
+
|
|
121
|
+
~2,000 RUNG 4 ▸ Raw Code Window Policy-gated
|
|
122
|
+
Full source code, requires justification
|
|
123
|
+
"I need to rewrite this error handler"
|
|
124
|
+
```
|
|
93
125
|
|
|
94
|
-
|
|
126
|
+
> **Most questions are answered at Rungs 1-2** without ever reading raw code. That's where the token savings come from.
|
|
95
127
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
128
|
+
| Scenario | Reading the file | Using the Ladder | Savings |
|
|
129
|
+
|:---------|:----------------:|:----------------:|:-------:|
|
|
130
|
+
| "What does `parseConfig` accept?" | ~2,000 tok | ~100 tok | **20x** |
|
|
131
|
+
| "Show me the shape of `AuthService`" | ~4,000 tok | ~300 tok | **13x** |
|
|
132
|
+
| "Where is `this.cache` set?" | ~2,000 tok | ~500 tok | **4x** |
|
|
99
133
|
|
|
100
|
-
|
|
134
|
+
[Iris Gate Ladder Deep Dive →](./docs/feature-deep-dives/iris-gate-ladder.md)
|
|
101
135
|
|
|
102
|
-
|
|
103
|
-
and _how many lines_. Requests are audited. This enforces disciplined token usage.
|
|
136
|
+
<br/>
|
|
104
137
|
|
|
105
138
|
---
|
|
106
139
|
|
|
107
|
-
|
|
140
|
+
<br/>
|
|
108
141
|
|
|
109
|
-
|
|
142
|
+
## Feature Tour
|
|
110
143
|
|
|
111
|
-
|
|
112
|
-
- **2,782x compression ratio** for a repository overview vs. a full card dump
|
|
144
|
+
### Symbol Cards — The Atoms of Understanding
|
|
113
145
|
|
|
114
|
-
|
|
146
|
+
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.
|
|
115
147
|
|
|
116
|
-
|
|
117
|
-
|
|
148
|
+
```
|
|
149
|
+
┌─────────────────────────────────────────────────────────┐
|
|
150
|
+
│ Symbol Card: validateToken │
|
|
151
|
+
│─────────────────────────────────────────────────────────│
|
|
152
|
+
│ Kind: function (exported) │
|
|
153
|
+
│ File: src/auth/jwt.ts:42-67 │
|
|
154
|
+
│ Signature: (token: string, opts?: ValidateOpts) │
|
|
155
|
+
│ → Promise<DecodedToken> │
|
|
156
|
+
│ Summary: Validates JWT signature and expiration, │
|
|
157
|
+
│ returns decoded payload or throws │
|
|
158
|
+
│ Invariants: ["throws on expired token"] │
|
|
159
|
+
│ Side FX: ["logs to audit trail"] │
|
|
160
|
+
│ Deps: calls: [verifySignature, checkExpiry] │
|
|
161
|
+
│ imports: [jsonwebtoken, AuditLogger] │
|
|
162
|
+
│ Metrics: fan-in: 12 │ fan-out: 4 │ churn: 3/30d │
|
|
163
|
+
│ Cluster: auth-module (8 members) │
|
|
164
|
+
│ Process: request-pipeline (intermediate, depth 1) │
|
|
165
|
+
│ Test: auth.test.ts (distance: 1, proximity: 0.9)│
|
|
166
|
+
│ ETag: a7f3c2... (for conditional requests) │
|
|
167
|
+
└─────────────────────────────────────────────────────────┘
|
|
168
|
+
```
|
|
118
169
|
|
|
119
|
-
|
|
170
|
+
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).
|
|
120
171
|
|
|
121
|
-
|
|
122
|
-
|
|
172
|
+
[Indexing & Language Support Deep Dive →](./docs/feature-deep-dives/indexing-languages.md)
|
|
173
|
+
|
|
174
|
+
---
|
|
123
175
|
|
|
124
|
-
###
|
|
176
|
+
### Graph Slicing — The Right Context for Every Task
|
|
125
177
|
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
178
|
+
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.
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
"Fix the auth middleware" → slice.build
|
|
182
|
+
│
|
|
183
|
+
BFS over graph
|
|
184
|
+
│
|
|
185
|
+
┌──────────────────┼──────────────────┐
|
|
186
|
+
▼ ▼ ▼
|
|
187
|
+
authenticate validateToken JwtConfig
|
|
188
|
+
│ │ │
|
|
189
|
+
▼ ▼ ▼
|
|
190
|
+
hashPassword getUserById envLoader
|
|
191
|
+
│
|
|
192
|
+
◆ frontier
|
|
193
|
+
(outside budget)
|
|
194
|
+
|
|
195
|
+
8 cards returned · ~800 tokens
|
|
196
|
+
vs. reading 8 files · ~16,000 tokens
|
|
197
|
+
```
|
|
129
198
|
|
|
130
|
-
|
|
199
|
+
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.
|
|
131
200
|
|
|
132
|
-
|
|
201
|
+
[Graph Slicing Deep Dive →](./docs/feature-deep-dives/graph-slicing.md)
|
|
133
202
|
|
|
134
203
|
---
|
|
135
204
|
|
|
136
|
-
|
|
205
|
+
### Delta Packs & Blast Radius — Semantic Change Intelligence
|
|
137
206
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
207
|
+
`git diff` tells you what lines changed. SDL-MCP tells you what that change *means* and who's affected.
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
Modified: validateToken() signature
|
|
211
|
+
│
|
|
212
|
+
├── signatureDiff: added `options?: object` parameter
|
|
213
|
+
├── invariantDiff: added "throws on expired"
|
|
214
|
+
└── sideEffectDiff: added "logs to audit trail"
|
|
215
|
+
│
|
|
216
|
+
▼
|
|
217
|
+
Blast Radius (ranked):
|
|
218
|
+
1. authenticate() ← direct caller, distance 1
|
|
219
|
+
2. refreshSession() ← direct caller, distance 1
|
|
220
|
+
3. AuthMiddleware ← calls authenticate, distance 2
|
|
221
|
+
4. auth.test.ts ← test coverage, flagged for re-run
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**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.
|
|
225
|
+
|
|
226
|
+
[Delta & Blast Radius Deep Dive →](./docs/feature-deep-dives/delta-blast-radius.md)
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### Live Indexing — Real-Time Code Intelligence
|
|
231
|
+
|
|
232
|
+
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.
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
Editor keystrokes → sdl.buffer.push → Overlay Store → merged reads
|
|
236
|
+
│
|
|
237
|
+
on save / idle
|
|
238
|
+
│
|
|
239
|
+
▼
|
|
240
|
+
LadybugDB (durable)
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
[Live Indexing Deep Dive →](./docs/feature-deep-dives/live-indexing.md)
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
### Governance & Policy — Controlled Access
|
|
248
|
+
|
|
249
|
+
Raw code access (Rung 4) is **policy-gated**. Agents must provide:
|
|
250
|
+
- A **reason** explaining why they need raw code
|
|
251
|
+
- **Identifiers** they expect to find in the code
|
|
252
|
+
- An **expected line count** within configured limits
|
|
253
|
+
|
|
254
|
+
Requests that don't meet policy are denied with actionable guidance ("try `getHotPath` with these identifiers instead"). Every access is audit-logged.
|
|
255
|
+
|
|
256
|
+
The sandboxed runtime execution tool (`sdl.runtime.execute`) has its own governance layer: disabled by default, executable allowlisting, CWD jailing, environment scrubbing, concurrency limits, and timeout enforcement.
|
|
257
|
+
|
|
258
|
+
[Governance & Policy Deep Dive →](./docs/feature-deep-dives/governance-policy.md)
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### Agent Orchestration — Autopilot Mode
|
|
263
|
+
|
|
264
|
+
`sdl.agent.orchestrate` is an autonomous task engine. Give it a task type (`debug`, `review`, `implement`, `explain`), a description, and a budget — it plans the optimal Iris Gate path, executes it, collects evidence, and returns a synthesized answer.
|
|
265
|
+
|
|
266
|
+
The feedback loop (`sdl.agent.feedback`) records which symbols were useful and which were missing, improving future slice quality.
|
|
267
|
+
|
|
268
|
+
`sdl.context.summary` generates portable, token-bounded context briefings in markdown, JSON, or clipboard format for use outside MCP environments.
|
|
269
|
+
|
|
270
|
+
[Agent Orchestration Deep Dive →](./docs/feature-deep-dives/agent-orchestration.md)
|
|
149
271
|
|
|
150
272
|
---
|
|
151
273
|
|
|
152
|
-
|
|
274
|
+
### Sandboxed Runtime Execution
|
|
275
|
+
|
|
276
|
+
Run tests, linters, and scripts through SDL-MCP's governance layer instead of uncontrolled shell access. Three runtimes (Node.js, Python, Shell), code-mode or args-mode, smart output summarization with keyword-matched excerpts, and gzip artifact persistence.
|
|
277
|
+
|
|
278
|
+
[Runtime Execution Deep Dive →](./docs/feature-deep-dives/runtime-execution.md)
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
### CLI Tool Access — No MCP Server Required
|
|
283
|
+
|
|
284
|
+
Access all 25 tool actions directly from the command line with `sdl-mcp tool`. No MCP server, transport, or SDK — just your terminal.
|
|
153
285
|
|
|
154
286
|
```bash
|
|
155
|
-
#
|
|
156
|
-
|
|
287
|
+
# Search for symbols
|
|
288
|
+
sdl-mcp tool symbol.search --query "handleAuth" --output-format pretty
|
|
157
289
|
|
|
158
|
-
#
|
|
159
|
-
sdl-mcp
|
|
290
|
+
# Build a task-scoped slice
|
|
291
|
+
sdl-mcp tool slice.build --task-text "debug auth flow" --max-cards 50
|
|
160
292
|
|
|
161
|
-
#
|
|
162
|
-
sdl-mcp
|
|
293
|
+
# Pipe JSON args, chain commands
|
|
294
|
+
echo '{"repoId":"my-repo"}' | sdl-mcp tool symbol.search --query "auth"
|
|
295
|
+
```
|
|
163
296
|
|
|
164
|
-
|
|
165
|
-
through the Iris Gate Ladder instead of bulk file reads.
|
|
297
|
+
Features include typed argument coercion (string, number, boolean, string[], json), budget flag merging, stdin JSON piping with CLI-flags-win precedence, auto-resolved `repoId` from cwd, four output formats (json, json-compact, pretty, table), typo suggestions, and per-action `--help`. The CLI dispatches through the same gateway router and Zod schemas as the MCP server — identical code paths, identical validation.
|
|
166
298
|
|
|
167
|
-
[
|
|
168
|
-
|
|
299
|
+
[CLI Tool Access Deep Dive →](./docs/feature-deep-dives/cli-tool-access.md)
|
|
300
|
+
|
|
301
|
+
---
|
|
169
302
|
|
|
303
|
+
### Tool Gateway — 81% Token Reduction
|
|
304
|
+
|
|
305
|
+
The tool gateway consolidates all 25 MCP tools into **4 namespace-scoped tools** (`sdl.query`, `sdl.code`, `sdl.repo`, `sdl.agent`), reducing `tools/list` overhead from **~3,742 tokens to ~713 tokens** — an **81% reduction**.
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
Before: 25 tools × full JSON Schema = ~3,742 tokens at conversation start
|
|
309
|
+
After: 4 tools × thin schema = ~713 tokens at conversation start
|
|
310
|
+
─────────────
|
|
311
|
+
~3,029 tokens saved per conversation
|
|
170
312
|
```
|
|
171
313
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
-
|
|
195
|
-
|
|
314
|
+
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. Legacy flat tool names are optionally emitted alongside for backward compatibility.
|
|
315
|
+
|
|
316
|
+
[Tool Gateway Deep Dive →](./docs/feature-deep-dives/tool-gateway.md)
|
|
317
|
+
|
|
318
|
+
<br/>
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
<br/>
|
|
323
|
+
|
|
324
|
+
## All 25 MCP Tools at a Glance
|
|
325
|
+
|
|
326
|
+
<table>
|
|
327
|
+
<tr><th>Category</th><th>Tool</th><th>One-Line Description</th></tr>
|
|
328
|
+
<tr><td rowspan="4"><strong>Repository</strong></td>
|
|
329
|
+
<td><code>sdl.repo.register</code></td><td>Register a codebase for indexing</td></tr>
|
|
330
|
+
<tr><td><code>sdl.repo.status</code></td><td>Health, versions, watcher, prefetch, live-index stats</td></tr>
|
|
331
|
+
<tr><td><code>sdl.repo.overview</code></td><td>Codebase summary: stats, directories, hotspots, clusters</td></tr>
|
|
332
|
+
<tr><td><code>sdl.index.refresh</code></td><td>Trigger full or incremental re-indexing</td></tr>
|
|
333
|
+
|
|
334
|
+
<tr><td rowspan="3"><strong>Live Buffer</strong></td>
|
|
335
|
+
<td><code>sdl.buffer.push</code></td><td>Push unsaved editor content for real-time indexing</td></tr>
|
|
336
|
+
<tr><td><code>sdl.buffer.checkpoint</code></td><td>Force-write pending buffers to the durable database</td></tr>
|
|
337
|
+
<tr><td><code>sdl.buffer.status</code></td><td>Live indexing diagnostics and queue depth</td></tr>
|
|
338
|
+
|
|
339
|
+
<tr><td rowspan="3"><strong>Symbols</strong></td>
|
|
340
|
+
<td><code>sdl.symbol.search</code></td><td>Search symbols by name (with optional semantic reranking)</td></tr>
|
|
341
|
+
<tr><td><code>sdl.symbol.getCard</code></td><td>Get a symbol card with ETag-based conditional support</td></tr>
|
|
342
|
+
<tr><td><code>sdl.symbol.getCards</code></td><td>Batch-fetch up to 100 cards in one round trip</td></tr>
|
|
343
|
+
|
|
344
|
+
<tr><td rowspan="3"><strong>Slices</strong></td>
|
|
345
|
+
<td><code>sdl.slice.build</code></td><td>Build a task-scoped dependency subgraph</td></tr>
|
|
346
|
+
<tr><td><code>sdl.slice.refresh</code></td><td>Delta-only update of an existing slice</td></tr>
|
|
347
|
+
<tr><td><code>sdl.slice.spillover.get</code></td><td>Page through overflow symbols beyond the budget</td></tr>
|
|
348
|
+
|
|
349
|
+
<tr><td rowspan="3"><strong>Code Access</strong></td>
|
|
350
|
+
<td><code>sdl.code.getSkeleton</code></td><td>Signatures + control flow, bodies elided</td></tr>
|
|
351
|
+
<tr><td><code>sdl.code.getHotPath</code></td><td>Lines matching specific identifiers + context</td></tr>
|
|
352
|
+
<tr><td><code>sdl.code.needWindow</code></td><td>Full source code (policy-gated, requires justification)</td></tr>
|
|
353
|
+
|
|
354
|
+
<tr><td><strong>Deltas</strong></td>
|
|
355
|
+
<td><code>sdl.delta.get</code></td><td>Semantic diff + blast radius between versions</td></tr>
|
|
356
|
+
|
|
357
|
+
<tr><td rowspan="2"><strong>Policy</strong></td>
|
|
358
|
+
<td><code>sdl.policy.get</code></td><td>Read current gating policy</td></tr>
|
|
359
|
+
<tr><td><code>sdl.policy.set</code></td><td>Update line/token limits and identifier requirements</td></tr>
|
|
360
|
+
|
|
361
|
+
<tr><td><strong>Risk</strong></td>
|
|
362
|
+
<td><code>sdl.pr.risk.analyze</code></td><td>Scored PR risk with findings and test recommendations</td></tr>
|
|
363
|
+
|
|
364
|
+
<tr><td><strong>Context</strong></td>
|
|
365
|
+
<td><code>sdl.context.summary</code></td><td>Token-bounded portable briefing (markdown/JSON/clipboard)</td></tr>
|
|
366
|
+
|
|
367
|
+
<tr><td rowspan="3"><strong>Agent</strong></td>
|
|
368
|
+
<td><code>sdl.agent.orchestrate</code></td><td>Autonomous task execution with budget control</td></tr>
|
|
369
|
+
<tr><td><code>sdl.agent.feedback</code></td><td>Record which symbols were useful or missing</td></tr>
|
|
370
|
+
<tr><td><code>sdl.agent.feedback.query</code></td><td>Query aggregated feedback statistics</td></tr>
|
|
371
|
+
|
|
372
|
+
<tr><td><strong>Runtime</strong></td>
|
|
373
|
+
<td><code>sdl.runtime.execute</code></td><td>Sandboxed subprocess execution (Node/Python/Shell)</td></tr>
|
|
374
|
+
</table>
|
|
375
|
+
|
|
376
|
+
[Complete MCP Tools Reference (detailed parameters & responses) →](./docs/mcp-tools-detailed.md)
|
|
377
|
+
|
|
378
|
+
<br/>
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
<br/>
|
|
196
383
|
|
|
197
384
|
## CLI Commands
|
|
198
385
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
- `
|
|
202
|
-
- `
|
|
203
|
-
- `
|
|
204
|
-
- `
|
|
205
|
-
- `
|
|
206
|
-
- `
|
|
207
|
-
- `
|
|
208
|
-
|
|
209
|
-
- `
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- Repository: `sdl.repo.register`, `sdl.repo.status`, `sdl.repo.overview`, `sdl.index.refresh`
|
|
214
|
-
- Symbols: `sdl.symbol.search`, `sdl.symbol.getCard`
|
|
215
|
-
- Context: `sdl.context.summary`
|
|
216
|
-
- Slice: `sdl.slice.build`, `sdl.slice.refresh`, `sdl.slice.spillover.get`
|
|
217
|
-
- Delta: `sdl.delta.get`
|
|
218
|
-
- Code: `sdl.code.needWindow`, `sdl.code.getSkeleton`, `sdl.code.getHotPath`
|
|
219
|
-
- Policy: `sdl.policy.get`, `sdl.policy.set`
|
|
220
|
-
- Risk/Agent: `sdl.pr.risk.analyze`, `sdl.agent.orchestrate`
|
|
221
|
-
|
|
222
|
-
See: [MCP Tools Reference](./docs/mcp-tools-reference.md)
|
|
386
|
+
| Command | Description |
|
|
387
|
+
|:--------|:------------|
|
|
388
|
+
| `sdl-mcp init` | Bootstrap config, detect repo/languages, optionally auto-index |
|
|
389
|
+
| `sdl-mcp doctor` | Validate runtime, config, DB, grammars, repo access |
|
|
390
|
+
| `sdl-mcp index` | Index repositories (with optional `--watch` mode) |
|
|
391
|
+
| `sdl-mcp serve` | Start MCP server (`--stdio` or `--http`) |
|
|
392
|
+
| `sdl-mcp tool` | Access all 25 MCP tool actions directly ([docs](./docs/feature-deep-dives/cli-tool-access.md)) |
|
|
393
|
+
| `sdl-mcp summary` | Generate copy/paste context summaries from the CLI |
|
|
394
|
+
| `sdl-mcp health` | Compute composite health score with badge/JSON output |
|
|
395
|
+
| `sdl-mcp export` | Export sync artifact |
|
|
396
|
+
| `sdl-mcp import` | Import sync artifact |
|
|
397
|
+
| `sdl-mcp pull` | Pull by version/commit with fallback |
|
|
398
|
+
| `sdl-mcp version` | Show version and environment info |
|
|
223
399
|
|
|
224
|
-
|
|
400
|
+
[CLI Reference →](./docs/cli-reference.md) · [Configuration Reference →](./docs/configuration-reference.md)
|
|
225
401
|
|
|
226
|
-
|
|
227
|
-
- [Iris Gate Ladder](./docs/IRIS_GATE_LADDER.md) - Context escalation methodology
|
|
228
|
-
- [Architecture](./docs/ARCHITECTURE.md) - Tech stack and data flow
|
|
229
|
-
- [Getting Started](./docs/getting-started.md)
|
|
230
|
-
- [CLI Reference](./docs/cli-reference.md)
|
|
231
|
-
- [MCP Tools Reference](./docs/mcp-tools-reference.md)
|
|
232
|
-
- [Configuration Reference](./docs/configuration-reference.md)
|
|
233
|
-
- [Agent Workflows](./docs/agent-workflows.md)
|
|
234
|
-
- [Troubleshooting](./docs/troubleshooting.md)
|
|
235
|
-
- [VSCode Extension README](./sdl-mcp-vscode/README.md)
|
|
236
|
-
- [Legacy User Guide](./docs/USER_GUIDE.md)
|
|
402
|
+
<br/>
|
|
237
403
|
|
|
238
|
-
|
|
404
|
+
---
|
|
239
405
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
# Optional native addon + parity checks
|
|
246
|
-
npm run build:native
|
|
247
|
-
npm run test:native-parity
|
|
248
|
-
```
|
|
406
|
+
<br/>
|
|
407
|
+
|
|
408
|
+
## Compatible With
|
|
409
|
+
|
|
410
|
+
SDL-MCP works with any MCP-compatible client:
|
|
249
411
|
|
|
250
|
-
|
|
412
|
+
| Client | Transport | Setup |
|
|
413
|
+
|:-------|:----------|:------|
|
|
414
|
+
| **Claude Code** | stdio | `sdl-mcp init --client claude-code` |
|
|
415
|
+
| **Claude Desktop** | stdio | `sdl-mcp init --client claude-code` |
|
|
416
|
+
| **Cursor** | stdio | Standard MCP server config |
|
|
417
|
+
| **Windsurf** | stdio | Standard MCP server config |
|
|
418
|
+
| **Codex CLI** | stdio | `sdl-mcp init --client codex` |
|
|
419
|
+
| **Gemini CLI** | stdio | `sdl-mcp init --client gemini` |
|
|
420
|
+
| **OpenCode** | stdio | `sdl-mcp init --client opencode` |
|
|
421
|
+
| **Any MCP client** | stdio / http | `sdl-mcp serve --stdio` or `--http` |
|
|
251
422
|
|
|
252
|
-
|
|
253
|
-
- `npm run benchmark:matrix`
|
|
254
|
-
- `npm run benchmark:sweep`
|
|
423
|
+
A **VSCode extension** (`sdl-mcp-vscode/`) provides live buffer integration for real-time indexing of unsaved edits.
|
|
255
424
|
|
|
256
|
-
|
|
425
|
+
<br/>
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
<br/>
|
|
430
|
+
|
|
431
|
+
## Tech Stack
|
|
432
|
+
|
|
433
|
+
| Component | Technology |
|
|
434
|
+
|:----------|:-----------|
|
|
435
|
+
| Runtime | Node.js 20+ / TypeScript 5.9+ (strict ESM) |
|
|
436
|
+
| Graph Database | LadybugDB (embedded, single-file) |
|
|
437
|
+
| Indexer (default) | Rust via napi-rs (multi-threaded) |
|
|
438
|
+
| Indexer (fallback) | tree-sitter + tree-sitter-typescript |
|
|
439
|
+
| MCP SDK | @modelcontextprotocol/sdk |
|
|
440
|
+
| Validation | Zod schemas for all payloads |
|
|
441
|
+
| Transports | stdio (agents) · HTTP (dev/network) |
|
|
442
|
+
|
|
443
|
+
<br/>
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
<br/>
|
|
448
|
+
|
|
449
|
+
## Documentation
|
|
450
|
+
|
|
451
|
+
| Document | Description |
|
|
452
|
+
|:---------|:------------|
|
|
453
|
+
| [Getting Started](./docs/getting-started.md) | Installation, 5-minute setup, MCP client config |
|
|
454
|
+
| [MCP Tools Reference](./docs/mcp-tools-detailed.md) | Detailed docs for all 25 tools (parameters, responses, examples) |
|
|
455
|
+
| [CLI Reference](./docs/cli-reference.md) | All CLI commands and options |
|
|
456
|
+
| [Configuration Reference](./docs/configuration-reference.md) | Every config option with defaults and guidance |
|
|
457
|
+
| [Agent Workflows](./docs/agent-workflows.md) | Workflow instructions for CLAUDE.md / AGENTS.md |
|
|
458
|
+
| [Architecture](./docs/ARCHITECTURE.md) | Tech stack, data flow, component diagram |
|
|
459
|
+
| [Iris Gate Ladder](./docs/IRIS_GATE_LADDER.md) | Context escalation methodology |
|
|
460
|
+
| [Troubleshooting](./docs/troubleshooting.md) | Common issues and fixes |
|
|
461
|
+
|
|
462
|
+
### Feature Deep Dives
|
|
463
|
+
|
|
464
|
+
| Topic | What You'll Learn |
|
|
465
|
+
|:------|:------------------|
|
|
466
|
+
| [Iris Gate Ladder](./docs/feature-deep-dives/iris-gate-ladder.md) | Four-rung context escalation with token savings analysis |
|
|
467
|
+
| [Graph Slicing](./docs/feature-deep-dives/graph-slicing.md) | BFS/beam search, edge weights, wire formats, auto-discovery |
|
|
468
|
+
| [Delta & Blast Radius](./docs/feature-deep-dives/delta-blast-radius.md) | Semantic diffs, ranked impact analysis, PR risk scoring |
|
|
469
|
+
| [Live Indexing](./docs/feature-deep-dives/live-indexing.md) | Real-time editor buffer integration and overlay architecture |
|
|
470
|
+
| [Governance & Policy](./docs/feature-deep-dives/governance-policy.md) | Proof-of-need gating, audit logging, runtime sandboxing |
|
|
471
|
+
| [Agent Orchestration](./docs/feature-deep-dives/agent-orchestration.md) | Autopilot mode, feedback loops, portable context summaries |
|
|
472
|
+
| [Indexing & Languages](./docs/feature-deep-dives/indexing-languages.md) | Rust/TS engines, two-pass architecture, 12-language support |
|
|
473
|
+
| [Runtime Execution](./docs/feature-deep-dives/runtime-execution.md) | Sandboxed subprocess execution with governance |
|
|
474
|
+
| [CLI Tool Access](./docs/feature-deep-dives/cli-tool-access.md) | Direct CLI access to all 25 actions, output formats, stdin piping, scripting |
|
|
475
|
+
| [Tool Gateway](./docs/feature-deep-dives/tool-gateway.md) | 25→4 tool consolidation, 81% token reduction, thin schemas, migration guide |
|
|
476
|
+
| [Semantic Engine](./docs/feature-deep-dives/semantic-engine.md) | Pass-2 call resolution, embedding search, LLM summaries, confidence scoring |
|
|
477
|
+
| [Semantic Embeddings Setup](./docs/feature-deep-dives/semantic-embeddings-setup.md) | Dependencies, model installation, provider configuration, tier-by-tier setup |
|
|
478
|
+
|
|
479
|
+
<br/>
|
|
480
|
+
|
|
481
|
+
---
|
|
257
482
|
|
|
258
|
-
|
|
483
|
+
<br/>
|
|
259
484
|
|
|
260
485
|
## License
|
|
261
486
|
|
|
262
487
|
This project is **source-available**.
|
|
263
488
|
|
|
264
489
|
- **Free Use (Community License):** You may use, run, and modify this software for any purpose, including **internal business use**, under the terms in [`LICENSE`](./LICENSE).
|
|
265
|
-
- **Commercial Distribution / Embedding:** You must obtain a **commercial license**
|
|
490
|
+
- **Commercial Distribution / Embedding:** You must obtain a **commercial license** before you **sell, license, sublicense, bundle, embed, or distribute** this software as part of a for-sale or monetized product. See [`COMMERCIAL_LICENSE.md`](./COMMERCIAL_LICENSE.md).
|
|
266
491
|
|
|
267
|
-
|
|
492
|
+
Questions? Contact **gmullins.gkc@gmail.com**.
|