Add generic ACP active-turn steering - #4425
IEatCodeDaily wants to merge 1 commit into
Conversation
|
| Filename | Overview |
|---|---|
| packages/server/src/server/agent/providers/acp-agent.ts | Adds concurrent ACP steering, but clears pending permissions before successful steering delivery is established. |
| packages/server/src/server/agent/providers/generic-acp-agent.ts | Validates the optional steering command and forwards it through the generic ACP client. |
| packages/server/src/server/agent/providers/acp-agent.test.ts | Adds steering coverage by mutating and asserting private session internals rather than exercising the caller-facing lifecycle. |
| docs/custom-providers.md | Documents opt-in slash-command steering and its provider compatibility requirement. |
Reviews (1): Last reviewed commit: "feat(acp): support opt-in active-turn st..." | Re-trigger Greptile
| if (options.clearPendingPermissions) { | ||
| for (const pending of this.pendingPermissions.values()) { | ||
| pending.resolve({ outcome: { outcome: "cancelled" } }); | ||
| } | ||
| this.pendingPermissions.clear(); | ||
| } |
There was a problem hiding this comment.
Permissions Cancelled Before Steering
When steering a turn that is waiting for permission, this code cancels every pending permission before the concurrent ACP prompt has been accepted. If connection.prompt rejects, the manager reports the steering failure without falling back to interrupt-and-replace, but the original turn has already received cancelled permission outcomes. It may therefore continue down a denial path even though the requested correction was never delivered. Queue the steer successfully before clearing pending permissions, as the other steering adapters do.
Knowledge Base Used: Agent and workspace lifecycle
| internals.sessionId = "session-1"; | ||
| internals.activeForegroundTurnId = "turn-1"; | ||
| internals.activeTurnSteerCommand = "/steer"; | ||
| internals.connection = { prompt }; |
There was a problem hiding this comment.
Test Bypasses Session Lifecycle
The test reaches through ACPSteerInternals to set the session ID, active turn, configuration, and connection, and it later asserts the private activeForegroundTurnId field on line 188. This violates the repository requirement that tests cross the same interface as callers. It also bypasses startTurn and the concurrent ACP request lifecycle that this feature needs to verify. This repository requirement must be satisfied before merging; establish the active turn through the session API and observe behavior through a typed ACP fake or integration harness.
Rule Used: # Code Review Pattern Reference: Slop, Tests, Feat... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Closing in favor of the Hermes steering implementation in #4154, which remains open. |
Summary
params.activeTurnSteerCommandRoot cause
Paseo's provider-neutral manager supports
steerActiveTurn, but the generic ACP adapter did not implement it because standard ACP has no steering method. Hermes exposes in-place steering through/steer, so Paseo unnecessarily canceled and replaced Hermes turns.Configuration
Verification
npm run build:server16767: a Hermes turn runningsleep 20accepted a mid-turn correction, preserved the tool call, emitted the correction once, and finished withSTEERED DONEProduction Paseo on port
6767was not modified or restarted.