Files
hamza.khyari 65a2e4db76 feat(resource): add LSP resource types
Add 4 LSP-related built-in resource types to the resource registry:

- executable: system binary/interpreter/LSP server binary with
  auto-discovery from container-exec-env and fs-directory (lazy)
- lsp-server: LSP server definition with command, language-ids,
  transport, args, port, initialization-options config;
  children: lsp-workspace
- lsp-workspace: workspace root tracked by LSP server, auto-discovered
  from lsp-server; children: lsp-document; not user-addable
- lsp-document: text document tracked by LSP server, auto-discovered
  from lsp-workspace; read+write capabilities; not user-addable

Type definitions extracted to _resource_registry_lsp.py for consistency
with existing type modules. Parent/child hierarchy: lsp-server ->
lsp-workspace -> lsp-document. YAML configs with ADR references
(ADR-039, ADR-040). All 7 lsp-server CLI args per ADR-040.

Behave tests (21 scenarios): YAML loading, user-addable flags,
capabilities, parent/child hierarchy, auto-discovery for all 3
discoverable types, BUILTIN_NAMES, DB bootstrap roundtrip, negative
tests for manual registration rejection.

Robot tests (6 tests): import, BUILTIN_NAMES, DB roundtrip, hierarchy,
auto-discovery, user-addable guard.

ISSUES CLOSED: #832
2026-03-24 13:21:12 +00:00

46 lines
1.3 KiB
YAML

# Spec reference: docs/adr/ADR-040-lsp-resource-types.md lines 69-88
schema_version: "1.0"
name: lsp-server
description: "LSP server definition and running process. Provides semantic services for one or more languages."
resource_kind: physical
sandbox_strategy: none
user_addable: true
built_in: true
cli_args:
- name: server-name
type: string
required: true
description: Unique server name
- name: command
type: string
required: true
description: Path to server executable or command
- name: language-ids
type: string
required: true
description: "Comma-separated language identifiers (e.g. python,typescript)"
- name: transport
type: string
required: false
description: "Transport protocol: stdio | tcp | pipe (default: stdio)"
- name: args
type: string
required: false
description: Additional command-line arguments
- name: port
type: string
required: false
description: TCP port (required when transport=tcp)
- name: initialization-options
type: string
required: false
description: JSON initialization options for the server
parent_types: ["container-instance", "container-exec-env"]
child_types: ["lsp-workspace"]
handler: "cleveragents.resource.handlers.lsp:LSPServerHandler"
capabilities:
read: true
write: false
sandbox: false
checkpoint: false