Repository navigation
fix(pulse): pass session resume inside query options for Siri turns (#2795) - #2800
Open
isihussain wants to merge 1 commit into
Open
isihussain wants to merge 1 commit into
isihussain wants to merge 1 commit into
Conversation
…anielmiessler#2795) Previously, runTurn set queryOpts.resume alongside options, but the Agent SDK's query() destructures { prompt, options } and expects resume to be a property of options. Consequently, the session id was dropped and every Siri turn started a fresh session. Move resume inside sdkOptions, set permissionMode to 'default', and remove the queryOpts wrapper and �s never cast. Add siri.resume.test.ts to verify session continuity across turns. Closes danielmiessler#2795 Signed-off-by: isihussain <isihussain@users.noreply.github.com>
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
Fixes #2795.
The Siri voice endpoint (LIFEOS/PULSE/modules/siri.ts) maintains an SDK session id across sequential turns within the 60-minute window, but previously set queryOpts.resume = resumeFromSdk as a sibling of options.
The Agent SDK's query() destructures { prompt, options } and reads
esume from options.resume. Because
esume sat at the top level of the argument, the id was dropped and every Siri turn was executed as an isolated fresh session.
Solution
esume into sdkOptions (...(resumeFromSdk ? { resume: resumeFromSdk } : {})).
Signed-off-by: isihussain isihussain@users.noreply.github.com