Commit Graph
102 Commits
Author SHA1 Message Date
Dominik Jain 3b898b671c Reify language backends, introducing LanguageBackendRegistry
* Many case differentiations in the agent code were replaced by
  method calls in the newly introduced LanguageBackend abstraction
* The registry allows new backends to be added dynamically
  (via Python packages that implement a specific entrypoint)
2026-09-18 15:20:10 +02:00
Dominik Jain 6da423c70a Add dev command to bump_version and make its interface explicit
bump_version could previously only create releases. It now provides two
subcommands, and the mutually exclusive --major/--minor/--patch flags (as
well as the explicit --version option) are replaced by a positional
argument, which cannot be misused:

    bump_version.py release <current|major|minor|patch>
    bump_version.py dev <major|minor|patch>

`dev` bumps the version to a new .dev0 version and commits it as
"Set version to vX" without creating a tag or touching the changelog. This
allows work on main to target a new minor/major version independently of a
release.

Because a .dev0 version no longer necessarily reserves the next patch
version, `release` now takes the target "current", which releases the
version reserved by the current .dev version (the usual case), whereas
major/minor/patch bump beyond it. The former special case of not
incrementing the patch version is thereby removed; `release patch` now
increments the patch version as its name suggests.

`release current` fails if the current version is not a development
version, in which case there is no reserved version to release.
2026-09-15 10:27:45 +02:00
Dominik Jain 6707cd9b7e Introduce component-based licensing: Serena GPL-3.0-or-later, SolidLSP MIT
The repository is licensed per component. SolidLSP (src/solidlsp,
test/solidlsp, test/resources) remains MIT-licensed and independently
reusable; the Serena application (src/serena, src/interprompt, scripts,
test/serena, docs) is licensed under GPL-3.0-or-later starting with the v2
licensing transition. The change is not retroactive: all releases and
commits up to v1.7.0 / 74c38a65 (tag mit-final) remain available under MIT.

Since MIT is GPL-compatible, a distribution combining both (such as the
serena-agent package) is as a whole subject to GPL-3.0-or-later, while the
SolidLSP files themselves stay MIT and can be extracted and used separately
under MIT terms. The distribution metadata therefore declares
GPL-3.0-or-later, with both license texts shipped alongside it.

Serena originally began under the GPL (v2) and was switched to MIT in
May 2025 following community requests. We consider that change a mistake;
the substantial changes in v2 make this the appropriate time to revert it.
We want the best version of Serena to remain free.

Changes:
* LICENSE is now the licensing overview; canonical license texts live in
  LICENSES/ (MIT.txt is the previous LICENSE verbatim, GPL-3.0-or-later.txt
  is the unmodified FSF text)
* pyproject.toml declares the PEP 639 license expression
  "GPL-3.0-or-later" and bundles LICENSE and LICENSES/* as license files;
  the deprecated MIT classifier is dropped and flake.nix declares gpl3Plus;
  README has per-component license badges and a License section
* SPDX-License-Identifier headers in all Python sources under src/ and
  scripts/, added by the new idempotent scripts/add_spdx_headers.py, which
  gen_prompt_factory.py also uses to keep the header on the generated
  module; existing third-party notices are preserved
* CLA.md: Contributor License Agreement (contributor retains copyright;
  grants a perpetual, irrevocable license including relicensing under any
  terms, incl. proprietary/commercial; patent grant; authority
  representations), to be enforced repository-wide via cla-assistant.io
* CONTRIBUTING.md, PR template and a new docs page explain the licensing
  boundary and the CLA workflow
2026-09-14 21:33:18 +02:00
weiconghe 1d44e9cfab feat: add Gleam language support via the Gleam compiler's bundled gleam lsp (#1765) 2026-08-08 19:44:27 +02:00
Evangelos Karatzas 76b94f3274 Add Nextflow language server support (#1815)
The Nextflow language server schedules a debounced (1s) AST update on every
didOpen/didChange, and LanguageService.references is the only request that does
not await it -- documentSymbol, codeLens, documentLink and semanticTokensFull
all do. A references request issued inside that window races the recompile of
the file it asks about and can return an empty list, which is what the macOS CI
runner hit. Send a documentSymbol request for the same file first, which blocks
server-side until the pending update has been applied.

Also compare reference paths using the platform separator in the tests, since
relativePath is OS-native and the hardcoded forward slashes failed on Windows.
2026-08-08 18:58:46 +02:00
Tyce HerrmanandDominik Jain 217517ecdf feat(kotlin): update language server to 262.9593.0 (#1811)
* feat(kotlin): update language server to 262.9593.0

Note: download URL structure differs depending on version

---------

Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
2026-08-08 16:25:13 +02:00
Dominik Jain 9fc8033ece Introduce DownloadedDependency abstraction with URL-keyed hash database
* Add DownloadedDependency abstraction to facilitate handling of downloaded
  and hash-verified dependencies.
  In CI, missing hashes raise an exception.
  For users, unverified downloads log a warning.
* Add DownloadedDependencyHashDatabase which manages a URL-keyed database
  of sha256 hashes. It can be conveniently updated incrementally through a
  script (src/solidlsp/resources/downloaded_dependency_hashes.json),
  provided that language server implementations provide DownloadedDependency
  instances statically

Applied in EclipseJDTLS:
* Replace the untyped nested-dict runtime dependency descriptors with DownloadedDependency instances
* Move the JDTLS version-pinning constants into DependencyProvider
* Replace the platform dependency dicts with the VSCodeJavaConfig dataclass

Utils:
 * Add FileUtils.ArchiveType to type archive types that were previously plain str
 * Add is_running_in_ci() to ls_utils

Updated memory on adding a language server accordingly.
2026-08-03 01:34:24 +02:00
Dominik Jain 33b042ad06 Add script for visualising the memory graph of a project 2026-07-24 22:30:05 +02:00
Dominik Jain 4f8f9b3fc8 Refactoring: Rename ProjectConfig.languages to language_servers 2026-07-22 21:41:00 +02:00
Dominik Jain d2cf18ddcb Refactoring: Rename Language to LanguageServerId
This resolves a long-standing naming issue in Serena & SolidLSP.
2026-07-22 20:55:36 +02:00
xormania 9debf7742a Add Grok Build support (context, setup, native hooks)
Adds first-class support for xAI's Grok Build CLI, following the
existing client-integration pattern (Claude Code, CodeBuddy, Codex):

- grok context: single-project, shaped like claude-code.yml, with the
  file-tool exclusions appropriate for a CLI agent that has its own
  read/edit/shell tools. structured_tool_output is left at the auto
  default (as in the codex and codebuddy contexts); claude-code's
  explicit false is a Claude-Code-specific bug workaround that is not
  carried over.
- serena setup grok: registers Serena as a user-scoped MCP server via
  "grok mcp add" after detecting a compatible grok CLI.
- serena-hooks --client=grok: Grok-native PreToolUse output
  ({decision, reason}) instead of the Claude-style hookSpecificOutput
  envelope; grep/read detection extended to Grok's tool names and
  shell payloads (target_file/targetFile path keys, non-string command
  values handled defensively). The payload-parsing refinements live in
  the remind hook's client-agnostic parsing and apply to all hook
  clients: a non-string command value previously raised, and
  target_file/targetFile paths were not recognized.
- Docs (030_clients.md #grok), unit tests for setup/hooks/context, and
  scripts/live_test_grok.py - a zero-inference, state-preserving live
  smoke test against a real grok installation (documented in
  CONTRIBUTING.md). Its M5 check verifies the structured-output wire
  shape: the grok context (auto default) serves an output schema and
  structuredContent for string-returning tools, while the claude-code
  context (explicit false workaround) serves plain text only.
2026-07-21 21:18:16 +02:00
Dominik Jain 65474d3d3b bump_version: Create new dev version after creation of a release version 2026-05-11 19:14:18 +02:00
Dominik Jain 2e0167f818 Refactor LSP tools for symbol declaration retrieval
* Apply common functionality already used in JetBrainsFindDeclarationTool
* Remove location-based tool (counteracts Serena's principle to eschew line numbers)
* Apply renaming to use "find declaration" instead of "find defining symbol"
2026-04-30 15:31:27 +02:00
Dominik Jain 061020ce22 Refactor EditingToolWithDiagnostics
* Add context manager to simplify usage, improving output handling
* Add util module ls_diagnostics, reifying DiagnosticsDiff
2026-04-30 15:31:27 +02:00
Michael Panchenko da59a19c50 Fixes in various LS and in tests to accommodate diagnostics edge behavior
Also minor fix in go test expectations of symbol name
2026-04-29 23:52:26 +02:00
Michael Panchenko bd7e64e85a Fixed diagnostics files uri handling, added low-level tests 2026-04-29 23:52:26 +02:00
Michael Panchenko c55e0c900e Diagnostics, implementation and definition tools (WIP) 2026-04-29 23:52:26 +02:00
Michael Panchenko d4c75224d3 Added demo script for profiling/debugging the CLI 2026-04-26 16:26:30 +02:00
Michael Panchenko 2c65578536 Demo script: remove toon encoding 2026-04-21 12:41:20 +02:00
Dominik Jain 00726f5fdc Add date to changelog headings, add 'v' prefix
Fixes #1337
2026-04-14 14:56:20 +02:00
Michael Panchenko 57dec4c7ca Followup after 34e1fae7 - added more ignored directories 2026-04-13 20:45:05 +02:00
Michael Panchenko 22959f154f Internal: run uv lock as part of bump_version 2026-04-12 14:08:25 +02:00
Dominik Jain 23ebce0563 Deploy news to and load news from Oraios server instead of GitHub
GitHub server (raw.githubuserconten.com) is frequently blacklisted
2026-04-10 19:07:40 +02:00
Dominik Jain b0fd895794 Do not assume any default for version component to bump 2026-04-08 17:33:27 +02:00
Dominik Jain 527abc2ed0 Add commit and tag in bump_version script, add developer instructions 2026-04-08 17:33:27 +02:00
Michael Panchenko 0c1157edca Added a script for bumping version 2026-04-07 16:03:12 +02:00
Michael Panchenko 4a692eed44 News: switched mechanism to fetch news from github
This allows news to be updated without updating the installed version of Serena itself.
2026-04-07 15:56:00 +02:00
Michael Panchenko 46c06230bd Merge branch 'refs/heads/main' into serena_init_cmd
# Conflicts:
#	CHANGELOG.md
2026-04-06 20:26:40 +02:00
Michael Panchenko eb453976e2 CLI: removed deprecated commands 2026-04-06 19:18:48 +02:00
Dominik Jain cda321e318 Fix manual shutdown triggered by GUI tool/dashboard not cleaning everything up.
Subprocesses were not cleaned up, in particular.

* Rename SerenaAgent.shutdown to on_shutdown, because it is really a shutdown handler;
  it did not perform a shutdown.
* Add new method shutdown which is now called from both sites (and which performs
  the full shutdown)
* Manage the process instance used for the dashboard viewer and shut it down
  explicitly.
* Initialise all variables used during shutdown immeditaly (avoiding errors when
  shutdown is triggered during init)
2026-04-06 16:04:51 +02:00
Michael Panchenko 2aa6603dbb Added safe_delete and inline_symbol tools (JB backend) 2026-03-27 14:07:10 +01:00
Michael PanchenkoandDominik Jain c6250aeeab Improved retrieval tool responses (#1190)
* Improved symbol retrieval tool responses

1. FindSymbol (LS and JB) now has max_matches. Both tools now perform grouping like other symbol retrieval tools
2. When a result exceeds max_answer_chars, the caller may pass a shortened message. This is used in references and overview tools

* Progressive shortening for tool results that exceed max_answer_chars

Change _limit_length to accept an optional list of closures instead of
a single shortened_result string. Each closure produces a progressively
shorter version of the result, tried in order until one fits. The last
closure is assumed to always fit and is used unconditionally.

* Extended grouper

More flexible grouping logic was needed to achieve the above results. Grouper also no longer
mutates the input (using deepcopy)

---------

Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
2026-03-27 08:34:21 +01:00
Michael Panchenko 0bbd9e375e Reformat (minor, after replacing black with ruff)
Black dependency created a dependabot warning and couldn't be bumped since it collided with pathspec dependencies. Since ruff can also format, black is not needed. But we now have these small format changes, mostly in test files
2026-03-23 21:10:41 +01:00
Dominik Jain abef88c482 SerenaConfig: Rename gui_log_window_enabled to gui_log_window
This removes the discrepancy with the configuration file (where it was always gui_log_window)
2026-01-19 18:33:43 +01:00
Dominik Jain 1c17d61121 Improve documentation (particularly on configuration) and the issue template 2026-01-17 00:46:43 +01:00
Michael Panchenko 1d5cf33237 Support for info in JB symbols and various improvements. Adds bs4 to deps
- Added typed dicts for most responses in jetbrains_types.py
- Fix bug in code_editor (location key no longer existed, found by mypy after adding the types)

Should be merged after next version of plugin release
2026-01-03 18:43:02 +07:00
Dominik Jain d410aa9f90 SerenaConfig: Use configuration setting 'language_backend' instead of 'jetbrains'
introducing enum LanguageBackend
2025-12-17 12:54:33 +01:00
Michael Panchenko 5c7ad8edf7 Minor [ci skip] 2025-11-13 11:04:05 +01:00
Dominik Jain 83f4da5ff0 Add profiling script, add pyinstrument to dev dependencies 2025-11-12 03:46:18 +01:00
Dominik Jain c3827d9d57 Apply formatter 2025-11-06 21:04:17 +01:00
Michael Panchenko 234aba4aba Demo for sponsor banners 2025-11-05 13:39:25 +07:00
MischaPanch ad4fec9230 Enhance dashboard functionality
Added an overview (landing page showing current and available config) and advanced stats windows, controlled by top-right menu

Stats calculation is no longer optional, but we use a trivial token estimator by default
2025-10-27 22:08:53 +01:00
David Markey 45407f7a2a Update agno API to the newest version, switch to AgentOS (#702) 2025-10-27 15:57:56 +01:00
MischaPanch 99757f35eb Made more tools optional and shortened several docstrings 2025-08-03 00:14:11 +02:00
MischaPanch caa2c545e4 New feature: allow users to override prompts. Extended CLI for that 2025-07-30 12:10:15 +02:00
Michael Panchenko cad4df59cc Refactoring (minor): move all cli related things to a dedicated module 2025-07-16 18:27:13 +02:00
Dominik Jain 915da8dc9f Fix demo script 2025-07-10 23:19:36 +02:00
Dominik Jain 58bf161fd2 More flexible handling of enabled tools:
* In addition to exclusion, support notion of "optional tools" that
    are disabled by default and enabled only upon request
  * Unify the handling of inclusions/exclusions across
      - SerenaConfig
      - ProjectConfig
      - SerenaAgentContext
      - SerenaAgentMode
  * Make ToolRegistry a singleton and simplify all related operations
2025-07-06 00:39:36 +02:00
Dominik Jain 51c93c2f45 Add package serena.config for configuration (with context_mode module) 2025-07-02 18:18:13 +02:00
Dominik Jain 8577616436 Simplify configuration management, unifying SerenaConfigBase and SerenaConfig
and removing other subclasses
2025-07-02 16:09:25 +02:00