@ai-agent-forge/plugin-lsp-diagnostics
v0.88.11
Published
LSP diagnostics capability plugin for Agent Forge (read-only lsp_diagnostics tool)
Maintainers
Readme
@agent-forge/plugin-lsp-diagnostics
LSP diagnostics capability plugin for Agent Forge, extracted from the
host's src/plugins/lsp (D-075 S3). It registers a single read-only tool, lsp_diagnostics, which asks the host to
read bounded diagnostics from a language-server session using opaque workspace/document references.
The plugin has no standalone language-server binding of its own at load time. Without host-injected resolver/client
seams the tool reports an explicit unsupported result; hosts that want real diagnostics bind
createNodeLspRealHostV1 (tsserver/pyright/clangd over one workspace directory) or their own client.
Install
# from a local checkout
agent-forge plugin install ./plugins/lsp-diagnostics
# from npm
agent-forge plugin install @agent-forge/plugin-lsp-diagnosticsThe package ships two manifests: agent-forge.json (ecosystem manifest for the deterministic plugin resolver) and
plugin.json (host-load manifest consumed by loadCapabilityPluginFromManifest, entry ./dist/entry.js).
Library surface
import { createNodeLspAdapterV1, createLspDiagnosticsCapabilityFactoryV1 } from "@agent-forge/plugin-lsp-diagnostics";
createNodeLspAdapterV1(options?)— read-only adapter; requires host-injectedresolver/clientto produce results, otherwise returnsunsupported.createDeterministicLspAdapterV1(fixtures)— deterministic fixture adapter for tests.createNodeLspRealHostV1({ workspaceDirectory, ... })— real language-server host (tsserver/pyright/clangd).createLspDiagnosticsCapabilityFactoryV1(adapter)— registerslsp_diagnosticson aCapabilityAPI.- Default export of
dist/entry.js— the precomposed factory used by external plugin loading.
Development
npm install --ignore-scripts # repo root, creates the workspace symlink
npm run build # plugins/lsp-diagnostics (tsgo)
npm test # vitest; the entry fidelity test requires `npm run build` first