feat(acp): steer prompts during active turns - #91
Open
amadad wants to merge 1 commit into
Open
Conversation
Signed-off-by: Ali Madad <ali@scty.org>
|
Live-tested this branch against pi 0.83.0 ( It works as designed. Pi's session file confirms the steered message was delivered as a user message at the first turn boundary (after tool result 1, before the next LLM call). Both ACP requests resolved together at Notes from the review:
This unblocks turn-boundary injection for headless ACP harnesses (our use case), not just editor UX. Would love to see it land. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
steercommand to the RPC process wrapperCloses #7.
Why
A corrective prompt arriving while Pi is executing tools currently waits in
turnQueueuntilagent_end. That prevents an ACP client from redirecting an active run even though Pi RPC already provides the intended steering primitive.The adapter now keeps the decision at the session boundary: active Pi loop means
steer; pending ACP request without an active loop keeps the existing queue behavior.Verification
node --import tsx --test test/component/session-events.test.ts test/component/session-queue-cancel.test.tsnpm test— 96 passednpm run typechecknpm run lintnpm run buildnpm run smoke— ACP handshake, session creation, prompt streaming, and completion passed against Pi 0.82.1