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
23 changes: 19 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

---

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__ = "3.8.0"
__version__ = "4.0.0"
6 changes: 1 addition & 5 deletions axonflow/adapters/langgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down Expand Up @@ -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:
Expand All @@ -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)

Expand All @@ -167,15 +165,13 @@ async def start_workflow(

Example:
>>> workflow_id = await adapter.start_workflow(
... total_steps=5,
... metadata={"customer_id": "cust-123"},
... trace_id="langsmith-run-abc123",
... )
"""
request = CreateWorkflowRequest(
workflow_name=self.workflow_name,
source=self.source,
total_steps=total_steps,
metadata=metadata or {},
trace_id=trace_id,
)
Expand Down
2 changes: 0 additions & 2 deletions axonflow/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
... )
... )
Expand All @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions axonflow/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
1 change: 0 additions & 1 deletion tests/test_wcp_approvals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down