Live & external diagnostics
Supply LSP-shaped diagnostics, query the live buffer, and understand how Python, Rust and Go report normalizers differ from native engine execution.
Signalint 1.2.1 accepts caller-supplied LSP-shaped diagnostics. It does not install an editor extension, watch files, subscribe to an LSP server, or launch new Python/Rust/Go tools automatically.
Ingest an LSP-shaped batch
Section titled “Ingest an LSP-shaped batch”Call ingest_diagnostics:
{ "source": "lsp", "serverName": "example-language-server", "diagnostics": [ { "file": "src/main.ts", "range": { "start": { "line": 0, "character": 2 }, "end": { "line": 0, "character": 7 } }, "severity": 1, "code": "example-rule", "message": "Example diagnostic" } ]}Positions arrive zero-based and become clamped, one-based normalized locations. Severity 1 is an error; other/default severities become warnings. Normalized messages retain at most 120 characters. MCP input requires file; the library normalizer additionally understands file:// URIs.
The current handler uses engine external-lsp and source kind lsp, with optional server name. Passing source: "vscode" does not automatically change that engine to vscode or add a timestamped provenance object. The public provenance helper functions support richer metadata, but the handler does not wire all of them into ingestion.
Query the live view
Section titled “Query the live view”Call get_live_diagnostics:
{ "files": ["src/main.ts"], "severity": "error" }Both filters are optional. The result merges issues from the newest retained non-LSP snapshot with the buffered external issues and returns clusters, flat remaining records, and the full merged normalized issues array. This full array is not subject to the check summary’s 100-record cap; it can be large. Prefer filters and inspect source attribution.
The merged view performs no cross-source deduplication. One compiler and one LSP report of the same problem can both appear.
Buffer versus snapshot
Section titled “Buffer versus snapshot”- Buffer capacity defaults to 10,000 with oldest-entry eviction. The debounce defaults to 50 ms for event listeners; it is not an MCP push subscription.
- Buffer dedup keys are file, rule, line and column. Engine and message are not part of that key, so a later report can replace an earlier one at the same location.
- Batches accumulate. An empty ingestion batch does not clear old diagnostics for a file. There is no MCP clear-buffer tool in this edition. An in-process integration can clear/remove entries through the library; restarting the server clears in-memory state.
- Each ingestion creates a snapshot of that batch, not of the entire accumulated buffer. Its
snapshotIdequals itscheckId. - The old mutable latest-issue field has been removed. Live queries select the newest retained non-LSP snapshot and combine it with the buffer; ingestion does not deliberately become that internal snapshot. Internal records can age out/evict with snapshot retention. Detail always requires the appropriate check ID.
External-language report adapters
Section titled “External-language report adapters”Public library exports normalize supplied reports from:
| Language | Function | Expected report family |
|---|---|---|
| Python | normalizeRuffDiagnostics | Ruff JSON diagnostics |
| Python | normalizeMypyDiagnostics | Mypy supplied structured/JSONL diagnostics |
| Rust | normalizeCargoClippyDiagnostics | Cargo/Clippy JSON message stream |
| Go | normalizeGolangCiLintDiagnostics | golangci-lint JSON diagnostics |
These functions attach external-lsp issues with adapter-specific server/provenance metadata. They do not execute the external programs, add engine-selection config keys or create a dedicated MCP tool for each report format. ingest_diagnostics expects the LSP-shaped input above, not an arbitrary raw Ruff/Clippy report; callers must convert it or integrate the library directly.
The built-in subprocess engines remain Oxlint, TypeScript, Biome and ESLint. Native checking still uses JavaScript/TypeScript project markers; a Python/Rust/Go-only directory is not automatically a supported native check project.
Source: diagnostics/, ingestDiagnostics.ts, and liveDiagnostics.ts.