UAT: LspRuntime missing 7 of 11 LSP capabilities — references, rename, code_actions, formatting, signature_help, document_symbols, workspace_symbols raise LspNotAvailableError #5676

Open
opened 2026-04-09 08:32:13 +00:00 by HAL9000 · 0 comments
Owner

Summary

The spec defines 11 LSP capabilities that should be exposed as tools via LspToolAdapter. However, LspRuntime only implements 4 of them (diagnostics, completions, hover, definitions). The remaining 7 capabilities are registered in LspCapability and LspToolAdapter but raise LspNotAvailableError("not yet implemented") when invoked.

Expected Behavior (from spec §LSP Integration — Capability Exposure)

All 11 capabilities should be callable tools:

Capability LSP Method Tool Name
diagnostics textDocument/publishDiagnostics lsp/diagnostics
hover textDocument/hover lsp/hover
completions textDocument/completion lsp/completions
definitions textDocument/definition lsp/definition
references textDocument/references lsp/references
rename textDocument/rename lsp/rename
code_actions textDocument/codeAction lsp/code-actions
formatting textDocument/formatting lsp/format
signature_help textDocument/signatureHelp lsp/signature
document_symbols textDocument/documentSymbol lsp/symbols
workspace_symbols workspace/symbol lsp/workspace-symbols

Actual Behavior

In src/cleveragents/lsp/tool_adapter.py, the _make_runtime_handler() function only handles 4 capabilities:

if capability == LspCapability.DIAGNOSTICS: ...   # ✓ implemented
if capability == LspCapability.COMPLETIONS: ...   # ✓ implemented
if capability == LspCapability.HOVER: ...         # ✓ implemented
if capability == LspCapability.DEFINITIONS: ...   # ✓ implemented

# Capabilities not yet implemented raise an explicit error
raise LspNotAvailableError(
    f"LSP capability '{capability.value}' is not yet implemented ..."
)

The following 7 capabilities always raise LspNotAvailableError even when a runtime is provided:

  • references (needed by Strategize phase: lsp/references to gauge impact)
  • rename (needed by Execute phase: lsp/rename for safe refactoring)
  • code_actions (needed for quick fixes)
  • formatting (needed for code formatting)
  • signature_help (needed for function call assistance)
  • document_symbols (needed by Strategize phase: lsp/symbols to understand module structure)
  • workspace_symbols (needed for cross-file symbol search)

Additionally, LspClient has no methods for these capabilities — get_references(), get_rename(), get_code_actions(), get_formatting(), get_signature_help(), get_document_symbols(), get_workspace_symbols() are all absent.

Code Location

  • src/cleveragents/lsp/tool_adapter.py lines 120-165 — only 4 capabilities handled
  • src/cleveragents/lsp/client.py — missing 7 LSP protocol methods
  • src/cleveragents/lsp/runtime.py — missing 7 runtime delegation methods

Impact

The spec explicitly requires lsp/references and lsp/symbols for the Strategize phase, and lsp/rename for the Execute phase. These are core use cases for LSP integration in plan execution.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Summary The spec defines 11 LSP capabilities that should be exposed as tools via `LspToolAdapter`. However, `LspRuntime` only implements 4 of them (`diagnostics`, `completions`, `hover`, `definitions`). The remaining 7 capabilities are registered in `LspCapability` and `LspToolAdapter` but raise `LspNotAvailableError("not yet implemented")` when invoked. ## Expected Behavior (from spec §LSP Integration — Capability Exposure) All 11 capabilities should be callable tools: | Capability | LSP Method | Tool Name | |---|---|---| | `diagnostics` | `textDocument/publishDiagnostics` | `lsp/diagnostics` | | `hover` | `textDocument/hover` | `lsp/hover` | | `completions` | `textDocument/completion` | `lsp/completions` | | `definitions` | `textDocument/definition` | `lsp/definition` | | `references` | `textDocument/references` | `lsp/references` | | `rename` | `textDocument/rename` | `lsp/rename` | | `code_actions` | `textDocument/codeAction` | `lsp/code-actions` | | `formatting` | `textDocument/formatting` | `lsp/format` | | `signature_help` | `textDocument/signatureHelp` | `lsp/signature` | | `document_symbols` | `textDocument/documentSymbol` | `lsp/symbols` | | `workspace_symbols` | `workspace/symbol` | `lsp/workspace-symbols` | ## Actual Behavior In `src/cleveragents/lsp/tool_adapter.py`, the `_make_runtime_handler()` function only handles 4 capabilities: ```python if capability == LspCapability.DIAGNOSTICS: ... # ✓ implemented if capability == LspCapability.COMPLETIONS: ... # ✓ implemented if capability == LspCapability.HOVER: ... # ✓ implemented if capability == LspCapability.DEFINITIONS: ... # ✓ implemented # Capabilities not yet implemented raise an explicit error raise LspNotAvailableError( f"LSP capability '{capability.value}' is not yet implemented ..." ) ``` The following 7 capabilities always raise `LspNotAvailableError` even when a runtime is provided: - `references` (needed by Strategize phase: `lsp/references` to gauge impact) - `rename` (needed by Execute phase: `lsp/rename` for safe refactoring) - `code_actions` (needed for quick fixes) - `formatting` (needed for code formatting) - `signature_help` (needed for function call assistance) - `document_symbols` (needed by Strategize phase: `lsp/symbols` to understand module structure) - `workspace_symbols` (needed for cross-file symbol search) Additionally, `LspClient` has no methods for these capabilities — `get_references()`, `get_rename()`, `get_code_actions()`, `get_formatting()`, `get_signature_help()`, `get_document_symbols()`, `get_workspace_symbols()` are all absent. ## Code Location - `src/cleveragents/lsp/tool_adapter.py` lines 120-165 — only 4 capabilities handled - `src/cleveragents/lsp/client.py` — missing 7 LSP protocol methods - `src/cleveragents/lsp/runtime.py` — missing 7 runtime delegation methods ## Impact The spec explicitly requires `lsp/references` and `lsp/symbols` for the Strategize phase, and `lsp/rename` for the Execute phase. These are core use cases for LSP integration in plan execution. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5676
No description provided.