diff --git a/.changeset/bump-claude-agent-sdk-0.3.md b/.changeset/bump-claude-agent-sdk-0.3.md deleted file mode 100644 index 1de40cc8..00000000 --- a/.changeset/bump-claude-agent-sdk-0.3.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -"@herdctl/core": minor ---- - -Bump `@anthropic-ai/claude-agent-sdk` from `^0.1.0` (resolved 0.1.77) to -`^0.3.0` (resolves 0.3.205). - -The pinned `^0.1.0` range could not cross a `0.x` minor, freezing herdctl on a -stale SDK line whose bundled JS harness lacks the current agentic toolset -(`ScheduleWakeup`, `ToolSearch`, `Cron*`, `Monitor`, …). `0.3.x` drops the -bundled harness and instead extracts/runs the native Claude Code binary, which -carries those tools — unblocking cross-turn autonomy (e.g. a persistent -`openSession()` agent scheduling `ScheduleWakeup` and being re-invoked when it -fires). - -Adapts the SDK adapter surface to the 0.3.x types: - -- `Query.interrupt()` now resolves to an optional interrupt-receipt object - instead of `void`; the streaming `RuntimeSession.interrupt()` awaits and - discards it to keep its fire-and-forget `Promise` contract. -- The SDK's `tool()` handler return type now uses a literal-typed MCP - `CallToolResult`; the injected-MCP adapter casts `InjectedMcpToolDef.handler` - at that boundary so the transport-agnostic tool definition stays SDK-free. - -No `@herdctl/core` public API changes. `query()`, `createSdkMcpServer()`, -`tool()`, streaming-input `AsyncIterable`, and the `Query` -control methods (`interrupt`, `supportedCommands`, `setModel`) all remain -compatible. Note: the SDK peer-depends on `zod@^4`, while core stays on -`zod@^3`; the schemas passed to `tool()` remain structurally compatible and -typecheck/build/tests are green. diff --git a/.changeset/zod-v4.md b/.changeset/zod-v4.md deleted file mode 100644 index bdb550a0..00000000 --- a/.changeset/zod-v4.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -"@herdctl/core": minor -"@herdctl/chat": patch ---- - -Upgrade `zod` from `^3.22.0` to `^4.0.0` in `@herdctl/core` and `@herdctl/chat`. - -This clears the peer-dependency mismatch introduced by -`@anthropic-ai/claude-agent-sdk@0.3.x`, which peer-depends on `zod@^4` (the SDK's -in-process MCP `tool()` schemas). Core and chat now resolve a single `zod@4`. - -**Behavior-preserving.** zod v4 changed `.default()` to short-circuit: a -`z.object({...}).default({})` whose fields carry their own defaults now yields a -bare `{}` at runtime instead of the fully-defaulted object (v3 re-ran the value -through the schema). The three affected config sites — `work_source.labels`, -`work_source.auth`, and Discord `output` — were switched to zod v4's -`.prefault({})`, which restores the v3 semantics (an omitted block is still run -through the schema so nested field defaults are applied). Existing schema tests -that assert those omitted-block defaults continue to pass. All other `.default()` -sites use scalar/array defaults, which are unaffected. - -Also updated the in-process MCP tool adapter's `tool()` handler cast to match -v4's stricter argument-shape inference. - -Note on the public surface: both packages re-export Zod schema **objects** from -their entry points (`@herdctl/core`: config/state schemas like `FleetConfigSchema` -and `AgentConfigSchema`; `@herdctl/chat`: `ChannelSessionSchema`, -`ChatSessionStateSchema`). Those objects are now Zod v4 instances. The inferred -(`z.infer`) types are structurally unchanged, so most consumers are unaffected; -only code that composes the exported schema objects with its **own** Zod instance -at runtime (`.extend`/`.merge`, `instanceof`, cross-instance parsing) needs to be -on `zod@^4`. diff --git a/packages/chat/CHANGELOG.md b/packages/chat/CHANGELOG.md index 8033d925..3fafefe2 100644 --- a/packages/chat/CHANGELOG.md +++ b/packages/chat/CHANGELOG.md @@ -1,5 +1,40 @@ # @herdctl/chat +## 0.5.2 + +### Patch Changes + +- [#305](https://github.com/edspencer/herdctl/pull/305) [`1262b8e`](https://github.com/edspencer/herdctl/commit/1262b8e4619a5eb479bba788d209a64143e3f61f) Thanks [@edspencer](https://github.com/edspencer)! - Upgrade `zod` from `^3.22.0` to `^4.0.0` in `@herdctl/core` and `@herdctl/chat`. + + This clears the peer-dependency mismatch introduced by + `@anthropic-ai/claude-agent-sdk@0.3.x`, which peer-depends on `zod@^4` (the SDK's + in-process MCP `tool()` schemas). Core and chat now resolve a single `zod@4`. + + **Behavior-preserving.** zod v4 changed `.default()` to short-circuit: a + `z.object({...}).default({})` whose fields carry their own defaults now yields a + bare `{}` at runtime instead of the fully-defaulted object (v3 re-ran the value + through the schema). The three affected config sites — `work_source.labels`, + `work_source.auth`, and Discord `output` — were switched to zod v4's + `.prefault({})`, which restores the v3 semantics (an omitted block is still run + through the schema so nested field defaults are applied). Existing schema tests + that assert those omitted-block defaults continue to pass. All other `.default()` + sites use scalar/array defaults, which are unaffected. + + Also updated the in-process MCP tool adapter's `tool()` handler cast to match + v4's stricter argument-shape inference. + + Note on the public surface: both packages re-export Zod schema **objects** from + their entry points (`@herdctl/core`: config/state schemas like `FleetConfigSchema` + and `AgentConfigSchema`; `@herdctl/chat`: `ChannelSessionSchema`, + `ChatSessionStateSchema`). Those objects are now Zod v4 instances. The inferred + (`z.infer`) types are structurally unchanged, so most consumers are unaffected; + only code that composes the exported schema objects with its **own** Zod instance + at runtime (`.extend`/`.merge`, `instanceof`, cross-instance parsing) needs to be + on `zod@^4`. + +- Updated dependencies [[`4eec7f3`](https://github.com/edspencer/herdctl/commit/4eec7f300248ce07ee5ce75dca92e06cf3dbce28), [`1262b8e`](https://github.com/edspencer/herdctl/commit/1262b8e4619a5eb479bba788d209a64143e3f61f)]: + - @herdctl/core@5.17.0 + ## 0.5.1 ### Patch Changes diff --git a/packages/chat/package.json b/packages/chat/package.json index b1685223..ad14db7b 100644 --- a/packages/chat/package.json +++ b/packages/chat/package.json @@ -1,6 +1,6 @@ { "name": "@herdctl/chat", - "version": "0.5.1", + "version": "0.5.2", "description": "Shared chat infrastructure for herdctl connectors", "license": "MIT", "type": "module", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index e4089d0f..b7f71dcd 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,15 @@ # herdctl +## 1.5.23 + +### Patch Changes + +- Updated dependencies [[`4eec7f3`](https://github.com/edspencer/herdctl/commit/4eec7f300248ce07ee5ce75dca92e06cf3dbce28), [`1262b8e`](https://github.com/edspencer/herdctl/commit/1262b8e4619a5eb479bba788d209a64143e3f61f)]: + - @herdctl/core@5.17.0 + - @herdctl/discord@1.2.14 + - @herdctl/slack@1.2.27 + - @herdctl/web@0.9.25 + ## 1.5.22 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 787052c8..e52d34e3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "herdctl", - "version": "1.5.22", + "version": "1.5.23", "description": "Autonomous Agent Fleet Management for Claude Code", "license": "MIT", "type": "module", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index ae949c7f..2904ba26 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,64 @@ # @herdctl/core +## 5.17.0 + +### Minor Changes + +- [#304](https://github.com/edspencer/herdctl/pull/304) [`4eec7f3`](https://github.com/edspencer/herdctl/commit/4eec7f300248ce07ee5ce75dca92e06cf3dbce28) Thanks [@edspencer](https://github.com/edspencer)! - Bump `@anthropic-ai/claude-agent-sdk` from `^0.1.0` (resolved 0.1.77) to + `^0.3.0` (resolves 0.3.205). + + The pinned `^0.1.0` range could not cross a `0.x` minor, freezing herdctl on a + stale SDK line whose bundled JS harness lacks the current agentic toolset + (`ScheduleWakeup`, `ToolSearch`, `Cron*`, `Monitor`, …). `0.3.x` drops the + bundled harness and instead extracts/runs the native Claude Code binary, which + carries those tools — unblocking cross-turn autonomy (e.g. a persistent + `openSession()` agent scheduling `ScheduleWakeup` and being re-invoked when it + fires). + + Adapts the SDK adapter surface to the 0.3.x types: + + - `Query.interrupt()` now resolves to an optional interrupt-receipt object + instead of `void`; the streaming `RuntimeSession.interrupt()` awaits and + discards it to keep its fire-and-forget `Promise` contract. + - The SDK's `tool()` handler return type now uses a literal-typed MCP + `CallToolResult`; the injected-MCP adapter casts `InjectedMcpToolDef.handler` + at that boundary so the transport-agnostic tool definition stays SDK-free. + + No `@herdctl/core` public API changes. `query()`, `createSdkMcpServer()`, + `tool()`, streaming-input `AsyncIterable`, and the `Query` + control methods (`interrupt`, `supportedCommands`, `setModel`) all remain + compatible. Note: the SDK peer-depends on `zod@^4`, while core stays on + `zod@^3`; the schemas passed to `tool()` remain structurally compatible and + typecheck/build/tests are green. + +- [#305](https://github.com/edspencer/herdctl/pull/305) [`1262b8e`](https://github.com/edspencer/herdctl/commit/1262b8e4619a5eb479bba788d209a64143e3f61f) Thanks [@edspencer](https://github.com/edspencer)! - Upgrade `zod` from `^3.22.0` to `^4.0.0` in `@herdctl/core` and `@herdctl/chat`. + + This clears the peer-dependency mismatch introduced by + `@anthropic-ai/claude-agent-sdk@0.3.x`, which peer-depends on `zod@^4` (the SDK's + in-process MCP `tool()` schemas). Core and chat now resolve a single `zod@4`. + + **Behavior-preserving.** zod v4 changed `.default()` to short-circuit: a + `z.object({...}).default({})` whose fields carry their own defaults now yields a + bare `{}` at runtime instead of the fully-defaulted object (v3 re-ran the value + through the schema). The three affected config sites — `work_source.labels`, + `work_source.auth`, and Discord `output` — were switched to zod v4's + `.prefault({})`, which restores the v3 semantics (an omitted block is still run + through the schema so nested field defaults are applied). Existing schema tests + that assert those omitted-block defaults continue to pass. All other `.default()` + sites use scalar/array defaults, which are unaffected. + + Also updated the in-process MCP tool adapter's `tool()` handler cast to match + v4's stricter argument-shape inference. + + Note on the public surface: both packages re-export Zod schema **objects** from + their entry points (`@herdctl/core`: config/state schemas like `FleetConfigSchema` + and `AgentConfigSchema`; `@herdctl/chat`: `ChannelSessionSchema`, + `ChatSessionStateSchema`). Those objects are now Zod v4 instances. The inferred + (`z.infer`) types are structurally unchanged, so most consumers are unaffected; + only code that composes the exported schema objects with its **own** Zod instance + at runtime (`.extend`/`.merge`, `instanceof`, cross-instance parsing) needs to be + on `zod@^4`. + ## 5.16.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index b080d6e4..4b2433c0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@herdctl/core", - "version": "5.16.0", + "version": "5.17.0", "description": "Core library for herdctl fleet management", "license": "MIT", "type": "module", diff --git a/packages/discord/CHANGELOG.md b/packages/discord/CHANGELOG.md index 958df078..ff8c540b 100644 --- a/packages/discord/CHANGELOG.md +++ b/packages/discord/CHANGELOG.md @@ -1,5 +1,13 @@ # @herdctl/discord +## 1.2.14 + +### Patch Changes + +- Updated dependencies [[`4eec7f3`](https://github.com/edspencer/herdctl/commit/4eec7f300248ce07ee5ce75dca92e06cf3dbce28), [`1262b8e`](https://github.com/edspencer/herdctl/commit/1262b8e4619a5eb479bba788d209a64143e3f61f)]: + - @herdctl/core@5.17.0 + - @herdctl/chat@0.5.2 + ## 1.2.13 ### Patch Changes diff --git a/packages/discord/package.json b/packages/discord/package.json index 8ccbbfb4..7d74b115 100644 --- a/packages/discord/package.json +++ b/packages/discord/package.json @@ -1,6 +1,6 @@ { "name": "@herdctl/discord", - "version": "1.2.13", + "version": "1.2.14", "description": "Discord connector for herdctl fleet management", "license": "MIT", "type": "module", diff --git a/packages/slack/CHANGELOG.md b/packages/slack/CHANGELOG.md index 3d3e7bfa..1b8686fd 100644 --- a/packages/slack/CHANGELOG.md +++ b/packages/slack/CHANGELOG.md @@ -1,5 +1,13 @@ # @herdctl/slack +## 1.2.27 + +### Patch Changes + +- Updated dependencies [[`4eec7f3`](https://github.com/edspencer/herdctl/commit/4eec7f300248ce07ee5ce75dca92e06cf3dbce28), [`1262b8e`](https://github.com/edspencer/herdctl/commit/1262b8e4619a5eb479bba788d209a64143e3f61f)]: + - @herdctl/core@5.17.0 + - @herdctl/chat@0.5.2 + ## 1.2.26 ### Patch Changes diff --git a/packages/slack/package.json b/packages/slack/package.json index baba069f..49d7ebe4 100644 --- a/packages/slack/package.json +++ b/packages/slack/package.json @@ -1,6 +1,6 @@ { "name": "@herdctl/slack", - "version": "1.2.26", + "version": "1.2.27", "description": "Slack connector for herdctl fleet management", "license": "MIT", "type": "module", diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index f70f0b65..84bed5c1 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -1,5 +1,13 @@ # @herdctl/web +## 0.9.25 + +### Patch Changes + +- Updated dependencies [[`4eec7f3`](https://github.com/edspencer/herdctl/commit/4eec7f300248ce07ee5ce75dca92e06cf3dbce28), [`1262b8e`](https://github.com/edspencer/herdctl/commit/1262b8e4619a5eb479bba788d209a64143e3f61f)]: + - @herdctl/core@5.17.0 + - @herdctl/chat@0.5.2 + ## 0.9.24 ### Patch Changes diff --git a/packages/web/package.json b/packages/web/package.json index 81221307..a68c9ed0 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@herdctl/web", - "version": "0.9.24", + "version": "0.9.25", "description": "Web dashboard for herdctl fleet management", "license": "MIT", "type": "module",