Commit Graph
2941 Commits
Author SHA1 Message Date
Sergiy Borodych 572e00e6d4 Allow query_project to use read-only tools even if they are excluded by the current context 2026-06-09 12:16:58 +02:00
Dominik Jain e4af86be05 Fix: Incorrect file access when loading context/mode
Context or mode argument referencing a known name (e.g. `--context anitgravity`) could result in
incorrect file access if a corresponding local file existed (e.g. `./antigravity` binary);
file access is now guarded with path detection (file ending or path separator must be present)

Fixes #1558
2026-06-09 12:06:26 +02:00
Michael Panchenko 4385741e8c Merge pull request #1555 from oraios/bug/svelte_ts_document_symbols
Fix Svelte (svelte-only) symbol discovery in .ts/.js files (#1552)
2026-06-08 16:16:41 +02:00
Michael PanchenkoandClaude Opus 4.8 79bc9d91cc Fix Svelte (svelte-only) symbol discovery in .ts/.js files (#1552)
Bug: with `languages: [svelte]` (the documented setup), find_symbol/get_symbols_overview returned
empty for .ts/.js files, and find_referencing_symbols failed with "No symbol matching '<name>'
found". Symbols living in plain .ts/.js modules (services, stores, types, utils) were undiscoverable
through Serena's symbolic tools.

Cause: SvelteLanguageServer delegated references/definition/rename/diagnostics for .ts/.js files to
the companion (svelte-plugin-aware) TS server, but had no override for document-symbol requests. So
documentSymbol on a .ts/.js file was answered by the base svelte LS, which only serves .svelte
files, and returned nothing. Since find_symbol/get_symbols_overview are backed by documentSymbol --
and find_referencing_symbols must first locate the target symbol the same way -- the discovery step
never reached the companion.

Fix: override request_document_symbols to route .ts/.js files to the companion TS server, mirroring
the existing delegations. This is the single method that all symbol-tree/overview/containing-symbol
paths flow through, so it restores discovery for find_symbol, get_symbols_overview,
find_referencing_symbols and symbol-based editing in one place.

Tests: add .ts document-symbol and overview coverage plus agent-level symbol-retriever tests;
strengthen the existing symbol-tree test to assert GAME_VERSION, a symbol defined only in a .ts file
(the prior assertions also matched .svelte definitions, which is why the regression went unnoticed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:15:53 +03:00
Dr. Dominik Jain b912152131 Merge pull request #1553 from oraios/bug/cli_args_persisted_in_config_on_disk
Fix: never persist runtime config overrides during project registration
2026-06-08 13:15:23 +02:00
Dominik Jain a9cf93aaa3 Improve handling of configuration file updates
* Make SerenaConfig.save private, because it is not a method that should
   ever be called on a runtime instance; it is purely an internal operation
 * Refactor the CLI init command appropriately (which used the save method)
 * Improve comments to make usage limitations clear
 * Improve the changelog entry to make error conditions more concrete
2026-06-08 11:36:24 +02:00
Michael PanchenkoandClaude Opus 4.8 34e7c93f78 Fix: never persist runtime config overrides during project registration
Bug: `serena start-mcp-server --language-backend X --project <newdir>` silently rewrote the global
serena_config.yml's language_backend to X. Cause: a not-yet-registered --project is auto-registered, and
SerenaConfig.save() rewrote the WHOLE file from the in-memory config — which by then carried the CLI
--language-backend override (and would equally carry --log-level / --tool-timeout / etc.).

Fix: project (de)registration now persists ONLY the projects list. add_registered_project / remove_project go
through a new _persist_projects(), which re-loads the on-disk config, copies in the current project list, and
saves that — so a transient runtime override of any field can never be written back.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 11:35:58 +02:00
Tomi P. Hakala b5b9cc4ffc Fix find_project_root hijacking git worktrees nested under a Serena project (#1550)
* Fix find_project_root hijacking git worktrees nested under a Serena project

find_project_root searched all ancestor levels for .serena/project.yml
before ever looking for .git. A git worktree whose own .git is a pointer
file, nested under a directory that is an explicit Serena project, was
resolved to the ancestor project instead of the worktree. With CLI agents
that launch via --project-from-cwd (Claude Code, Codex, Gemini), this
silently bound the server to the wrong working tree: reads returned stale
symbols and edits landed in the parent repo.

Walk up in a single pass so the nearest project boundary wins, whether it
is a .serena/project.yml or a .git (dir or worktree/submodule pointer
file). Same-level behavior is unchanged. Adds a regression test.

* Document worktree project-root fix in changelog and usage docs
2026-06-07 18:05:01 +02:00
Dominik Jain 577931c8cf Revise issue template #1549 2026-06-07 17:53:11 +02:00
Dominik Jain 1931b601ef Remove incorrect assertion
Fixes #1543
2026-06-05 16:46:54 +02:00
Dr. Dominik Jain c9abd9f793 Merge pull request #1539 from oraios/launch-jetbrains
Add configuration option `jetbrains_launch_command`
2026-06-02 19:19:21 +02:00
Dominik Jain 1a3943b917 Add configuration option jetbrains_launch_command, allowing Serena to spawn IDE instances automatically
upon project activation

Serena searches for the plugin instance upon project activation, and if the instance is not found
and the setting is configured, launches a new IDE instance based on the command
2026-06-02 17:08:17 +02:00
Dr. Dominik Jain 8a1bb1f80a Merge pull request #1538 from oraios/improve-subprocess-quote-args
Improve quoting of arguments for subprocess executions
2026-06-02 16:23:45 +02:00
Dominik Jain a10c3e1c5a Update additional usage pointers
* Remove obsolete/outdated content
* git-worktree:
  - Remove incorrect recommendation to copy the entire .serena folder
    in order to retain the cache (cache contains abs. paths)
  - Recommend to add the .serena folder to version control instead
    (which will not include the cache folder)

Relates to #805
2026-06-02 13:46:36 +02:00
Dominik Jain 02c3d6bb78 Fix: Wait for the subprocess that opens the browser window, preventing zombie processes
Fixes #1488
2026-06-02 11:36:05 +02:00
Dominik Jain 5db677162c Improve quoting of arguments for subprocess executions
* Add util function subprocess_util.convert_shell_cmd
* Apply function in
  - StdioLanguageServer (replacing use of quote_arg function)
  - RuntimeDependencyCollection (previously no quoting applied)
2026-06-02 10:48:36 +02:00
Dr. Dominik Jain 8a54795848 Merge pull request #1531 from futile/fix-nix-appindicator-tray
fix(nix): Add NixOS-support for the tray manager in AppIndicator trays
2026-06-01 15:21:02 +02:00
Felix Rath 7b9fc9c5b7 fix(nix): Add Linux-support for the tray manager in AppIndicator trays
Assisted-by: gpt-5.5
2026-06-01 15:17:36 +02:00
Dr. Dominik Jain ae58b60a58 Merge pull request #1509 from oraios/agent-config-update-events
Introduce events for agent config/status updates
2026-06-01 14:02:01 +02:00
Dr. Dominik Jain 93dd4df696 Merge pull request #1536 from oraios/fix-svelte-diagnostics
SvelteLanguageServer: Fix diagnostics requests for TypeScript/JavaScript files
2026-06-01 13:59:51 +02:00
Dominik Jain 7b30f9328e SvelteLanguageServer: Fix diagnostics requests for TypeScript/JavaScript files
incorrectly being processed by the Svelte LS instead of the TypeScript LS
2026-06-01 12:50:31 +02:00
Dominik Jain 4aeef5ab85 Merge remote-tracking branch 'origin/main' into agent-config-update-events
Conflicts:
	CHANGELOG.md
	src/serena/agent.py
2026-06-01 11:25:23 +02:00
Dr. Dominik Jain 81fafd646e Merge pull request #1522 from oraios/configurable-trusted-hosts
Make dashboard trusted hosts configurable
2026-06-01 11:16:27 +02:00
Dominik Jain d5033c404d Make dashboard trusted hosts configurable 2026-05-28 14:31:41 +02:00
Dominik Jain c57b7f2b7d Add missing changelog entry for v1.5.3 2026-05-28 13:36:32 +02:00
Dominik Jain 09430b0fb6 Fix: Host validation required a local host even if the listen address was set to a non-local address
(regression introduced in 1.5.2)
2026-05-28 13:36:32 +02:00
Michael Panchenko 3240403ab1 Dashboard: configure trusted hosts directly in flask app 2026-05-28 13:28:56 +02:00
Petr Devyaterikov 7bf30080f6 typescript_vts: add initialization_options pass-through (#1507)
* typescript_vts: add initialization_options pass-through

Extends ls_specific_settings["typescript_vts"] with an optional
initialization_options key — a dict forwarded to vtsls via all three
LSP configuration channels:

- the initialize request (initializationOptions field),
- a workspace/didChangeConfiguration notification right after initialize,
- and responses to workspace/configuration pulls, looked up per section
  (e.g. "typescript", "vtsls", "javascript", or dotted paths like
  "typescript.tsdk").

All three channels are necessary because different parts of vtsls read
settings from different places — notably typescript.tsdk, which vtsls
pulls via workspace/configuration rather than reading from
initializationOptions. Without the pull-answer, setting tsdk had no
effect.

Primary use case: Yarn Plug'n'Play projects. Running
`yarn dlx @yarnpkg/sdks vscode` in the project root generates
.yarn/sdks/typescript/lib/tsserver.js, a PnP-aware tsserver. The user
then points vtsls at it with:

    ls_specific_settings:
      typescript_vts:
        initialization_options:
          typescript:
            tsdk: "<...>/.yarn/sdks/typescript/lib"
          vtsls:
            autoUseWorkspaceTsdk: true

autoUseWorkspaceTsdk is required alongside tsdk because, in a headless
LSP context, there is no UI prompt to confirm switching to the
workspace TypeScript version. See yioneko/vtsls#169 for the recipe.

Default behaviour is unchanged — the field is optional, omitted from
the initialize params and didChangeConfiguration when unset or empty,
and workspace/configuration continues to answer empty sections.
2026-05-27 13:31:57 +02:00
Michael Panchenko 9b292a6c8b Set version to v1.5.4.dev0 2026-05-26 21:03:36 +02:00
Michael Panchenko 2449313c0d Release v1.5.3 2026-05-26 21:03:36 +02:00
Michael Panchenko 0847215740 Prepare release to GitHub's mcp registry 2026-05-26 21:01:47 +02:00
Michael Panchenko d0dbed3779 Shorten command in installation instructions
--prerelease=allow is no longer necessary (pythonnet was bumped) and @latest is not needed either (same effect as without it)
2026-05-26 17:10:14 +02:00
Michael Panchenko 209ea95881 Set version to v1.5.3.dev0 2026-05-26 17:05:07 +02:00
Michael Panchenko 2ee8f100b2 Release v1.5.2 2026-05-26 17:05:07 +02:00
Joe Black f5c707aca4 feat(hooks): expand _CODE_FILE_EXTENSIONS to include config/schema formats
Add structured non-source file types (.yaml, .json, .toml, .graphql,
.proto, .sql, .tf, .hcl, etc.) to the read-file nudge set.

These extensions are common in real-world projects and repeated raw
reads of them are equally well served by `search_for_pattern` or
other Serena tools — the same rationale that applies to .py/.ts already
applies to config, schema, and query files.

Note added to the docstring: `search_for_pattern` works regardless of
extension and is always a valid alternative to repeated raw reads.
2026-05-26 16:43:47 +02:00
Michael Panchenko 6956948180 Merge pull request #1518 from oraios/improve_packaging
Improve packaging
2026-05-26 16:39:36 +02:00
Michael Panchenko 75738f4838 Add identifier as comment to readme
Needed for Serena to be listed in GitHub's mcp registry
2026-05-26 15:34:38 +02:00
Michael Panchenko 1122166b7c Remove pyright and fortls from serena-agent package, instead install with uvx on the fly
Added a dedicated LSDependencyProvider for that
2026-05-26 15:34:37 +02:00
Michael Panchenko 6941af6aab Bumped pythonnet, added serena-agent cli alias command
The latter enables running uvx serena-agent as entrypoint, otherwise one needs uvx --from serena-agent serena
2026-05-26 14:58:54 +02:00
Michael Panchenko 016ccbe1c0 Dashboard: validate host and port on each request 2026-05-26 13:44:57 +02:00
weiconghe 9c19d5f7f8 fix: allow non-existent paths in ignore check
The _is_ignored_relative_path method used to raise FileNotFoundError
when checking a path that does not exist on disk. This prevented
editing tools (replace_content, insert_after_symbol, etc.) from
operating on newly created files.

Since a non-existent file cannot be matched by ignore patterns,
returning False (not ignored) is semantically correct and safe.

Changes:
- _is_ignored_relative_path: return False instead of raising for
  non-existent paths, with a debug log message
- validate_relative_path docstring: updated to reflect new behavior
- Added 3 test cases covering non-existent path scenarios
2026-05-26 11:44:06 +02:00
Dominik Jain 24c16b6fec Fix empty executions queue displaying as 'Loading ...' 2026-05-23 15:51:10 +02:00
Dominik Jain 065df5ea31 Introduce events for agent config/status updates
decoupling dashboard config computation from the task queue

Resolves #1064
2026-05-23 15:51:09 +02:00
Dominik Jain 981f560fa3 Consolidate handling of resources paths
* constants.py should remain the central place where a root path
   is determined based on source file location
 * SerenaPaths should consistently use strings
2026-05-21 15:27:49 +02:00
Dominik Jain 1b1522d46d Improve change log
* v1.5.1: Add hotfix cbfe68a4cd
 * v1.5.0: Mention changes to onboarding invasiveness
2026-05-20 15:10:12 +02:00
dependabot[bot] c3144a7144 Bump idna from 3.11 to 3.15 in the uv group across 1 directory
Bumps the uv group with 1 update in the / directory: [idna](https://github.com/kjd/idna).


Updates `idna` from 3.11 to 3.15
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](https://github.com/kjd/idna/compare/v3.11...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
  dependency-group: uv
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-20 14:08:32 +02:00
Sergiy Borodych 860c5841df Include .t files in Perl::LanguageServer fileFilter
Serena's file-to-language router already maps `.t` to the Perl LS
(`Language.PERL` in `solidlsp/ls_config.py`), but the
Perl::LanguageServer-side `fileFilter` was hardcoded to
`[".pm", ".pl"]`. As a result Perl::LanguageServer skipped `.t`
files entirely: symbol queries on a `.t` returned empty, and
references to `.pm`/`.pl` subs missed any callers defined in
`.t` files.

Add `.t` to the filter, deduplicate the two `fileFilter` literals
into a `_FILE_FILTER` class constant, and note the sync requirement
with `Language.PERL.get_source_fn_matcher()` in a comment. Cover
the behavior with a new cross-file references test plus a `helper.t`
fixture; the test fails on unpatched `main` and passes on this
branch.
2026-05-20 14:07:57 +02:00
Michael Panchenko 0909ae05f7 Set version to v1.5.2.dev0 2026-05-18 23:15:02 +03:00
Michael Panchenko c3a8d5a9c5 Release v1.5.1 2026-05-18 23:15:01 +03:00
Edward Muller ffd5dfd3e7 Add CUE language support via cue lsp (#1474) 2026-05-18 22:12:40 +02:00