grok-bot-cli 0.10.1 → 0.11.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.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: chatgpt-desktop
3
+ description: Use the gbot ChatGPT Desktop MCP tools to discover hosts and threads, page/search/read conversations, and send or wait for replies on the user's Mac. Use for local Desktop CDP automation and remote-control thread routing; do not use for ordinary Grok Bot messaging.
4
+ ---
5
+ # ChatGPT Desktop through gbot
6
+
7
+ Use the `chatgpt_desktop_*` MCP tools on the user's Mac. The CLI is a secondary
8
+ surface. CDP listens on `127.0.0.1` only; these tools do not transport CDP to
9
+ another machine.
10
+
11
+ ## Find the right conversation
12
+
13
+ 1. Call `chatgpt_desktop_status`. `reachable: false` or `exitCode: 1` means
14
+ CDP is down: open/send/wait cannot work. `appServerFallback.reachable` is a
15
+ separate list/search/read probe. Do not retry a send because CDP disappeared.
16
+ 2. Call `chatgpt_desktop_list_hosts` for dynamic host IDs, labels, and
17
+ `modelProvider` values. `local` is this Mac. A remote-control host ID looks
18
+ like `remote-control:env_e_...`; its `hostName` may be `null`. Do not infer a
19
+ host name from a project label. Managed SSH hosts may have no threads.
20
+ 3. Use `chatgpt_desktop_list_threads` with `host`, `modelProvider`, or `project`
21
+ as needed. Pass `nextCursor` back as `cursor` with the same filters until it
22
+ is `null`. The cursor refers to a sorted merged inventory; pages normally
23
+ fill `limit` and can stop earlier at the MCP document cap. If the inventory
24
+ changed after a cursor expired, restart without one. Project labels and IDs
25
+ come from Desktop project assignments and workspace roots; `projectRootPath`
26
+ is the resolved root when available.
27
+ `chatgpt_desktop_search_threads` also accepts `cursor`; keep its query and
28
+ filters unchanged. Search matches the full title even when the display row
29
+ has a 200-character `title` and `titleTruncated: true`.
30
+ 4. Read with `chatgpt_desktop_read_thread`. `full: false` gets the recent tail;
31
+ `full: true` pages chronologically from the start. Pass `nextCursor` back
32
+ as `cursor` with the same thread ID and `full` value until `complete: true`.
33
+ The byte budget can stop before `limit`. An oversized turn is returned as
34
+ ordered fragments with one stable `turnKey`; use `continuation.field`,
35
+ `offsetChars`, and `totalChars` to reassemble `text`, `userText`, and
36
+ `assistantText`. `textTruncated: true` signals a fragment, not missing text.
37
+ Check `complete` and `warnings` before treating a page as full history.
38
+
39
+ Durable local IDs are `local:<conversationId>` (a bare conversation ID also
40
+ works). `local:client-new-thread:*` is temporary and works only while that
41
+ conversation remains selected. `REMOTE_THREAD_NOT_LOADED` includes the
42
+ owning `hostId`: read or send through gbot running on that host's own Desktop
43
+ or app-server. The local Mac cannot fetch that remote history through CDP.
44
+
45
+ ## Open, send, and wait
46
+
47
+ - `chatgpt_desktop_open_thread` navigates to a durable conversation even if it
48
+ is absent from the sidebar. An archived route returns `archived: true`; the
49
+ thread remains readable through `chatgpt_desktop_read_thread`.
50
+ - `chatgpt_desktop_send` with `threadId` sends to that conversation. Omit
51
+ `threadId` and `project` to start outside a project. Omit `threadId` and set
52
+ `project` to start inside that project. The tool verifies the empty new-chat
53
+ view and its project selection before typing. Send once. A new-thread receipt may
54
+ include `temporaryThreadId` and resolves `threadId` to the durable
55
+ `local:<conversationId>` before returning. Keep both until the durable ID is
56
+ confirmed; use the durable ID for later work.
57
+ - Then call `chatgpt_desktop_wait_reply` with the returned `threadId` (or the
58
+ selected temporary ID). It returns the reply and durable `conversationId`.
59
+ A timeout is an observation, not permission to resend.
60
+
61
+ `ARCHIVED_THREAD` means send was rejected before submission. Read remains
62
+ available. Pass `unarchive: true` with an existing `threadId` on send only if
63
+ the user wants the archive state changed; this explicitly calls app-server
64
+ `thread/unarchive` and retries once. Never unarchive merely to read or open.
65
+
66
+ `COMPOSER_HAS_DRAFT` means the user's draft would be disturbed; leave it for
67
+ the operator. `PROJECT_UNAVAILABLE` means Desktop disabled a project's new-chat
68
+ action, often because its configured workspace root no longer exists; correct
69
+ the project root in Desktop before retrying. `NEW_CHAT_NAVIGATION_FAILED` means
70
+ the button did not open the requested empty view within three seconds; inspect
71
+ Desktop before retrying. `CDP_UNREACHABLE` requires restoring the local Desktop CDP
72
+ endpoint. App-server failures, including oversized frames, appear as errors or
73
+ read `warnings` with `complete: false`; inspect the partial result and source
74
+ status before continuing. A send with unknown delivery must not be repeated
75
+ without checking the selected thread and reply state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grok-bot-cli",
3
- "version": "0.10.1",
3
+ "version": "0.11.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": {
@@ -58,7 +58,7 @@
58
58
  "@agent-bundle/runtime": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@899755dc6d",
59
59
  "@changesets/cli": "3.0.3",
60
60
  "@modelcontextprotocol/server": "2.1.0",
61
- "@rstest/core": "0.11.12",
61
+ "@rstest/core": "0.12.2",
62
62
  "@types/node": "^24.0.0",
63
63
  "@types/react": "^19.2.18",
64
64
  "agent-bundle": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/agent-bundle@899755dc6d",