Skip to content

feat: version discovery, User-Agent, trace_id, ToolContext, telemetry#104

Merged
saurabhjain1592 merged 21 commits intomainfrom
feat/version-discovery
Mar 3, 2026
Merged

feat: version discovery, User-Agent, trace_id, ToolContext, telemetry#104
saurabhjain1592 merged 21 commits intomainfrom
feat/version-discovery

Conversation

@saurabhjain1592
Copy link
Member

@saurabhjain1592 saurabhjain1592 commented Mar 1, 2026

Summary

  • Version discovery and capability detection via /api/v1/version
  • User-Agent header with SDK version on all requests
  • health_check_detailed() method for component-level health
  • trace_id field on workflow create/status/list operations
  • ToolContext class for per-tool governance within tool_call steps
  • Per-tool adapter support for step gate requests
  • Anonymous runtime telemetry (fire-and-forget checkpoint ping on client init)
  • telemetry config option, AXONFLOW_TELEMETRY=off / DO_NOT_TRACK=1 opt-out

Test plan

  • pytest tests/ passes (615 passed, 22 skipped, 0 failures)
  • Coverage threshold met (77.16%)
  • E2E: workflow-control Python example passes with trace_id assertions

- Fix __version__ from 3.6.0 to 3.8.0
- Add User-Agent header to all HTTP requests
- Add health_check_detailed() returning HealthResponse with capabilities
- Add has_capability() for runtime feature detection
- Add PlatformCapability, SDKCompatibility, HealthResponse dataclasses
- Sync wrapper in SyncAxonFlow
- Log warning when SDK version is below platform min_sdk_version
- Add ToolContext model for per-tool governance within tool_call steps
- Add trace_id field to CreateWorkflowRequest, CreateWorkflowResponse,
  WorkflowStatusResponse, and ListWorkflowsOptions
- Add trace_id query param support in list_workflows client method
- Add tool_context parameter to StepGateRequest and check_gate() adapter
- Add check_tool_gate() convenience method for per-tool gate checks
- Add tool_completed() convenience method for tool-level completion
- Add tokens_in/tokens_out/cost_usd params to step_completed() adapter
- Export ToolContext from axonflow package
- Add trace_id param to LangGraph adapter start_workflow()
@saurabhjain1592 saurabhjain1592 changed the title feat: version discovery, User-Agent, health_check_detailed feat: version discovery, User-Agent, health_check_detailed, trace_id, ToolContext, per-tool adapter Mar 1, 2026
- Add trace_id to create_workflow request body and response parsing
- Add trace_id to _map_workflow_response for get_workflow
- Add tool_context to step_gate request body when present
Replace '/' with '-' in auto-generated step_id to prevent
tools/tool_name from being interpreted as URL path segments.
- P1-1: Update pyproject.toml version from 3.6.0 to 3.8.0 to match SDK
- P1-2: Create axonflow/_version.py as single source of truth for version string; update __init__.py and client.py to import from it
- P1-3: Make _parse_version robust against pre-release suffixes (e.g. 1.0.0-beta, 1.0.0+build)
- P1-4: Only include tool_type in serialized body when not None, avoiding JSON null
- P2-1: Fix Ruff Q000 single-quote violations in langgraph.py
- P2-2: Add frozen=True (model_config) to ToolContext in workflow.py
Fire-and-forget checkpoint ping on client init with SDK version, OS,
arch, runtime version, deployment mode, and enabled features. Off by
default for community/sandbox, on for production. Opt out via
AXONFLOW_TELEMETRY=off or DO_NOT_TRACK=1.
@saurabhjain1592 saurabhjain1592 changed the title feat: version discovery, User-Agent, health_check_detailed, trace_id, ToolContext, per-tool adapter feat: version discovery, User-Agent, trace_id, ToolContext, telemetry Mar 2, 2026
- Move telemetry import to top-level in client.py (PLC0415)
- Fix import sorting in client.py and test_telemetry.py (I001)
- Use specific exception types instead of bare Exception (BLE001)
- Add _HTTP_OK constant for status code comparison (PLR2004)
- Add noqa for unused endpoint parameter kept for future use (ARG001)
Production mode without credentials (community/self-hosted) now defaults
telemetry to OFF, matching Go/TypeScript SDKs and documented policy.
Remove credential-based default logic. Telemetry is now ON by default
for all modes except sandbox. Opt out via DO_NOT_TRACK=1,
AXONFLOW_TELEMETRY=off, or telemetry config flag.
@saurabhjain1592 saurabhjain1592 merged commit d1a5db5 into main Mar 3, 2026
13 checks passed
@saurabhjain1592 saurabhjain1592 deleted the feat/version-discovery branch March 3, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant