Skip to content

Merge the reviewed CLI fixes and dependency update queue - #164

Merged
ScriptedAlchemy merged 34 commits into
mainfrom
integrate/open-grok-bot-cli-prs
Nov 4, 2026
Merged

ScriptedAlchemy merged 34 commits into
mainfrom
integrate/open-grok-bot-cli-prs

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Integrates the open fix and update PRs into one validated result while retaining their original commits. Merge this PR with a merge commit (not squash/rebase) so the original PR heads remain ancestors of main.

Included PRs: #143, #144, #145, #146, #148, #150, #151, #152, #153, #154, #156, #158, #159, #161, #162, and #163. The Changesets release PR #142 remains separate and should follow this merge.

The combined code accepts descriptor v3 while retaining single-entry validation; supports missing-route and hibernated read reconnection with active-account identity checks; preserves uncertain send delivery and confirms accepted acknowledgements through clientNonce receipts; fixes the desktop shim startup protocol; and updates the dependency/workflow pins. Overlapping credential readers were consolidated, and the initial missing-route reconnect is bound to the same account checks as subsequent refreshes. Added integration regression coverage, reconciled test contracts, included missing dependency Changeset metadata, regenerated the lockfile and rebuilt the committed distribution.

Validation on the combined tree: npm run check passed (509 unit tests and 97 route tests, build, artifact validation and typecheck); 69 focused gateway/session tests passed; publint passed; a temporary packed installation successfully ran all three executable help commands. Workflow lint passed with only the cached actionlint runner-label warning for officially supported ubuntu-26.04 filtered. No local publishing, live shim installation, account changes, or real messages were performed.

Hosted checks must pass on this integration head before merge. The old contributor-head workflow approvals and stale-artifact failures are superseded by checks on this fully rebuilt combined result.

Nicolas Mertens and others added 30 commits October 6, 2026 19:34
Current Grok Bot desktop builds write gateway-descriptor.json version 3,
which keeps the version 2 entries layout (adds savedAtMs per entry).
Every command failed with "Unsupported Grok Bot gateway descriptor
version 3". Treat v3 like v2; the multiple-entries safety check stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7jcCQRFPBA9cNGeLvEoJi
Grok Bot 0.70.x on Windows no longer leaves gateway-descriptor.json on
disk once the cloud computer has been parked, so every gbot command fell
back to files mode with "Could not find a Grok Bot agents directory"
while desktop-status.json still said signedIn: true.

When the descriptor is absent, decrypt only the active account's access
token from sand-secrets.json (DPAPI-wrapped Safe Storage key on Windows,
keychain or basic_text elsewhere) and call EnsureSandBox for a fresh
route. The cached descriptor, GROK_BOT_GATEWAY_URL/TOKEN and
CURSOR_ACCESS_TOKEN keep precedence.

EnsureSandBox rejects the fixed x-cursor-client-version 0.20.0 as an
outdated client, so send the installed app version read from the app's
own desktop-status.json on every platform, falling back to the macOS
Info.plist. SAND_CLIENT_VERSION still overrides.

Also reads version 3 descriptors (same entries layout as version 2) and
reports active-account credentials in gbot doctor.

Reuses the reconnect implementation from #145
by Tomer Ben David; adds the desktop-status.json version source, the
appData option on the credential reader, and Windows fixture tests.

Verified on Windows 11 with Grok Bot 0.70.2: artifact/bin/gbot.mjs bots
list --json returns the roster with no env overrides.

Co-authored-by: Tomer Ben David <tomer-ben-david@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…pt clientNonce

Current Grok Bot gateways (desktop app 0.70.x) answer sendPrompt with
`{ accepted: true }` and no messageId, so every delivered message was
reported as `delivery: "unknown"`.

A bare flag is still not treated as a receipt. When the ack arrives
without a messageId, read the transcript tail once and use the id of the
entry that carries this request's clientNonce. Any miss or read failure
keeps the send `unknown`, so the never-a-silent-accept contract holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Current Grok Bot desktop builds write gateway-descriptor.json version 3,
which keeps the version 2 entries layout (adds savedAtMs per entry).
Every command failed with "Unsupported Grok Bot gateway descriptor
version 3". Treat v3 like v2; the multiple-entries safety check stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7jcCQRFPBA9cNGeLvEoJi
Exercise the existing Windows DPAPI key-provider path with synthetic v3
fixtures, including invalid entries and AES-GCM authentication failure.
Run the built doctor command for v2 and v3 under isolated app-data paths
on Windows as well as macOS/Linux, covering the flight worker bundle.

Refresh the artifact source snapshot while preserving its executable mode.
Load active desktop credentials through Safe Storage, detect the installed client version, and coalesce a single account-bound refresh for explicit AnyRun hibernation responses. Retry only allowlisted reads; preserve explicit routing overrides and never replay mutations.

Add reconnect/security regressions and rebuild distribution artifacts. Verified 67 gateway/session tests, 97 route tests, typecheck, and live read-only connectivity.

Co-Authored-By: Warp <agent@warp.dev>
@changeset-bot

changeset-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3cf043b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
grok-bot-cli Patch

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

@ScriptedAlchemy
ScriptedAlchemy merged commit 1663388 into main Nov 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants