feat: add fast-lane override for immediate response execution#1647
Open
BingqingLyu wants to merge 7 commits into
Open
feat: add fast-lane override for immediate response execution#1647BingqingLyu wants to merge 7 commits into
BingqingLyu wants to merge 7 commits into
Conversation
- Introduced `forceRunNowWhenActive` parameter to enable immediate execution of replies when certain conditions are met. - Implemented logic to determine fast-lane candidates based on message characteristics. - Updated queue policy to respect the new fast-lane behavior. - Added tests to verify the immediate run functionality when the fast-lane override is enabled.
- Added file system cleanup for transient fast-lane session files after execution. - Updated queue policy to ensure heartbeat conditions take precedence over fast-lane overrides. - Modified the runPreparedReply function to handle session management more effectively during fast-lane execution. - Added a test case to validate the new heartbeat precedence behavior.
- Replaced single fast-lane session file variable with an array to handle multiple files for cleanup. - Updated cleanup logic to iterate over the array of transient fast-lane files. - Maintained session key for proper system-event routing during fast-lane execution.
- Introduced `sessionLaneKey` to `RunEmbeddedPiAgentParams` for optional command-lane key overrides. - Updated `runEmbeddedPiAgent` to utilize `sessionLaneKey` for improved session lane resolution. - Modified context building in `buildEmbeddedContextFromTemplate` to include `sessionLaneKey`. - Enhanced `runPreparedReply` to isolate command-lane serialization using `sessionLaneKey` for better queue management.
…m/vasujain00/openclaw into feature/session-fast-lane-replies
…reparedReply - Added `fastMode` property to `FollowupRun` type for improved configuration options. - Updated `runPreparedReply` to explicitly type `followupRun` as `FollowupRun` for better type safety.
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
Why
Long-running turns currently block quick follow-up messages in the same session, which creates high perceived latency in fast chat channels (especially Discord). This change preserves the existing safe queue model for normal traffic while allowing low-risk, short messages to get timely responses during busy turns.
What changed
src/auto-reply/reply/get-reply-run.tssrc/auto-reply/reply/agent-runner.tsforceRunNowWhenActiveflag into queue-action selectionsrc/auto-reply/reply/queue-policy.tsforceRunNowWhenActiveby returningrun-noweven while activesrc/auto-reply/reply/queue-policy.test.tsBehavior notes
Verification
pnpm tsgo✅pnpm test -- src/auto-reply/reply/queue-policy.test.tsRisk / follow-up
get-reply-run/reply-flowReferences
Closes openclaw#56880