Commit Graph
3041 Commits
Author SHA1 Message Date
Dr. Dominik Jain f54ffaa8ab Merge pull request #1631 from oraios/ls-init-options
Centralise creation of LSP InitializeParams, adding support for configurable workspace folders across all LS
2026-07-03 11:42:05 +02:00
Dominik Jain 81b664bb32 Merge branch 'main' into ls-init-options
Conflicts:
	src/solidlsp/language_servers/typescript_language_server.py
2026-07-03 11:41:18 +02:00
bymebyu 81b1bc804d TypeScript/VTS: event-based indexing wait and no automatic typing acquisition (#1639)
* TypeScript/VTS: event-based indexing wait, no automatic typing acquisition

- Set disableAutomaticTypingAcquisition in initializationOptions (TS and VTS)
  so tsserver does not download type packages from the network during
  language server initialization.
- Replace the fixed 2-second wait before cross-file reference requests with
  $/progress-based indexing tracking: a pre-open hook arms the tracking
  (expect_indexing) before didOpen, then the request waits until indexing
  progress drains (wait_for_indexing), bounded by a configurable
  'indexing_timeout' (ls_specific_settings, default 30s). If tsserver does
  not start reporting progress within a 2-second grace period (the previous
  fixed wait), the request proceeds — so the fast path is never slower than
  before, while slow indexing is actually awaited instead of guessed at.
2026-07-03 11:38:53 +02:00
Dominik JainandClaude Opus 4.8 05181b62e5 Docs: Update add-language guide for _create_base_initialize_params pattern
Document the new LSP initialization pattern in the "adding new language
support" memory: override _create_base_initialize_params (server-specific
keys only), let the InitializeParamsBuilder supply the common keys, and call
_create_initialize_params() in _start_server. Includes notes on
builder-resolved workspace folders, nested initializationOptions folder
lists, and opting out via set_workspace_folders=False.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 01:05:40 +02:00
Dominik JainandClaude Opus 4.8 1c12156901 SolidLSP: Apply InitializeParamsBuilder across all remaining language servers
Convert every remaining SolidLanguageServer subclass from the old
_get_initialize_params method to the new _create_base_initialize_params
override, so common LSP initialize keys (processId, rootPath, rootUri,
clientInfo, workspaceFolders) are provided centrally by the
InitializeParamsBuilder rather than by each server.

- Drop the per-server processId/rootPath/rootUri/workspaceFolders and all
  clientInfo entries (including the VS Code spoofs in rust_analyzer and
  sourcekit); these are now set centrally.
- Preserve nested capabilities.workspace.workspaceFolders flags and any
  server-specific initializationOptions.workspaceFolders (e.g. kotlin,
  eclipse_jdtls).
- omnisharp keeps loading its JSON template but no longer sets the
  centrally-managed keys.
- Update _start_server call sites to self._create_initialize_params() and
  drop now-unnecessary cast()/type: ignore wrappers.

angular, svelte and vue are intentionally left as-is: they already override
_create_base_initialize_params for their TypeScript companion server, and
their remaining _get_initialize_params drives a separate language server
process.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 01:05:40 +02:00
Dominik Jain c904efed5e SolidLSP: Allow workspace folders to be flexibly configured across all language servers
that use the newly introduced InitializeParamsBuilder

- Add new configuration option `ls_workspace_folders` to allow indexed source folders to be specified
  explicitly. In monorepos, this allows the set of indexed folders to be restricted to a subset of
  the repository. #1627
- Rename configuration option `additional_workspace_folders` to `ls_additional_workspace_folders`
  and support the option across all language servers that use an InitializeParamsBuilder
  (previously limited strictly to the TypeScript server).
  Moved the option from SolidLSPSettings to LanguageServerConfig, where it belongs.

Apply InitializeParamsBuilder in TypeScriptLanguageServer and its subclasses.
2026-07-03 01:05:40 +02:00
Dominik Jain 6f1f05407d Introduce InitializeParamsBuilder base class and default implementation
which sets common settings centrally:
- processId
- rootPath
- rootUri
- clientInfo
- workspaceFolders

Apply builder in SolidLanguageServer, adding new abstract method
_create_base_initialize_params to be implemented by subclasses.
Applied in PyrightServer.
2026-07-02 23:51:39 +02:00
Dr. Dominik Jain 4f4b862802 Merge pull request #1636 from oraios/refactor-ls-dependency-providers 2026-07-02 22:41:29 +02:00
bymebyu a7501b1c69 Fix: language composition percentages diluted by unrecognised files
determine_programming_language_composition computed percentages over the total
file count, so files belonging to no supported language (images, plain text,
licenses, lock files) diluted the numbers — a repository with 2 Python files
and 23 assets reported Python at 8%. Percentages are now relative to files
matching at least one supported language, and the counting runs in a single
pass over the file list instead of one pass per language.

The only consumer (ProjectConfig.autogenerate) sorts languages by percentage,
which is unaffected by the uniform rescaling.
2026-07-02 22:24:32 +02:00
Dominik Jain 8c418dc799 Support ls_base_cmd in LanguageServerDependencyProviderBaseCommand
ls_base_cmd allows the user to override the base command with a
multi-element command (e.g. ["npx", "-y", "/my/local/package"]),
generalising ls_path, which it takes precedence over.
2026-07-02 21:59:46 +02:00
Dominik Jain 60abdd5297 Support ls_args and ls_extra_args centrally in LanguageServerDependencyProviderBaseCommand
* ls_args overrides the internal command builder, fully defining the arguments
* ls_extra_args appends additional arguments to the launch command
2026-07-02 21:59:46 +02:00
Dominik Jain e93bbeedad solidlsp: Introduce LanguageServerDependencyProviderBaseCommand
Generalises launch command creation from a base command which
the user can override via custom settings.
SinglePath and Uvx dependency providers are now specialisations of it;
the uvx command construction was moved from common.py into the Uvx provider.

The language support guide memory is updated accordingly.
2026-07-02 21:59:38 +02:00
Dominik Jain 3c241bab0d Update project file 2026-07-02 14:16:41 +02:00
Dominik Jain 7d0481b8a4 Add poe ty as alias for type-check 2026-07-02 10:54:53 +02:00
weicongheandClaude b8a0882d29 fix(file_system): handle PermissionError on scandir in gitignore walker (#1634)
Wrap os.scandir() with PermissionError guard in _iter_gitignore_files'
scan() function to prevent crash when a subdirectory is not readable.

Previously, PermissionError on the scandir call itself crashed the
entire gitignore walker, even when the path was listed in ignored_paths.

Fixes oraios/serena#1624

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-02 10:53:22 +02:00
Jordan CarneyandDominik Jain dcbd8ce064 Add activation_command to project config (#1623)
Add activation_command to project config

Adds two optional fields to ProjectConfig:
- activation_command: shell command run in the project root before the
  language backend (LSP or JetBrains) initialises
- activation_command_timeout: safety backstop (default 180s); on expiry
  the process tree is killed and activation continues

The command is only executed for trusted projects (trusted_project_path_patterns).
Exit code is the primary completion signal; failures and timeouts are logged
but never abort activation (no return channel to the LLM at that point).

Closes #1606

---------

Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
2026-07-01 18:12:05 +02:00
Dr. Dominik Jain 684f457f0d Merge pull request #1630 from oraios/file-proxy 2026-07-01 18:01:57 +02:00
Dominik Jain d5d88d72eb Improve handling of glob support in FileProxy, fixing tests 2026-07-01 17:00:00 +02:00
Dominik Jain 3096ac4fe2 Fix in Project._is_ignored_relative_path: Filtering of files for source files ignored the language backend
The check is really only possible for LSP,
so the flag is now ignored for JetBrains (where there is no known list of languages).
2026-07-01 14:57:52 +02:00
Dominik Jain 423c04101d Make Project aware of the language backend (as it can affect its behaviour) 2026-07-01 14:57:52 +02:00
Dominik Jain f39906728d search_text: Remove obsolete option allow_multiline_match
The obsolete option was only used in tests, where adjusting the `multiline` parameter
restored the tested functionality.
2026-07-01 14:57:52 +02:00
Dominik Jain 6e518b5f7c Refactor search in files/iterative file processing
* Introduce abstractions: FileCollection, FileProxy
* Unify handling of pattern search in project files
  (source code vs. all files)

This prepares for processing of external files,
which can implement FileProxy differently.
2026-07-01 14:32:37 +02:00
Dominik Jain 103a17072e Update change log 2026-06-29 17:25:06 +02:00
Dr. Dominik Jain d1a25ddbc1 Merge pull request #1621 from oraios/ade-updates
ADE updates
2026-06-29 16:31:27 +02:00
Dominik Jain 673f657dcc Apply formatter, fix spelling 2026-06-29 16:19:41 +02:00
Michael PanchenkoandClaude Opus 4.8 3d9b953ac6 Add mode benchmark
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 16:04:44 +02:00
Dominik Jain 3a7757a390 Merge commit 'ee3e7506428d08c8786a90306a8bc5cf1734182f'
Conflicts:
  CHANGELOG.md
2026-06-29 16:00:17 +02:00
Dominik Jain 99ad6eaaee Fix JetBrainsPluginClient._make_request incorrectly passing None as data
Fixes #1615
2026-06-29 15:56:21 +02:00
ee3e750642 Update Serena system prompt
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Dominik Jain <dominik.jain@outlook.com>
2026-06-29 15:48:38 +02:00
6b0a5ec097 Update editing mode prompt
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Dominik Jain <dominik.jain@outlook.com>
2026-06-29 15:48:38 +02:00
Dominik Jain d589d09d85 Improve interactive mode prompt 2026-06-29 15:48:38 +02:00
Michael PanchenkoandClaude Opus 4.8 634460d32d Add agent instructions on tool descriptions and memories
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 15:48:38 +02:00
Michael Panchenko 310a01c1ac Bugfix: list_memories was not recursing into symlinked dirs. 2026-06-29 15:48:38 +02:00
Michael PanchenkoandClaude Opus 4.8 b174a2cf72 util/yaml: make save_yaml atomic (temp + os.replace, Windows retry)
A plain truncate-and-write (open(path,"w")) is not atomic: a concurrent writer
(a second Serena process updating the auto-managed registered-projects list) or an
interrupted write can leave the file half-overwritten -- a shorter value over a longer
one leaves a stale tail, corrupting the YAML so every later load fails. This is what
wedged native benchmark runs (serena MCP crashed at startup with a ruamel ScannerError
-> 0 tools registered -> agent silently degraded to Bash).

Write to a temp file in the same dir, then os.replace onto the target (atomic;
last-writer-wins, never a corrupt interleave). Retry os.replace on Windows
PermissionError (WinError 5/32 sharing violation under contention). Adds
test/serena/util/test_yaml.py covering the shorter-over-longer corruption signature
plus a concurrent-writers stress.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 15:48:38 +02:00
Michael Panchenko 75410c78e7 Use depth=-1 to enable lang-specific default for overview tools 2026-06-29 15:48:38 +02:00
Michael Panchenko 4dc0cd1453 Add ReplaceInFilesTool 2026-06-29 15:37:18 +02:00
Dominik Jain 31e2acd9bc Restructure change log entries 2026-06-29 15:36:59 +02:00
Michael PanchenkoandClaude Opus 4.8 a6d052a6a2 print-system-prompt: make project optional, drop logging + stray prints
Render the system prompt without activating a project: `project` is now an
optional positional (default None -> project-independent prompt). Drop the
--log-level option / logging.configure call so CLI logging stays off and only
the prompt reaches stdout, and remove two stray debug print()s
(default_modes/base_modes) that leaked onto stdout. IDE autostart is already
disabled here via with_headless_mode_overrides() (it nulls
jetbrains_launch_command). Also drop an accidental unused sqlalchemy import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 15:25:29 +02:00
Michael Panchenko 7333a0c868 Replace mypy by ty (#1619) 2026-06-29 12:26:07 +02:00
Dominik Jain 0d8d5add9d Add instructions on submitting PRs 2026-06-29 12:20:36 +02:00
Michael Panchenko c89b0d1942 CI: mark flaky zls test as xfail 2026-06-29 11:25:39 +02:00
Michael Panchenko 4c7fa0e578 CI: caching of deps in the niche batch 2026-06-29 10:40:13 +02:00
Michael Panchenko 85e78db670 CI: remove now obsolete Dockerfile.maximal-based workflow 2026-06-29 10:13:33 +02:00
Michael Panchenko ebe7646764 CI: overcome rate-limits for GH downloads by providing access token
Also only run haskell tests on linux, toolchain takes 6 mins to install on macos
2026-06-28 22:38:48 +02:00
Michael Panchenko af1048901d CI: run niche batch only on ubuntu and document workflow logic 2026-06-28 21:44:55 +02:00
Michael Panchenko 4246ac0fe8 CI: remove unnecessary free disk space step 2026-06-28 19:22:34 +02:00
Michael Panchenko ad7f65ef13 CI: improve distribution of cases to batches (GH offers limited concurrency)
See https://docs.github.com/en/actions/reference/limits#job-concurrency-limits-for-github-hosted-runners
2026-06-28 19:04:31 +02:00
Michael Panchenko 4b7e02239a CI: re-adding ubuntu to OS matrix and niche languages with large toolkits 2026-06-28 18:28:36 +02:00
Michael Panchenko 0143479621 Tests: centralized test enabling logic, better parallelization in CI
Removing some heavy toolchains from windows/macos run (they will be tested only in the job based off the maximal docker image)
2026-06-28 17:47:36 +02:00
Michael Panchenko ae097c5c10 Remove perl and nix from CI tests (heavy toolchains) 2026-06-28 16:27:24 +02:00