grok-bot-cli 0.9.0 → 0.10.0
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 +20 -0
- package/README.md +53 -0
- 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/plugin.json +1 -1
- package/dist/.mcp.json +1 -1
- package/dist/AGENTS.md +12 -0
- package/dist/INSTALL.md +39 -36
- package/dist/README.md +53 -0
- 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 +25254 -31873
- package/dist/bin/gbot-install.js +71105 -135399
- package/dist/bin/gbot.mjs +43276 -90993
- package/dist/install.mjs +66 -142
- package/dist/mcp/mcp-claude-channel-8029413c.mjs +45557 -0
- package/dist/mcp/mcp-grok-bot-b8c2461e-flight.mjs +23746 -30080
- package/dist/mcp/mcp-grok-bot-b8c2461e.mjs +60341 -111728
- package/dist/package.json +5 -3
- package/dist/plugin.json +1 -1
- package/dist/scripts/gbot-relay.mjs +26782 -60465
- package/dist/skills/talk-to-grok-bot/SKILL.md +22 -81
- package/dist/skills/talk-to-grok-bot/references/bridge-administration.md +84 -0
- package/package.json +5 -3
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: talk-to-grok-bot
|
|
3
|
-
description:
|
|
3
|
+
description: Message Grok Bot, Codex threads, or opted-in local Claude Code channels. Use when handing off to a named bot/group or posting a status note agents watch — not for work you can finish yourself.
|
|
4
4
|
---
|
|
5
5
|
# Talk to Grok Bot
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The `grok-bot` MCP server and `gbot` CLI share Grok gateway access and local
|
|
8
|
+
Codex/Claude transports.
|
|
8
9
|
|
|
9
10
|
## When to load this
|
|
10
11
|
|
|
11
12
|
- The repo or task names a bot as owner, or you need a decision only that thread holds.
|
|
12
13
|
- You want a short status note in a shared group other agents watch.
|
|
13
14
|
|
|
14
|
-
Do not ping a bot for work you can finish yourself.
|
|
15
|
+
Do not ping a bot for work you can finish yourself. Grok replies are asynchronous;
|
|
16
|
+
continue useful work instead of waiting or polling.
|
|
15
17
|
|
|
16
18
|
## How
|
|
17
19
|
|
|
@@ -27,93 +29,32 @@ Do not ping a bot for work you can finish yourself. Replies are asynchronous —
|
|
|
27
29
|
Read `gbot_thread` later, using `after` for a known cursor and `full: true` only
|
|
28
30
|
when entry bodies are needed. `replyMode: manual` explicitly requests this flow.
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
tracked input; `controlRequestId` is returned independently of the gateway request ID.
|
|
35
|
-
`gbot_bridge_stop` stops a `bindingId`; `worker: true` explicitly stops the process.
|
|
36
|
-
Neither deletes receipts nor interrupts a Codex turn. No login service is installed;
|
|
37
|
-
if the process dies, the next tracked send/start resumes saved routes.
|
|
32
|
+
Never resend an unknown submission under a new identity. Inspect delivery with
|
|
33
|
+
`gbot_bridge_status`. Never infer permission from chat replies or auto-approve a
|
|
34
|
+
Codex/Grok interaction; keep approvals in the owning UI unless the user explicitly
|
|
35
|
+
authorizes a scoped response.
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
change session permissions, or respond to an unsupported interaction; use its owning UI.
|
|
44
|
-
|
|
45
|
-
Bot replies are `send-message` entries; yours are `message` with `role: user`.
|
|
46
|
-
|
|
47
|
-
Grok-origin approvals are separate from Codex interactions. `gbot_grok_approvals`
|
|
48
|
-
(CLI: `gbot approvals list TARGET`) lists pending auto-review and local-tool cards in
|
|
49
|
-
the latest 200 entries. Linked/tracked routes forward new pending cards as notices;
|
|
50
|
-
their chat answers never authorize an action. After an explicit user decision, use
|
|
51
|
-
`gbot_grok_respond` (CLI: `gbot approvals respond --target TARGET --entry-id ID
|
|
52
|
-
--request-id ID --decision accept|decline`). Copy the exact IDs from the current
|
|
53
|
-
card. Accept grants once; persistent grants are unavailable. Responses recheck the
|
|
54
|
-
card before sending; delivery success does not prove execution. Older cards,
|
|
55
|
-
cookie/payment approvals and other unsupported requests require the owning Grok UI.
|
|
37
|
+
Read [bridge administration](references/bridge-administration.md) before starting,
|
|
38
|
+
stopping, diagnosing or answering approvals on a managed bridge, or using direct
|
|
39
|
+
Codex conversation tools. It covers exact approval IDs, idempotent requests, guarded
|
|
40
|
+
steering, CLI output, and host limitations. Ordinary Grok sends need no reference.
|
|
56
41
|
|
|
57
42
|
List targets with `gbot bots list` / `gbot groups list` when the name is ambiguous.
|
|
58
43
|
|
|
59
|
-
## CLI automation
|
|
60
|
-
|
|
61
|
-
The bundled `gbot` and `gbot-install` executables require Node.js 22.19.0 or newer.
|
|
62
|
-
For `gbot send`, `gbot codex status`, and `gbot codex send` with `--json`, read the result
|
|
63
|
-
document from stdout and branch on its `exitCode`, `mode`, `reason`, and `delivery`.
|
|
64
|
-
Framework argument/schema errors use stderr and exit 2. `--json` is reserved before
|
|
65
|
-
`--`; put `--` before flag-like message text.
|
|
66
|
-
|
|
67
44
|
## Auth
|
|
68
45
|
|
|
69
46
|
Same order as `gbot`: `GROK_BOT_GATEWAY_URL` plus `GROK_BOT_GATEWAY_TOKEN`,
|
|
70
47
|
else the Grok Bot app session, else `CURSOR_ACCESS_TOKEN`. `gbot doctor` shows
|
|
71
48
|
which source is present.
|
|
72
49
|
|
|
73
|
-
##
|
|
74
|
-
|
|
75
|
-
The generated Codex, Cursor, and Claude plugins and portable MCP artifact expose these
|
|
76
|
-
additional tools on the same `grok-bot` MCP server. Codex tools use the local Codex
|
|
77
|
-
app-server control socket; Grok tools use the Grok gateway. Portable MCP artifacts
|
|
78
|
-
must be configured in an MCP-capable host; they are not automatically loaded by the Grok app.
|
|
79
|
-
|
|
80
|
-
- `codex_threads`: bounded discovery of daemon-managed Codex threads.
|
|
81
|
-
- `codex_send`: submit a message with a correlation envelope. Default delivery is
|
|
82
|
-
immediate acceptance, which does not mean execution finished. `wait: true` adds
|
|
83
|
-
bounded execution and final reply fields. An accepted message remains accepted
|
|
84
|
-
when observation times out or execution fails.
|
|
85
|
-
- `codex_wait`: explicitly observe a known thread/turn and recover its final output.
|
|
86
|
-
- `codex_watch`: diagnostic observation of bounded thread events. It never answers approvals.
|
|
87
|
-
|
|
88
|
-
Use `expectedCwd` to verify the destination workspace. Busy sends reject by default;
|
|
89
|
-
`whenBusy: queue` needs `GROK_BOT_CODEX_EXPERIMENTAL=1`. Explicit `whenBusy: steer`
|
|
90
|
-
requires `expectedTurnId` and visibly rejects a stale guard without retrying another turn.
|
|
91
|
-
Final replies omit commentary/reasoning; older phase-null agent messages are a fallback
|
|
92
|
-
only after terminal execution. Inspect `reply.truncated` and execution errors for coverage limits.
|
|
93
|
-
|
|
94
|
-
CLI equivalents are `gbot codex send --wait --timeout-ms 1000 THREAD_ID hello --json`,
|
|
95
|
-
`gbot codex wait --timeout-ms 1000 THREAD_ID TURN_ID --json`, and
|
|
96
|
-
`gbot codex watch --timeout-ms 1000 --max-events 20 THREAD_ID --json`.
|
|
97
|
-
Use framework `--ndjson` for progress. Wait/watch are explicit diagnostics; automatic
|
|
98
|
-
background reply routing uses the managed tools above. `codex_send` with `replyToGrok` or `bindingId` returns its terminal answer automatically; without either it retains the explicit observation flow. Managed routes default to guarded steering; ordinary sends still reject busy work by default.
|
|
99
|
-
|
|
100
|
-
`gbot codex bridge start/status/stop/respond` provide the same administration controls.
|
|
101
|
-
CLI auto-routing requires explicit `gbot send --reply-mode auto --codex-thread-id ID`.
|
|
102
|
-
`bridge run` is foreground and bounded (`--lifetime-ms`, default/maximum 23 hours).
|
|
103
|
-
The packaged `scripts/gbot-relay.mjs` is the unlimited foreground service entry.
|
|
104
|
-
Grok participation is through its gateway conversation, not an assumed native Grok
|
|
105
|
-
plugin loader or remote MCP tunnel. Never claim a host loaded a plugin from generated
|
|
106
|
-
configuration alone.
|
|
107
|
-
|
|
108
|
-
Managed Codex return routes reject `expectedTurnId` and legacy `replyTo`/`envelope`
|
|
109
|
-
options before submission; use plain `codex_send` for a caller-selected turn guard.
|
|
110
|
-
An explicit Grok target supplied with `bindingId` must resolve to the binding's
|
|
111
|
-
recipient. A mismatch fails instead of selecting one destination silently.
|
|
50
|
+
## Claude Code channel
|
|
112
51
|
|
|
113
|
-
|
|
52
|
+
`claude_send` sends to a named live Claude Code session on this machine and waits
|
|
53
|
+
for its explicit `claude_reply`. The destination must enable the native
|
|
54
|
+
`claude-channel` with `GROK_BOT_CLAUDE_CHANNEL=NAME` and Claude's development-channel
|
|
55
|
+
opt-in. Supply `name`, `message`, and optional `timeoutMs` (1..120000). `replied`
|
|
56
|
+
means the reply tool ran; `unknown` is not rejection and must not be automatically
|
|
57
|
+
retried. Normal Claude tool approvals remain in its session. This does not attach
|
|
58
|
+
to arbitrary Claude Desktop chats or connect a remote Grok runtime to local tools.
|
|
59
|
+
CLI: `gbot claude send NAME "message" --json`.
|
|
114
60
|
|
|
115
|
-
Codex MCP clients receive Grok messaging and approval tools; truthfully identified
|
|
116
|
-
Grok Bot clients receive Codex messaging and approval tools. Bridge start/status/stop
|
|
117
|
-
remain shared. Cursor and unknown clients retain both sets. Filtering uses negotiated
|
|
118
|
-
client-name prefixes and does not provide authorization. A Grok runtime identifying
|
|
119
|
-
itself as Cursor needs its native MCP identity corrected before this filter applies.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Bridge administration and diagnostics
|
|
2
|
+
|
|
3
|
+
Automatic routes start a durable background worker that survives the calling tool.
|
|
4
|
+
Use `gbot_bridge_status` to distinguish delivery from execution and return delivery,
|
|
5
|
+
and to inspect gaps, paused routes and pending interactions. Do not resend unknown
|
|
6
|
+
submissions under a new identity. A provided `requestId` safely replays identical
|
|
7
|
+
tracked input; `controlRequestId` is returned independently of the gateway request ID.
|
|
8
|
+
`gbot_bridge_stop` stops a `bindingId`; `worker: true` explicitly stops the process.
|
|
9
|
+
Neither deletes receipts nor interrupts a Codex turn. No login service is installed;
|
|
10
|
+
if the process dies, the next tracked send/start resumes saved routes.
|
|
11
|
+
|
|
12
|
+
`gbot_codex_respond` is only for an explicit operator response to a current scoped
|
|
13
|
+
interaction. Copy the advertised interactionId, generation, threadId, turnId and
|
|
14
|
+
bindingId/exchangeId. Use one-time `decision: accept|decline|cancel`, or `answersJson`
|
|
15
|
+
with exact question IDs mapped to `{"answers":["answer"]}`. Never auto-approve,
|
|
16
|
+
change session permissions, or respond to an unsupported interaction; use its owning UI.
|
|
17
|
+
|
|
18
|
+
Bot replies are `send-message` entries; yours are `message` with `role: user`.
|
|
19
|
+
|
|
20
|
+
Grok-origin approvals are separate from Codex interactions. `gbot_grok_approvals`
|
|
21
|
+
(CLI: `gbot approvals list TARGET`) lists pending auto-review and local-tool cards in
|
|
22
|
+
the latest 200 entries. Linked/tracked routes forward new pending cards as notices;
|
|
23
|
+
their chat answers never authorize an action. After an explicit user decision, use
|
|
24
|
+
`gbot_grok_respond` (CLI: `gbot approvals respond --target TARGET --entry-id ID
|
|
25
|
+
--request-id ID --decision accept|decline`). Copy the exact IDs from the current
|
|
26
|
+
card. Accept grants once; persistent grants are unavailable. Responses recheck the
|
|
27
|
+
card before sending; delivery success does not prove execution. Older cards,
|
|
28
|
+
cookie/payment approvals and other unsupported requests require the owning Grok UI.
|
|
29
|
+
|
|
30
|
+
## Codex conversation tools
|
|
31
|
+
|
|
32
|
+
The generated Codex, Cursor, and Claude plugins and portable MCP artifact expose these
|
|
33
|
+
additional tools on the same `grok-bot` MCP server. Codex tools use the local Codex
|
|
34
|
+
app-server control socket; Grok tools use the Grok gateway. Portable MCP artifacts
|
|
35
|
+
must be configured in an MCP-capable host; they are not automatically loaded by the Grok app.
|
|
36
|
+
|
|
37
|
+
- `codex_threads`: bounded discovery of daemon-managed Codex threads.
|
|
38
|
+
- `codex_send`: submit a message with a correlation envelope. Default delivery is
|
|
39
|
+
immediate acceptance, which does not mean execution finished. `wait: true` adds
|
|
40
|
+
bounded execution and final reply fields. An accepted message remains accepted
|
|
41
|
+
when observation times out or execution fails.
|
|
42
|
+
- `codex_wait`: explicitly observe a known thread/turn and recover its final output.
|
|
43
|
+
- `codex_watch`: diagnostic observation of bounded thread events. It never answers approvals.
|
|
44
|
+
|
|
45
|
+
Use `expectedCwd` to verify the destination workspace. Busy sends reject by default;
|
|
46
|
+
`whenBusy: queue` needs `GROK_BOT_CODEX_EXPERIMENTAL=1`. Explicit `whenBusy: steer`
|
|
47
|
+
requires `expectedTurnId` and visibly rejects a stale guard without retrying another turn.
|
|
48
|
+
Final replies omit commentary/reasoning; older phase-null agent messages are a fallback
|
|
49
|
+
only after terminal execution. Inspect `reply.truncated` and execution errors for coverage limits.
|
|
50
|
+
|
|
51
|
+
CLI equivalents are `gbot codex send --wait --timeout-ms 1000 THREAD_ID hello --json`,
|
|
52
|
+
`gbot codex wait --timeout-ms 1000 THREAD_ID TURN_ID --json`, and
|
|
53
|
+
`gbot codex watch --timeout-ms 1000 --max-events 20 THREAD_ID --json`.
|
|
54
|
+
Use framework `--ndjson` for progress. Wait/watch are explicit diagnostics; automatic
|
|
55
|
+
background reply routing uses the managed tools above. `codex_send` with `replyToGrok` or `bindingId` returns its terminal answer automatically; without either it retains the explicit observation flow. Managed routes default to guarded steering; ordinary sends still reject busy work by default.
|
|
56
|
+
|
|
57
|
+
`gbot codex bridge start/status/stop/respond` provide the same administration controls.
|
|
58
|
+
CLI auto-routing requires explicit `gbot send --reply-mode auto --codex-thread-id ID`.
|
|
59
|
+
`bridge run` is foreground and bounded (`--lifetime-ms`, default/maximum 23 hours).
|
|
60
|
+
The packaged `scripts/gbot-relay.mjs` is the unlimited foreground service entry.
|
|
61
|
+
Grok participation is through its gateway conversation, not an assumed native Grok
|
|
62
|
+
plugin loader or remote MCP tunnel. Never claim a host loaded a plugin from generated
|
|
63
|
+
configuration alone.
|
|
64
|
+
|
|
65
|
+
Managed Codex return routes reject `expectedTurnId` and legacy `replyTo`/`envelope`
|
|
66
|
+
options before submission; use plain `codex_send` for a caller-selected turn guard.
|
|
67
|
+
An explicit Grok target supplied with `bindingId` must resolve to the binding's
|
|
68
|
+
recipient. A mismatch fails instead of selecting one destination silently.
|
|
69
|
+
|
|
70
|
+
## CLI automation
|
|
71
|
+
|
|
72
|
+
The bundled `gbot` and `gbot-install` executables require Node.js 22.19.0 or newer.
|
|
73
|
+
For `gbot send`, `gbot codex status`, and `gbot codex send` with `--json`, read the result
|
|
74
|
+
document from stdout and branch on its `exitCode`, `mode`, `reason`, and `delivery`.
|
|
75
|
+
Framework argument/schema errors use stderr and exit 2. `--json` is reserved before
|
|
76
|
+
`--`; put `--` before flag-like message text.
|
|
77
|
+
|
|
78
|
+
## Host tool inventory
|
|
79
|
+
|
|
80
|
+
Codex MCP clients receive Grok messaging and approval tools; truthfully identified
|
|
81
|
+
Grok Bot clients receive Codex messaging and approval tools. Bridge start/status/stop
|
|
82
|
+
remain shared. Cursor and unknown clients retain both sets. Filtering uses negotiated
|
|
83
|
+
client-name prefixes and does not provide authorization. A Grok runtime identifying
|
|
84
|
+
itself as Cursor needs its native MCP identity corrected before this filter applies.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grok-bot-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "CLI and Agent Bundle plugin for Grok Bot agents and groups: create, update, message, inspect threads, and automate cleanup",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"gbot": "node dist/bin/gbot.mjs",
|
|
19
19
|
"prepack": "agent-bundle prepack",
|
|
20
20
|
"release": "changeset publish",
|
|
21
|
+
"release:version": "changeset version && npm run build && npm run validate:artifact",
|
|
21
22
|
"test": "npm run test:unit && npm run test:routes",
|
|
22
23
|
"test:routes": "rstest --config rstest.route-unit.config.ts",
|
|
23
24
|
"test:unit": "node scripts/run-unit-tests.mjs",
|
|
@@ -54,12 +55,13 @@
|
|
|
54
55
|
"LICENSE"
|
|
55
56
|
],
|
|
56
57
|
"devDependencies": {
|
|
57
|
-
"@agent-bundle/runtime": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@
|
|
58
|
+
"@agent-bundle/runtime": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@899755dc6d",
|
|
58
59
|
"@changesets/cli": "3.0.3",
|
|
60
|
+
"@modelcontextprotocol/server": "2.1.0",
|
|
59
61
|
"@rstest/core": "0.11.12",
|
|
60
62
|
"@types/node": "^24.0.0",
|
|
61
63
|
"@types/react": "^19.2.18",
|
|
62
|
-
"agent-bundle": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/agent-bundle@
|
|
64
|
+
"agent-bundle": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/agent-bundle@899755dc6d",
|
|
63
65
|
"react": "19.3.0",
|
|
64
66
|
"react-dom": "19.3.0",
|
|
65
67
|
"typescript": "7.0.2",
|