feat(lsp): add missing LspServerConfig model fields (description, transport, initialization, workspace_settings) #835

Closed
opened 2026-03-13 20:16:21 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit Message: feat(lsp): add missing LspServerConfig model fields
  • Branch: feature/lsp-config-fields
  • Type: Feature
  • Priority: Medium
  • MoSCoW: Should have
  • Points: 2
  • Milestone: v3.6.0

Background and Context

The specification defines several fields on LspServerConfig that are absent from the current model in src/cleveragents/lsp/models.py:

  • description: str — Human-readable description of the LSP server's purpose
  • transport: LspTransport — Transport mechanism (stdio, tcp, pipe) for LSP communication
  • initialization: dict — Custom initialization options passed during LSP initialize request
  • workspace_settings: dict — Workspace-specific settings sent via workspace/didChangeConfiguration

These fields are needed for proper LSP server configuration, especially transport (determines how to communicate with the server) and initialization (required for servers that need custom init parameters).

Acceptance Criteria

  • LspServerConfig includes description, transport, initialization, workspace_settings fields
  • LspTransport enum defined with stdio, tcp, pipe values
  • Actor YAML LSP binding schema accepts these new fields
  • LSP registry validates the new fields during server registration
  • Default values: transport=stdio, initialization={}, workspace_settings={}

Definition of Done

This issue is complete when:

  • All subtasks below are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Subtasks

  • Add description, transport, initialization, workspace_settings fields to LspServerConfig
  • Define LspTransport enum (stdio, tcp, pipe)
  • Update actor YAML schema to accept new fields in LSP bindings
  • Update registry validation
  • Tests (Behave): Add scenarios for config field validation
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors
## Metadata - **Commit Message**: `feat(lsp): add missing LspServerConfig model fields` - **Branch**: `feature/lsp-config-fields` - **Type**: Feature - **Priority**: Medium - **MoSCoW**: Should have - **Points**: 2 - **Milestone**: v3.6.0 ## Background and Context The specification defines several fields on `LspServerConfig` that are absent from the current model in `src/cleveragents/lsp/models.py`: - `description: str` — Human-readable description of the LSP server's purpose - `transport: LspTransport` — Transport mechanism (stdio, tcp, pipe) for LSP communication - `initialization: dict` — Custom initialization options passed during LSP initialize request - `workspace_settings: dict` — Workspace-specific settings sent via workspace/didChangeConfiguration These fields are needed for proper LSP server configuration, especially `transport` (determines how to communicate with the server) and `initialization` (required for servers that need custom init parameters). ## Acceptance Criteria - [x] `LspServerConfig` includes `description`, `transport`, `initialization`, `workspace_settings` fields - [x] `LspTransport` enum defined with `stdio`, `tcp`, `pipe` values - [x] Actor YAML LSP binding schema accepts these new fields - [x] LSP registry validates the new fields during server registration - [x] Default values: transport=stdio, initialization={}, workspace_settings={} ## Definition of Done This issue is complete when: - All subtasks below are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Subtasks - [x] Add description, transport, initialization, workspace_settings fields to LspServerConfig - [x] Define LspTransport enum (stdio, tcp, pipe) - [x] Update actor YAML schema to accept new fields in LSP bindings - [x] Update registry validation - [x] Tests (Behave): Add scenarios for config field validation - [x] Verify coverage >=97% via `nox -s coverage_report` - [x] Run `nox` (all default sessions), fix any errors
freemo added this to the v3.6.0 milestone 2026-03-13 20:20:04 +00:00
Member

Note on pipe transport value

AC2 and Subtask 2 specify LspTransport with three values: stdio, tcp, pipe.

However, the specification at docs/specification.md line 20551 defines the transport field as:

transport | string | No | Communication transport: stdio (default) or tcp.

No pipe value is defined in the spec.

Per CONTRIBUTING.md line 1159-1163:

"When there is a discrepancy between the current codebase and the specification document, always assume the specification document is correct."

The implementation follows the spec: LspTransport has stdio and tcp only. Both reviewers (@hurui200320 in Critical finding #1, @freemo in approval) accepted this.

If pipe is needed, the process per CONTRIBUTING.md line 386-390 is: propose an ADR, update the spec to include pipe, then implement it.

## Note on `pipe` transport value AC2 and Subtask 2 specify `LspTransport` with three values: `stdio`, `tcp`, `pipe`. However, the specification at `docs/specification.md` line 20551 defines the transport field as: > `transport` | string | No | Communication transport: `stdio` (default) or `tcp`. No `pipe` value is defined in the spec. Per CONTRIBUTING.md line 1159-1163: > "When there is a discrepancy between the current codebase and the specification document, always assume the specification document is correct." The implementation follows the spec: `LspTransport` has `stdio` and `tcp` only. Both reviewers (@hurui200320 in Critical finding #1, @freemo in approval) accepted this. If `pipe` is needed, the process per CONTRIBUTING.md line 386-390 is: propose an ADR, update the spec to include `pipe`, then implement it.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#824 Epic: LSP Functional Runtime
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#835
No description provided.