AGENTS.md
packages/lsp-core/AGENTS.mdAGENTS.md
Quality
43/100
Scores the file, not the repository.Length
326 words
4 headings · 0 code blocksRepository
67k
— · pushed 0 days agoLast changed
2 days ago
First indexed 2 days ago.1# lsp-core -- Harness-Neutral LSP Engine (Core)23**Generated:** 2026-07-17 / 7d664b96b45## OVERVIEW67Harness-neutral LSP engine (`@oh-my-opencode/lsp-core`). Manages language server lifecycle, JSON-RPC transport, configuration merging, and tool definitions. Consumed by the MCP-layer packages [`lsp-tools-mcp`](../lsp-tools-mcp) and [`lsp-daemon`](../lsp-daemon/AGENTS.md). See parent [packages/AGENTS.md](../AGENTS.md).89## KEY FILES1011| File | Role |12|------|------|13| `src/lsp/manager.ts` | `LspManager`: ref-counted client pool, init timeout, idle reaper, abort signals |14| `src/lsp/client.ts` | `LspClient`: `openFile`, `definition`, `references`, `symbols`, `diagnostics`, `rename` |15| `src/lsp/client-wrapper.ts` | `withLspClient()`: workspace root discovery, retry on dead connection, release |16| `src/lsp/connection.ts` | `LspClientConnection`: `initialize` request with capabilities, settle delay |17| `src/lsp/json-rpc-connection.ts` | Raw JSON-RPC 2.0 framing over stdio |18| `src/lsp/config-loader.ts` | Load `.codex/lsp-client.json` (project + user), merge with builtins |19| `src/lsp/server-definitions.ts` | `BUILTIN_SERVERS` (51 languages), `LSP_INSTALL_HINTS`, `AUTO_INSTALLABLE_SERVERS` |20| `src/lsp/server-resolution.ts` | `findServerForExtension()`: map extension to installed server |21| `src/lsp/server-installation.ts` | `isServerInstalled()`: PATH lookup with Windows extension handling |22| `src/lsp/directory-diagnostics.ts` | `aggregateDiagnosticsForDirectory()`: walk directory, cap files + diagnostics; `AbortSignal` cancels acquisition and per-file scans |23| `src/lsp/formatters.ts` | Format locations, symbols, diagnostics, rename results, workspace edits |24| `src/tools/definitions.ts` | `LSP_MCP_TOOLS`: 8 tool schemas exported to MCP |25| `src/tools/runtime.ts` | `executeLspTool()` + `coerceToolArguments()` dispatch |26| `src/request-context.ts` | `runWithRequestContext()` / `contextCwd()` / `contextEnv()` via `AsyncLocalStorage` |27| `src/mcp.ts` | `handleLspMcpRequest()` + `runMcpStdioServer()`: MCP entry over `mcp-stdio-core` |2829## NOTES3031- **Tool surface:** 8 tools: `lsp_diagnostics`, `lsp_goto_definition`, `lsp_find_references`, `lsp_symbols`, `lsp_prepare_rename`, `lsp_rename`, `lsp_status`, and `lsp_install_decision`.32- **RequestContext seam:** `request-context.ts` uses `AsyncLocalStorage` so the MCP proxy can thread `cwd` and `env` through shared daemon sessions.33- **Config priority:** project `.codex/lsp-client.json` beats user `~/.codex/lsp-client.json` beats `BUILTIN_SERVERS`.34- **Reaper:** `LspManager` reaps clients idle longer than `IDLE_TIMEOUT_MS` (default 5 min) or stuck initializing past `INIT_TIMEOUT_MS` (default 30 s).35- **Directory diagnostics cancellation:** `aggregateDiagnosticsForDirectory()` accepts an `AbortSignal`; it throws if aborted before acquisition, threads the signal into `manager.getClient()` so a cold acquisition is cancellable, and checks it between files. An aborted cold start rejects with `AbortError` and leaves `clientCount()` at 0.36
Also in code-yeongyu/oh-my-openagent
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagent.agents/AGENTS.md · 67k | AGENTS.md | stylearchtesting-strategydatabase | 64/100 | 2 days ago | |
| code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 67k | AGENTS.md | stylearchdo-not | 71/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentAGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+11 | 84/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentassets/AGENTS.md · 67k | AGENTS.md | buildteststylearch | 88/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentbin/AGENTS.md · 67k | AGENTS.md | teststylearch | 64/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/AGENTS.md · 67k | AGENTS.md | buildtestlint-formatstyle+3 | 83/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 67k | AGENTS.md | archdependenciesapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 67k | AGENTS.md | archapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 67k | AGENTS.md | archagent-behaviour | 56/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 67k | AGENTS.md | archdependenciesapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 67k | AGENTS.md | stylearchdependenciesapi | 60/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 67k | AGENTS.md | buildtestlint-formatarch+1 | 82/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 67k | AGENTS.md | archtypesdependenciesapi | 48/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/lsp-daemon/AGENTS.md · 67k | AGENTS.md | buildtestlint-formatarch+1 | 84/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/lsp-tools-mcp/AGENTS.md · 67k | AGENTS.md | buildtestlint-formatarch | 74/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/mcp-client-core/AGENTS.md · 67k | AGENTS.md | arch | 43/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/mcp-stdio-core/AGENTS.md · 67k | AGENTS.md | archapi | 56/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/model-core/AGENTS.md · 67k | AGENTS.md | arch | 54/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-codex/AGENTS.md · 67k | AGENTS.md | setupbuildtestarch+6 | 93/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-codex/plugin/components/bootstrap/AGENTS.md · 67k | AGENTS.md | buildtestarchagent-behaviour | 88/100 | 2 days ago |
Diff against .agents/AGENTS.md Diff against .opencode/AGENTS.md Diff against AGENTS.md Diff against assets/AGENTS.md Diff against bin/AGENTS.md Diff against packages/AGENTS.md Diff against packages/agents-md-core/AGENTS.md Diff against packages/boulder-state/AGENTS.md Diff against packages/claude-code-compat-core/AGENTS.md Diff against packages/comment-checker-core/AGENTS.md Diff against packages/delegate-core/AGENTS.md Diff against packages/git-bash-mcp/AGENTS.md Diff against packages/hashline-core/AGENTS.md Diff against packages/lsp-daemon/AGENTS.md Diff against packages/lsp-tools-mcp/AGENTS.md Diff against packages/mcp-client-core/AGENTS.md Diff against packages/mcp-stdio-core/AGENTS.md Diff against packages/model-core/AGENTS.md Diff against packages/omo-codex/AGENTS.md Diff against packages/omo-codex/plugin/components/bootstrap/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 3 days ago |
