diff --git a/CHANGELOG.md b/CHANGELOG.md index a3e9f56..a6868bb 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-06 + +### 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..d9785ed 100644 --- a/axonflow/telemetry.py +++ b/axonflow/telemetry.py @@ -74,18 +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.""" if arch == "aarch64": @@ -160,10 +148,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"