grok-bot-cli 0.10.0 → 0.10.2

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,2 @@
1
+
2
+ Use the local `gbot codex send` CLI command to send $ARGUMENTS. Include `--expected-cwd` when the destination directory matters. Show the delivery receipt and distinguish acceptance from completion. If Codex is on another machine, use Grok Bot Shell with that machineId to run gbot there.
@@ -0,0 +1,2 @@
1
+
2
+ Run `gbot codex list-threads --json` locally and summarize the thread IDs, directories, and statuses. If Codex runs on another machine, use Grok Bot Shell with that machineId to run gbot there.
@@ -0,0 +1,2 @@
1
+
2
+ Run `gbot codex wait $ARGUMENTS --json` on the same machine as Codex. Report the execution state and final reply. For long turns, pass `--timeout-ms` with a suitable duration, up to 7200000 milliseconds.
package/dist/install.mjs CHANGED
@@ -7,7 +7,7 @@ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'nod
7
7
  import { fileURLToPath } from 'node:url';
8
8
 
9
9
  const pluginName = "gbot";
10
- const pluginVersion = "0.10.0";
10
+ const pluginVersion = "0.10.2";
11
11
  const receiptFile = ".agent-bundle-install.json";
12
12
  const receiptFormat = "agent-bundle-install-receipt/2";
13
13
  const preservedEntries = ["state"];
@@ -45215,6 +45215,7 @@ var __webpack_modules__ = {
45215
45215
  var node_net__rspack_import_2 = __webpack_require__("node:net");
45216
45216
  var node_os__rspack_import_3 = __webpack_require__("node:os");
45217
45217
  var node_path__rspack_import_4 = __webpack_require__("node:path");
45218
+ var _user_machine_guidance_js__rspack_import_5 = __webpack_require__("./src/core/user-machine-guidance.js");
45218
45219
  const MAX_BYTES = 65536;
45219
45220
  const FRAME_BYTES = MAX_BYTES * 6 + 1024;
45220
45221
  const defaultDirectory = ()=>(0, node_path__rspack_import_4.join)((0, node_os__rspack_import_3.homedir)(), '.grok-bot-cli', 'claude');
@@ -45225,6 +45226,18 @@ var __webpack_modules__ = {
45225
45226
  if (Buffer.byteLength(path) >= 104) throw Error('Claude channel socket path is too long');
45226
45227
  return path;
45227
45228
  }
45229
+ function absentClaudeChannelMessage(path, directory) {
45230
+ if (looksLikeGrokBotBox({
45231
+ path,
45232
+ home: directory
45233
+ })) {
45234
+ return [
45235
+ 'No Claude channel socket at ' + path + '.',
45236
+ USER_MACHINE_CODEX_CLAUDE_GUIDANCE
45237
+ ].join('\n');
45238
+ }
45239
+ return 'No Claude channel socket at ' + path + '. Start an opted-in Claude Code session with GROK_BOT_CLAUDE_CHANNEL on this machine (gbot has no remote transport).';
45240
+ }
45228
45241
  function messageText(message) {
45229
45242
  if (typeof message !== 'string' || !message.trim() || Buffer.byteLength(message) > MAX_BYTES) throw Error('Message must contain text within 64 KiB');
45230
45243
  return message;
@@ -45358,8 +45371,21 @@ var __webpack_modules__ = {
45358
45371
  const path = socketPath(name, directory);
45359
45372
  messageText(message);
45360
45373
  timeout(timeoutMs);
45361
- await privateDirectory(directory);
45362
- const info = await lstat(path);
45374
+ try {
45375
+ await privateDirectory(directory);
45376
+ } catch (error) {
45377
+ if (error && (error.code === 'ENOENT' || /no such file|ENOENT/i.test(String(error.message)))) {
45378
+ throw Error(absentClaudeChannelMessage(path, directory));
45379
+ }
45380
+ throw error;
45381
+ }
45382
+ let info;
45383
+ try {
45384
+ info = await lstat(path);
45385
+ } catch (error) {
45386
+ if (error && error.code === 'ENOENT') throw Error(absentClaudeChannelMessage(path, directory));
45387
+ throw error;
45388
+ }
45363
45389
  if (!info.isSocket() || info.uid !== process.getuid() || info.mode & 63) throw Error('Claude channel socket is not private to this user');
45364
45390
  return new Promise((resolve, reject)=>{
45365
45391
  const socket = connect(path);
@@ -45398,6 +45424,22 @@ var __webpack_modules__ = {
45398
45424
  __webpack_require__.d(__webpack_exports__, {
45399
45425
  u: ()=>openClaudeChannel
45400
45426
  });
45427
+ },
45428
+ "./src/core/user-machine-guidance.js" () {
45429
+ const USER_MACHINE_CODEX_CLAUDE_GUIDANCE1 = [
45430
+ "Codex and Claude sessions live on the user's registered machines (for example their Linux desktop or Mac), not on the Grok Bot agent box (/home/box).",
45431
+ "Codex must run on the same machine as gbot. Set CODEX_APP_SERVER_SOCK to an existing local control socket, or use $CODEX_HOME/app-server-control/app-server-control.sock. There is no remote transport.",
45432
+ "When running on the box (HOME=/home/box), do not call codex_* or claude_send there. Run the gbot CLI on the user's machine through Grok Bot Shell with a machineId (the host's machine-targeted shell).",
45433
+ "On that machine, provide the socket with `codex app-server daemon start` (or bootstrap). Auth stays with each machine's native Codex or Claude login; gbot does not store or export credentials."
45434
+ ].join("\n");
45435
+ function looksLikeGrokBotBox1({ path = "", env = process.env, home = env.HOME || "" } = {}) {
45436
+ const values = [
45437
+ home,
45438
+ env.HOME,
45439
+ path
45440
+ ].filter((value)=>value != null && value !== "").map(String);
45441
+ return values.some((value)=>value === "/home/box" || value.startsWith("/home/box/"));
45442
+ }
45401
45443
  }
45402
45444
  };
45403
45445
  var __webpack_module_cache__ = {};