diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bb5a53..fdd541f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,15 @@ 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). -## [3.9.0] - 2026-03-06 +## [4.0.0] - 2026-03-09 + +### Breaking Changes + +- **Removed `total_steps` from `CreateWorkflowRequest`**. Requires Platform v4.5.0+ (recommended v5.0.0+). + Total steps are auto-computed when the workflow reaches a terminal state. +- **`mcp_check_input()` default `operation` changed from `"query"` to `"execute"`**. Callers relying on + the implicit `"query"` default must now pass `operation="query"` explicitly. This better reflects the + default MCP tool call pattern where side effects are unknown. ### Added @@ -15,13 +23,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `operation`: Operation type forwarded to `mcp_check_input` (default: `"execute"`; use `"query"` for known read-only tool calls) - `MCPInterceptorOptions` and `WorkflowApprovalRequiredError` are now exported from `axonflow.adapters` +### Fixed + +- `mcp_tool_interceptor()` now uses JSON serialization (`json.dumps`) for `statement` and output `message` fields instead of Python `repr()`, ensuring the policy engine receives valid structured data + ### Changed -- `mcp_check_input()` default `operation` changed from `"query"` to `"execute"` to better reflect the default MCP tool call pattern where side effects are unknown +- Removed Scarf tracking pixel from README (GitHub's camo proxy strips viewer identity, making the pixel unattributable) +- Disabled SDK telemetry in CI workflows with `DO_NOT_TRACK=1` to prevent test runs from polluting checkpoint data +- Added pip dependency caching to CI and release workflows for faster builds -### Fixed +### Note -- `mcp_tool_interceptor()` now uses JSON serialization (`json.dumps`) for `statement` and output `message` fields instead of Python `repr()`, ensuring the policy engine receives valid structured data +`MediaAnalysisResult.extracted_text` was replaced by `has_extracted_text` + `extracted_text_length` +in v3.5.0. This major version formally acknowledges that breaking change. --- diff --git a/axonflow/_version.py b/axonflow/_version.py index 487424a..4c122e6 100644 --- a/axonflow/_version.py +++ b/axonflow/_version.py @@ -1,3 +1,3 @@ """Single source of truth for the AxonFlow SDK version.""" -__version__ = "3.8.0" +__version__ = "4.0.0" diff --git a/axonflow/adapters/langgraph.py b/axonflow/adapters/langgraph.py index 0f111d4..81b6545 100644 --- a/axonflow/adapters/langgraph.py +++ b/axonflow/adapters/langgraph.py @@ -115,7 +115,7 @@ class AxonFlowLangGraphAdapter: Example: >>> adapter = AxonFlowLangGraphAdapter(client, "code-review-pipeline") - >>> await adapter.start_workflow(total_steps=5) + >>> await adapter.start_workflow() >>> >>> # Before each LangGraph node execution >>> if await adapter.check_gate("analyze", "llm_call"): @@ -149,7 +149,6 @@ def __init__( async def start_workflow( self, - total_steps: int | None = None, metadata: dict[str, Any] | None = None, trace_id: str | None = None, ) -> str: @@ -158,7 +157,6 @@ async def start_workflow( Call this at the start of your LangGraph workflow execution. Args: - total_steps: Total number of steps (if known) metadata: Additional workflow metadata trace_id: External trace ID for correlation (Langsmith, Datadog, OTel) @@ -167,7 +165,6 @@ async def start_workflow( Example: >>> workflow_id = await adapter.start_workflow( - ... total_steps=5, ... metadata={"customer_id": "cust-123"}, ... trace_id="langsmith-run-abc123", ... ) @@ -175,7 +172,6 @@ async def start_workflow( request = CreateWorkflowRequest( workflow_name=self.workflow_name, source=self.source, - total_steps=total_steps, metadata=metadata or {}, trace_id=trace_id, ) diff --git a/axonflow/client.py b/axonflow/client.py index 7687c8c..8a03472 100644 --- a/axonflow/client.py +++ b/axonflow/client.py @@ -3439,7 +3439,6 @@ async def create_workflow( ... CreateWorkflowRequest( ... workflow_name="customer-support-agent", ... source=WorkflowSource.LANGGRAPH, - ... total_steps=5, ... metadata={"customer_id": "cust-123"} ... ) ... ) @@ -3448,7 +3447,6 @@ async def create_workflow( body = { "workflow_name": request.workflow_name, "source": request.source.value if request.source else "external", - "total_steps": request.total_steps, "metadata": request.metadata, } if request.trace_id: diff --git a/axonflow/workflow.py b/axonflow/workflow.py index ab49623..070a1e0 100644 --- a/axonflow/workflow.py +++ b/axonflow/workflow.py @@ -75,9 +75,6 @@ class CreateWorkflowRequest(BaseModel): source: WorkflowSource | None = Field( default=None, description="Source orchestrator running the workflow" ) - total_steps: int | None = Field( - default=None, ge=0, description="Total number of steps in the workflow (if known)" - ) metadata: dict[str, Any] = Field( default_factory=dict, description="Additional metadata for the workflow" ) diff --git a/pyproject.toml b/pyproject.toml index 0b09102..583ea54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "axonflow" -version = "3.8.0" +version = "4.0.0" description = "AxonFlow Python SDK - Enterprise AI Governance in 3 Lines of Code" readme = "README.md" license = {text = "MIT"} diff --git a/tests/test_wcp_approvals.py b/tests/test_wcp_approvals.py index 0dab146..22f7709 100644 --- a/tests/test_wcp_approvals.py +++ b/tests/test_wcp_approvals.py @@ -865,7 +865,6 @@ async def test_create_workflow( request = CreateWorkflowRequest( workflow_name="customer-support", source=WorkflowSource.LANGGRAPH, - total_steps=3, metadata={"customer_id": "cust-1"}, ) result = await client.create_workflow(request)