From 72494a4d3a9901f045030eaa8fbff6d7f5731e0e Mon Sep 17 00:00:00 2001 From: Saurabh Jain Date: Mon, 6 Apr 2026 18:47:20 +0200 Subject: [PATCH 1/3] feat: add check_tool_input/check_tool_output aliases, enable localhost telemetry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add check_tool_input() and check_tool_output() as generic aliases for mcp_check_input() and mcp_check_output() on both async and sync clients - Remove localhost telemetry suppression — anonymous telemetry now enabled by default for all endpoints including localhost/self-hosted evaluation - Opt out with DO_NOT_TRACK=1 or AXONFLOW_TELEMETRY=off - Bump version to 6.1.0 --- CHANGELOG.md | 12 +++++++++++ axonflow/_version.py | 2 +- axonflow/client.py | 50 +++++++++++++++++++++++++++++++++++++++++++ axonflow/telemetry.py | 15 ------------- 4 files changed, 63 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3e9f56..857ca5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to the AxonFlow Python SDK will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.1.0] - 2026-04-08 + +### Added + +- **`check_tool_input()` / `check_tool_output()`** — generic aliases for tool governance. Existing `mcp_check_input()` / `mcp_check_output()` remain supported. + +### Changed + +- Anonymous telemetry is now enabled by default for all endpoints, including localhost/self-hosted evaluation. Opt out with `DO_NOT_TRACK=1` or `AXONFLOW_TELEMETRY=off`. + +--- + ## [6.0.0] - 2026-04-05 ### BREAKING CHANGES diff --git a/axonflow/_version.py b/axonflow/_version.py index c79667f..f9332fa 100644 --- a/axonflow/_version.py +++ b/axonflow/_version.py @@ -1,3 +1,3 @@ """Single source of truth for the AxonFlow SDK version.""" -__version__ = "6.0.0" +__version__ = "6.1.0" diff --git a/axonflow/client.py b/axonflow/client.py index 8a3880a..3033513 100644 --- a/axonflow/client.py +++ b/axonflow/client.py @@ -1258,6 +1258,16 @@ async def mcp_check_input( return MCPCheckInputResponse(**data) + async def check_tool_input( + self, + connector_type: str, + statement: str, + operation: str = "execute", + parameters: dict[str, Any] | None = None, + ) -> MCPCheckInputResponse: + """Alias for :meth:`mcp_check_input`. Validates tool input against configured policies.""" + return await self.mcp_check_input(connector_type, statement, operation, parameters) + async def mcp_check_output( self, connector_type: str, @@ -1313,6 +1323,19 @@ async def mcp_check_output( return MCPCheckOutputResponse(**data) + async def check_tool_output( + self, + connector_type: str, + response_data: list[dict[str, Any]] | None = None, + message: str | None = None, + metadata: dict[str, Any] | None = None, + row_count: int = 0, + ) -> MCPCheckOutputResponse: + """Alias for :meth:`mcp_check_output`. Validates tool output against configured policies.""" + return await self.mcp_check_output( + connector_type, response_data, message, metadata, row_count + ) + async def generate_plan( self, query: str, @@ -6511,6 +6534,33 @@ def mcp_check_output( ) ) + def check_tool_input( + self, + connector_type: str, + statement: str, + operation: str = "execute", + parameters: dict[str, Any] | None = None, + ) -> MCPCheckInputResponse: + """Alias for :meth:`mcp_check_input`. Validates tool input against configured policies.""" + return self._run_sync( + self._async_client.mcp_check_input(connector_type, statement, operation, parameters) + ) + + def check_tool_output( + self, + connector_type: str, + response_data: list[dict[str, Any]] | None = None, + message: str | None = None, + metadata: dict[str, Any] | None = None, + row_count: int = 0, + ) -> MCPCheckOutputResponse: + """Alias for :meth:`mcp_check_output`. Validates tool output against configured policies.""" + return self._run_sync( + self._async_client.mcp_check_output( + connector_type, response_data, message, metadata, row_count + ) + ) + def generate_plan( self, query: str, diff --git a/axonflow/telemetry.py b/axonflow/telemetry.py index f1413cc..f3869ac 100644 --- a/axonflow/telemetry.py +++ b/axonflow/telemetry.py @@ -74,17 +74,6 @@ def _detect_platform_version(endpoint: str) -> str | None: return None -def _is_localhost(endpoint: str) -> bool: - """Check whether the endpoint is a localhost address.""" - try: - from urllib.parse import urlparse # noqa: PLC0415 - - host = urlparse(endpoint).hostname or "" - except ValueError: - return False - else: - return host in ("localhost", "127.0.0.1", "::1") - def _normalize_arch(arch: str) -> str: """Normalize architecture names to match other SDKs.""" @@ -160,10 +149,6 @@ def send_telemetry_ping( if not _is_telemetry_enabled(mode, telemetry_enabled, has_credentials): return - # Suppress telemetry for localhost endpoints unless explicitly enabled. - if telemetry_enabled is not True and _is_localhost(endpoint): - return - logger.info( "AxonFlow: anonymous telemetry enabled. " "Opt out: AXONFLOW_TELEMETRY=off | https://docs.getaxonflow.com/docs/telemetry" From 83523b64ced8db3c15e25ae6f8d6f33ca3f8d8c2 Mon Sep 17 00:00:00 2001 From: Saurabh Jain Date: Mon, 6 Apr 2026 19:48:12 +0200 Subject: [PATCH 2/3] style: fix ruff formatting in telemetry.py --- axonflow/telemetry.py | 1 - 1 file changed, 1 deletion(-) diff --git a/axonflow/telemetry.py b/axonflow/telemetry.py index f3869ac..d9785ed 100644 --- a/axonflow/telemetry.py +++ b/axonflow/telemetry.py @@ -74,7 +74,6 @@ def _detect_platform_version(endpoint: str) -> str | None: return None - def _normalize_arch(arch: str) -> str: """Normalize architecture names to match other SDKs.""" if arch == "aarch64": From 9afe18c08307ee4ae349379b28d54292ca85a940 Mon Sep 17 00:00:00 2001 From: Saurabh Jain Date: Mon, 6 Apr 2026 19:50:01 +0200 Subject: [PATCH 3/3] fix: changelog date to 2026-04-06 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 857ca5a..a6868bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to the AxonFlow Python SDK will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [6.1.0] - 2026-04-08 +## [6.1.0] - 2026-04-06 ### Added