From 6844eec0f55b0c35bc9d4b5f8777ab3f3b2c15c2 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 10 Apr 2026 17:08:11 +0200 Subject: [PATCH 1/4] Collect basic usage data --- CHANGELOG.md | 3 ++- src/serena/agent.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a672fcde..b1a87a1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ Status of the `main` branch. Changes prior to the next official version change will appear here. * General: - - Added `serena init` command + - Add `serena init` command + - Add minimal usage data collection on startup (only Serena version, language backend, OS, dashboard enabled status; no personally identifiable information) * Language Servers: - Added Crystal language support (uses [Crystalline](https://github.com/elbywan/crystalline) language server) diff --git a/src/serena/agent.py b/src/serena/agent.py index f3c4d6ab..57ed1926 100644 --- a/src/serena/agent.py +++ b/src/serena/agent.py @@ -14,6 +14,7 @@ from contextlib import contextmanager from logging import Logger from typing import TYPE_CHECKING, Optional, TypeVar +import requests import webview from sensai.util import logging from sensai.util.logging import LogTime @@ -406,6 +407,23 @@ class SerenaAgent: if self._gui_log_viewer is not None: self._gui_log_viewer.set_dashboard_url(dashboard_url) + self._send_usage_info() + + def _send_usage_info(self): + is_ci = os.getenv("CI") == "true" or os.getenv("GITHUB_ACTIONS") == "true" + if is_ci: + return + params = { + "os": platform.system(), + "dashboard": int(self.serena_config.web_dashboard), + "version": self.version, + "backend": self._language_backend.value, + } + try: + requests.get("https://www.oraios-software.de/serena_usage.php", params=params, timeout=1, verify=False) + except Exception as e: + log.debug(f"Failed to send usage info: {e}") + @classmethod def _create_base_toolset( cls, From 7588c4343cec8dae3f588be255853209aa9cdc13 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 10 Apr 2026 22:35:48 +0200 Subject: [PATCH 2/4] Changelog: Move fixes into respective sections --- CHANGELOG.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29de4dfa..930f7dc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,11 @@ Status of the `main` branch. Changes prior to the next official version change w - **Major**: added commands for hooks and documentation on recommended setup. Consider setting up the [recommended hooks](https://oraios.github.io/serena/02-usage/030_clients.html) ! - Reworked installation instructions, switching to releases on pypi for distribution. Please update your mcp startup commands! - Add minimal usage data collection on startup (only Serena version, language backend, OS, dashboard enabled status; no personally identifiable information) + - Fix: git commit id in Serena version strings was incorrect * Language Servers: - Added Crystal language support (uses [Crystalline](https://github.com/elbywan/crystalline) language server) + - Fix: Reactivation of the same project restarted language servers #1280 * JetBrains: - `JetBrainsFindReferencingSymbolTool`: Include context lines (when using plugin version 2023.2.15+) @@ -18,11 +20,7 @@ Status of the `main` branch. Changes prior to the next official version change w - Add version display - Dashboard viewer (Windows): Add a parent monitoring thread to ensure termination. Some clients would terminate the MCP server in a way that did not ensure proper termination. - -* Fixes: - - Fix reactivation of the same project restarting language servers #1280 - - Fix git commit id in version string - - Fix manual server shutdown triggered by GUI tool/dashboard not cleaning everything up. + - Fix: Manual server shutdown triggered by GUI tool/dashboard not cleaning everything up. # 1.0.0 From 233fe19d01c0c6ff98d72093c0cba11f2003eb93 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 10 Apr 2026 22:38:04 +0200 Subject: [PATCH 3/4] Changelog: More consistent wording (imperative, use of caps) --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 930f7dc1..b27daa90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,14 @@ Status of the `main` branch. Changes prior to the next official version change will appear here. * General: - - Added `serena init` and `serena setup` commands - - **Major**: added commands for hooks and documentation on recommended setup. Consider setting up the [recommended hooks](https://oraios.github.io/serena/02-usage/030_clients.html) ! - - Reworked installation instructions, switching to releases on pypi for distribution. Please update your mcp startup commands! + - Add `serena init` and `serena setup` commands + - **Major**: Add commands for hooks and documentation of recommended setup. Consider setting up the [recommended hooks](https://oraios.github.io/serena/02-usage/030_clients.html) ! + - Rework installation instructions, switching to releases on pypi for distribution. Please update your mcp startup commands! - Add minimal usage data collection on startup (only Serena version, language backend, OS, dashboard enabled status; no personally identifiable information) - Fix: git commit id in Serena version strings was incorrect * Language Servers: - - Added Crystal language support (uses [Crystalline](https://github.com/elbywan/crystalline) language server) + - Add Crystal language support (uses [Crystalline](https://github.com/elbywan/crystalline) language server) - Fix: Reactivation of the same project restarted language servers #1280 * JetBrains: @@ -18,7 +18,7 @@ Status of the `main` branch. Changes prior to the next official version change w * Dashboard: - Add version display - - Dashboard viewer (Windows): Add a parent monitoring thread to ensure termination. + - Fix: Dashboard viewer (Windows): Add a parent monitoring thread to ensure termination. Some clients would terminate the MCP server in a way that did not ensure proper termination. - Fix: Manual server shutdown triggered by GUI tool/dashboard not cleaning everything up. From ac215817f35b9581de429955209f2ef1b0c53f98 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Sat, 11 Apr 2026 00:14:00 +0200 Subject: [PATCH 4/4] Fix untyped def --- src/serena/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serena/agent.py b/src/serena/agent.py index b3feec7d..ab14239f 100644 --- a/src/serena/agent.py +++ b/src/serena/agent.py @@ -409,7 +409,7 @@ class SerenaAgent: self._send_usage_info() - def _send_usage_info(self): + def _send_usage_info(self) -> None: is_ci = os.getenv("CI") == "true" or os.getenv("GITHUB_ACTIONS") == "true" if is_ci: return