diff --git a/agents/CHANGELOG.md b/agents/CHANGELOG.md index cdabbd5a1f..a719719fcd 100644 --- a/agents/CHANGELOG.md +++ b/agents/CHANGELOG.md @@ -4,6 +4,72 @@ All twenty-six published Dex agents packages share this changelog and one versio release is tagged `agents/v`. See [README.md](README.md#versions-and-compatibility) for the Dex SDK and framework versions each release supports. +## 0.6.6 (2026-11-13) + +### Breaking + +- `@superdurable/dex-agents-claude-agent-sdk`: `ClaudeAgentRunner` now + implements `AgentFrameworkRunner`, and its + `executeDeferredToolCall` returns `Promise` instead of + `Promise`. `createClaudeAgentSessionFlow` returns + `AgentSessionFlow` instead of `AgentSessionFlow`, as + `createBuiltinAgentSessionFlow` returns `AgentSessionFlow`. + Code that annotates the Flow as a bare `AgentSessionFlow` no longer + compiles: drop the annotation, or write + `AgentSessionFlow`. A parameter that takes the Flow of + any adapter can use `AgentSessionFlow>`. + A subclass that overrides `executeDeferredToolCall` declares + `Promise`, and code that reads `.output` from its + result first checks that the outcome has no `kind`. + +### Added + +- Python Claude Agent SDK adapter: `ClaudeAgentRunner` polls and cancels the + tool tasks of its tool sources. A source call that returns + `ToolTaskStarted` waits for its task: `poll_tool_task` polls it through the + source on a Timer, and the resumed Claude session receives its result. + `cancel_turn` cancels the task through the source's `cancel_tool_task` + and records the call `outcome_unknown`. Before, such a call recorded `failed` + for a `read` tool and `outcome_unknown` otherwise. `McpToolSource` now sees + `supports_tool_tasks` set, so it hands the tasks of a Streamable HTTP + server to the session to poll instead of finishing them inside the tool + Step. + A task that a tool Step was already polling when its Worker upgrades stays + in that tool Step: a retried CallTool attempt resumes it from the heartbeat + checkpoint, and if the server no longer knows the task, that attempt sends + the call again with the same idempotency key. Only calls made after the + upgrade hand their tasks to the session. +- `@superdurable/dex-agents-claude-agent-sdk`: `ClaudeAgentRunner` polls and + cancels the tool tasks of its tool sources through the new `pollToolTask` + and `cancelToolTask`. A source call that returns `ToolTaskStarted` waits + for its task: the session polls it through the source on a Timer, and the + resumed Claude session receives its result. `cancel_turn` records the call + `outcome_unknown` and cancels the task through the source. A source call + that returns `ToolInputRequested` waits for the user's answer, and the + source runs the call again with it, as in the Python adapter. Before, a call + that started a task recorded `failed` for a `read` tool and + `outcome_unknown` otherwise, and a call that asked a question recorded + `failed`. `McpToolSource` now sees `supportsToolTasks` set, so it hands the + tasks of a Streamable HTTP server to the session to poll instead of + finishing them inside the tool Step. A task that a tool Step was already + polling when its Worker upgrades stays in that tool Step: a retried + `CallTool` attempt resumes it from the heartbeat checkpoint, and if the + server no longer knows the task, that attempt sends the call again with the + same idempotency key. Only calls made after the upgrade hand their tasks to + the session. The `dex-agents-claude-sdk` command gets the same behavior for + its MCP servers and connector tools. + +### Changed + +- `dex-agents`: `McpToolSource` marks the heartbeat checkpoint of a task it + hands to the session with `mcp_task_polled_by_session`, as the TypeScript + source does. A retried `CallTool` attempt returns the saved task as + `ToolTaskStarted` only when the checkpoint carries the marker, and + `will_resume_tool_task_without_sending` is `True` only then. A task saved + without it was polled inside its tool Step, so the retried attempt keeps + polling it there and sends the call again with the same idempotency key + when the server no longer knows the task. + ## 0.6.5 (2026-11-13) ### Fixed diff --git a/changelog.d/agents-packages/agents-python-claude-tool-tasks-017882.md b/changelog.d/agents-packages/agents-python-claude-tool-tasks-017882.md deleted file mode 100644 index 9fb6dde530..0000000000 --- a/changelog.d/agents-packages/agents-python-claude-tool-tasks-017882.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -section: Changed ---- -- `dex-agents`: `McpToolSource` marks the heartbeat checkpoint of a task it - hands to the session with `mcp_task_polled_by_session`, as the TypeScript - source does. A retried `CallTool` attempt returns the saved task as - `ToolTaskStarted` only when the checkpoint carries the marker, and - `will_resume_tool_task_without_sending` is `True` only then. A task saved - without it was polled inside its tool Step, so the retried attempt keeps - polling it there and sends the call again with the same idempotency key - when the server no longer knows the task. diff --git a/changelog.d/agents-packages/agents-python-claude-tool-tasks-397ea5.md b/changelog.d/agents-packages/agents-python-claude-tool-tasks-397ea5.md deleted file mode 100644 index f5a90357e2..0000000000 --- a/changelog.d/agents-packages/agents-python-claude-tool-tasks-397ea5.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -section: Added ---- -- Python Claude Agent SDK adapter: `ClaudeAgentRunner` polls and cancels the - tool tasks of its tool sources. A source call that returns - `ToolTaskStarted` waits for its task: `poll_tool_task` polls it through the - source on a Timer, and the resumed Claude session receives its result. - `cancel_turn` cancels the task through the source's `cancel_tool_task` - and records the call `outcome_unknown`. Before, such a call recorded `failed` - for a `read` tool and `outcome_unknown` otherwise. `McpToolSource` now sees - `supports_tool_tasks` set, so it hands the tasks of a Streamable HTTP - server to the session to poll instead of finishing them inside the tool - Step. - A task that a tool Step was already polling when its Worker upgrades stays - in that tool Step: a retried CallTool attempt resumes it from the heartbeat - checkpoint, and if the server no longer knows the task, that attempt sends - the call again with the same idempotency key. Only calls made after the - upgrade hand their tasks to the session. diff --git a/changelog.d/agents-packages/agents-ts-claude-tool-tasks-af069b.md b/changelog.d/agents-packages/agents-ts-claude-tool-tasks-af069b.md deleted file mode 100644 index fd7e1b5191..0000000000 --- a/changelog.d/agents-packages/agents-ts-claude-tool-tasks-af069b.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -section: Added ---- -- `@superdurable/dex-agents-claude-agent-sdk`: `ClaudeAgentRunner` polls and - cancels the tool tasks of its tool sources through the new `pollToolTask` - and `cancelToolTask`. A source call that returns `ToolTaskStarted` waits - for its task: the session polls it through the source on a Timer, and the - resumed Claude session receives its result. `cancel_turn` records the call - `outcome_unknown` and cancels the task through the source. A source call - that returns `ToolInputRequested` waits for the user's answer, and the - source runs the call again with it, as in the Python adapter. Before, a call - that started a task recorded `failed` for a `read` tool and - `outcome_unknown` otherwise, and a call that asked a question recorded - `failed`. `McpToolSource` now sees `supportsToolTasks` set, so it hands the - tasks of a Streamable HTTP server to the session to poll instead of - finishing them inside the tool Step. A task that a tool Step was already - polling when its Worker upgrades stays in that tool Step: a retried - `CallTool` attempt resumes it from the heartbeat checkpoint, and if the - server no longer knows the task, that attempt sends the call again with the - same idempotency key. Only calls made after the upgrade hand their tasks to - the session. The `dex-agents-claude-sdk` command gets the same behavior for - its MCP servers and connector tools. diff --git a/changelog.d/agents-packages/agents-ts-claude-tool-tasks-breaking-e1a6b0.md b/changelog.d/agents-packages/agents-ts-claude-tool-tasks-breaking-e1a6b0.md deleted file mode 100644 index ab5cd9390f..0000000000 --- a/changelog.d/agents-packages/agents-ts-claude-tool-tasks-breaking-e1a6b0.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -section: Breaking ---- -- `@superdurable/dex-agents-claude-agent-sdk`: `ClaudeAgentRunner` now - implements `AgentFrameworkRunner`, and its - `executeDeferredToolCall` returns `Promise` instead of - `Promise`. `createClaudeAgentSessionFlow` returns - `AgentSessionFlow` instead of `AgentSessionFlow`, as - `createBuiltinAgentSessionFlow` returns `AgentSessionFlow`. - Code that annotates the Flow as a bare `AgentSessionFlow` no longer - compiles: drop the annotation, or write - `AgentSessionFlow`. A parameter that takes the Flow of - any adapter can use `AgentSessionFlow>`. - A subclass that overrides `executeDeferredToolCall` declares - `Promise`, and code that reads `.output` from its - result first checks that the outcome has no `kind`. diff --git a/changelog.d/agents/agents-ts-claude-tool-tasks-12e57c.md b/changelog.d/agents/agents-ts-claude-tool-tasks-12e57c.md deleted file mode 100644 index 68de4538df..0000000000 --- a/changelog.d/agents/agents-ts-claude-tool-tasks-12e57c.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -section: Added ---- -- TypeScript Claude Agent SDK adapter: a tool source call can start a tool task. The session polls it while no Claude Code CLI runs, and the resumed Claude session receives the task's result. **cancel_turn** records the call **outcome_unknown** and cancels the task through its source. A source call can also ask the user a question, as in the Python adapter. Before, such a call recorded **failed**, or **outcome_unknown** for a task of a write. diff --git a/changelog.d/agents/agents-ts-claude-tool-tasks-breaking-0de2d0.md b/changelog.d/agents/agents-ts-claude-tool-tasks-breaking-0de2d0.md deleted file mode 100644 index 51ede32655..0000000000 --- a/changelog.d/agents/agents-ts-claude-tool-tasks-breaking-0de2d0.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -section: Breaking ---- -- TypeScript Claude Agent SDK adapter: **createClaudeAgentSessionFlow** now returns an **AgentSessionFlow** typed with **ClaudeAgentRunner**, and the runner's **executeDeferredToolCall** returns a **DeferredToolOutcome**. Code that annotates the Flow as a plain **AgentSessionFlow** no longer compiles. Drop the annotation, or type it with **ClaudeAgentRunner** as the built-in agent loop's Flow is typed with **BuiltinLoopAgentRunner**. diff --git a/docs/reference/agents/changelog.mdx b/docs/reference/agents/changelog.mdx index 449b131b0f..7f519fc2cf 100644 --- a/docs/reference/agents/changelog.mdx +++ b/docs/reference/agents/changelog.mdx @@ -16,12 +16,13 @@ and upgrade steps. ## 0.6 {#v0-6} -Released 2026-11-12 as [agents/v0.6.0](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.0); 0.6.1 released 2026-11-12 as [agents/v0.6.1](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.1); 0.6.2 released 2026-11-12 as [agents/v0.6.2](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.2); 0.6.3 released 2026-11-13 as [agents/v0.6.3](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.3); 0.6.4 released 2026-11-13 as [agents/v0.6.4](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.4); 0.6.5 released 2026-11-13 as [agents/v0.6.5](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.5). +Released 2026-11-12 as [agents/v0.6.0](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.0); 0.6.1 released 2026-11-12 as [agents/v0.6.1](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.1); 0.6.2 released 2026-11-12 as [agents/v0.6.2](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.2); 0.6.3 released 2026-11-13 as [agents/v0.6.3](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.3); 0.6.4 released 2026-11-13 as [agents/v0.6.4](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.4); 0.6.5 released 2026-11-13 as [agents/v0.6.5](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.5); 0.6.6 released 2026-11-13 as [agents/v0.6.6](https://github.com/superdurable/dex/releases/tag/agents%2Fv0.6.6). ### Breaking - **dex-agents-deepagents**: file writes and shell commands no longer wait for approval by default, as in Deep Agents without **interrupt_on**. Name the tool in **approval.always** to make it wait. **local_tools.shell.allow** has no effect on this command, and its file tools are Deep Agents' own, which take absolute paths. [Reference](/reference/agents/cli#harness-tools). - **dex-agents-pi**: file writes, edits, and **bash** no longer wait for approval by default, as in Pi. Name the tool in **approval.always** to make it wait. **local_tools.shell.allow** has no effect on this command. The file tools and **bash** have no workspace boundary. Without **workspace** in the file, the workspace is the directory the command starts in. [Reference](/reference/agents/cli#harness-tools). +- TypeScript Claude Agent SDK adapter: **createClaudeAgentSessionFlow** now returns an **AgentSessionFlow** typed with **ClaudeAgentRunner**, and the runner's **executeDeferredToolCall** returns a **DeferredToolOutcome**. Code that annotates the Flow as a plain **AgentSessionFlow** no longer compiles. Drop the annotation, or type it with **ClaudeAgentRunner** as the built-in agent loop's Flow is typed with **BuiltinLoopAgentRunner**. Since 0.6.6. ### Added @@ -48,6 +49,7 @@ Released 2026-11-12 as [agents/v0.6.0](https://github.com/superdurable/dex/relea RPCs and the **SessionTerminalLease** Attribute, which mark the terminal that has the session open. Since 0.6.3. - Python and TypeScript CLI commands: the new **mcp_servers** section of the configuration file adds the tools of remote MCP servers over Streamable HTTP, stateless servers included. The agent sees each tool as **SERVER__TOOL**, and every call waits for approval unless **trust_tool_annotations** lets the server's hints mark the tool a read or an idempotent write. A header value can take its secret from an environment variable reference, which the Worker expands at startup and never prints, logs, or stores; error text that a server sends back, such as an HTTP 401 body or a tool error, has the header values replaced with **[redacted]** on a best-effort basis; an http URL on a host that is not loopback, or an unset variable, stops the command. [Reference](/reference/agents/cli#mcp-servers). Since 0.6.4. +- TypeScript Claude Agent SDK adapter: a tool source call can start a tool task. The session polls it while no Claude Code CLI runs, and the resumed Claude session receives the task's result. **cancel_turn** records the call **outcome_unknown** and cancels the task through its source. A source call can also ask the user a question, as in the Python adapter. Before, such a call recorded **failed**, or **outcome_unknown** for a task of a write. Since 0.6.6. ### Changed