diff --git a/.changeset/bump-claude-agent-sdk-0-3-302.md b/.changeset/bump-claude-agent-sdk-0-3-302.md new file mode 100644 index 00000000..06a1d356 --- /dev/null +++ b/.changeset/bump-claude-agent-sdk-0-3-302.md @@ -0,0 +1,11 @@ +--- +"@herdctl/core": patch +--- + +Raise the `@anthropic-ai/claude-agent-sdk` floor to `^0.3.302` (current npm `latest`). + +Picks up upstream fixes across 0.3.284–0.3.302, including: foreground subagents missing task-tracking tools, SDK MCP tool schema conversion, `toggleMcpServer()` leaving in-process tool calls hung, `forkSession()` history reading, `getSessionMessages()` message inclusion, `importSessionToStore` dropping transcript rows containing U+2028/U+2029, assistant text blocks losing `citations` in streamed responses, and `includePartialMessages` streams never emitting `message_stop` on a cut stream. + +No code adaptation was needed. The API surface is additive over this range — the only new exports are `BUILTIN_TOOL_NAMES` and `LEGACY_TOOL_NAME_ALIASES`, and nothing was removed or renamed. Two upstream `permissionMode` default changes (0.3.286 and 0.3.302) do not reach herdctl, which always sets `permissionMode` explicitly (`agent.permission_mode ?? "acceptEdits"`) and always passes `--permission-mode` on the CLI runtime. + +Note one runtime behaviour change inherited from 0.3.302: fork subagents (`subagent_type: "fork"`) are now on by default in SDK sessions, matching the terminal. Set `CLAUDE_CODE_FORK_SUBAGENT=0` to opt out. diff --git a/packages/core/package.json b/packages/core/package.json index 5837ec2f..dfd77575 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -18,7 +18,7 @@ "lint": "biome check src/" }, "dependencies": { - "@anthropic-ai/claude-agent-sdk": "^0.3.283", + "@anthropic-ai/claude-agent-sdk": "^0.3.302", "chokidar": "^5", "cron-parser": "^4.9.0", "dockerode": "^4.0.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84b7a6e1..ac7f5633 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -120,8 +120,8 @@ importers: packages/core: dependencies: '@anthropic-ai/claude-agent-sdk': - specifier: ^0.3.283 - version: 0.3.283(@anthropic-ai/sdk@0.110.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) + specifier: ^0.3.302 + version: 0.3.302(@anthropic-ai/sdk@0.110.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) chokidar: specifier: ^5 version: 5.0.0 @@ -312,48 +312,48 @@ packages: '@antfu/install-pkg@1.1.0': resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==} - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.283': - resolution: {integrity: sha512-UQkROekjufppyB/qrsrU81sM0fcYNWJBEITrGp7NLbOocJZBUR+uVMIx/UHVpe6j81trXPIeRWyfJWgZI17Kxg==} + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.302': + resolution: {integrity: sha512-RwuagoGPwd1i6zNeKhIlU3xLnlez/BGE4qEBSmymdNRQxyE5U2wmGtvi0+taWSg4T91oTMzHRuN8HapSk8swiQ==} cpu: [arm64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.283': - resolution: {integrity: sha512-WkwVppmX0cg1DnXTT9od82pmqM4OK9H3O6MIXoX89SWYty0OpMxsB37263C1tiqk4WkWCs2jwxRXhsoO62ArGQ==} + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.302': + resolution: {integrity: sha512-92aWlLyKYf9L68mAe1s1UQLpHoWXXGH+lzUBGDD1ony9MrkvJk/HSSvn/yYpHvvG1NcOYDqW8ySAIKRzffj23Q==} cpu: [x64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.283': - resolution: {integrity: sha512-BRlnlh5fsRMoTtjDSGxZL6TathGRgSCMpJk2kdy9Wtz8l6qDjgkLuQilzTF12CwFIn+yf1Fqfrk+Njw+0EsL3A==} + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.302': + resolution: {integrity: sha512-lba7aywUy4wYI3avNoq5vHA+U7jPba7TaMnurEFkRnG6A51mJfLGwZ35AW8QGFXcMXZnA7UVZ/F65GznPt1Ypg==} cpu: [arm64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.283': - resolution: {integrity: sha512-47IEX/XWw4DUIzPPC85qiASO90rpz7E+2gWr4AKOz5ZAa7ZqEX0PYqPIcpHEM7WpEREfmXCMZgef2bwim24u8A==} + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.302': + resolution: {integrity: sha512-TlPrant3tYgB763zY2/StpmRpZEMAi9+5gy9kiIIhp9h/NOD2bHvpnUoqaOEB/tcxzerIadxeZuCToVPocVJ3w==} cpu: [arm64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.283': - resolution: {integrity: sha512-T0T8mR7MSe7bVI96tmeK7DgUy2xhG8CZD1i0nCC2C05sSmkDDn/OYgNqpGPxJbo8Ic0Psxd7TOmngQYqPKWtpA==} + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.302': + resolution: {integrity: sha512-UCsqTcoUmV8qGdnmw0od2grDPgrkK6kclpo5Oyox15B9glHXhOIL0nifWcw2xS9VKV0VZ11I9FujPLIXfEpXtg==} cpu: [x64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.283': - resolution: {integrity: sha512-cE5AebMvTlq7t7Oc0FmP5LzMOEtJ3F8XRGxkc3kTGr4aNcQgXplyYNH2yu1teW1yInuMXHzlCeFRdrmxpe2sRg==} + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.302': + resolution: {integrity: sha512-HqD0+tnjJDldkZJPuTiMIZ1XbrVW8LH/3QKqCBgXLGwVFNgkLOM+Sfh14C0vqyZSIaLFgsFd4bIw1jg5V+td6w==} cpu: [x64] os: [linux] - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.283': - resolution: {integrity: sha512-hZjyeIgZpALMvYq2QfyPzl4AZzOVRUoU8NOB82Z3cVXLcEvQJXJN03Hp3XNsuBq5YMUoSUJAffMannhM7UqVmg==} + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.302': + resolution: {integrity: sha512-W0LhTtFWANn1PRXD84PjqtYrlldGglP+x+ea95JvPvkYyvgLK0dL8TJHBJ8+C0lcW0NJuY9VspFespy3hwmuSA==} cpu: [arm64] os: [win32] - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.283': - resolution: {integrity: sha512-h5eZxFxk6f1LPSuUOoBH9fslhL9ncywdZN5Qw9XmWuijHYTfevXuoza5nm6N98O+hmSykJ8NjC3/muhONDvzBg==} + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.302': + resolution: {integrity: sha512-R2pgjSw60MNBNRxNewypqMnHUz8zlgrWWoQJY9UC+clFtp1NwnuauyCAsY3t63VzJ6mPq0+pDDN89dISfEJ5Ig==} cpu: [x64] os: [win32] - '@anthropic-ai/claude-agent-sdk@0.3.283': - resolution: {integrity: sha512-KB+mqU5JLbH2sztlSQeCOu71bK6padYAha3uacBzxFSOVfuRTywYzvsC9P+qV6gXmPXcu98FaPqQv6vBF9j8hA==} + '@anthropic-ai/claude-agent-sdk@0.3.302': + resolution: {integrity: sha512-VUxgraOIxnu4COhS9IkP3AF21kh9KOOF8oyU7pc6q0PfzMPlarbnhXvuhCNIPPYddhIev+17LLq1nZ700GdLBg==} engines: {node: '>=18.0.0'} peerDependencies: '@anthropic-ai/sdk': '>=0.93.0' @@ -2083,6 +2083,7 @@ packages: '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} + deprecated: Potential CWE-502 - Update to 1.3.1 or higher '@vitejs/plugin-react@4.7.0': resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} @@ -2527,6 +2528,7 @@ packages: cron-parser@4.9.0: resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} engines: {node: '>=12.0.0'} + deprecated: v4 is no longer maintained, upgrade to v5 cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} @@ -4911,6 +4913,7 @@ packages: tsconfck@3.1.6: resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} engines: {node: ^18 || >=20} + deprecated: unmaintained hasBin: true peerDependencies: typescript: ^5.0.0 @@ -5118,6 +5121,7 @@ packages: uuid@10.0.0: resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true uuid@11.1.0: @@ -5444,44 +5448,44 @@ snapshots: package-manager-detector: 1.6.0 tinyexec: 1.0.2 - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.283': + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.283': + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.283': + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.283': + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.283': + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.283': + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.283': + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.283': + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.302': optional: true - '@anthropic-ai/claude-agent-sdk@0.3.283(@anthropic-ai/sdk@0.110.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': + '@anthropic-ai/claude-agent-sdk@0.3.302(@anthropic-ai/sdk@0.110.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': dependencies: '@anthropic-ai/sdk': 0.110.0(zod@4.4.3) '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) zod: 4.4.3 optionalDependencies: - '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.283 - '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.283 - '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.283 - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.283 - '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.283 - '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.283 - '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.283 - '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.283 + '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.302 + '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.302 + '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.302 + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.302 + '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.302 + '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.302 + '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.302 + '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.302 '@anthropic-ai/sdk@0.110.0(zod@4.4.3)': dependencies: