grok-bot-cli 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +62 -2
- package/dist/.claude-plugin/marketplace.json +1 -1
- package/dist/.claude-plugin/plugin.json +1 -1
- package/dist/.codex-plugin/plugin.json +1 -1
- package/dist/.cursor-plugin/marketplace.json +1 -1
- package/dist/.cursor-plugin/plugin.json +1 -1
- package/dist/.mcp.json +1 -1
- package/dist/AGENTS.md +12 -0
- package/dist/INSTALL.md +40 -37
- package/dist/README.md +62 -2
- package/dist/agent-bundle.compile-evidence.json +1 -1
- package/dist/agent-bundle.manifest.json +1 -1
- package/dist/agent-bundle.package-compile-evidence.json +1 -1
- package/dist/bin/gbot-flight.mjs +25354 -31911
- package/dist/bin/gbot-install.js +71105 -135399
- package/dist/bin/gbot.mjs +43363 -91018
- package/dist/install.mjs +66 -142
- package/dist/mcp/mcp-claude-channel-8029413c.mjs +45599 -0
- package/dist/mcp/mcp-grok-bot-b8c2461e-flight.mjs +23822 -30094
- package/dist/mcp/mcp-grok-bot-b8c2461e.mjs +60288 -111613
- package/dist/package.json +5 -3
- package/dist/plugin.json +1 -1
- package/dist/rules/codex-claude-on-user-machines.mdc +18 -0
- package/dist/scripts/gbot-relay.mjs +27023 -60670
- package/dist/skills/talk-to-grok-bot/SKILL.md +40 -84
- package/dist/skills/talk-to-grok-bot/references/bridge-administration.md +89 -0
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# grok-bot-cli
|
|
2
2
|
|
|
3
|
+
## 0.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3508def: Tell Grok Bot agents that Codex/Claude tools use local sockets only: on the box, do not call them — run `gbot` on the user's machine via Grok Bot Shell with a machineId after `codex app-server daemon start` / bootstrap. No remote transport.
|
|
8
|
+
|
|
9
|
+
## 0.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- a619538: Add an opt-in native Claude Code channel, with private local messaging and correlated replies through `gbot claude send` and `claude_send`.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 75521df: Update agent-bundle to the 0.3.1 release preview (899755dc6d) and rebuild the plugin artifact.
|
|
18
|
+
- 3f64ac2: Update agent-bundle to b4e38409f4 so generated executables no longer ship bundled dependencies' comments.
|
|
19
|
+
- 872eb61: Reduce the messaging skill's default context by loading bridge administration and diagnostic procedures only when needed.
|
|
20
|
+
- 657ed43: Update the Claude channel MCP server SDK to 2.1.0.
|
|
21
|
+
|
|
22
|
+
## 0.9.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- f2482eb: Build the plugin with the agent-bundle 0.3.0 pkg.pr.new preview (4f62216f30).
|
|
27
|
+
- c49a0b8: Ship generated host marketplaces and the complete Agent Bundle artifact in the GitHub repository so Codex, Claude Code, and Cursor can install it without a local build.
|
|
28
|
+
|
|
3
29
|
## 0.9.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -59,6 +59,50 @@ Options are command-local (for example, `gbot send --history-dir DIR ...`);
|
|
|
59
59
|
a JSON document on stdout with `exitCode` (see below), every other command
|
|
60
60
|
prints the failure message on stderr and exits 1.
|
|
61
61
|
|
|
62
|
+
## Messaging a live Claude Code session
|
|
63
|
+
|
|
64
|
+
Claude Code has a native [Channels API](https://code.claude.com/docs/en/channels-reference),
|
|
65
|
+
so this integration needs no desktop shim. The Claude plugin includes an opt-in
|
|
66
|
+
`claude-channel` MCP server; Codex and Grok callers can use `claude_send`, or the
|
|
67
|
+
local CLI, to send a message and receive Claude's explicit reply.
|
|
68
|
+
|
|
69
|
+
Claude channels live on the **user's registered machine** (the same host that runs
|
|
70
|
+
Claude Code), not on the Grok Bot agent box (`HOME=/home/box`). gbot has no remote
|
|
71
|
+
transport: from the box, use Grok Bot Shell with a machineId to run
|
|
72
|
+
`gbot claude send` on that computer. Auth stays with that machine's native Claude login.
|
|
73
|
+
|
|
74
|
+
After installing this version of the Claude plugin, launch a named session:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
GROK_BOT_CLAUDE_CHANNEL=review claude --dangerously-load-development-channels plugin:gbot@gbot-marketplace
|
|
78
|
+
# From another terminal on the same machine and user account:
|
|
79
|
+
gbot claude send review "Reply with GBOT_CLAUDE_OK" --json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Accept Claude's development-channel prompt. Custom channels are a research preview
|
|
83
|
+
and require session opt-in and any applicable organization policy. Claude must be
|
|
84
|
+
signed in. The development flag permits this channel; it does not bypass tool
|
|
85
|
+
approvals. `claude_send` takes `name`, `message`, and optional `timeoutMs` (default
|
|
86
|
+
60000, maximum 120000). Claude uses `claude_reply` with the incoming `request_id`.
|
|
87
|
+
Only that explicit reply completes the call; a notification alone is not proof
|
|
88
|
+
Claude received or processed the message. Timeout/disconnect returns `unknown`;
|
|
89
|
+
do not automatically resend.
|
|
90
|
+
|
|
91
|
+
Each name selects one live session. Sockets live under `~/.grok-bot-cli/claude/`
|
|
92
|
+
in a user-owned 0700 directory, with mode 0600 sockets. Access grants messaging
|
|
93
|
+
to local processes running as the same user. No TCP listener, automatic permission
|
|
94
|
+
approval, conversation-history scraping, or background daemon is installed.
|
|
95
|
+
Without `GROK_BOT_CLAUDE_CHANNEL`, the channel is disabled. Shut down the owning
|
|
96
|
+
Claude session to close it. A crashed process may leave a socket: confirm the
|
|
97
|
+
named session is stopped before removing that socket and restarting. A second
|
|
98
|
+
session with the same name fails rather than taking over the first.
|
|
99
|
+
|
|
100
|
+
This targets opted-in Claude Code sessions, not arbitrary existing sessions or
|
|
101
|
+
ordinary Claude Desktop chats. Remote Grok runtimes need local tool execution to
|
|
102
|
+
reach the socket; installing an MCP artifact does not establish that connection.
|
|
103
|
+
Claude can use the existing `gbot_send`/`gbot_thread` and `codex_send` tools for
|
|
104
|
+
outgoing messages; its own tool permissions still apply.
|
|
105
|
+
|
|
62
106
|
## Automatic Grok ↔ Codex replies
|
|
63
107
|
|
|
64
108
|
In a native Codex invocation, `gbot_send` sends once and returns a durable exchange
|
|
@@ -159,6 +203,8 @@ gbot codex send <threadId> "Grok here: the build is green, please continue."
|
|
|
159
203
|
|
|
160
204
|
**Which Codex you reach.** `gbot` connects to `$CODEX_HOME/app-server-control/app-server-control.sock` (default `~/.codex/...`) with a built-in WebSocket client. The daemon must be started by `codex app-server daemon start`. `list-threads` shows the threads recorded under `CODEX_HOME` (CLI, TUI, VS Code); `send` uses the resumed thread state and selected busy policy: ordinary sends reject active work, while explicitly selected guarded steering can deliver into the active turn. Method and parameter names are pinned to the Codex release recorded in `src/core/codex-bridge.js` (`codex app-server generate-json-schema`); `status` prints the daemon and CLI versions so a stale daemon is visible, and `codex app-server daemon restart` picks up the installed CLI. Native Windows is not supported yet (AF_UNIX control socket); use WSL, Linux, or macOS.
|
|
161
205
|
|
|
206
|
+
**User machines, not the Grok Bot box.** Codex (and Claude) sessions live on the user's registered computers — for example their Linux desktop or Mac — not on the Grok Bot agent's sandbox VM (`HOME=/home/box`, no Codex install). gbot has **no remote transport**; it only dials a local Unix socket. When this process is on the box, do not call the Codex/Claude MCP tools there — run the `gbot` CLI on the user's machine through **Grok Bot Shell with a machineId**. On that machine, start the daemon with `codex app-server daemon start` (or bootstrap). Auth stays with each machine's native login; gbot does not store or export credentials.
|
|
207
|
+
|
|
162
208
|
**ChatGPT Desktop limitation.** Desktop runs its own private stdio app-server and does not publish the shared control socket, so external clients cannot reach live Desktop tasks. When the socket is absent, `gbot codex status` exits 1 and says so, naming the upstream issues: [openai/codex#41014](https://github.com/openai/codex/issues/41014) and [openai/codex#41112](https://github.com/openai/codex/issues/41112). `gbot` never reads Desktop's temporary `CODEX_APP_TOOLS_PIPE_PATH` sockets under `/tmp/codex-browser-use/`; that channel is private to Desktop.
|
|
163
209
|
|
|
164
210
|
**Pointing Desktop at the managed daemon (macOS).** Desktop injects `codex_app` overrides, so `CODEX_APP_SERVER_USE_LOCAL_DAEMON=1` alone cannot select the managed daemon. The workaround is a `CODEX_CLI_PATH` wrapper that rewrites Desktop's `codex … app-server` spawn into a stdio↔WebSocket bridge onto the managed control socket — no Desktop binary patches, no pipe scraping, no protocol change (`gbot` already speaks that socket). Do not use stock `codex app-server proxy` here: it hangs for Desktop stdio, so the shim ships its own bridge.
|
|
@@ -183,7 +229,7 @@ Current shim limitation: Desktop's spawn-time app-tools MCP `-c` overrides are n
|
|
|
183
229
|
|
|
184
230
|
**Thread discovery.** `list-threads --limit N` (1–200) pages with the opaque `--cursor` from the previous `nextCursor`; JSON keeps the cursor verbatim, text output prints a sanitized `more: --cursor …` hint. Text fields are stripped of terminal control sequences in both outputs (single-line fields also lose line breaks; `preview` keeps its newlines; a structured `source` such as `{ "custom": … }` passes through unchanged), `status` is one of `notLoaded | idle | active | systemError | unknown`, and non-numeric `updatedAt` becomes `null`. Unknown arguments are rejected before the socket is touched; a response that does not match the pinned schema (including an entry without a string `id`) fails with `reason: "bad-response"`.
|
|
185
231
|
|
|
186
|
-
**Routes, attribution, and loops.** `gbot codex send` runs on the machine that owns `CODEX_HOME`, as the user who owns the socket, with that user's Codex credentials; the socket path comes only from `CODEX_HOME`, never from the message or an agent-supplied argument. A cloud-hosted Grok Bot cannot reach a desktop socket
|
|
232
|
+
**Routes, attribution, and loops.** `gbot codex send` runs on the machine that owns `CODEX_HOME`, as the user who owns the socket, with that user's Codex credentials; the socket path comes only from `CODEX_HOME` or `CODEX_APP_SERVER_SOCK`, never from the message or an agent-supplied argument. gbot has no remote transport. A cloud-hosted Grok Bot on the box cannot reach a desktop socket at `/home/box/.codex/...` — use Grok Bot Shell with a machineId to run `gbot` on the user's registered machine (after `codex app-server daemon start` / bootstrap there). `GROK_BOT_CODEX_THREADS=id,id` lets the operator pin `send` to approved threads (`reason: "route-not-allowed"` otherwise). Every send gets a delivery envelope: `messageId` (also sent as Codex's native `clientUserMessageId`), `correlationId` (defaults to the message id), optional `replyTo`, and `hop`. A reply passes the original correlation id and `hop` + 1:
|
|
187
233
|
|
|
188
234
|
```sh
|
|
189
235
|
gbot codex send <threadId> "Grok here: build is green" # receipt: messageId M, correlationId M, hop 0
|
|
@@ -196,7 +242,7 @@ Sends at `hop >= GROK_BOT_MAX_HOPS` (default 4) are refused with `reason: "hop-l
|
|
|
196
242
|
|
|
197
243
|
**Failure modes.** Every `send` and `codex` outcome under `--json` is one document on stdout with `exitCode`; failures include `{ error, delivery, reason, messageId, correlationId, hop, exitCode: 1, … }` and the process exits 1. Framework argument/schema errors remain on stderr and exit 2. `--json` is reserved anywhere before `--`; put `--` before flag-like message text. `reason` values are stable:
|
|
198
244
|
|
|
199
|
-
- `socket-absent` / `permission-denied` / `not-a-socket` / `connect-failed` / `handshake-failed` / `windows-unsupported`: the route is unavailable. Start the daemon, fix the socket, or wait for the upstream Desktop fixes.
|
|
245
|
+
- `socket-absent` / `permission-denied` / `not-a-socket` / `connect-failed` / `handshake-failed` / `windows-unsupported`: the route is unavailable. Start the daemon on the user's machine (`codex app-server daemon start` / bootstrap), fix the socket, or wait for the upstream Desktop fixes. On a Grok Bot box (`HOME=/home/box`), the error explains that gbot has no remote transport and to run `gbot` via Grok Bot Shell with a machineId instead of expecting a box-local Codex socket.
|
|
200
246
|
- `unknown-thread`: use `list-threads`.
|
|
201
247
|
- `external-owner`: a thread with an active writer (VS Code, TUI) is open in another client; close it there first.
|
|
202
248
|
- `busy` / `thread-error` / `unknown-status`: see above.
|
|
@@ -217,6 +263,20 @@ Codex conversation, and managed bridge tools, plus a `talk-to-grok-bot` skill.
|
|
|
217
263
|
The tools bundle this repository's gateway client and worker, so the installed
|
|
218
264
|
plugin does not need `gbot` on `PATH`.
|
|
219
265
|
|
|
266
|
+
Install the committed bundle directly from GitHub without cloning or building it:
|
|
267
|
+
|
|
268
|
+
```sh
|
|
269
|
+
codex plugin marketplace add ScriptedAlchemy/grok-bot-cli
|
|
270
|
+
codex plugin add gbot@gbot-marketplace
|
|
271
|
+
|
|
272
|
+
claude plugin marketplace add ScriptedAlchemy/grok-bot-cli
|
|
273
|
+
claude plugin install gbot@gbot-marketplace
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Cursor users can add `https://github.com/ScriptedAlchemy/grok-bot-cli` as a
|
|
277
|
+
marketplace repository from Customize → Plugins. The repository-root host
|
|
278
|
+
marketplaces all point at the committed `artifact/` bundle.
|
|
279
|
+
|
|
220
280
|
Install the bundled host projections from the same npm package:
|
|
221
281
|
|
|
222
282
|
```sh
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"description":"Message Grok Bot from Codex, Claude Code, and Cursor,
|
|
1
|
+
{"description":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.","name":"gbot-marketplace","owner":{"name":"gbot"},"plugins":[{"author":{"name":"Zack Jackson","url":"https://github.com/ScriptedAlchemy"},"description":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.","homepage":"https://github.com/ScriptedAlchemy/grok-bot-cli#readme","keywords":["grok","grok-bot","grokbot","gbot","cursor","ai-agents","automation","terminal","cli","agent-bundle"],"license":"MIT","name":"gbot","repository":"https://github.com/ScriptedAlchemy/grok-bot-cli","source":"./","version":"0.10.1"}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":{"name":"gbot"},"description":"Message Grok Bot from Codex, Claude Code, and Cursor,
|
|
1
|
+
{"author":{"name":"gbot"},"channels":[{"server":"claude-channel"}],"description":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.","name":"gbot","version":"0.10.1"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":{"name":"Zack Jackson","url":"https://github.com/ScriptedAlchemy"},"description":"Message Grok Bot from Codex, Claude Code, and Cursor,
|
|
1
|
+
{"author":{"name":"Zack Jackson","url":"https://github.com/ScriptedAlchemy"},"description":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.","homepage":"https://github.com/ScriptedAlchemy/grok-bot-cli#readme","interface":{"capabilities":["mcp","skills"],"category":"Productivity","defaultPrompt":["Help me use gbot."],"developerName":"gbot","displayName":"gbot","longDescription":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.","shortDescription":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId."},"keywords":["grok","grok-bot","grokbot","gbot","cursor","ai-agents","automation","terminal","cli","agent-bundle"],"license":"MIT","mcpServers":"./.codex-plugin/mcp.json","name":"gbot","repository":"https://github.com/ScriptedAlchemy/grok-bot-cli","skills":"./skills/","version":"0.10.1"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"gbot-marketplace","owner":{"name":"gbot"},"plugins":[{"description":"Message Grok Bot from Codex, Claude Code, and Cursor,
|
|
1
|
+
{"name":"gbot-marketplace","owner":{"name":"gbot"},"plugins":[{"description":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.","name":"gbot","source":"./"}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":{"name":"Zack Jackson"},"description":"Message Grok Bot from Codex, Claude Code, and Cursor,
|
|
1
|
+
{"author":{"name":"Zack Jackson"},"description":"Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.","displayName":"gbot","homepage":"https://github.com/ScriptedAlchemy/grok-bot-cli#readme","keywords":["grok","grok-bot","grokbot","gbot","cursor","ai-agents","automation","terminal","cli","agent-bundle"],"license":"MIT","mcpServers":"./.cursor-plugin/mcp.json","name":"gbot","repository":"https://github.com/ScriptedAlchemy/grok-bot-cli","rules":"./rules/","skills":"./skills/","version":"0.10.1"}
|
package/dist/.mcp.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mcpServers":{"grok-bot":{"args":["${CLAUDE_PLUGIN_ROOT}/mcp/mcp-grok-bot-b8c2461e.mjs"],"command":"node","env":{"AGENT_BUNDLE_PLUGIN_ROOT":"${CLAUDE_PLUGIN_ROOT}"},"type":"stdio"}}}
|
|
1
|
+
{"mcpServers":{"claude-channel":{"args":["${CLAUDE_PLUGIN_ROOT}/mcp/mcp-claude-channel-8029413c.mjs"],"command":"node","env":{"AGENT_BUNDLE_PLUGIN_ROOT":"${CLAUDE_PLUGIN_ROOT}"},"type":"stdio"},"grok-bot":{"args":["${CLAUDE_PLUGIN_ROOT}/mcp/mcp-grok-bot-b8c2461e.mjs"],"command":"node","env":{"AGENT_BUNDLE_PLUGIN_ROOT":"${CLAUDE_PLUGIN_ROOT}"},"type":"stdio"}}}
|
package/dist/AGENTS.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Agent instructions
|
|
2
|
+
|
|
3
|
+
Publish exclusively through `.github/workflows/release.yml` with GitHub OIDC.
|
|
4
|
+
Its package release script is a workflow entrypoint: never publish locally,
|
|
5
|
+
request npm publishing tokens/login, or troubleshoot local publishing auth.
|
|
6
|
+
Use the existing Changesets flow and verify Actions plus the registry before
|
|
7
|
+
updating installations.
|
|
8
|
+
|
|
9
|
+
Delete dead code, obsolete scripts, duplicate workarounds, and unused legacy
|
|
10
|
+
installs. Check active owners/references first; preserve auth, operator env,
|
|
11
|
+
durable data, and intentional duplicate suppression. Prefer existing helpers,
|
|
12
|
+
stdlib, and native features over new wrappers or fallback frameworks.
|
package/dist/INSTALL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Install gbot
|
|
2
2
|
|
|
3
|
-
Message Grok Bot from Codex, Claude Code, and Cursor,
|
|
3
|
+
Message Grok Bot from Codex, Claude Code, and Cursor. Codex/Claude tools use local sockets on the user's registered machines only (no remote transport); from the Grok Bot box, run gbot via Grok Bot Shell with a machineId.
|
|
4
4
|
|
|
5
|
-
Version: `0.
|
|
5
|
+
Version: `0.10.1`
|
|
6
6
|
|
|
7
7
|
Run these commands from this bundle directory. The bundle is self-contained: every command below is
|
|
8
8
|
a host command or the bundled installer, and nothing requires the `agent-bundle` CLI. Where that CLI is
|
|
@@ -33,7 +33,7 @@ claude plugin install gbot@gbot-marketplace --scope user
|
|
|
33
33
|
|
|
34
34
|
With the optional `agent-bundle` CLI, `agent-bundle install claude --from ./` runs this sequence
|
|
35
35
|
automatically when the installed copy has the same version but a different content hash; `--replace`
|
|
36
|
-
|
|
36
|
+
forces it.
|
|
37
37
|
|
|
38
38
|
### Uninstall
|
|
39
39
|
|
|
@@ -42,7 +42,7 @@ claude plugin uninstall gbot@gbot-marketplace --scope user --keep-data
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Match the scope the plugin was installed with (`user`, `project`, or `local`). `--keep-data` keeps durable
|
|
45
|
-
runtime state (Claude orphans the cached copy
|
|
45
|
+
runtime state (Claude orphans the cached copy for its ~14-day grace period); omit it to
|
|
46
46
|
remove `~/.claude/plugins/data/<id>/` immediately.
|
|
47
47
|
|
|
48
48
|
The marketplace `gbot-marketplace` stays registered. Remove it only when nothing else installs from it:
|
|
@@ -61,9 +61,10 @@ would be removed and `agent-bundle uninstall claude --from ./` reverses the reco
|
|
|
61
61
|
(or under `$CLAUDE_CONFIG_DIR`; `user` is the install scope, pass `--scope project` or `--scope local` to match
|
|
62
62
|
a scoped install), and `uninstall` consumes it, running the two commands above in order and retaining the
|
|
63
63
|
marketplace while any other plugin, scope, or project still installs from it. Durable runtime state
|
|
64
|
-
is kept by default; `--purge-data --confirm-purge` removes
|
|
65
|
-
immediately. A missing receipt or a cached copy that no longer matches it is refused unless `--force`;
|
|
66
|
-
|
|
64
|
+
is kept by default; `--purge-data --confirm-purge` removes the receipt-owned state roots and
|
|
65
|
+
`~/.claude/plugins/data/<id>/` immediately. A missing receipt or a cached copy that no longer matches it is refused unless `--force`;
|
|
66
|
+
`--purge-data --confirm-purge` without a receipt is refused even with `--force` (`AB7009`); a second run is a
|
|
67
|
+
`not-installed` no-op.
|
|
67
68
|
|
|
68
69
|
## Codex
|
|
69
70
|
|
|
@@ -92,7 +93,7 @@ or omits `enabled` (`AB7004`) and leaves that install unchanged. Enable the plug
|
|
|
92
93
|
|
|
93
94
|
With the optional `agent-bundle` CLI, `agent-bundle install codex --from ./` runs this sequence
|
|
94
95
|
automatically when the installed copy has the same version but a different content hash; `--replace`
|
|
95
|
-
|
|
96
|
+
forces it.
|
|
96
97
|
|
|
97
98
|
### Uninstall
|
|
98
99
|
|
|
@@ -100,8 +101,7 @@ automatically when the installed copy has the same version but a different conte
|
|
|
100
101
|
codex plugin remove gbot@gbot-marketplace
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
Codex 0.147.0 deletes the cached plugin tree
|
|
104
|
-
option.
|
|
104
|
+
Codex 0.147.0 deletes the cached plugin tree on `plugin remove` and has no keep-data option.
|
|
105
105
|
|
|
106
106
|
The marketplace `gbot-marketplace` stays registered. Remove it only when nothing else installs from it:
|
|
107
107
|
`codex plugin list` shows every other plugin from it.
|
|
@@ -114,8 +114,10 @@ With the optional `agent-bundle` CLI, `agent-bundle uninstall codex --from ./ --
|
|
|
114
114
|
would be removed and `agent-bundle uninstall codex --from ./` reverses the recorded registrations.
|
|
115
115
|
`agent-bundle install codex` records a receipt at `~/.codex/agent-bundle/receipts/gbot.gbot-marketplace.user.json` (or
|
|
116
116
|
under `$CODEX_HOME`), and `uninstall` consumes it, running the two commands above in order. `--keep-data`
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
keeps the framework state roots the receipt records outside the cached tree (`kept`); with nothing there the
|
|
118
|
+
result says so (`unavailable`). A missing receipt or a cached
|
|
119
|
+
copy that no longer matches it is refused unless `--force`; `--purge-data --confirm-purge` without a receipt is
|
|
120
|
+
refused even with `--force` (`AB7009`); a second run is a `not-installed` no-op.
|
|
119
121
|
|
|
120
122
|
## Cursor
|
|
121
123
|
|
|
@@ -137,37 +139,38 @@ manifest-declared `hooks/hooks.json` from that directory; plugin hooks run from
|
|
|
137
139
|
The installer writes an install receipt (`.agent-bundle-install.json`: plugin, version, content hash,
|
|
138
140
|
owned files) beside the plugin manifest. Re-running `node ./install.mjs` on an identical artifact
|
|
139
141
|
is a no-op that says so. When the installed copy has the same version but different content, the
|
|
140
|
-
installer replaces its owned files in place and leaves
|
|
142
|
+
installer replaces its owned files in place and leaves unowned entries untouched:
|
|
141
143
|
|
|
142
144
|
```sh
|
|
143
145
|
node ./install.mjs # same-version content drift of a receipt-managed copy is replaced
|
|
144
|
-
node ./install.mjs --replace # also replace a different installed version
|
|
146
|
+
node ./install.mjs --replace # also replace a different installed version
|
|
145
147
|
```
|
|
146
148
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
manually. The optional `agent-bundle` CLI applies the same policy through
|
|
149
|
+
A directory without a receipt naming this plugin (including a copy placed before install receipts
|
|
150
|
+
existed) is foreign and always refused with an installed-versus-artifact content-hash comparison;
|
|
151
|
+
remove it manually and reinstall. The optional `agent-bundle` CLI applies the same policy through
|
|
150
152
|
`agent-bundle install cursor --from ./ [--replace]`.
|
|
151
153
|
|
|
152
154
|
### Uninstall
|
|
153
155
|
|
|
154
156
|
```sh
|
|
155
157
|
node ./install.mjs --uninstall --plan # print exactly what would be removed
|
|
156
|
-
node ./install.mjs --uninstall # remove the receipt-owned files; keep state
|
|
157
|
-
node ./install.mjs --uninstall --purge-data --confirm-purge # also remove durable runtime state
|
|
158
|
+
node ./install.mjs --uninstall # remove the receipt-owned files; keep durable state
|
|
159
|
+
node ./install.mjs --uninstall --purge-data --confirm-purge # also remove receipt-owned durable runtime state
|
|
158
160
|
node ./install.mjs --uninstall --mode marketplace # remove a staged marketplace repository
|
|
159
161
|
```
|
|
160
162
|
|
|
161
163
|
Uninstall removes exactly what the receipt owns: the listed files, the directories the installer
|
|
162
164
|
created (including `~/.cursor/plugins/local` when the installer made it), and nothing else. Durable
|
|
163
|
-
runtime state
|
|
164
|
-
server, the `~/.cursor/agent-bundle/plugin-data/<name>` directory the receipt records
|
|
165
|
-
unless `--purge-data --confirm-purge` is passed (a kept data directory leaves a
|
|
166
|
-
purge still finds it; an empty one is pruned); unowned
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
runtime state (the framework state roots the receipt records with ownership evidence) — and, for an Agent
|
|
166
|
+
Plugins pack with a stdio server, the `~/.cursor/agent-bundle/plugin-data/<name>` directory the receipt records
|
|
167
|
+
as `PLUGIN_DATA` — is kept unless `--purge-data --confirm-purge` is passed (a kept data directory leaves a
|
|
168
|
+
remnant receipt behind so a later purge still finds it; an empty one is pruned); unowned entries, including a
|
|
169
|
+
`state/` directory beside the plugin, are left in place and listed. A receipt with no recorded state location
|
|
170
|
+
(written before the install could record it) retains the current environment's default as unproven; a
|
|
171
|
+
keep-data run cannot turn that observation into later purge authority. A directory without a receipt naming
|
|
172
|
+
this plugin is foreign and always refused, with or without `--force`; owned content that no longer matches
|
|
173
|
+
the receipt is refused unless `--force`.
|
|
171
174
|
A second run is a `Not installed` no-op. With the optional `agent-bundle` CLI,
|
|
172
175
|
`agent-bundle uninstall cursor --from ./ [--mode marketplace]` applies the same policy, and
|
|
173
176
|
`agent-bundle doctor --from ./` shows the lifecycle stage (placed, registered, enabled, active) with
|
|
@@ -254,21 +257,21 @@ other clients; the recorded clients above name which of them expand the placehol
|
|
|
254
257
|
### Reinstall after a same-version rebuild
|
|
255
258
|
|
|
256
259
|
The installer records an install receipt (`.agent-bundle-install.json`) and replaces its owned files in
|
|
257
|
-
place when the same version was rebuilt with different content;
|
|
258
|
-
touched. Pass `--replace`
|
|
259
|
-
copy installed before receipts existed
|
|
260
|
-
comparison. For a client that manages its own copy, remove and re-add
|
|
261
|
-
when only content changed at the same version.
|
|
260
|
+
place when the same version was rebuilt with different content; unowned entries are never
|
|
261
|
+
touched. Pass `--replace` to replace a different installed version. A directory without a receipt
|
|
262
|
+
naming this plugin (including a copy installed before receipts existed) is foreign and refused with a
|
|
263
|
+
content-hash comparison; remove it manually. For a client that manages its own copy, remove and re-add
|
|
264
|
+
the plugin through that client when only content changed at the same version.
|
|
262
265
|
|
|
263
266
|
### Uninstall
|
|
264
267
|
|
|
265
268
|
```sh
|
|
266
269
|
node ./install.mjs --uninstall --plan # print exactly what would be removed
|
|
267
|
-
node ./install.mjs --uninstall # remove the receipt-owned files; keep state
|
|
268
|
-
node ./install.mjs --uninstall --purge-data --confirm-purge # also remove durable runtime state
|
|
270
|
+
node ./install.mjs --uninstall # remove the receipt-owned files; keep durable state
|
|
271
|
+
node ./install.mjs --uninstall --purge-data --confirm-purge # also remove receipt-owned durable runtime state
|
|
269
272
|
```
|
|
270
273
|
|
|
271
274
|
Uninstall removes exactly what the receipt owns (files, installer-created directories) and keeps
|
|
272
|
-
durable runtime state
|
|
273
|
-
unless `--purge-data --confirm-purge` is passed.
|
|
274
|
-
|
|
275
|
+
the durable runtime state the receipt records (and the recorded `PLUGIN_DATA` directory of an Agent Plugins
|
|
276
|
+
pack) unless `--purge-data --confirm-purge` is passed. Modified owned content is refused unless `--force`;
|
|
277
|
+
a directory without a receipt naming this plugin is foreign and always refused.
|
package/dist/README.md
CHANGED
|
@@ -59,6 +59,50 @@ Options are command-local (for example, `gbot send --history-dir DIR ...`);
|
|
|
59
59
|
a JSON document on stdout with `exitCode` (see below), every other command
|
|
60
60
|
prints the failure message on stderr and exits 1.
|
|
61
61
|
|
|
62
|
+
## Messaging a live Claude Code session
|
|
63
|
+
|
|
64
|
+
Claude Code has a native [Channels API](https://code.claude.com/docs/en/channels-reference),
|
|
65
|
+
so this integration needs no desktop shim. The Claude plugin includes an opt-in
|
|
66
|
+
`claude-channel` MCP server; Codex and Grok callers can use `claude_send`, or the
|
|
67
|
+
local CLI, to send a message and receive Claude's explicit reply.
|
|
68
|
+
|
|
69
|
+
Claude channels live on the **user's registered machine** (the same host that runs
|
|
70
|
+
Claude Code), not on the Grok Bot agent box (`HOME=/home/box`). gbot has no remote
|
|
71
|
+
transport: from the box, use Grok Bot Shell with a machineId to run
|
|
72
|
+
`gbot claude send` on that computer. Auth stays with that machine's native Claude login.
|
|
73
|
+
|
|
74
|
+
After installing this version of the Claude plugin, launch a named session:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
GROK_BOT_CLAUDE_CHANNEL=review claude --dangerously-load-development-channels plugin:gbot@gbot-marketplace
|
|
78
|
+
# From another terminal on the same machine and user account:
|
|
79
|
+
gbot claude send review "Reply with GBOT_CLAUDE_OK" --json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Accept Claude's development-channel prompt. Custom channels are a research preview
|
|
83
|
+
and require session opt-in and any applicable organization policy. Claude must be
|
|
84
|
+
signed in. The development flag permits this channel; it does not bypass tool
|
|
85
|
+
approvals. `claude_send` takes `name`, `message`, and optional `timeoutMs` (default
|
|
86
|
+
60000, maximum 120000). Claude uses `claude_reply` with the incoming `request_id`.
|
|
87
|
+
Only that explicit reply completes the call; a notification alone is not proof
|
|
88
|
+
Claude received or processed the message. Timeout/disconnect returns `unknown`;
|
|
89
|
+
do not automatically resend.
|
|
90
|
+
|
|
91
|
+
Each name selects one live session. Sockets live under `~/.grok-bot-cli/claude/`
|
|
92
|
+
in a user-owned 0700 directory, with mode 0600 sockets. Access grants messaging
|
|
93
|
+
to local processes running as the same user. No TCP listener, automatic permission
|
|
94
|
+
approval, conversation-history scraping, or background daemon is installed.
|
|
95
|
+
Without `GROK_BOT_CLAUDE_CHANNEL`, the channel is disabled. Shut down the owning
|
|
96
|
+
Claude session to close it. A crashed process may leave a socket: confirm the
|
|
97
|
+
named session is stopped before removing that socket and restarting. A second
|
|
98
|
+
session with the same name fails rather than taking over the first.
|
|
99
|
+
|
|
100
|
+
This targets opted-in Claude Code sessions, not arbitrary existing sessions or
|
|
101
|
+
ordinary Claude Desktop chats. Remote Grok runtimes need local tool execution to
|
|
102
|
+
reach the socket; installing an MCP artifact does not establish that connection.
|
|
103
|
+
Claude can use the existing `gbot_send`/`gbot_thread` and `codex_send` tools for
|
|
104
|
+
outgoing messages; its own tool permissions still apply.
|
|
105
|
+
|
|
62
106
|
## Automatic Grok ↔ Codex replies
|
|
63
107
|
|
|
64
108
|
In a native Codex invocation, `gbot_send` sends once and returns a durable exchange
|
|
@@ -159,6 +203,8 @@ gbot codex send <threadId> "Grok here: the build is green, please continue."
|
|
|
159
203
|
|
|
160
204
|
**Which Codex you reach.** `gbot` connects to `$CODEX_HOME/app-server-control/app-server-control.sock` (default `~/.codex/...`) with a built-in WebSocket client. The daemon must be started by `codex app-server daemon start`. `list-threads` shows the threads recorded under `CODEX_HOME` (CLI, TUI, VS Code); `send` uses the resumed thread state and selected busy policy: ordinary sends reject active work, while explicitly selected guarded steering can deliver into the active turn. Method and parameter names are pinned to the Codex release recorded in `src/core/codex-bridge.js` (`codex app-server generate-json-schema`); `status` prints the daemon and CLI versions so a stale daemon is visible, and `codex app-server daemon restart` picks up the installed CLI. Native Windows is not supported yet (AF_UNIX control socket); use WSL, Linux, or macOS.
|
|
161
205
|
|
|
206
|
+
**User machines, not the Grok Bot box.** Codex (and Claude) sessions live on the user's registered computers — for example their Linux desktop or Mac — not on the Grok Bot agent's sandbox VM (`HOME=/home/box`, no Codex install). gbot has **no remote transport**; it only dials a local Unix socket. When this process is on the box, do not call the Codex/Claude MCP tools there — run the `gbot` CLI on the user's machine through **Grok Bot Shell with a machineId**. On that machine, start the daemon with `codex app-server daemon start` (or bootstrap). Auth stays with each machine's native login; gbot does not store or export credentials.
|
|
207
|
+
|
|
162
208
|
**ChatGPT Desktop limitation.** Desktop runs its own private stdio app-server and does not publish the shared control socket, so external clients cannot reach live Desktop tasks. When the socket is absent, `gbot codex status` exits 1 and says so, naming the upstream issues: [openai/codex#41014](https://github.com/openai/codex/issues/41014) and [openai/codex#41112](https://github.com/openai/codex/issues/41112). `gbot` never reads Desktop's temporary `CODEX_APP_TOOLS_PIPE_PATH` sockets under `/tmp/codex-browser-use/`; that channel is private to Desktop.
|
|
163
209
|
|
|
164
210
|
**Pointing Desktop at the managed daemon (macOS).** Desktop injects `codex_app` overrides, so `CODEX_APP_SERVER_USE_LOCAL_DAEMON=1` alone cannot select the managed daemon. The workaround is a `CODEX_CLI_PATH` wrapper that rewrites Desktop's `codex … app-server` spawn into a stdio↔WebSocket bridge onto the managed control socket — no Desktop binary patches, no pipe scraping, no protocol change (`gbot` already speaks that socket). Do not use stock `codex app-server proxy` here: it hangs for Desktop stdio, so the shim ships its own bridge.
|
|
@@ -183,7 +229,7 @@ Current shim limitation: Desktop's spawn-time app-tools MCP `-c` overrides are n
|
|
|
183
229
|
|
|
184
230
|
**Thread discovery.** `list-threads --limit N` (1–200) pages with the opaque `--cursor` from the previous `nextCursor`; JSON keeps the cursor verbatim, text output prints a sanitized `more: --cursor …` hint. Text fields are stripped of terminal control sequences in both outputs (single-line fields also lose line breaks; `preview` keeps its newlines; a structured `source` such as `{ "custom": … }` passes through unchanged), `status` is one of `notLoaded | idle | active | systemError | unknown`, and non-numeric `updatedAt` becomes `null`. Unknown arguments are rejected before the socket is touched; a response that does not match the pinned schema (including an entry without a string `id`) fails with `reason: "bad-response"`.
|
|
185
231
|
|
|
186
|
-
**Routes, attribution, and loops.** `gbot codex send` runs on the machine that owns `CODEX_HOME`, as the user who owns the socket, with that user's Codex credentials; the socket path comes only from `CODEX_HOME`, never from the message or an agent-supplied argument. A cloud-hosted Grok Bot cannot reach a desktop socket
|
|
232
|
+
**Routes, attribution, and loops.** `gbot codex send` runs on the machine that owns `CODEX_HOME`, as the user who owns the socket, with that user's Codex credentials; the socket path comes only from `CODEX_HOME` or `CODEX_APP_SERVER_SOCK`, never from the message or an agent-supplied argument. gbot has no remote transport. A cloud-hosted Grok Bot on the box cannot reach a desktop socket at `/home/box/.codex/...` — use Grok Bot Shell with a machineId to run `gbot` on the user's registered machine (after `codex app-server daemon start` / bootstrap there). `GROK_BOT_CODEX_THREADS=id,id` lets the operator pin `send` to approved threads (`reason: "route-not-allowed"` otherwise). Every send gets a delivery envelope: `messageId` (also sent as Codex's native `clientUserMessageId`), `correlationId` (defaults to the message id), optional `replyTo`, and `hop`. A reply passes the original correlation id and `hop` + 1:
|
|
187
233
|
|
|
188
234
|
```sh
|
|
189
235
|
gbot codex send <threadId> "Grok here: build is green" # receipt: messageId M, correlationId M, hop 0
|
|
@@ -196,7 +242,7 @@ Sends at `hop >= GROK_BOT_MAX_HOPS` (default 4) are refused with `reason: "hop-l
|
|
|
196
242
|
|
|
197
243
|
**Failure modes.** Every `send` and `codex` outcome under `--json` is one document on stdout with `exitCode`; failures include `{ error, delivery, reason, messageId, correlationId, hop, exitCode: 1, … }` and the process exits 1. Framework argument/schema errors remain on stderr and exit 2. `--json` is reserved anywhere before `--`; put `--` before flag-like message text. `reason` values are stable:
|
|
198
244
|
|
|
199
|
-
- `socket-absent` / `permission-denied` / `not-a-socket` / `connect-failed` / `handshake-failed` / `windows-unsupported`: the route is unavailable. Start the daemon, fix the socket, or wait for the upstream Desktop fixes.
|
|
245
|
+
- `socket-absent` / `permission-denied` / `not-a-socket` / `connect-failed` / `handshake-failed` / `windows-unsupported`: the route is unavailable. Start the daemon on the user's machine (`codex app-server daemon start` / bootstrap), fix the socket, or wait for the upstream Desktop fixes. On a Grok Bot box (`HOME=/home/box`), the error explains that gbot has no remote transport and to run `gbot` via Grok Bot Shell with a machineId instead of expecting a box-local Codex socket.
|
|
200
246
|
- `unknown-thread`: use `list-threads`.
|
|
201
247
|
- `external-owner`: a thread with an active writer (VS Code, TUI) is open in another client; close it there first.
|
|
202
248
|
- `busy` / `thread-error` / `unknown-status`: see above.
|
|
@@ -217,6 +263,20 @@ Codex conversation, and managed bridge tools, plus a `talk-to-grok-bot` skill.
|
|
|
217
263
|
The tools bundle this repository's gateway client and worker, so the installed
|
|
218
264
|
plugin does not need `gbot` on `PATH`.
|
|
219
265
|
|
|
266
|
+
Install the committed bundle directly from GitHub without cloning or building it:
|
|
267
|
+
|
|
268
|
+
```sh
|
|
269
|
+
codex plugin marketplace add ScriptedAlchemy/grok-bot-cli
|
|
270
|
+
codex plugin add gbot@gbot-marketplace
|
|
271
|
+
|
|
272
|
+
claude plugin marketplace add ScriptedAlchemy/grok-bot-cli
|
|
273
|
+
claude plugin install gbot@gbot-marketplace
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Cursor users can add `https://github.com/ScriptedAlchemy/grok-bot-cli` as a
|
|
277
|
+
marketplace repository from Customize → Plugins. The repository-root host
|
|
278
|
+
marketplaces all point at the committed `artifact/` bundle.
|
|
279
|
+
|
|
220
280
|
Install the bundled host projections from the same npm package:
|
|
221
281
|
|
|
222
282
|
```sh
|