Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e9ac663
fix(app-session): read gateway descriptor version 3
Oct 6, 2026
090fb0d
chore(deps): update actions/setup-node digest to 949feb2
renovate[bot] Oct 8, 2026
ff9bdc1
fix: support version 3 Grok Bot gateway descriptors
tomer-ben-david Oct 8, 2026
9c36b08
fix: reconnect Grok Bot from the active account when its route disapp…
tomer-ben-david Oct 9, 2026
a2dcf25
chore(deps): update dependency @types/node to v24.19.2
renovate[bot] Oct 10, 2026
842e98c
Preserve uncertain delivery when timeout messages are read-only
al0x99 Oct 11, 2026
aee33fe
chore(deps): update dependency zod to v4.6.7
renovate[bot] Oct 13, 2026
9209c7a
chore(deps): update react monorepo to v19.3.1
renovate[bot] Oct 14, 2026
0f29266
fix(app-session): reconnect from the active Grok Bot account on Windows
trippjak Oct 14, 2026
92bdd62
fix(gateway): confirm `{ accepted: true }` send acks via the transcri…
scort1213 Oct 15, 2026
e533e32
fix(app-session): read gateway descriptor version 3
Oct 6, 2026
af40323
test(app-session): cover Windows v3 descriptors and CLI worker
Oct 16, 2026
e76b5a0
fix(gateway): reconnect hibernated read-only sessions
Oct 20, 2026
aeb3eef
chore(deps): update dependency @modelcontextprotocol/server to v2.4.0
renovate[bot] Oct 23, 2026
8dbe1d1
chore(deps): update dependency node to v26
renovate[bot] Oct 28, 2026
d344c45
fix: read version 3 gateway descriptors (Grok Bot 0.77)
valkyriweb Oct 31, 2026
a86461d
fix: preserve desktop startup commands through daemon shim
ScriptedAlchemy Nov 3, 2026
1f17c59
chore(deps): update dependency @rstest/core to v0.12.6
renovate[bot] Nov 3, 2026
3ad567d
Merge PR #143 for validated queue integration
ScriptedAlchemy Nov 3, 2026
6115adb
Merge PR #145 for queue integration
ScriptedAlchemy Nov 3, 2026
4684ee6
Merge PR #152 for queue integration
ScriptedAlchemy Nov 3, 2026
6657140
Merge PR #154 Windows descriptor regression coverage
ScriptedAlchemy Nov 3, 2026
1334450
Merge PR #158 for queue integration
ScriptedAlchemy Nov 3, 2026
0dd9c69
Merge PR #162 for queue integration
ScriptedAlchemy Nov 3, 2026
3e28d26
Merge PR #148 for queue integration
ScriptedAlchemy Nov 3, 2026
19acc2b
Merge PR #153 for queue integration
ScriptedAlchemy Nov 3, 2026
bb540b6
Merge PR #144 for queue integration
ScriptedAlchemy Nov 3, 2026
2a90f08
Merge PR #146 for queue integration
ScriptedAlchemy Nov 3, 2026
698ccd7
Merge PR #150 for queue integration
ScriptedAlchemy Nov 3, 2026
8c040eb
Merge PR #151 for queue integration
ScriptedAlchemy Nov 3, 2026
6e30527
Merge PR #156 for queue integration
ScriptedAlchemy Nov 3, 2026
11a2063
Merge PR #159 MCP server dependency update
ScriptedAlchemy Nov 3, 2026
71cc996
Merge PR #161 Node 26 workflow and type updates
ScriptedAlchemy Nov 3, 2026
3cf043b
Reconcile reconnect contracts and refresh integrated distribution
ScriptedAlchemy Nov 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/active-account-reconnect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"grok-bot-cli": patch
---

Reconnect from the active encrypted Grok Bot account when the cached gateway descriptor is absent, and use the installed macOS app version for backend requests.
5 changes: 5 additions & 0 deletions .changeset/descriptor-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"grok-bot-cli": patch
---

Read version 3 Grok Bot gateway descriptors (Grok Bot 0.77), which keep the version 2 entries layout.
7 changes: 7 additions & 0 deletions .changeset/desktop-startup-passthrough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"grok-bot-cli": patch
---

Pass Desktop startup configuration, sign-out, and CLI help/version requests through to the real Codex CLI instead of the interactive daemon bridge.

Allow fallback when the bridge reaches EOF without consuming input or committing output. Existing shim users must re-run `gbot codex desktop-shim install` after upgrading, then fully quit and relaunch ChatGPT.
5 changes: 5 additions & 0 deletions .changeset/gateway-descriptor-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"grok-bot-cli": patch
---

Read Grok Bot gateway descriptor version 3 (same `entries` layout as version 2), which current Grok Bot desktop builds write. The multiple-entries safety check is unchanged.
5 changes: 5 additions & 0 deletions .changeset/hibernated-read-reconnect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"grok-bot-cli": patch
---

Reconnect allowlisted read-only gateway calls once when the AnyRun proxy explicitly reports a hibernated pod. Use the selected desktop account's Safe Storage credentials and installed app version to obtain fresh routing credentials, coalesce concurrent refreshes, and retain the new route in memory without rewriting desktop-owned files. Refuse account changes, preserve explicit gateway overrides and credential host checks, and never automatically replay mutations or generic transport failures.
5 changes: 5 additions & 0 deletions .changeset/open-pr-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"grok-bot-cli": patch
---

Update bundled MCP server, React and Zod dependencies and refresh the development tooling and generated distribution.
5 changes: 5 additions & 0 deletions .changeset/preserve-send-timeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"grok-bot-cli": patch
---

Preserve unknown delivery and the target when a prompt send times out with a DOMException. Keep the original exception as the annotated error's cause.
5 changes: 5 additions & 0 deletions .changeset/send-accepted-ack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"grok-bot-cli": patch
---

Confirm `{ accepted: true }` send acknowledgements by finding the request's clientNonce in the transcript tail, so delivered messages report `delivery: "accepted"` with a messageId instead of `unknown`.
4 changes: 2 additions & 2 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"
node-version: "26"
- run: npm ci
- name: Require a changeset for shipped-package changes
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"
node-version: "26"

- name: Install dependencies
run: npm ci
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"
node-version: "26"
package-manager-cache: false
registry-url: https://registry.npmjs.org

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Manage [Grok Bot](https://cursor.com/help/grok-bot/plans) agents, groups, and me
npm install --global grok-bot-cli
```

Requires Node.js 22.19.0+ and the Grok Bot desktop app on macOS, Linux, or Windows. Open Grok Bot and sign in once; `gbot` automatically uses the app's encrypted session and routing credentials. No token copying is required. On Linux the app keeps its session under `~/.config/Grok Bot` (or `$XDG_CONFIG_HOME`); when it is stored in the system keyring, `gbot` reads the key with `secret-tool` (package `libsecret-tools`). On Windows the session lives under `%APPDATA%\\Grok Bot` and decrypts with the app's DPAPI-wrapped Safe Storage key.
Requires Node.js 22.19.0+ and the Grok Bot desktop app on macOS, Linux, or Windows. Open Grok Bot and sign in once; `gbot` automatically uses the app's encrypted session and routing credentials. No token copying is required. If the app removes its cached gateway route while the cloud computer sleeps, the CLI uses the active account in `sand-secrets.json` to request a fresh route through `EnsureSandBox`. Signed-out and inactive saved accounts are never selected. Backend requests use the installed Grok Bot app version, read from the app's `desktop-status.json` (or the macOS app bundle); `SAND_CLIENT_VERSION` remains an explicit override. On Linux the app keeps its session under `~/.config/Grok Bot` (or `$XDG_CONFIG_HOME`); when it is stored in the system keyring, `gbot` reads the key with `secret-tool` (package `libsecret-tools`). On Windows the session lives under `%APPDATA%\\Grok Bot` and decrypts with the app's DPAPI-wrapped Safe Storage key.

## Use

Expand Down Expand Up @@ -225,10 +225,12 @@ gbot codex desktop-shim uninstall # removes wrapper/bridge/LaunchAgent; Desktop

Install copies the scripts out of the package into durable `~/.codex/bin/` paths, so uninstalling the npm package never leaves Desktop pointing into a deleted checkout. The wrapper exports install-time `CODEX_HOME` and derives the socket from it at runtime (`CODEX_APP_SERVER_SOCK`), so custom `CODEX_HOME` layouts work; `gbot` itself resolves the socket the same way (`CODEX_APP_SERVER_SOCK` wins, else `CODEX_HOME`), and `status` reports the effective path and which variable won.

Fail-open runs only before any stdin byte is consumed and no daemon payload was committed to stdout: the wrapper preflights the daemon socket (3 s deadline) and runs the bridge as a child — never `exec` — falling through to the real standalone `codex` for every non-`app-server` spawn, every preflight failure, and every pre-session bridge failure (exit 1), always on pristine stdio+stdout. The bridge's connect + WebSocket-upgrade handshake runs under one absolute monotonic deadline (`CODEX_BRIDGE_CONNECT_TIMEOUT`, default 10 s) requiring `HTTP/1.1 101` plus a matching `Sec-WebSocket-Accept` (a `200` fails even with a valid hash), and a first-response deadline (`CODEX_BRIDGE_FIRST_MESSAGE_TIMEOUT`, default 30 s) bounds connect-to-matching-daemon-response covering the first RPC — an unrelated notification or foreign response never satisfies it, only the matching response/error (or timeout) clears it — preflight (3 s) + upgrade (10 s) + first RPC (30 s) stays far below a daemon-lock hang, and preflight and upgrade leave stdin untouched. Reads after a successful init block with no timeout so healthy idle sessions survive silence; every mid-session socket send and stdout write runs under its own write budget (`CODEX_BRIDGE_IO_TIMEOUT`, default 30 s), so a wedged or non-reading peer cannot hang Desktop. The commit point is byte-precise on input OR output, committed before the stdout write: the bridge counts every stdin byte read (buffered readahead included, even an unforwarded blank line) and marks stdout used before writing any forwarded daemon payload via a bounded write, so the fallback only ever runs on truly pristine stdio+stdout. Buffered EOF-tail data flushes before the WS Close. A mid-session bridge failure (exit 2+) makes the wrapper exit promptly so Desktop reconnects; the fallback never runs on half-consumed stdin or dirty stdout. The wrapper never starts the daemon on the spawn path (a wedged daemon lock must not block Desktop) — upkeep belongs to the LaunchAgent login script and install, which share one `CODEX_HOME` for the GUI domain and the daemon they start; if the socket is absent, Desktop simply runs stock Codex until the daemon is started.
Fail-open runs only before any stdin byte is consumed and no daemon payload was committed to stdout: the wrapper preflights the daemon socket (3 s deadline) and runs the bridge as a child — never `exec` — passing one-shot startup configuration, sign-out, help, version, and non-`app-server` requests to the real standalone `codex`, and falling back on every preflight failure or pre-session bridge failure (exit 1), always on pristine stdio+stdout. The bridge's connect + WebSocket-upgrade handshake runs under one absolute monotonic deadline (`CODEX_BRIDGE_CONNECT_TIMEOUT`, default 10 s) requiring `HTTP/1.1 101` plus a matching `Sec-WebSocket-Accept` (a `200` fails even with a valid hash), and a first-response deadline (`CODEX_BRIDGE_FIRST_MESSAGE_TIMEOUT`, default 30 s) bounds connect-to-matching-daemon-response covering the first RPC — an unrelated notification or foreign response never satisfies it, only the matching response/error (or timeout) clears it — preflight (3 s) + upgrade (10 s) + first RPC (30 s) stays far below a daemon-lock hang, and preflight and upgrade leave stdin untouched. Reads after a successful init block with no timeout so healthy idle sessions survive silence; every mid-session socket send and stdout write runs under its own write budget (`CODEX_BRIDGE_IO_TIMEOUT`, default 30 s), so a wedged or non-reading peer cannot hang Desktop. The commit point is byte-precise on input OR output, committed before the stdout write: the bridge counts every stdin byte read (buffered readahead included, even an unforwarded blank line) and marks stdout used before writing any forwarded daemon payload via a bounded write, so the fallback only ever runs on truly pristine stdio+stdout. Buffered EOF-tail data flushes before the WS Close. A mid-session bridge failure (exit 2+) makes the wrapper exit promptly so Desktop reconnects; the fallback never runs on half-consumed stdin or dirty stdout. The wrapper never starts the daemon on the spawn path (a wedged daemon lock must not block Desktop) — upkeep belongs to the LaunchAgent login script and install, which share one `CODEX_HOME` for the GUI domain and the daemon they start; if the socket is absent, Desktop simply runs stock Codex until the daemon is started.

Residual risks, stated honestly: requests without both matching thread and turn IDs remain unanswered; a Codex client must handle those requests. A daemon that speaks framing-valid but semantically unexpected JSON-RPC (unknown methods, id-less responses) is treated as transport; pins are to app-server schema 0.158.0. The bridge trusts the local control socket; a malicious local daemon could hold the session up to the stated budgets, not past them.

After upgrading `gbot`, existing shim users must re-run `gbot codex desktop-shim install` and fully quit and relaunch ChatGPT to refresh the installed scripts. EOF without any consumed input or committed output falls back to the real CLI instead of counting as a served session.

Current shim limitation: Desktop's spawn-time app-tools MCP `-c` overrides are not forwarded to the already-running managed daemon. No restoration path or app-tools parity has been demonstrated here; this is not a claim of permanent protocol impossibility. Fully quit and relaunch ChatGPT.app after install (or login) so it inherits `CODEX_CLI_PATH`. `status` reads the macOS GUI-domain value via `launchctl getenv` (what Desktop actually inherits) alongside the calling shell's value. LaunchAgent persistence is macOS-first; elsewhere install still writes the wrapper and bridge but leaves `CODEX_CLI_PATH` for you to export. `~/.codex/bin` holds scripts only — there is no extra revert note to clean up; revert is `gbot codex desktop-shim uninstall` plus this section.

**ChatGPT Desktop over CDP (scaffold).** Prefer the Desktop UI surface via Chrome DevTools Protocol when you need more than the app-server socket. CDP is **local-only** (`127.0.0.1`); there is no remote transport. Relaunch the macOS app with a debug port (Electron fuses block Node inspect, not Chromium's flag):
Expand Down Expand Up @@ -355,7 +357,7 @@ the short summary. Unknown cursors set `gapReset: true`; repeat that call with
`full:true` to inspect the bounded reset snapshot.

Auth resolves exactly as for `gbot`: `GROK_BOT_GATEWAY_URL` + `GROK_BOT_GATEWAY_TOKEN`,
then the Grok Bot app session, then `CURSOR_ACCESS_TOKEN`. The MCP server therefore
then the Grok Bot cached gateway session, then `CURSOR_ACCESS_TOKEN`, then the active Grok Bot account credentials. The MCP server therefore
needs outbound HTTPS to the gateway host and read access to the app-session file
(`~/.config/Grok Bot` on Linux, `~/Library/Application Support/Grok Bot` on macOS).
A sandbox that blocks network egress or hides the home directory makes `gbot_send`
Expand Down
2 changes: 1 addition & 1 deletion artifact/agent-bundle.compile-evidence.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifact/agent-bundle.manifest.json

Large diffs are not rendered by default.

Loading