fix: telemetry fixes, audit_tool_call, export audit#116
Merged
saurabhjain1592 merged 14 commits intomainfrom Mar 14, 2026
Merged
fix: telemetry fixes, audit_tool_call, export audit#116saurabhjain1592 merged 14 commits intomainfrom
saurabhjain1592 merged 14 commits intomainfrom
Conversation
- Call /health endpoint to detect platform version before sending telemetry ping (2s timeout, silent failure on any error) - Platform version is included in the checkpoint payload when available - endpoint parameter is no longer unused (was reserved for this purpose)
Report 'darwin' instead of 'Darwin' for consistency across SDKs.
Add TypeError and AttributeError to exception tuple so non-object /health responses (arrays, strings) don't escape and kill the telemetry thread before POST.
Export AuditSearchRequest, AuditSearchResponse, AuditLogEntry, and AuditQueryOptions from the package __init__.py. The types, client methods, and tests were already implemented but not publicly exported.
Add audit_tool_call SDK method to record non-LLM tool calls (MCP tools, API calls, function calls) in the audit trail. Posts to POST /api/v1/audit/tool-call with AuditToolCallRequest and returns AuditToolCallResponse.
Add 10 missing type exports (AxonFlowConfig, ConnectorHealthStatus, PolicyMatchInfo, ExfiltrationCheckInfo, DynamicPolicyMatch, DynamicPolicyInfo, ConnectorPolicyInfo, FindingSeverity, FindingStatus, Finding) to both imports and __all__ in axonflow/__init__.py.
When the SDK endpoint is localhost, 127.0.0.1, or ::1, telemetry pings are now suppressed unless telemetry_enabled is explicitly set to True. Prevents telemetry leaks during local development.
- Sort imports in __init__.py (I001) - Extract string literal from ValueError (EM101) - Narrow blind Exception catch to ValueError (BLE001) - Move return to else block (TRY300) - Break long Field descriptions to stay under 100 chars (E501)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aarch64toarm64,x86_64tox64), thread-safety fix (build payload inside thread), broader exception handlingaudit_tool_call()method andAuditToolCallRequest/AuditToolCallResponsetypesAuditSearchRequest,AuditSearchResponse,AuditLogEntry,AuditQueryOptionsfrom__init__.pyTest plan
pytestpasses (642 tests, 22 skipped, 77.78% coverage)from axonflow import AuditToolCallRequest