grok-bot-cli 0.10.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.
@@ -21558,6 +21558,7 @@ var __webpack_modules__ = {
21558
21558
  var node_net__rspack_import_2 = __webpack_require__("node:net");
21559
21559
  var node_os__rspack_import_3 = __webpack_require__("node:os");
21560
21560
  var node_path__rspack_import_4 = __webpack_require__("node:path");
21561
+ var _user_machine_guidance_js__rspack_import_5 = __webpack_require__("./src/core/user-machine-guidance.js");
21561
21562
  const MAX_BYTES = 65536;
21562
21563
  const FRAME_BYTES = MAX_BYTES * 6 + 1024;
21563
21564
  const defaultDirectory = ()=>(0, node_path__rspack_import_4.join)((0, node_os__rspack_import_3.homedir)(), '.grok-bot-cli', 'claude');
@@ -21568,6 +21569,18 @@ var __webpack_modules__ = {
21568
21569
  if (Buffer.byteLength(path) >= 104) throw Error('Claude channel socket path is too long');
21569
21570
  return path;
21570
21571
  }
21572
+ function absentClaudeChannelMessage(path, directory) {
21573
+ if ((0, _user_machine_guidance_js__rspack_import_5.R)({
21574
+ path,
21575
+ home: directory
21576
+ })) {
21577
+ return [
21578
+ 'No Claude channel socket at ' + path + '.',
21579
+ _user_machine_guidance_js__rspack_import_5.M
21580
+ ].join('\n');
21581
+ }
21582
+ 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).';
21583
+ }
21571
21584
  function messageText(message) {
21572
21585
  if (typeof message !== 'string' || !message.trim() || Buffer.byteLength(message) > MAX_BYTES) throw Error('Message must contain text within 64 KiB');
21573
21586
  return message;
@@ -21701,8 +21714,21 @@ var __webpack_modules__ = {
21701
21714
  const path = socketPath(name, directory);
21702
21715
  messageText(message);
21703
21716
  timeout(timeoutMs);
21704
- await privateDirectory(directory);
21705
- const info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
21717
+ try {
21718
+ await privateDirectory(directory);
21719
+ } catch (error) {
21720
+ if (error && (error.code === 'ENOENT' || /no such file|ENOENT/i.test(String(error.message)))) {
21721
+ throw Error(absentClaudeChannelMessage(path, directory));
21722
+ }
21723
+ throw error;
21724
+ }
21725
+ let info;
21726
+ try {
21727
+ info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
21728
+ } catch (error) {
21729
+ if (error && error.code === 'ENOENT') throw Error(absentClaudeChannelMessage(path, directory));
21730
+ throw error;
21731
+ }
21706
21732
  if (!info.isSocket() || info.uid !== process.getuid() || info.mode & 63) throw Error('Claude channel socket is not private to this user');
21707
21733
  return new Promise((resolve, reject)=>{
21708
21734
  const socket = (0, node_net__rspack_import_2.connect)(path);
@@ -21752,6 +21778,7 @@ var __webpack_modules__ = {
21752
21778
  var _package_json__rspack_import_6 = __webpack_require__("./package.json");
21753
21779
  var _codex_contract_js__rspack_import_7 = __webpack_require__("./src/core/codex/contract.js");
21754
21780
  var _desktop_shim_js__rspack_import_8 = __webpack_require__("./src/core/desktop-shim.js");
21781
+ var _user_machine_guidance_js__rspack_import_9 = __webpack_require__("./src/core/user-machine-guidance.js");
21755
21782
  const PINNED_CODEX_VERSION = "0.154.0";
21756
21783
  const UPSTREAM_DESKTOP_ISSUES = [
21757
21784
  "https://github.com/openai/codex/issues/41014",
@@ -21785,20 +21812,34 @@ var __webpack_modules__ = {
21785
21812
  function singleLine(text) {
21786
21813
  return stripTerminalControls(text).replace(/[\t\n\r\u2028\u2029]+/g, " ");
21787
21814
  }
21788
- function unreachableMessage(path, desktopAttached = "unknown") {
21815
+ function boxUnreachableMessage(path) {
21816
+ return [
21817
+ "No Codex app-server control socket at " + path + ".",
21818
+ _user_machine_guidance_js__rspack_import_9.M
21819
+ ].join("\n");
21820
+ }
21821
+ function unreachableMessage(path, desktopAttached = "unknown", env = process.env) {
21822
+ if ((0, _user_machine_guidance_js__rspack_import_9.R)({
21823
+ path,
21824
+ env,
21825
+ home: env.HOME || (0, node_os__rspack_import_3.homedir)()
21826
+ })) {
21827
+ return boxUnreachableMessage(path);
21828
+ }
21789
21829
  if (desktopAttached === "private-stdio") {
21790
21830
  return [
21791
21831
  "ChatGPT Desktop is running its private stdio app-server, which external clients cannot reach",
21792
21832
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
21793
- "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start`.",
21794
- "gbot codex targets daemon-managed threads only."
21833
+ "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start` (or bootstrap).",
21834
+ "gbot codex targets daemon-managed threads only; gbot has no remote transport."
21795
21835
  ].join("\n");
21796
21836
  }
21797
21837
  return [
21798
21838
  "No Codex app-server control socket at " + path + ".",
21799
- "Either no daemon is running (start one with `codex app-server daemon start`),",
21839
+ "Either no daemon is running (start one with `codex app-server daemon start` or bootstrap),",
21800
21840
  "or ChatGPT Desktop is running a private stdio app-server that external clients cannot reach",
21801
21841
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
21842
+ "gbot connects only to this machine's local socket; it has no remote transport.",
21802
21843
  "gbot codex targets daemon-managed threads only."
21803
21844
  ].join("\n");
21804
21845
  }
@@ -22531,7 +22572,7 @@ var __webpack_modules__ = {
22531
22572
  session = await openSession(env);
22532
22573
  } catch (err) {
22533
22574
  if (err instanceof CodexRouteError) {
22534
- const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached) : err.message;
22575
+ const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached, env) : err.message;
22535
22576
  return (0, _codex_contract_js__rspack_import_7.AQ)({
22536
22577
  ...base,
22537
22578
  reachable: false,
@@ -25812,9 +25853,30 @@ ts() { date -u +%Y-%m-%dT%H:%M:%SZ; }
25812
25853
  fp: ()=>redactSecrets
25813
25854
  });
25814
25855
  },
25856
+ "./src/core/user-machine-guidance.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
25857
+ const USER_MACHINE_CODEX_CLAUDE_GUIDANCE = [
25858
+ "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).",
25859
+ "gbot connects only to a local Unix socket ($CODEX_HOME/app-server-control/app-server-control.sock, or CODEX_APP_SERVER_SOCK). There is no remote transport.",
25860
+ "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).",
25861
+ "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."
25862
+ ].join("\n");
25863
+ function looksLikeGrokBotBox({ path = "", env = process.env, home = env.HOME || "" } = {}) {
25864
+ const values = [
25865
+ home,
25866
+ env.HOME,
25867
+ path
25868
+ ].filter((value)=>value != null && value !== "").map(String);
25869
+ return values.some((value)=>value === "/home/box" || value.startsWith("/home/box/"));
25870
+ }
25871
+ __webpack_require__.d(__webpack_exports__, {
25872
+ R: ()=>looksLikeGrokBotBox
25873
+ }, {
25874
+ M: USER_MACHINE_CODEX_CLAUDE_GUIDANCE
25875
+ });
25876
+ },
25815
25877
  "./package.json" (module) {
25816
25878
  module.exports = {
25817
- "rE": "0.10.0"
25879
+ "rE": "0.10.1"
25818
25880
  };
25819
25881
  }
25820
25882
  };
package/dist/bin/gbot.mjs CHANGED
@@ -39247,11 +39247,11 @@ var __webpack_modules__ = {
39247
39247
  if (import.meta.main) {
39248
39248
  await (0, agent_bundle_cli_entry__rspack_import_1.yA)({
39249
39249
  commands,
39250
- description: "Message Grok Bot from Codex, Claude Code, and Cursor, with managed automatic replies and explicit Codex conversation links.",
39250
+ 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.",
39251
39251
  execute,
39252
39252
  name: "gbot",
39253
39253
  render,
39254
- version: "0.10.0"
39254
+ version: "0.10.1"
39255
39255
  });
39256
39256
  }
39257
39257
  __webpack_require__.d(__webpack_exports__, {}, {
@@ -39472,6 +39472,7 @@ var __webpack_modules__ = {
39472
39472
  var node_net__rspack_import_2 = __webpack_require__("node:net");
39473
39473
  var node_os__rspack_import_3 = __webpack_require__("node:os");
39474
39474
  var node_path__rspack_import_4 = __webpack_require__("node:path");
39475
+ var _user_machine_guidance_js__rspack_import_5 = __webpack_require__("./src/core/user-machine-guidance.js");
39475
39476
  const MAX_BYTES = 65536;
39476
39477
  const FRAME_BYTES = MAX_BYTES * 6 + 1024;
39477
39478
  const defaultDirectory = ()=>(0, node_path__rspack_import_4.join)((0, node_os__rspack_import_3.homedir)(), '.grok-bot-cli', 'claude');
@@ -39482,6 +39483,18 @@ var __webpack_modules__ = {
39482
39483
  if (Buffer.byteLength(path) >= 104) throw Error('Claude channel socket path is too long');
39483
39484
  return path;
39484
39485
  }
39486
+ function absentClaudeChannelMessage(path, directory) {
39487
+ if ((0, _user_machine_guidance_js__rspack_import_5.R)({
39488
+ path,
39489
+ home: directory
39490
+ })) {
39491
+ return [
39492
+ 'No Claude channel socket at ' + path + '.',
39493
+ _user_machine_guidance_js__rspack_import_5.M
39494
+ ].join('\n');
39495
+ }
39496
+ 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).';
39497
+ }
39485
39498
  function messageText(message) {
39486
39499
  if (typeof message !== 'string' || !message.trim() || Buffer.byteLength(message) > MAX_BYTES) throw Error('Message must contain text within 64 KiB');
39487
39500
  return message;
@@ -39615,8 +39628,21 @@ var __webpack_modules__ = {
39615
39628
  const path = socketPath(name, directory);
39616
39629
  messageText(message);
39617
39630
  timeout(timeoutMs);
39618
- await privateDirectory(directory);
39619
- const info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
39631
+ try {
39632
+ await privateDirectory(directory);
39633
+ } catch (error) {
39634
+ if (error && (error.code === 'ENOENT' || /no such file|ENOENT/i.test(String(error.message)))) {
39635
+ throw Error(absentClaudeChannelMessage(path, directory));
39636
+ }
39637
+ throw error;
39638
+ }
39639
+ let info;
39640
+ try {
39641
+ info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
39642
+ } catch (error) {
39643
+ if (error && error.code === 'ENOENT') throw Error(absentClaudeChannelMessage(path, directory));
39644
+ throw error;
39645
+ }
39620
39646
  if (!info.isSocket() || info.uid !== process.getuid() || info.mode & 63) throw Error('Claude channel socket is not private to this user');
39621
39647
  return new Promise((resolve, reject)=>{
39622
39648
  const socket = (0, node_net__rspack_import_2.connect)(path);
@@ -39666,6 +39692,7 @@ var __webpack_modules__ = {
39666
39692
  var _package_json__rspack_import_6 = __webpack_require__("./package.json");
39667
39693
  var _codex_contract_js__rspack_import_7 = __webpack_require__("./src/core/codex/contract.js");
39668
39694
  var _desktop_shim_js__rspack_import_8 = __webpack_require__("./src/core/desktop-shim.js");
39695
+ var _user_machine_guidance_js__rspack_import_9 = __webpack_require__("./src/core/user-machine-guidance.js");
39669
39696
  const PINNED_CODEX_VERSION = "0.154.0";
39670
39697
  const UPSTREAM_DESKTOP_ISSUES = [
39671
39698
  "https://github.com/openai/codex/issues/41014",
@@ -39699,20 +39726,34 @@ var __webpack_modules__ = {
39699
39726
  function singleLine(text) {
39700
39727
  return stripTerminalControls(text).replace(/[\t\n\r\u2028\u2029]+/g, " ");
39701
39728
  }
39702
- function unreachableMessage(path, desktopAttached = "unknown") {
39729
+ function boxUnreachableMessage(path) {
39730
+ return [
39731
+ "No Codex app-server control socket at " + path + ".",
39732
+ _user_machine_guidance_js__rspack_import_9.M
39733
+ ].join("\n");
39734
+ }
39735
+ function unreachableMessage(path, desktopAttached = "unknown", env = process.env) {
39736
+ if ((0, _user_machine_guidance_js__rspack_import_9.R)({
39737
+ path,
39738
+ env,
39739
+ home: env.HOME || (0, node_os__rspack_import_3.homedir)()
39740
+ })) {
39741
+ return boxUnreachableMessage(path);
39742
+ }
39703
39743
  if (desktopAttached === "private-stdio") {
39704
39744
  return [
39705
39745
  "ChatGPT Desktop is running its private stdio app-server, which external clients cannot reach",
39706
39746
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
39707
- "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start`.",
39708
- "gbot codex targets daemon-managed threads only."
39747
+ "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start` (or bootstrap).",
39748
+ "gbot codex targets daemon-managed threads only; gbot has no remote transport."
39709
39749
  ].join("\n");
39710
39750
  }
39711
39751
  return [
39712
39752
  "No Codex app-server control socket at " + path + ".",
39713
- "Either no daemon is running (start one with `codex app-server daemon start`),",
39753
+ "Either no daemon is running (start one with `codex app-server daemon start` or bootstrap),",
39714
39754
  "or ChatGPT Desktop is running a private stdio app-server that external clients cannot reach",
39715
39755
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
39756
+ "gbot connects only to this machine's local socket; it has no remote transport.",
39716
39757
  "gbot codex targets daemon-managed threads only."
39717
39758
  ].join("\n");
39718
39759
  }
@@ -40445,7 +40486,7 @@ var __webpack_modules__ = {
40445
40486
  session = await openSession(env);
40446
40487
  } catch (err) {
40447
40488
  if (err instanceof CodexRouteError) {
40448
- const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached) : err.message;
40489
+ const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached, env) : err.message;
40449
40490
  return (0, _codex_contract_js__rspack_import_7.AQ)({
40450
40491
  ...base,
40451
40492
  reachable: false,
@@ -43726,9 +43767,30 @@ ts() { date -u +%Y-%m-%dT%H:%M:%SZ; }
43726
43767
  fp: ()=>redactSecrets
43727
43768
  });
43728
43769
  },
43770
+ "./src/core/user-machine-guidance.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
43771
+ const USER_MACHINE_CODEX_CLAUDE_GUIDANCE = [
43772
+ "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).",
43773
+ "gbot connects only to a local Unix socket ($CODEX_HOME/app-server-control/app-server-control.sock, or CODEX_APP_SERVER_SOCK). There is no remote transport.",
43774
+ "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).",
43775
+ "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."
43776
+ ].join("\n");
43777
+ function looksLikeGrokBotBox({ path = "", env = process.env, home = env.HOME || "" } = {}) {
43778
+ const values = [
43779
+ home,
43780
+ env.HOME,
43781
+ path
43782
+ ].filter((value)=>value != null && value !== "").map(String);
43783
+ return values.some((value)=>value === "/home/box" || value.startsWith("/home/box/"));
43784
+ }
43785
+ __webpack_require__.d(__webpack_exports__, {
43786
+ R: ()=>looksLikeGrokBotBox
43787
+ }, {
43788
+ M: USER_MACHINE_CODEX_CLAUDE_GUIDANCE
43789
+ });
43790
+ },
43729
43791
  "./package.json" (module) {
43730
43792
  module.exports = {
43731
- "rE": "0.10.0"
43793
+ "rE": "0.10.1"
43732
43794
  };
43733
43795
  }
43734
43796
  };
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.1";
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
+ "gbot connects only to a local Unix socket ($CODEX_HOME/app-server-control/app-server-control.sock, or CODEX_APP_SERVER_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__ = {};
@@ -8654,7 +8654,7 @@ var __webpack_modules__ = {
8654
8654
  var _core_claude_routes_js__rspack_import_2 = __webpack_require__("./src/core/claude-routes.ts");
8655
8655
  const __rspack_default_export = (0, agent_bundle_routes__rspack_import_1.uO)({
8656
8656
  title: 'Message Claude Code',
8657
- description: 'Send to a named, opted-in live Claude Code channel and wait for its reply. Unknown delivery must not be retried automatically.',
8657
+ description: 'Send to a named, opted-in live Claude Code channel and wait for its reply. Unknown delivery must not be retried automatically. Runs on the user\'s registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.',
8658
8658
  annotations: {
8659
8659
  readOnlyHint: false
8660
8660
  },
@@ -8724,7 +8724,7 @@ var __webpack_modules__ = {
8724
8724
  excludeClients: [
8725
8725
  'codex'
8726
8726
  ],
8727
- description: 'Send to Codex. With replyToGrok or bindingId, managed delivery returns the terminal answer to Grok automatically. Otherwise optional wait observes completion and explicit steer requires expectedTurnId. Acceptance is not completion.',
8727
+ description: 'Send to a Codex thread. Runs on the user\'s registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport. With replyToGrok or bindingId, managed delivery returns the terminal answer to Grok automatically. Otherwise optional wait observes completion and explicit steer requires expectedTurnId. Acceptance is not completion.',
8728
8728
  title: 'Codex send',
8729
8729
  annotations: {
8730
8730
  readOnlyHint: false
@@ -8835,7 +8835,7 @@ var __webpack_modules__ = {
8835
8835
  excludeClients: [
8836
8836
  'codex'
8837
8837
  ],
8838
- description: 'Discover a bounded page of Codex daemon threads.',
8838
+ description: 'Discover a bounded page of Codex daemon threads. Runs on the user\'s registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.',
8839
8839
  title: 'Codex threads',
8840
8840
  annotations: {
8841
8841
  readOnlyHint: true
@@ -8886,7 +8886,7 @@ var __webpack_modules__ = {
8886
8886
  excludeClients: [
8887
8887
  'codex'
8888
8888
  ],
8889
- description: 'Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.',
8889
+ description: 'Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it. Runs on the user\'s registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.',
8890
8890
  title: 'Codex wait',
8891
8891
  annotations: {
8892
8892
  readOnlyHint: true
@@ -8955,7 +8955,7 @@ var __webpack_modules__ = {
8955
8955
  excludeClients: [
8956
8956
  'codex'
8957
8957
  ],
8958
- description: 'Watch bounded Codex thread events for diagnostics without answering approvals.',
8958
+ description: 'Watch bounded Codex thread events for diagnostics without answering approvals. Runs on the user\'s registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.',
8959
8959
  title: 'Codex watch',
8960
8960
  annotations: {
8961
8961
  readOnlyHint: true
@@ -20235,6 +20235,7 @@ var __webpack_modules__ = {
20235
20235
  var node_net__rspack_import_2 = __webpack_require__("node:net");
20236
20236
  var node_os__rspack_import_3 = __webpack_require__("node:os");
20237
20237
  var node_path__rspack_import_4 = __webpack_require__("node:path");
20238
+ var _user_machine_guidance_js__rspack_import_5 = __webpack_require__("./src/core/user-machine-guidance.js");
20238
20239
  const MAX_BYTES = 65536;
20239
20240
  const FRAME_BYTES = MAX_BYTES * 6 + 1024;
20240
20241
  const defaultDirectory = ()=>(0, node_path__rspack_import_4.join)((0, node_os__rspack_import_3.homedir)(), '.grok-bot-cli', 'claude');
@@ -20245,6 +20246,18 @@ var __webpack_modules__ = {
20245
20246
  if (Buffer.byteLength(path) >= 104) throw Error('Claude channel socket path is too long');
20246
20247
  return path;
20247
20248
  }
20249
+ function absentClaudeChannelMessage(path, directory) {
20250
+ if ((0, _user_machine_guidance_js__rspack_import_5.R)({
20251
+ path,
20252
+ home: directory
20253
+ })) {
20254
+ return [
20255
+ 'No Claude channel socket at ' + path + '.',
20256
+ _user_machine_guidance_js__rspack_import_5.M
20257
+ ].join('\n');
20258
+ }
20259
+ 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).';
20260
+ }
20248
20261
  function messageText(message) {
20249
20262
  if (typeof message !== 'string' || !message.trim() || Buffer.byteLength(message) > MAX_BYTES) throw Error('Message must contain text within 64 KiB');
20250
20263
  return message;
@@ -20378,8 +20391,21 @@ var __webpack_modules__ = {
20378
20391
  const path = socketPath(name, directory);
20379
20392
  messageText(message);
20380
20393
  timeout(timeoutMs);
20381
- await privateDirectory(directory);
20382
- const info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
20394
+ try {
20395
+ await privateDirectory(directory);
20396
+ } catch (error) {
20397
+ if (error && (error.code === 'ENOENT' || /no such file|ENOENT/i.test(String(error.message)))) {
20398
+ throw Error(absentClaudeChannelMessage(path, directory));
20399
+ }
20400
+ throw error;
20401
+ }
20402
+ let info;
20403
+ try {
20404
+ info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
20405
+ } catch (error) {
20406
+ if (error && error.code === 'ENOENT') throw Error(absentClaudeChannelMessage(path, directory));
20407
+ throw error;
20408
+ }
20383
20409
  if (!info.isSocket() || info.uid !== process.getuid() || info.mode & 63) throw Error('Claude channel socket is not private to this user');
20384
20410
  return new Promise((resolve, reject)=>{
20385
20411
  const socket = (0, node_net__rspack_import_2.connect)(path);
@@ -20429,6 +20455,7 @@ var __webpack_modules__ = {
20429
20455
  var _package_json__rspack_import_6 = __webpack_require__("./package.json");
20430
20456
  var _codex_contract_js__rspack_import_7 = __webpack_require__("./src/core/codex/contract.js");
20431
20457
  var _desktop_shim_js__rspack_import_8 = __webpack_require__("./src/core/desktop-shim.js");
20458
+ var _user_machine_guidance_js__rspack_import_9 = __webpack_require__("./src/core/user-machine-guidance.js");
20432
20459
  const PINNED_CODEX_VERSION = "0.154.0";
20433
20460
  const UPSTREAM_DESKTOP_ISSUES = [
20434
20461
  "https://github.com/openai/codex/issues/41014",
@@ -20462,20 +20489,34 @@ var __webpack_modules__ = {
20462
20489
  function singleLine(text) {
20463
20490
  return stripTerminalControls(text).replace(/[\t\n\r\u2028\u2029]+/g, " ");
20464
20491
  }
20465
- function unreachableMessage(path, desktopAttached = "unknown") {
20492
+ function boxUnreachableMessage(path) {
20493
+ return [
20494
+ "No Codex app-server control socket at " + path + ".",
20495
+ _user_machine_guidance_js__rspack_import_9.M
20496
+ ].join("\n");
20497
+ }
20498
+ function unreachableMessage(path, desktopAttached = "unknown", env = process.env) {
20499
+ if ((0, _user_machine_guidance_js__rspack_import_9.R)({
20500
+ path,
20501
+ env,
20502
+ home: env.HOME || (0, node_os__rspack_import_3.homedir)()
20503
+ })) {
20504
+ return boxUnreachableMessage(path);
20505
+ }
20466
20506
  if (desktopAttached === "private-stdio") {
20467
20507
  return [
20468
20508
  "ChatGPT Desktop is running its private stdio app-server, which external clients cannot reach",
20469
20509
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
20470
- "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start`.",
20471
- "gbot codex targets daemon-managed threads only."
20510
+ "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start` (or bootstrap).",
20511
+ "gbot codex targets daemon-managed threads only; gbot has no remote transport."
20472
20512
  ].join("\n");
20473
20513
  }
20474
20514
  return [
20475
20515
  "No Codex app-server control socket at " + path + ".",
20476
- "Either no daemon is running (start one with `codex app-server daemon start`),",
20516
+ "Either no daemon is running (start one with `codex app-server daemon start` or bootstrap),",
20477
20517
  "or ChatGPT Desktop is running a private stdio app-server that external clients cannot reach",
20478
20518
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
20519
+ "gbot connects only to this machine's local socket; it has no remote transport.",
20479
20520
  "gbot codex targets daemon-managed threads only."
20480
20521
  ].join("\n");
20481
20522
  }
@@ -21208,7 +21249,7 @@ var __webpack_modules__ = {
21208
21249
  session = await openSession(env);
21209
21250
  } catch (err) {
21210
21251
  if (err instanceof CodexRouteError) {
21211
- const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached) : err.message;
21252
+ const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached, env) : err.message;
21212
21253
  return withStatusExitCode({
21213
21254
  ...base,
21214
21255
  reachable: false,
@@ -24135,9 +24176,30 @@ ts() { date -u +%Y-%m-%dT%H:%M:%SZ; }
24135
24176
  fp: ()=>redactSecrets
24136
24177
  });
24137
24178
  },
24179
+ "./src/core/user-machine-guidance.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
24180
+ const USER_MACHINE_CODEX_CLAUDE_GUIDANCE = [
24181
+ "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).",
24182
+ "gbot connects only to a local Unix socket ($CODEX_HOME/app-server-control/app-server-control.sock, or CODEX_APP_SERVER_SOCK). There is no remote transport.",
24183
+ "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).",
24184
+ "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."
24185
+ ].join("\n");
24186
+ function looksLikeGrokBotBox({ path = "", env = process.env, home = env.HOME || "" } = {}) {
24187
+ const values = [
24188
+ home,
24189
+ env.HOME,
24190
+ path
24191
+ ].filter((value)=>value != null && value !== "").map(String);
24192
+ return values.some((value)=>value === "/home/box" || value.startsWith("/home/box/"));
24193
+ }
24194
+ __webpack_require__.d(__webpack_exports__, {
24195
+ R: ()=>looksLikeGrokBotBox
24196
+ }, {
24197
+ M: USER_MACHINE_CODEX_CLAUDE_GUIDANCE
24198
+ });
24199
+ },
24138
24200
  "./package.json" (module) {
24139
24201
  module.exports = {
24140
- "rE": "0.10.0"
24202
+ "rE": "0.10.1"
24141
24203
  };
24142
24204
  }
24143
24205
  };
@@ -24226,7 +24288,7 @@ globalThis.__rspack_rsc_manifest__ ??= Object.freeze({
24226
24288
  });
24227
24289
  if (node_worker_threads__rspack_import_0.parentPort === null) throw new Error('Generated Flight worker requires a parent port.');
24228
24290
  process.stdout.write = process.stderr.write.bind(process.stderr);
24229
- const ARTIFACT_EPOCH = "gbot@0.10.0";
24291
+ const ARTIFACT_EPOCH = "gbot@0.10.1";
24230
24292
  const processLifetime = {
24231
24293
  hits: 0,
24232
24294
  instanceId: crypto.randomUUID(),
@@ -24243,7 +24305,7 @@ const routes = Object.freeze({
24243
24305
  "annotations": {
24244
24306
  "readOnlyHint": false
24245
24307
  },
24246
- "description": "Send to a named, opted-in live Claude Code channel and wait for its reply. Unknown delivery must not be retried automatically.",
24308
+ "description": "Send to a named, opted-in live Claude Code channel and wait for its reply. Unknown delivery must not be retried automatically. Runs on the user's registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.",
24247
24309
  "inputJsonSchema": {
24248
24310
  "additionalProperties": false,
24249
24311
  "properties": {
@@ -24279,7 +24341,7 @@ const routes = Object.freeze({
24279
24341
  "annotations": {
24280
24342
  "readOnlyHint": false
24281
24343
  },
24282
- "description": "Send to Codex. With replyToGrok or bindingId, managed delivery returns the terminal answer to Grok automatically. Otherwise optional wait observes completion and explicit steer requires expectedTurnId. Acceptance is not completion.",
24344
+ "description": "Send to a Codex thread. Runs on the user's registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport. With replyToGrok or bindingId, managed delivery returns the terminal answer to Grok automatically. Otherwise optional wait observes completion and explicit steer requires expectedTurnId. Acceptance is not completion.",
24283
24345
  "excludeClients": [
24284
24346
  "codex"
24285
24347
  ],
@@ -24360,7 +24422,7 @@ const routes = Object.freeze({
24360
24422
  "annotations": {
24361
24423
  "readOnlyHint": true
24362
24424
  },
24363
- "description": "Discover a bounded page of Codex daemon threads.",
24425
+ "description": "Discover a bounded page of Codex daemon threads. Runs on the user's registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.",
24364
24426
  "excludeClients": [
24365
24427
  "codex"
24366
24428
  ],
@@ -24394,7 +24456,7 @@ const routes = Object.freeze({
24394
24456
  "annotations": {
24395
24457
  "readOnlyHint": true
24396
24458
  },
24397
- "description": "Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.",
24459
+ "description": "Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it. Runs on the user's registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.",
24398
24460
  "excludeClients": [
24399
24461
  "codex"
24400
24462
  ],
@@ -24444,7 +24506,7 @@ const routes = Object.freeze({
24444
24506
  "annotations": {
24445
24507
  "readOnlyHint": true
24446
24508
  },
24447
- "description": "Watch bounded Codex thread events for diagnostics without answering approvals.",
24509
+ "description": "Watch bounded Codex thread events for diagnostics without answering approvals. Runs on the user's registered machine via its local socket, not the Grok Bot box. From the box, use Grok Bot Shell with a machineId to run gbot there after codex app-server daemon start or bootstrap; gbot has no remote transport.",
24448
24510
  "excludeClients": [
24449
24511
  "codex"
24450
24512
  ],