# Changelog

## [3.0.0] - 2026-03-30

> **Breaking:** The SDK namespace has moved from `mistralai_workflows` to `mistralai.workflows`.
> Update all imports (e.g. `from mistralai.workflows import workflow, activity`).

---

### Added

#### Package & Namespace

- The SDK package namespace has been migrated from `mistralai_workflows` to `mistralai.workflows`.
- Re-exported `imports_passed_through` and `sandbox_unrestricted` from `temporalio.workflow.unsafe` so users don't need to depend on Temporal internals directly.
- Prefixed internal implementation files with a leading underscore to clearly distinguish them from public API modules. This is a breaking change for any code importing directly from these internal module paths.
- Migrate workflows client core to mistralai SDK: removed WorkflowsClient in favor of the generated mistralai client for all workflow operations (execute, schedule, query, traces, registrations, etc.)

#### Workers & Deployment

- Workers now register under a named deployment identity, enabling per-deployment task queue routing and versioning.
- Worker now uses `DEPLOYMENT_NAME` as the Temporal task queue name. `TEMPORAL_TASK_QUEUE` is kept for backwards compatibility but raises if it conflicts with `DEPLOYMENT_NAME`.
- Workers now fail fast at startup when `DEPLOYMENT_NAME` is not set and no meaningful deployment identity can be derived from the config, instead of silently registering under the `"default"` queue.
- Versioned workers (with `deployment_name` and `build_id`) are now forbidden from using the `default` task queue to prevent Temporal versioning conflicts.
- Validate `deployment_name` on register and heartbeat requests: names must match `^[a-zA-Z0-9_\-\.]+$`; invalid names return a 422 error.
- Add deployment location metadata (local/k8s) to worker registration.
- Added a worker health HTTP endpoint to replace log-based health checks.

#### Determinism enforcement

- Enable determinism enforcement by default. Use `DEFAULT_ENFORCE_DETERMINISM=0` on your worker, or `enforce_determinism=False` in your workflow decorator to disable it.

#### Workflow Execution

- Added `wait=False` support to `execute_workflow()` for fire-and-forget child workflow execution, returning a `ChildWorkflowHandle` that can be awaited later.
- Added a default `execution_timeout` of 1 hour on workflow executions to prevent infinite retries when no workers are active.
- Added batch cancel and terminate endpoints for cancelling or terminating multiple workflow executions at once.
- Added execution token metadata injection for cross-workflow tracing and observability.
- Workflow events are now sent in batches instead of one-by-one, reducing HTTP overhead for activities that emit many events.

#### Activities & Handlers

- Added `**kwargs` support for query, signal, and update handlers, allowing extra keyword arguments to be forwarded from callers.
- Added support for multiple resources in workflow output.
- Handle bare union of workflow input schemas.

#### API & Client

- Expose Workflows API (runs, executions, events, schedules) in the mistralai SDK.
- Added the `fetch_executor_identity` method to the client.
- `WorkflowsClient` now sends a `User-Agent` header with the SDK version on all API requests.
- Replaced hand-written HTTP calls in `WorkflowsClient` with a Speakeasy-generated `worker_client` SDK for improved reliability and maintainability.
- Implemented the runtime identity-fetching mechanism for nuage_v2's workflow start-up.
- Renamed `WorkflowVersion` to `WorkflowRegistration` across the SDK to better reflect what it represents.
- Relax `WorkflowScheduleRequest` validator: `workflow_identifier` alone is now valid without `workflow_task_queue`.
- Added optional HTTP proxy configuration for the Temporal client connection.

#### UI & Forms

- Moved conversational UI utilities (forms, chat inputs, todo lists, confirmations, canvas) from the mistralai plugin to the main SDK. Mistral-specific components (canvas, UI components, assistant messages) remain in the lechat plugin module.
- Added `DateField` helper for workflow forms, supporting date-only picker UI alongside the existing date-time field.
- Support `UIComponentResource` in `ResourceOutput`.
- Add `CommandToolUIState` in list of available `ToolUIState`.
- Add `@input_tag` decorator to annotate workflow input schemas with `x-input-tag`, and `@conversational_input` shorthand for Le Chat usage.

#### Plugins

- Added HTTP/webhook plugin, enabling workflows to receive HTTP requests from external services (GitHub, Linear, Slack, etc.).
- Relaxed plugin version bounds from `<3.0.0` to `>=3.0.0a1,<4.0.0`, allowing co-installation of pre-release SDK and plugin versions.
- Upgraded `mistralai` SDK dependency to v2.0.0 in the workflows mistralai and nuage plugins.

---

### Removed

- Removed the dead `publish_stream_event` client method which had no server-side implementation.
- Removed deprecated APIs: `display_name` and `extends` activity fields, `record_event` tracing utility, and `workflow_name` workflow parameter (use `name` instead).

---

### Fixed

#### Activities

- Activities called as agent tools can now return any JSON-serializable value, not just Pydantic models.
- Fixed activity argument type validation when activities have optional parameters with default values.
- Allow keyword arguments when calling activities with typed parameters. Previously, any keyword argument was rejected even for valid named parameters. Now only unknown kwargs or duplicate positional/keyword arguments are rejected.

#### Workers & Temporal

- Use `TEMPORAL_DEPLOYMENT_NAME` for Temporal worker versioning in controller mode so workers register under the same deployment name the controller uses. `DEPLOYMENT_NAME` (task queue) is used for the heartbeat API only.
- Fixed child workflow `execution_timeout` parameter which was incorrectly passed as `task_timeout` to Temporal, changing its semantics from single-task timeout to full execution timeout.

#### Payload & Storage

- Added read-only support for the legacy `json/abraxas_v1` payload encoding to prevent 500 errors when decoding old Temporal payloads.
- Fixed payload decoding failure when combining offloaded and partially encrypted payloads.
- Fixed storage key prefix to properly URL-quote execution IDs and namespaces, preventing key collisions with special characters.

#### Plugins & Client

- Fixed streaming truncation bug in the mistralai plugin where the first tool call chunk's arguments were dropped.
- Fixed `HTTPRouterWorkflow` entrypoint generation for inherited router workflow subclasses.
- Fixed `WorkflowSpecsRegisterResponse` to accept both old (`workflow_version_*`) and new (`workflow_registration_*`) field names from the server.
- Fix calls to mistralai client for Agent in workflows.

#### Error Messages

- Improved error message when a workflow event payload exceeds the maximum size, making the root cause easier to diagnose.

---

### Security

- API key is no longer logged in full in debug output; only the first 8 characters are shown.

---

## [2.0.0] - 2026-03-04

Initial public release of mistralai-workflows v2.
