Skip to content

feat: read the Grok Bot app session on Windows - #21

Merged
ScriptedAlchemy merged 2 commits into
ScriptedAlchemy:mainfrom
CDVolvik:windows-app-session
Sep 15, 2026
Merged

ScriptedAlchemy merged 2 commits into
ScriptedAlchemy:mainfrom
CDVolvik:windows-app-session

Conversation

@CDVolvik

Copy link
Copy Markdown
Contributor

Summary

  • find the Windows app's gateway-descriptor.json under %APPDATA%\Grok Bot, falling back to ~\AppData\Roaming when APPDATA is unset
  • decrypt it with Chromium's Windows Safe Storage scheme: AES-256-GCM, with the key DPAPI-wrapped in Local State
  • unwrap the key through the built-in Windows PowerShell, so no new dependencies
  • leave the macOS Keychain path unchanged; Linux still reports no app session
  • update the README requirement line to macOS or Windows
  • include a minor Changeset for the npm release

Verification

  • RED: the new Windows tests failed on the missing decryptWindowsSafeStorageString export
  • GREEN: npm test — 27/28 pass, 1 skipped (the macOS-only doctor integration), on Node 22 and Node 18
  • npx --yes publint@0.3.24 — All good
  • packed consumer CLI on Windows 11 with Grok Bot 0.47.0 — gbot doctor reports the app session as usable; gbot bots list returned 20 bots with no tokens set

No real tokens, descriptors, or DPAPI keys are included in tests or output.

@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c96f0f9

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

A present but broken Grok Bot descriptor (e.g. Windows Local State
missing) no longer blocks CURSOR_ACCESS_TOKEN → EnsureSandBox.
@ScriptedAlchemy
ScriptedAlchemy merged commit 3fe1287 into ScriptedAlchemy:main Sep 15, 2026
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.

2 participants