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.
@@ -8137,13 +8137,22 @@ var __webpack_modules__ = {
8137
8137
  const observationFields = {
8138
8138
  expectedCwd: zod__rspack_import_3.YjP().min(1).optional(),
8139
8139
  threadId: id,
8140
- timeoutMs: zod__rspack_import_3.aig().int().min(1).max(600000).optional()
8140
+ timeoutMs: zod__rspack_import_3.aig().int().min(1).max(7200000).optional()
8141
8141
  };
8142
8142
  const sendFields = {
8143
8143
  ...observationFields,
8144
8144
  correlationId: id.optional(),
8145
8145
  envelope: zod__rspack_import_3.zMY().optional(),
8146
8146
  hop: zod__rspack_import_3.aig().int().min(0).optional(),
8147
+ model: zod__rspack_import_3.YjP().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/).optional(),
8148
+ effort: zod__rspack_import_3.k5n([
8149
+ 'none',
8150
+ 'minimal',
8151
+ 'low',
8152
+ 'medium',
8153
+ 'high',
8154
+ 'xhigh'
8155
+ ]).optional(),
8147
8156
  replyTo: id.optional(),
8148
8157
  expectedTurnId: id.optional(),
8149
8158
  whenBusy: zod__rspack_import_3.k5n([
@@ -8165,7 +8174,9 @@ var __webpack_modules__ = {
8165
8174
  maxOutputBytes: zod__rspack_import_3.aig().int().min(1).max(4194304).optional()
8166
8175
  }).strict();
8167
8176
  const watchSchema = zod__rspack_import_3.Ikc({
8168
- ...observationFields,
8177
+ expectedCwd: zod__rspack_import_3.YjP().min(1).optional(),
8178
+ threadId: id,
8179
+ timeoutMs: zod__rspack_import_3.aig().int().min(1).max(600000).optional(),
8169
8180
  maxEvents: zod__rspack_import_3.aig().int().min(1).max(500).default(100)
8170
8181
  }).strict();
8171
8182
  const threadsSchema = zod__rspack_import_3.Ikc({
@@ -8222,6 +8233,8 @@ var __webpack_modules__ = {
8222
8233
  envelope,
8223
8234
  whenBusy: input.whenBusy,
8224
8235
  expectedCwd: input.expectedCwd,
8236
+ model: input.model,
8237
+ effort: input.effort,
8225
8238
  signal
8226
8239
  });
8227
8240
  }
@@ -8234,7 +8247,9 @@ var __webpack_modules__ = {
8234
8247
  receipt = await conversation.send(input.message, {
8235
8248
  envelope,
8236
8249
  whenBusy: input.whenBusy,
8237
- expectedTurnId: input.expectedTurnId
8250
+ expectedTurnId: input.expectedTurnId,
8251
+ model: input.model,
8252
+ effort: input.effort
8238
8253
  });
8239
8254
  if (!input.wait || receipt.delivery !== 'accepted' || !receipt.turnId) return receipt;
8240
8255
  await progress?.(`Accepted message ${receipt.messageId}; observing turn ${receipt.turnId}`);
@@ -8525,7 +8540,9 @@ var __webpack_modules__ = {
8525
8540
  requestId: input.requestId,
8526
8541
  busyPolicy: input.whenBusy,
8527
8542
  hop: input.hop,
8528
- correlationId: input.correlationId
8543
+ correlationId: input.correlationId,
8544
+ model: input.model,
8545
+ effort: input.effort
8529
8546
  }, options(context)));
8530
8547
  }
8531
8548
  __webpack_require__.d(__webpack_exports__, {
@@ -8654,7 +8671,7 @@ var __webpack_modules__ = {
8654
8671
  var _core_claude_routes_js__rspack_import_2 = __webpack_require__("./src/core/claude-routes.ts");
8655
8672
  const __rspack_default_export = (0, agent_bundle_routes__rspack_import_1.uO)({
8656
8673
  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.',
8674
+ 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
8675
  annotations: {
8659
8676
  readOnlyHint: false
8660
8677
  },
@@ -8697,6 +8714,91 @@ var __webpack_modules__ = {
8697
8714
  "default": __rspack_default_export
8698
8715
  });
8699
8716
  },
8717
+ "./src/mcp/grok-bot/tools/codex_new.tsx" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
8718
+ __webpack_require__.r(__webpack_exports__);
8719
+ var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.react-server.js");
8720
+ var _agent_bundle_runtime__rspack_import_6 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
8721
+ var agent_bundle_routes__rspack_import_1 = __webpack_require__("./node_modules/agent-bundle/dist/routes.js");
8722
+ var zod__rspack_import_5 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
8723
+ var _core_codex_bridge_js__rspack_import_2 = __webpack_require__("./src/core/codex-bridge.js");
8724
+ var _core_codex_contract_js__rspack_import_3 = __webpack_require__("./src/core/codex/contract.js");
8725
+ var _core_codex_routes_js__rspack_import_4 = __webpack_require__("./src/core/codex/routes.ts");
8726
+ const inputSchema = zod__rspack_import_5.Ikc({
8727
+ cwd: zod__rspack_import_5.YjP().min(1),
8728
+ expectedCwd: zod__rspack_import_5.YjP().min(1).optional(),
8729
+ model: zod__rspack_import_5.YjP().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/).optional(),
8730
+ effort: zod__rspack_import_5.k5n([
8731
+ 'none',
8732
+ 'minimal',
8733
+ 'low',
8734
+ 'medium',
8735
+ 'high',
8736
+ 'xhigh'
8737
+ ]).optional(),
8738
+ message: zod__rspack_import_5.YjP().min(1).optional()
8739
+ }).strict();
8740
+ const __rspack_default_export = (0, agent_bundle_routes__rspack_import_1.uO)({
8741
+ excludeClients: [
8742
+ 'codex'
8743
+ ],
8744
+ title: 'Codex new thread',
8745
+ description: 'Start a new Codex thread on this machine in cwd, optionally sending its first message. Codex must run locally on the same machine as gbot.',
8746
+ annotations: {
8747
+ readOnlyHint: false
8748
+ },
8749
+ inputSchema,
8750
+ resultSchema: _core_codex_routes_js__rspack_import_4.FD,
8751
+ inputJsonSchema: {
8752
+ type: 'object',
8753
+ additionalProperties: false,
8754
+ properties: {
8755
+ cwd: {
8756
+ type: 'string'
8757
+ },
8758
+ expectedCwd: {
8759
+ type: 'string'
8760
+ },
8761
+ model: {
8762
+ type: 'string'
8763
+ },
8764
+ effort: {
8765
+ type: 'string',
8766
+ enum: [
8767
+ 'none',
8768
+ 'minimal',
8769
+ 'low',
8770
+ 'medium',
8771
+ 'high',
8772
+ 'xhigh'
8773
+ ]
8774
+ },
8775
+ message: {
8776
+ type: 'string'
8777
+ }
8778
+ },
8779
+ required: [
8780
+ 'cwd'
8781
+ ]
8782
+ }
8783
+ }, async (input)=>{
8784
+ let out;
8785
+ try {
8786
+ out = await (0, _core_codex_bridge_js__rspack_import_2.QC)(input);
8787
+ } catch (error) {
8788
+ out = (0, _core_codex_contract_js__rspack_import_3.DG)(error);
8789
+ }
8790
+ return (0, react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6.g.Result, {
8791
+ value: out,
8792
+ children: (0, react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6.g.Text, {
8793
+ children: out.threadId && !('delivery' in out) ? `Started Codex thread ${out.threadId}` : (0, _core_codex_routes_js__rspack_import_4.D6)(out)
8794
+ })
8795
+ });
8796
+ });
8797
+ __webpack_require__.d(__webpack_exports__, {}, {
8798
+ "default": __rspack_default_export,
8799
+ inputSchema: inputSchema
8800
+ });
8801
+ },
8700
8802
  "./src/mcp/grok-bot/tools/codex_send.tsx" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
8701
8803
  __webpack_require__.r(__webpack_exports__);
8702
8804
  var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.react-server.js");
@@ -8724,13 +8826,13 @@ var __webpack_modules__ = {
8724
8826
  excludeClients: [
8725
8827
  'codex'
8726
8828
  ],
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.',
8829
+ 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
8830
  title: 'Codex send',
8729
8831
  annotations: {
8730
8832
  readOnlyHint: false
8731
8833
  },
8732
8834
  render: {
8733
- maxElapsedMs: 660000
8835
+ maxElapsedMs: 7260000
8734
8836
  },
8735
8837
  inputSchema,
8736
8838
  resultSchema,
@@ -8740,6 +8842,20 @@ var __webpack_modules__ = {
8740
8842
  expectedCwd: {
8741
8843
  type: 'string'
8742
8844
  },
8845
+ model: {
8846
+ type: 'string'
8847
+ },
8848
+ effort: {
8849
+ type: 'string',
8850
+ enum: [
8851
+ 'none',
8852
+ 'minimal',
8853
+ 'low',
8854
+ 'medium',
8855
+ 'high',
8856
+ 'xhigh'
8857
+ ]
8858
+ },
8743
8859
  threadId: {
8744
8860
  type: 'string'
8745
8861
  },
@@ -8835,7 +8951,7 @@ var __webpack_modules__ = {
8835
8951
  excludeClients: [
8836
8952
  'codex'
8837
8953
  ],
8838
- description: 'Discover a bounded page of Codex daemon threads.',
8954
+ 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
8955
  title: 'Codex threads',
8840
8956
  annotations: {
8841
8957
  readOnlyHint: true
@@ -8886,13 +9002,13 @@ var __webpack_modules__ = {
8886
9002
  excludeClients: [
8887
9003
  'codex'
8888
9004
  ],
8889
- description: 'Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.',
9005
+ 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
9006
  title: 'Codex wait',
8891
9007
  annotations: {
8892
9008
  readOnlyHint: true
8893
9009
  },
8894
9010
  render: {
8895
- maxElapsedMs: 660000
9011
+ maxElapsedMs: 7260000
8896
9012
  },
8897
9013
  inputSchema: _core_codex_routes_js__rspack_import_2.jS,
8898
9014
  resultSchema: _core_codex_routes_js__rspack_import_2.FD,
@@ -8908,7 +9024,7 @@ var __webpack_modules__ = {
8908
9024
  },
8909
9025
  "timeoutMs": {
8910
9026
  "type": "number",
8911
- "description": "Observation timeout: 1-600000 milliseconds."
9027
+ "description": "Observation timeout: 1-7200000 milliseconds."
8912
9028
  },
8913
9029
  "turnId": {
8914
9030
  "type": "string"
@@ -8955,7 +9071,7 @@ var __webpack_modules__ = {
8955
9071
  excludeClients: [
8956
9072
  'codex'
8957
9073
  ],
8958
- description: 'Watch bounded Codex thread events for diagnostics without answering approvals.',
9074
+ 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
9075
  title: 'Codex watch',
8960
9076
  annotations: {
8961
9077
  readOnlyHint: true
@@ -20235,6 +20351,7 @@ var __webpack_modules__ = {
20235
20351
  var node_net__rspack_import_2 = __webpack_require__("node:net");
20236
20352
  var node_os__rspack_import_3 = __webpack_require__("node:os");
20237
20353
  var node_path__rspack_import_4 = __webpack_require__("node:path");
20354
+ var _user_machine_guidance_js__rspack_import_5 = __webpack_require__("./src/core/user-machine-guidance.js");
20238
20355
  const MAX_BYTES = 65536;
20239
20356
  const FRAME_BYTES = MAX_BYTES * 6 + 1024;
20240
20357
  const defaultDirectory = ()=>(0, node_path__rspack_import_4.join)((0, node_os__rspack_import_3.homedir)(), '.grok-bot-cli', 'claude');
@@ -20245,6 +20362,18 @@ var __webpack_modules__ = {
20245
20362
  if (Buffer.byteLength(path) >= 104) throw Error('Claude channel socket path is too long');
20246
20363
  return path;
20247
20364
  }
20365
+ function absentClaudeChannelMessage(path, directory) {
20366
+ if ((0, _user_machine_guidance_js__rspack_import_5.R)({
20367
+ path,
20368
+ home: directory
20369
+ })) {
20370
+ return [
20371
+ 'No Claude channel socket at ' + path + '.',
20372
+ _user_machine_guidance_js__rspack_import_5.M
20373
+ ].join('\n');
20374
+ }
20375
+ 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).';
20376
+ }
20248
20377
  function messageText(message) {
20249
20378
  if (typeof message !== 'string' || !message.trim() || Buffer.byteLength(message) > MAX_BYTES) throw Error('Message must contain text within 64 KiB');
20250
20379
  return message;
@@ -20378,8 +20507,21 @@ var __webpack_modules__ = {
20378
20507
  const path = socketPath(name, directory);
20379
20508
  messageText(message);
20380
20509
  timeout(timeoutMs);
20381
- await privateDirectory(directory);
20382
- const info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
20510
+ try {
20511
+ await privateDirectory(directory);
20512
+ } catch (error) {
20513
+ if (error && (error.code === 'ENOENT' || /no such file|ENOENT/i.test(String(error.message)))) {
20514
+ throw Error(absentClaudeChannelMessage(path, directory));
20515
+ }
20516
+ throw error;
20517
+ }
20518
+ let info;
20519
+ try {
20520
+ info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
20521
+ } catch (error) {
20522
+ if (error && error.code === 'ENOENT') throw Error(absentClaudeChannelMessage(path, directory));
20523
+ throw error;
20524
+ }
20383
20525
  if (!info.isSocket() || info.uid !== process.getuid() || info.mode & 63) throw Error('Claude channel socket is not private to this user');
20384
20526
  return new Promise((resolve, reject)=>{
20385
20527
  const socket = (0, node_net__rspack_import_2.connect)(path);
@@ -20429,7 +20571,8 @@ var __webpack_modules__ = {
20429
20571
  var _package_json__rspack_import_6 = __webpack_require__("./package.json");
20430
20572
  var _codex_contract_js__rspack_import_7 = __webpack_require__("./src/core/codex/contract.js");
20431
20573
  var _desktop_shim_js__rspack_import_8 = __webpack_require__("./src/core/desktop-shim.js");
20432
- const PINNED_CODEX_VERSION = "0.154.0";
20574
+ var _user_machine_guidance_js__rspack_import_9 = __webpack_require__("./src/core/user-machine-guidance.js");
20575
+ const PINNED_CODEX_VERSION = "0.158.0";
20433
20576
  const UPSTREAM_DESKTOP_ISSUES = [
20434
20577
  "https://github.com/openai/codex/issues/41014",
20435
20578
  "https://github.com/openai/codex/issues/41112"
@@ -20462,20 +20605,34 @@ var __webpack_modules__ = {
20462
20605
  function singleLine(text) {
20463
20606
  return stripTerminalControls(text).replace(/[\t\n\r\u2028\u2029]+/g, " ");
20464
20607
  }
20465
- function unreachableMessage(path, desktopAttached = "unknown") {
20608
+ function boxUnreachableMessage(path) {
20609
+ return [
20610
+ "No Codex app-server control socket at " + path + ".",
20611
+ _user_machine_guidance_js__rspack_import_9.M
20612
+ ].join("\n");
20613
+ }
20614
+ function unreachableMessage(path, desktopAttached = "unknown", env = process.env) {
20615
+ if ((0, _user_machine_guidance_js__rspack_import_9.R)({
20616
+ path,
20617
+ env,
20618
+ home: env.HOME || (0, node_os__rspack_import_3.homedir)()
20619
+ })) {
20620
+ return boxUnreachableMessage(path);
20621
+ }
20466
20622
  if (desktopAttached === "private-stdio") {
20467
20623
  return [
20468
20624
  "ChatGPT Desktop is running its private stdio app-server, which external clients cannot reach",
20469
20625
  "(" + 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."
20626
+ "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start` (or bootstrap).",
20627
+ "gbot codex targets daemon-managed threads only; gbot has no remote transport."
20472
20628
  ].join("\n");
20473
20629
  }
20474
20630
  return [
20475
20631
  "No Codex app-server control socket at " + path + ".",
20476
- "Either no daemon is running (start one with `codex app-server daemon start`),",
20632
+ "Either no daemon is running (start one with `codex app-server daemon start` or bootstrap),",
20477
20633
  "or ChatGPT Desktop is running a private stdio app-server that external clients cannot reach",
20478
20634
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
20635
+ "Codex must run on the same machine as gbot. Set CODEX_APP_SERVER_SOCK to an existing local control socket if it is elsewhere; gbot has no remote transport.",
20479
20636
  "gbot codex targets daemon-managed threads only."
20480
20637
  ].join("\n");
20481
20638
  }
@@ -21119,6 +21276,47 @@ var __webpack_modules__ = {
21119
21276
  };
21120
21277
  }
21121
21278
  const openSession = openCodexSession;
21279
+ async function startCodexThread({ cwd, expectedCwd, model, effort, message, env = process.env, signal } = {}) {
21280
+ validateModelEffort(model, effort);
21281
+ if (typeof cwd !== "string" || !cwd.trim()) throw new RangeError("--cwd is required for a new Codex thread");
21282
+ const resolvedCwd = (0, node_fs__rspack_import_1.realpathSync)(cwd);
21283
+ if (expectedCwd !== undefined && (0, node_fs__rspack_import_1.realpathSync)(expectedCwd) !== resolvedCwd) throw new RangeError("New Codex thread cwd does not match expectedCwd");
21284
+ if (message !== undefined && (typeof message !== "string" || !message.trim())) throw new RangeError("Message must contain text");
21285
+ const { client } = await openSession(env, {
21286
+ signal
21287
+ });
21288
+ let threadId, started;
21289
+ try {
21290
+ started = await client.request("thread/start", {
21291
+ cwd: resolvedCwd,
21292
+ ...model ? {
21293
+ model
21294
+ } : {},
21295
+ ...effort ? {
21296
+ config: {
21297
+ model_reasoning_effort: effort
21298
+ }
21299
+ } : {}
21300
+ });
21301
+ threadId = started?.thread?.id;
21302
+ if (typeof threadId !== "string" || !ID_PATTERN.test(threadId)) throw new CodexProtocolError("thread/start", "missing `thread.id`");
21303
+ } finally{
21304
+ client.close();
21305
+ }
21306
+ if (message === undefined) return {
21307
+ threadId,
21308
+ cwd: resolvedCwd,
21309
+ model: started.model ?? model,
21310
+ exitCode: 0
21311
+ };
21312
+ return await sendToCodexThread(threadId, message, {
21313
+ env,
21314
+ expectedCwd: resolvedCwd,
21315
+ model,
21316
+ effort,
21317
+ signal
21318
+ });
21319
+ }
21122
21320
  const CODEX_VERSION_PROBE_TIMEOUT_MS = 3000;
21123
21321
  function probeLocalCodexVersion(timeoutMs = CODEX_VERSION_PROBE_TIMEOUT_MS) {
21124
21322
  const out = spawnSync("codex", [
@@ -21208,7 +21406,7 @@ var __webpack_modules__ = {
21208
21406
  session = await openSession(env);
21209
21407
  } catch (err) {
21210
21408
  if (err instanceof CodexRouteError) {
21211
- const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached) : err.message;
21409
+ const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached, env) : err.message;
21212
21410
  return withStatusExitCode({
21213
21411
  ...base,
21214
21412
  reachable: false,
@@ -21417,7 +21615,7 @@ var __webpack_modules__ = {
21417
21615
  }
21418
21616
  function requireExperimental(env, what) {
21419
21617
  if (experimentalEnabled(env)) return;
21420
- throw new CodexSendError(what + " uses Codex's experimental app-server API (thread/queue/*), which is off by default. " + "Set GROK_BOT_CODEX_EXPERIMENTAL=1 to opt in; method names are pinned to Codex " + PINNED_CODEX_VERSION + ".", {
21618
+ throw new CodexSendError(what + " needs thread/queue/add, which is experimental and absent from Codex " + PINNED_CODEX_VERSION + "'s stable API. " + "Use --when-busy steer with an expected turn ID, wait until the thread is idle, or opt in with GROK_BOT_CODEX_EXPERIMENTAL=1 on a Codex daemon that supports the experimental queue API.", {
21421
21619
  delivery: "rejected",
21422
21620
  reason: "experimental-disabled"
21423
21621
  });
@@ -21425,7 +21623,7 @@ var __webpack_modules__ = {
21425
21623
  function unsupportedOrRpc(err, method, threadId, envelope, turnId) {
21426
21624
  const guarded = method === "turn/steer";
21427
21625
  if (err instanceof CodexRpcError && err.rpc && err.rpc.code === -32601) {
21428
- return new CodexSendError("Codex app-server does not offer " + method + " (daemon predates it, or experimentalApi was not granted). " + (guarded ? "Upgrade Codex before retrying guarded steering." : "Upgrade Codex or send without --when-busy queue."), {
21626
+ return new CodexSendError("Codex app-server does not offer " + method + " (daemon predates it, or experimentalApi was not granted). " + (guarded ? "Upgrade Codex before retrying guarded steering." : "Use --when-busy steer with an expected turn ID, wait for idle, or use a Codex daemon with experimental queue support and GROK_BOT_CODEX_EXPERIMENTAL=1."), {
21429
21627
  delivery: "rejected",
21430
21628
  reason: "unsupported",
21431
21629
  threadId,
@@ -21482,7 +21680,7 @@ var __webpack_modules__ = {
21482
21680
  }
21483
21681
  async function sendToCodexThread(threadId, text, { env = process.env, envelope = buildEnvelope({
21484
21682
  env
21485
- }), whenBusy = "reject", session, expectedTurnId, expectedCwd, signal } = {}) {
21683
+ }), whenBusy = "reject", session, expectedTurnId, expectedCwd, model, effort, signal } = {}) {
21486
21684
  try {
21487
21685
  const receipt = await sendToCodexThreadInner(threadId, text, {
21488
21686
  env,
@@ -21491,6 +21689,8 @@ var __webpack_modules__ = {
21491
21689
  session,
21492
21690
  expectedTurnId,
21493
21691
  expectedCwd,
21692
+ model,
21693
+ effort,
21494
21694
  signal
21495
21695
  });
21496
21696
  return (0, _codex_contract_js__rspack_import_7.Dz)(receipt);
@@ -21502,7 +21702,19 @@ var __webpack_modules__ = {
21502
21702
  return (0, _codex_contract_js__rspack_import_7.DG)(err);
21503
21703
  }
21504
21704
  }
21505
- async function sendToCodexThreadInner(threadId, text, { env, envelope, whenBusy, session, expectedTurnId, expectedCwd, signal }) {
21705
+ function validateModelEffort(model, effort) {
21706
+ if (model !== undefined && (typeof model !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/.test(model))) throw new RangeError("--model must be a nonempty model ID");
21707
+ if (effort !== undefined && ![
21708
+ "none",
21709
+ "minimal",
21710
+ "low",
21711
+ "medium",
21712
+ "high",
21713
+ "xhigh"
21714
+ ].includes(effort)) throw new RangeError("--effort must be none, minimal, low, medium, high, or xhigh");
21715
+ }
21716
+ async function sendToCodexThreadInner(threadId, text, { env, envelope, whenBusy, session, expectedTurnId, expectedCwd, model, effort, signal }) {
21717
+ validateModelEffort(model, effort);
21506
21718
  if (![
21507
21719
  "reject",
21508
21720
  "queue",
@@ -21548,7 +21760,15 @@ var __webpack_modules__ = {
21548
21760
  try {
21549
21761
  resumed = await client.request("thread/resume", {
21550
21762
  threadId,
21551
- excludeTurns: true
21763
+ excludeTurns: true,
21764
+ ...model ? {
21765
+ model
21766
+ } : {},
21767
+ ...effort ? {
21768
+ config: {
21769
+ model_reasoning_effort: effort
21770
+ }
21771
+ } : {}
21552
21772
  });
21553
21773
  } catch (err) {
21554
21774
  assertNotCancelled();
@@ -21681,7 +21901,13 @@ var __webpack_modules__ = {
21681
21901
  }
21682
21902
  ],
21683
21903
  clientUserMessageId: envelope.messageId,
21684
- turnTrigger: "gbot"
21904
+ turnTrigger: "gbot",
21905
+ ...model ? {
21906
+ model
21907
+ } : {},
21908
+ ...effort ? {
21909
+ effort
21910
+ } : {}
21685
21911
  });
21686
21912
  } catch (err) {
21687
21913
  if (err instanceof CodexSendError) throw err;
@@ -21738,6 +21964,7 @@ var __webpack_modules__ = {
21738
21964
  __webpack_require__.d(__webpack_exports__, {
21739
21965
  $3: ()=>assertThreadAllowed,
21740
21966
  Mr: ()=>withEnvelopeHeader,
21967
+ QC: ()=>startCodexThread,
21741
21968
  X$: ()=>listCodexThreads,
21742
21969
  ZS: ()=>sendToCodexThread,
21743
21970
  e0: ()=>experimentalEnabled,
@@ -21952,10 +22179,10 @@ var __webpack_modules__ = {
21952
22179
  ];
21953
22180
  if (afterMessageId !== undefined) boundedInteger(anchors.length, 200, 'afterMessageId count');
21954
22181
  for (const anchor of anchors)conversationId(anchor, 'afterMessageId');
21955
- boundedInteger(timeoutMs, 600000, 'timeoutMs');
22182
+ boundedInteger(timeoutMs, 7200000, 'timeoutMs');
21956
22183
  boundedInteger(maxOutputBytes, BUDGET, 'maxOutputBytes');
21957
22184
  if (waitSignal !== undefined && !(waitSignal instanceof AbortSignal)) throw new TypeError('signal must be an AbortSignal');
21958
- let done = false, status = acceptedTurns.has(turnId) ? 'inProgress' : undefined, error, historyError, itemBytes = 0, truncated = overflow;
22185
+ let done = false, status = acceptedTurns.has(turnId) ? 'inProgress' : undefined, error, historyError, itemBytes = 0, truncated = false;
21959
22186
  const items = new Map();
21960
22187
  const add = (item)=>{
21961
22188
  if (!item || typeof item.id !== 'string' || typeof item.type !== 'string') throw new Error('Invalid history item');
@@ -22002,6 +22229,7 @@ var __webpack_modules__ = {
22002
22229
  };
22003
22230
  const result = (state, detail)=>{
22004
22231
  const interactions = scan();
22232
+ const overflowUncertain = state === 'unknown' && /Notification coverage overflow/.test(detail ?? '');
22005
22233
  const candidates = [
22006
22234
  ...items.values()
22007
22235
  ].map((x)=>x.item);
@@ -22010,7 +22238,7 @@ var __webpack_modules__ = {
22010
22238
  const reply = {
22011
22239
  text: '',
22012
22240
  items: [],
22013
- truncated: truncated || overflow
22241
+ truncated: truncated || overflowUncertain
22014
22242
  };
22015
22243
  for (const item of selected){
22016
22244
  const text = reply.text ? `${reply.text}\n${item.text}` : item.text;
@@ -22043,7 +22271,7 @@ var __webpack_modules__ = {
22043
22271
  interactions
22044
22272
  };
22045
22273
  };
22046
- let timer, notify;
22274
+ let timer, pollTimer, notify;
22047
22275
  const abortSignals = [
22048
22276
  signal,
22049
22277
  waitSignal
@@ -22059,10 +22287,18 @@ var __webpack_modules__ = {
22059
22287
  'Codex connection closed'
22060
22288
  ]);
22061
22289
  };
22062
- timer = setTimeout(()=>resolve([
22290
+ timer = setTimeout(()=>resolve(overflow ? [
22291
+ 'unknown',
22292
+ 'Notification coverage overflow; pending interaction status is uncertain'
22293
+ ] : [
22063
22294
  'timeout',
22064
22295
  'Observation deadline reached'
22065
22296
  ]), timeoutMs);
22297
+ pollTimer = setInterval(()=>{
22298
+ for (const listener of [
22299
+ ...wake
22300
+ ])listener();
22301
+ }, 2000);
22066
22302
  for (const s of abortSignals)s.addEventListener('abort', notify, {
22067
22303
  once: true
22068
22304
  });
@@ -22133,19 +22369,51 @@ var __webpack_modules__ = {
22133
22369
  historyError
22134
22370
  ];
22135
22371
  }
22372
+ let lastPoll = 0;
22136
22373
  while(!done){
22137
22374
  const interactions = scan();
22138
22375
  if (terminal(status)) return [
22139
22376
  status,
22140
22377
  error ?? historyError
22141
22378
  ];
22142
- if (historyError || overflow) return [
22379
+ if (historyError) return [
22143
22380
  'unknown',
22144
- historyError ?? 'Notification coverage overflow'
22381
+ historyError
22145
22382
  ];
22146
22383
  if (interactions.length) return [
22147
22384
  'waiting-for-input'
22148
22385
  ];
22386
+ if (Date.now() - lastPoll >= 2000) {
22387
+ lastPoll = Date.now();
22388
+ try {
22389
+ await visitCodexHistory(session, threadId, 'thread/turns/list', {}, (data)=>{
22390
+ const turn = data.find((t)=>t?.id === turnId);
22391
+ if (!turn) return false;
22392
+ if (terminal(turn.status)) {
22393
+ status = turn.status;
22394
+ error = turn.error;
22395
+ }
22396
+ return true;
22397
+ }, {
22398
+ stopped: ()=>done
22399
+ });
22400
+ if (terminal(status)) {
22401
+ await visitCodexHistory(session, threadId, 'thread/items/list', {
22402
+ turnId,
22403
+ sortDirection: 'asc'
22404
+ }, (data)=>{
22405
+ for (const row of data)if (row?.turnId === turnId && row.item) add(row.item);
22406
+ return false;
22407
+ }, {
22408
+ stopped: ()=>done
22409
+ });
22410
+ continue;
22411
+ }
22412
+ } catch (err) {
22413
+ historyError = err.message;
22414
+ truncated = true;
22415
+ }
22416
+ }
22149
22417
  await new Promise((resolve)=>{
22150
22418
  const listener = ()=>{
22151
22419
  wake.delete(listener);
@@ -22168,6 +22436,7 @@ var __webpack_modules__ = {
22168
22436
  } finally{
22169
22437
  done = true;
22170
22438
  clearTimeout(timer);
22439
+ clearInterval(pollTimer);
22171
22440
  wake.delete(notify);
22172
22441
  for (const s of abortSignals)s.removeEventListener('abort', notify);
22173
22442
  for (const listener of [
@@ -22215,7 +22484,7 @@ var __webpack_modules__ = {
22215
22484
  close,
22216
22485
  async send (text, { envelope = (0, _codex_bridge_js__rspack_import_2.nq)({
22217
22486
  env
22218
- }), whenBusy = 'reject', expectedTurnId, signal: sendSignal } = {}) {
22487
+ }), whenBusy = 'reject', expectedTurnId, model, effort, signal: sendSignal } = {}) {
22219
22488
  if (closed) return (0, _contract_js__rspack_import_0.DG)(Object.assign(new Error('Conversation closed'), {
22220
22489
  delivery: 'rejected',
22221
22490
  reason: 'closed',
@@ -22234,6 +22503,8 @@ var __webpack_modules__ = {
22234
22503
  expectedTurnId,
22235
22504
  session,
22236
22505
  expectedCwd,
22506
+ model,
22507
+ effort,
22237
22508
  signal: submissionSignal
22238
22509
  });
22239
22510
  if (receipt.delivery === 'accepted' && receipt.turnId) {
@@ -24135,9 +24406,30 @@ ts() { date -u +%Y-%m-%dT%H:%M:%SZ; }
24135
24406
  fp: ()=>redactSecrets
24136
24407
  });
24137
24408
  },
24409
+ "./src/core/user-machine-guidance.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
24410
+ const USER_MACHINE_CODEX_CLAUDE_GUIDANCE = [
24411
+ "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).",
24412
+ "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.",
24413
+ "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).",
24414
+ "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."
24415
+ ].join("\n");
24416
+ function looksLikeGrokBotBox({ path = "", env = process.env, home = env.HOME || "" } = {}) {
24417
+ const values = [
24418
+ home,
24419
+ env.HOME,
24420
+ path
24421
+ ].filter((value)=>value != null && value !== "").map(String);
24422
+ return values.some((value)=>value === "/home/box" || value.startsWith("/home/box/"));
24423
+ }
24424
+ __webpack_require__.d(__webpack_exports__, {
24425
+ R: ()=>looksLikeGrokBotBox
24426
+ }, {
24427
+ M: USER_MACHINE_CODEX_CLAUDE_GUIDANCE
24428
+ });
24429
+ },
24138
24430
  "./package.json" (module) {
24139
24431
  module.exports = {
24140
- "rE": "0.10.0"
24432
+ "rE": "0.10.2"
24141
24433
  };
24142
24434
  }
24143
24435
  };
@@ -24190,49 +24482,51 @@ function __webpack_require__(moduleId) {
24190
24482
  var __webpack_exports__ = {};
24191
24483
  var node_worker_threads__rspack_import_0 = __webpack_require__("node:worker_threads");
24192
24484
  var react__rspack_import_1 = __webpack_require__("./node_modules/react/react.react-server.js");
24193
- var _agent_bundle_runtime_flight_server__rspack_import_19 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/flight/server.js");
24194
- var _agent_bundle_runtime__rspack_import_16 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
24195
- var _agent_bundle_runtime__rspack_import_17 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/736.js");
24196
- var _agent_bundle_runtime__rspack_import_18 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
24485
+ var _agent_bundle_runtime_flight_server__rspack_import_20 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/flight/server.js");
24486
+ var _agent_bundle_runtime__rspack_import_17 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
24487
+ var _agent_bundle_runtime__rspack_import_18 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/736.js");
24488
+ var _agent_bundle_runtime__rspack_import_19 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
24197
24489
  var node_url__rspack_import_2 = __webpack_require__("node:url");
24198
24490
  var _src_mcp_grok_bot_tools_claude_send_tsx__rspack_import_3 = __webpack_require__("./src/mcp/grok-bot/tools/claude_send.tsx");
24199
- var _src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_4 = __webpack_require__("./src/mcp/grok-bot/tools/codex_send.tsx");
24200
- var _src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_5 = __webpack_require__("./src/mcp/grok-bot/tools/codex_threads.tsx");
24201
- var _src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_6 = __webpack_require__("./src/mcp/grok-bot/tools/codex_wait.tsx");
24202
- var _src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_7 = __webpack_require__("./src/mcp/grok-bot/tools/codex_watch.tsx");
24203
- var _src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_8 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_start.tsx");
24204
- var _src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_9 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_status.tsx");
24205
- var _src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_10 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_stop.tsx");
24206
- var _src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_11 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_codex_respond.tsx");
24207
- var _src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_12 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_approvals.tsx");
24208
- var _src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_13 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_respond.tsx");
24209
- var _src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_14 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_send.tsx");
24210
- var _src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_15 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_thread.tsx");
24491
+ var _src_mcp_grok_bot_tools_codex_new_tsx__rspack_import_4 = __webpack_require__("./src/mcp/grok-bot/tools/codex_new.tsx");
24492
+ var _src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_5 = __webpack_require__("./src/mcp/grok-bot/tools/codex_send.tsx");
24493
+ var _src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_6 = __webpack_require__("./src/mcp/grok-bot/tools/codex_threads.tsx");
24494
+ var _src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_7 = __webpack_require__("./src/mcp/grok-bot/tools/codex_wait.tsx");
24495
+ var _src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_8 = __webpack_require__("./src/mcp/grok-bot/tools/codex_watch.tsx");
24496
+ var _src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_9 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_start.tsx");
24497
+ var _src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_10 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_status.tsx");
24498
+ var _src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_11 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_stop.tsx");
24499
+ var _src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_12 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_codex_respond.tsx");
24500
+ var _src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_13 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_approvals.tsx");
24501
+ var _src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_14 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_respond.tsx");
24502
+ var _src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_15 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_send.tsx");
24503
+ var _src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_16 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_thread.tsx");
24211
24504
  const route0 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_claude_send_tsx__rspack_import_3, 'default'), _src_mcp_grok_bot_tools_claude_send_tsx__rspack_import_3);
24212
- const route1 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_4, 'default'), _src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_4);
24213
- const route2 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_5, 'default'), _src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_5);
24214
- const route3 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_6, 'default'), _src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_6);
24215
- const route4 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_7, 'default'), _src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_7);
24216
- const route5 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_8, 'default'), _src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_8);
24217
- const route6 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_9, 'default'), _src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_9);
24218
- const route7 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_10, 'default'), _src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_10);
24219
- const route8 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_11, 'default'), _src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_11);
24220
- const route9 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_12, 'default'), _src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_12);
24221
- const route10 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_13, 'default'), _src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_13);
24222
- const route11 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_14, 'default'), _src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_14);
24223
- const route12 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_15, 'default'), _src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_15);
24505
+ const route1 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_new_tsx__rspack_import_4, 'default'), _src_mcp_grok_bot_tools_codex_new_tsx__rspack_import_4);
24506
+ const route2 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_5, 'default'), _src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_5);
24507
+ const route3 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_6, 'default'), _src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_6);
24508
+ const route4 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_7, 'default'), _src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_7);
24509
+ const route5 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_8, 'default'), _src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_8);
24510
+ const route6 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_9, 'default'), _src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_9);
24511
+ const route7 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_10, 'default'), _src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_10);
24512
+ const route8 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_11, 'default'), _src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_11);
24513
+ const route9 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_12, 'default'), _src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_12);
24514
+ const route10 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_13, 'default'), _src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_13);
24515
+ const route11 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_14, 'default'), _src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_14);
24516
+ const route12 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_15, 'default'), _src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_15);
24517
+ const route13 = Object.assign({}, Reflect.get(_src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_16, 'default'), _src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_16);
24224
24518
  globalThis.__rspack_rsc_manifest__ ??= Object.freeze({
24225
24519
  clientManifest: Object.freeze({})
24226
24520
  });
24227
24521
  if (node_worker_threads__rspack_import_0.parentPort === null) throw new Error('Generated Flight worker requires a parent port.');
24228
24522
  process.stdout.write = process.stderr.write.bind(process.stderr);
24229
- const ARTIFACT_EPOCH = "gbot@0.10.0";
24523
+ const ARTIFACT_EPOCH = "gbot@0.10.2";
24230
24524
  const processLifetime = {
24231
24525
  hits: 0,
24232
24526
  instanceId: crypto.randomUUID(),
24233
24527
  pid: process.pid
24234
24528
  };
24235
- const pluginRoot = (0, _agent_bundle_runtime__rspack_import_16.E7)({
24529
+ const pluginRoot = (0, _agent_bundle_runtime__rspack_import_17.E7)({
24236
24530
  fallback: (0, node_url__rspack_import_2.fileURLToPath)(new URL('..', import.meta.url)),
24237
24531
  stateAnchor: 'user-data'
24238
24532
  });
@@ -24243,7 +24537,7 @@ const routes = Object.freeze({
24243
24537
  "annotations": {
24244
24538
  "readOnlyHint": false
24245
24539
  },
24246
- "description": "Send to a named, opted-in live Claude Code channel and wait for its reply. Unknown delivery must not be retried automatically.",
24540
+ "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
24541
  "inputJsonSchema": {
24248
24542
  "additionalProperties": false,
24249
24543
  "properties": {
@@ -24274,12 +24568,61 @@ const routes = Object.freeze({
24274
24568
  name: "claude_send",
24275
24569
  serverId: "mcp:grok-bot"
24276
24570
  }),
24571
+ "tool:grok-bot/codex_new": Object.freeze({
24572
+ config: {
24573
+ "annotations": {
24574
+ "readOnlyHint": false
24575
+ },
24576
+ "description": "Start a new Codex thread on this machine in cwd, optionally sending its first message. Codex must run locally on the same machine as gbot.",
24577
+ "excludeClients": [
24578
+ "codex"
24579
+ ],
24580
+ "inputJsonSchema": {
24581
+ "additionalProperties": false,
24582
+ "properties": {
24583
+ "cwd": {
24584
+ "type": "string"
24585
+ },
24586
+ "effort": {
24587
+ "enum": [
24588
+ "none",
24589
+ "minimal",
24590
+ "low",
24591
+ "medium",
24592
+ "high",
24593
+ "xhigh"
24594
+ ],
24595
+ "type": "string"
24596
+ },
24597
+ "expectedCwd": {
24598
+ "type": "string"
24599
+ },
24600
+ "message": {
24601
+ "type": "string"
24602
+ },
24603
+ "model": {
24604
+ "type": "string"
24605
+ }
24606
+ },
24607
+ "required": [
24608
+ "cwd"
24609
+ ],
24610
+ "type": "object"
24611
+ },
24612
+ "title": "Codex new thread"
24613
+ },
24614
+ id: "tool:grok-bot/codex_new",
24615
+ kind: "tool",
24616
+ module: route1,
24617
+ name: "codex_new",
24618
+ serverId: "mcp:grok-bot"
24619
+ }),
24277
24620
  "tool:grok-bot/codex_send": Object.freeze({
24278
24621
  config: {
24279
24622
  "annotations": {
24280
24623
  "readOnlyHint": false
24281
24624
  },
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.",
24625
+ "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
24626
  "excludeClients": [
24284
24627
  "codex"
24285
24628
  ],
@@ -24292,6 +24635,17 @@ const routes = Object.freeze({
24292
24635
  "correlationId": {
24293
24636
  "type": "string"
24294
24637
  },
24638
+ "effort": {
24639
+ "enum": [
24640
+ "none",
24641
+ "minimal",
24642
+ "low",
24643
+ "medium",
24644
+ "high",
24645
+ "xhigh"
24646
+ ],
24647
+ "type": "string"
24648
+ },
24295
24649
  "envelope": {
24296
24650
  "type": "boolean"
24297
24651
  },
@@ -24310,6 +24664,9 @@ const routes = Object.freeze({
24310
24664
  "message": {
24311
24665
  "type": "string"
24312
24666
  },
24667
+ "model": {
24668
+ "type": "string"
24669
+ },
24313
24670
  "replyTo": {
24314
24671
  "type": "string"
24315
24672
  },
@@ -24345,13 +24702,13 @@ const routes = Object.freeze({
24345
24702
  "type": "object"
24346
24703
  },
24347
24704
  "render": {
24348
- "maxElapsedMs": 660000
24705
+ "maxElapsedMs": 7260000
24349
24706
  },
24350
24707
  "title": "Codex send"
24351
24708
  },
24352
24709
  id: "tool:grok-bot/codex_send",
24353
24710
  kind: "tool",
24354
- module: route1,
24711
+ module: route2,
24355
24712
  name: "codex_send",
24356
24713
  serverId: "mcp:grok-bot"
24357
24714
  }),
@@ -24360,7 +24717,7 @@ const routes = Object.freeze({
24360
24717
  "annotations": {
24361
24718
  "readOnlyHint": true
24362
24719
  },
24363
- "description": "Discover a bounded page of Codex daemon threads.",
24720
+ "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
24721
  "excludeClients": [
24365
24722
  "codex"
24366
24723
  ],
@@ -24385,7 +24742,7 @@ const routes = Object.freeze({
24385
24742
  },
24386
24743
  id: "tool:grok-bot/codex_threads",
24387
24744
  kind: "tool",
24388
- module: route2,
24745
+ module: route3,
24389
24746
  name: "codex_threads",
24390
24747
  serverId: "mcp:grok-bot"
24391
24748
  }),
@@ -24394,7 +24751,7 @@ const routes = Object.freeze({
24394
24751
  "annotations": {
24395
24752
  "readOnlyHint": true
24396
24753
  },
24397
- "description": "Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.",
24754
+ "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
24755
  "excludeClients": [
24399
24756
  "codex"
24400
24757
  ],
@@ -24415,7 +24772,7 @@ const routes = Object.freeze({
24415
24772
  "type": "string"
24416
24773
  },
24417
24774
  "timeoutMs": {
24418
- "description": "Observation timeout: 1-600000 milliseconds.",
24775
+ "description": "Observation timeout: 1-7200000 milliseconds.",
24419
24776
  "type": "number"
24420
24777
  },
24421
24778
  "turnId": {
@@ -24429,13 +24786,13 @@ const routes = Object.freeze({
24429
24786
  "type": "object"
24430
24787
  },
24431
24788
  "render": {
24432
- "maxElapsedMs": 660000
24789
+ "maxElapsedMs": 7260000
24433
24790
  },
24434
24791
  "title": "Codex wait"
24435
24792
  },
24436
24793
  id: "tool:grok-bot/codex_wait",
24437
24794
  kind: "tool",
24438
- module: route3,
24795
+ module: route4,
24439
24796
  name: "codex_wait",
24440
24797
  serverId: "mcp:grok-bot"
24441
24798
  }),
@@ -24444,7 +24801,7 @@ const routes = Object.freeze({
24444
24801
  "annotations": {
24445
24802
  "readOnlyHint": true
24446
24803
  },
24447
- "description": "Watch bounded Codex thread events for diagnostics without answering approvals.",
24804
+ "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
24805
  "excludeClients": [
24449
24806
  "codex"
24450
24807
  ],
@@ -24478,7 +24835,7 @@ const routes = Object.freeze({
24478
24835
  },
24479
24836
  id: "tool:grok-bot/codex_watch",
24480
24837
  kind: "tool",
24481
- module: route4,
24838
+ module: route5,
24482
24839
  name: "codex_watch",
24483
24840
  serverId: "mcp:grok-bot"
24484
24841
  }),
@@ -24520,7 +24877,7 @@ const routes = Object.freeze({
24520
24877
  },
24521
24878
  id: "tool:grok-bot/gbot_bridge_start",
24522
24879
  kind: "tool",
24523
- module: route5,
24880
+ module: route6,
24524
24881
  name: "gbot_bridge_start",
24525
24882
  serverId: "mcp:grok-bot"
24526
24883
  }),
@@ -24546,7 +24903,7 @@ const routes = Object.freeze({
24546
24903
  },
24547
24904
  id: "tool:grok-bot/gbot_bridge_status",
24548
24905
  kind: "tool",
24549
- module: route6,
24906
+ module: route7,
24550
24907
  name: "gbot_bridge_status",
24551
24908
  serverId: "mcp:grok-bot"
24552
24909
  }),
@@ -24575,7 +24932,7 @@ const routes = Object.freeze({
24575
24932
  },
24576
24933
  id: "tool:grok-bot/gbot_bridge_stop",
24577
24934
  kind: "tool",
24578
- module: route7,
24935
+ module: route8,
24579
24936
  name: "gbot_bridge_stop",
24580
24937
  serverId: "mcp:grok-bot"
24581
24938
  }),
@@ -24634,7 +24991,7 @@ const routes = Object.freeze({
24634
24991
  },
24635
24992
  id: "tool:grok-bot/gbot_codex_respond",
24636
24993
  kind: "tool",
24637
- module: route8,
24994
+ module: route9,
24638
24995
  name: "gbot_codex_respond",
24639
24996
  serverId: "mcp:grok-bot"
24640
24997
  }),
@@ -24665,7 +25022,7 @@ const routes = Object.freeze({
24665
25022
  },
24666
25023
  id: "tool:grok-bot/gbot_grok_approvals",
24667
25024
  kind: "tool",
24668
- module: route9,
25025
+ module: route10,
24669
25026
  name: "gbot_grok_approvals",
24670
25027
  serverId: "mcp:grok-bot"
24671
25028
  }),
@@ -24712,7 +25069,7 @@ const routes = Object.freeze({
24712
25069
  },
24713
25070
  id: "tool:grok-bot/gbot_grok_respond",
24714
25071
  kind: "tool",
24715
- module: route10,
25072
+ module: route11,
24716
25073
  name: "gbot_grok_respond",
24717
25074
  serverId: "mcp:grok-bot"
24718
25075
  }),
@@ -24773,7 +25130,7 @@ const routes = Object.freeze({
24773
25130
  },
24774
25131
  id: "tool:grok-bot/gbot_send",
24775
25132
  kind: "tool",
24776
- module: route11,
25133
+ module: route12,
24777
25134
  name: "gbot_send",
24778
25135
  serverId: "mcp:grok-bot"
24779
25136
  }),
@@ -24819,7 +25176,7 @@ const routes = Object.freeze({
24819
25176
  },
24820
25177
  id: "tool:grok-bot/gbot_thread",
24821
25178
  kind: "tool",
24822
- module: route12,
25179
+ module: route13,
24823
25180
  name: "gbot_thread",
24824
25181
  serverId: "mcp:grok-bot"
24825
25182
  })
@@ -24867,7 +25224,7 @@ const render = async (message)=>{
24867
25224
  };
24868
25225
  try {
24869
25226
  const plugin = message.plugin ?? pluginRoot.identity;
24870
- await (0, _agent_bundle_runtime__rspack_import_17.iC)({
25227
+ await (0, _agent_bundle_runtime__rspack_import_18.iC)({
24871
25228
  ...message.actor === undefined ? {} : {
24872
25229
  actor: message.actor
24873
25230
  },
@@ -24881,7 +25238,7 @@ const render = async (message)=>{
24881
25238
  operationId: route.id,
24882
25239
  surface: route.name
24883
25240
  },
24884
- lineage: message.lineage ?? (0, _agent_bundle_runtime__rspack_import_17.hU)('not-provided'),
25241
+ lineage: message.lineage ?? (0, _agent_bundle_runtime__rspack_import_18.hU)('not-provided'),
24885
25242
  plugin,
24886
25243
  progress: {
24887
25244
  report: async (update)=>{
@@ -24897,7 +25254,7 @@ const render = async (message)=>{
24897
25254
  session: message.session
24898
25255
  },
24899
25256
  signal: controller.signal,
24900
- terminal: message.terminal ?? (0, _agent_bundle_runtime__rspack_import_17.hU)('not-provided'),
25257
+ terminal: message.terminal ?? (0, _agent_bundle_runtime__rspack_import_18.hU)('not-provided'),
24901
25258
  ...message.workspace === undefined ? {} : {
24902
25259
  workspace: message.workspace
24903
25260
  }
@@ -24932,10 +25289,10 @@ const render = async (message)=>{
24932
25289
  type: 'observed-render-start'
24933
25290
  });
24934
25291
  const renderStartedAt = performance.now();
24935
- const element = validationError === undefined ? composeLayouts(observedRoute, props, controller.signal) : (0, react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_18.g.Result, null, (0, react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_18.g.Error, {
25292
+ const element = validationError === undefined ? composeLayouts(observedRoute, props, controller.signal) : (0, react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_19.g.Result, null, (0, react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_19.g.Error, {
24936
25293
  code: 'invalid-input'
24937
25294
  }, `Input validation error: ${validationError instanceof Error ? validationError.message : String(validationError)}`));
24938
- const flight = (0, _agent_bundle_runtime_flight_server__rspack_import_19.y)(element, {
25295
+ const flight = (0, _agent_bundle_runtime_flight_server__rspack_import_20.y)(element, {
24939
25296
  signal: controller.signal
24940
25297
  });
24941
25298
  const reader = flight.getReader();