Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 25e5295 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Fixes #174
Summary
Adds support for the version 4
gateway-descriptor.jsonformat written by Grok Bot desktop 1.3.0 while preserving existing account selection, ambiguity, and unsupported-version safeguards.What changed
src/core/app-session.jsversion: 4alongside existingentries-map versions (2,3,4), keepingversion >= 5rejected withUNSUPPORTED_VERSION.savedAtMsmust be a finite number; missing/invalid values fail closed withINVALID_ENTRYbefore touching Keychain, Secret Service, or Windows DPAPI).savedAtMsTTL (10080 * 60 * 1000ms, configurable viamaxAgeMs/now) before decrypting, throwingEXPIRED_DESCRIPTORwhen stale.baseUrlandtoken, string-valuedheadersmap (when present, supporting v4 headers such asx-anyrun-port-token,x-sand-gateway-token, andauthorization), and optional finite numericauthorizationRefreshAtMs(throwingEXPIRED_DESCRIPTORoncenow() >= authorizationRefreshAtMs).EMPTY_ENTRIES,AMBIGUOUS_ENTRIES, andMISSING_ENCRYPTED_PAYLOADsemantics intact.src/core/gateway.jssessionFromApp, fall through toEnsureSandBoxwhen an expired cached descriptor (EXPIRED_DESCRIPTOR) is accompanied by active app credentials, matching desktop behavior.error.codewhen wrapping session errors inGatewayErrorso callers can distinguishEXPIRED_DESCRIPTOR/INVALID_ENTRYwhen fallback is unavailable.v10/v11), and Windows DPAPI loading/rejection, 7-daysavedAtMsTTL boundary,authorizationRefreshAtMsexpiry, invalid headers/blank fields,gbot doctor --jsonv4 reporting, andconnectGatewayfallback vs fail-closed behavior (test/app-session.test.js,test/doctor.test.js,test/gateway-reconnect.test.js)..changeset/gateway-descriptor-v4.mdand rebuiltartifact/.Verification
npm run check(validate,build,validate:artifact,tsc --noEmit,test:unit,test:routes):npx changeset status --since=origin/main --verbose: passed (grok-bot-clipatch bump)