Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion axonflow/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Single source of truth for the AxonFlow SDK version."""

__version__ = "6.0.0"
__version__ = "6.1.0"
50 changes: 50 additions & 0 deletions axonflow/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 0 additions & 16 deletions axonflow/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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"
Expand Down
Loading