diff --git a/packages/agent/CHANGELOG.md b/packages/agent/CHANGELOG.md index 23d4c637..38778e2f 100644 --- a/packages/agent/CHANGELOG.md +++ b/packages/agent/CHANGELOG.md @@ -2,9 +2,21 @@ ## [Unreleased] +### Breaking Changes + +- **Queue API replaced with steer/followUp**: The `queueMessage()` method has been split into two methods with different delivery semantics ([#403](https://github.com/badlogic/pi-mono/issues/403)): + - `steer(msg)`: Interrupts the agent mid-run. Delivered after current tool execution, skips remaining tools. + - `followUp(msg)`: Waits until the agent finishes. Delivered only when there are no more tool calls or steering messages. +- **Queue mode renamed**: `queueMode` option renamed to `steeringMode`. Added new `followUpMode` option. Both control whether messages are delivered one-at-a-time or all at once. +- **AgentLoopConfig callbacks renamed**: `getQueuedMessages` split into `getSteeringMessages` and `getFollowUpMessages`. +- **Agent methods renamed**: + - `queueMessage()` → `steer()` and `followUp()` + - `clearMessageQueue()` → `clearSteeringQueue()`, `clearFollowUpQueue()`, `clearAllQueues()` + - `setQueueMode()`/`getQueueMode()` → `setSteeringMode()`/`getSteeringMode()` and `setFollowUpMode()`/`getFollowUpMode()` + ### Fixed -- `prompt()` and `continue()` now throw if called while the agent is already streaming, preventing race conditions and corrupted state. Use `queueMessage()` to queue messages during streaming, or `await` the previous call. +- `prompt()` and `continue()` now throw if called while the agent is already streaming, preventing race conditions and corrupted state. Use `steer()` or `followUp()` to queue messages during streaming, or `await` the previous call. ## [0.31.1] - 2026-01-02 diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 5b6c91a5..19eec49f 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,13 +2,34 @@ ## [Unreleased] +### Breaking Changes + +- **Queue API replaced with steer/followUp**: The `queueMessage()` method has been split into two methods with different delivery semantics ([#403](https://github.com/badlogic/pi-mono/issues/403)): + - `steer(text)`: Interrupts the agent mid-run (Enter while streaming). Delivered after current tool execution. + - `followUp(text)`: Waits until the agent finishes (Alt+Enter while streaming). Delivered only when agent stops. +- **Settings renamed**: `queueMode` setting renamed to `steeringMode`. Added new `followUpMode` setting. Old settings.json files are migrated automatically. +- **AgentSession methods renamed**: + - `queueMessage()` → `steer()` and `followUp()` + - `queueMode` getter → `steeringMode` and `followUpMode` getters + - `setQueueMode()` → `setSteeringMode()` and `setFollowUpMode()` + - `queuedMessageCount` → `pendingMessageCount` + - `getQueuedMessages()` → `getSteeringMessages()` and `getFollowUpMessages()` + - `clearQueue()` now returns `{ steering: string[], followUp: string[] }` +- **sendHookMessage() signature changed**: Second parameter changed from `triggerTurn?: boolean` to `options?: { triggerTurn?, deliverAs? }`. Use `deliverAs: "followUp"` for follow-up delivery. +- **RPC API changes**: + - `queue_message` command → `steer` and `follow_up` commands + - `set_queue_mode` command → `set_steering_mode` and `set_follow_up_mode` commands + - `RpcSessionState.queueMode` → `steeringMode` and `followUpMode` +- **Settings UI**: "Queue mode" setting split into "Steering mode" and "Follow-up mode" + ### Added +- Alt+Enter keybind to queue follow-up messages while agent is streaming - Terminal window title now displays "pi - dirname" to identify which project session you're in ([#407](https://github.com/badlogic/pi-mono/pull/407) by [@kaofelix](https://github.com/kaofelix)) ### Fixed -- `AgentSession.prompt()` now throws if called while the agent is already streaming, preventing race conditions. Use `queueMessage()` to queue messages during streaming. +- `AgentSession.prompt()` now throws if called while the agent is already streaming, preventing race conditions. Use `steer()` or `followUp()` to queue messages during streaming. - Ctrl+C now works like Escape in selector components, so mashing Ctrl+C will eventually close the program ([#400](https://github.com/badlogic/pi-mono/pull/400) by [@mitsuhiko](https://github.com/mitsuhiko)) ## [0.31.1] - 2026-01-02