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.
@@ -6545,13 +6545,22 @@ var __webpack_modules__ = {
6545
6545
  const observationFields = {
6546
6546
  expectedCwd: zod__rspack_import_3.YjP().min(1).optional(),
6547
6547
  threadId: id,
6548
- timeoutMs: zod__rspack_import_3.aig().int().min(1).max(600000).optional()
6548
+ timeoutMs: zod__rspack_import_3.aig().int().min(1).max(7200000).optional()
6549
6549
  };
6550
6550
  const sendFields = {
6551
6551
  ...observationFields,
6552
6552
  correlationId: id.optional(),
6553
6553
  envelope: zod__rspack_import_3.zMY().optional(),
6554
6554
  hop: zod__rspack_import_3.aig().int().min(0).optional(),
6555
+ model: zod__rspack_import_3.YjP().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/).optional(),
6556
+ effort: zod__rspack_import_3.k5n([
6557
+ 'none',
6558
+ 'minimal',
6559
+ 'low',
6560
+ 'medium',
6561
+ 'high',
6562
+ 'xhigh'
6563
+ ]).optional(),
6555
6564
  replyTo: id.optional(),
6556
6565
  expectedTurnId: id.optional(),
6557
6566
  whenBusy: zod__rspack_import_3.k5n([
@@ -6573,7 +6582,9 @@ var __webpack_modules__ = {
6573
6582
  maxOutputBytes: zod__rspack_import_3.aig().int().min(1).max(4194304).optional()
6574
6583
  }).strict();
6575
6584
  const watchSchema = zod__rspack_import_3.Ikc({
6576
- ...observationFields,
6585
+ expectedCwd: zod__rspack_import_3.YjP().min(1).optional(),
6586
+ threadId: id,
6587
+ timeoutMs: zod__rspack_import_3.aig().int().min(1).max(600000).optional(),
6577
6588
  maxEvents: zod__rspack_import_3.aig().int().min(1).max(500).default(100)
6578
6589
  }).strict();
6579
6590
  const threadsSchema = zod__rspack_import_3.Ikc({
@@ -6630,6 +6641,8 @@ var __webpack_modules__ = {
6630
6641
  envelope,
6631
6642
  whenBusy: input.whenBusy,
6632
6643
  expectedCwd: input.expectedCwd,
6644
+ model: input.model,
6645
+ effort: input.effort,
6633
6646
  signal
6634
6647
  });
6635
6648
  }
@@ -6642,7 +6655,9 @@ var __webpack_modules__ = {
6642
6655
  receipt = await conversation.send(input.message, {
6643
6656
  envelope,
6644
6657
  whenBusy: input.whenBusy,
6645
- expectedTurnId: input.expectedTurnId
6658
+ expectedTurnId: input.expectedTurnId,
6659
+ model: input.model,
6660
+ effort: input.effort
6646
6661
  });
6647
6662
  if (!input.wait || receipt.delivery !== 'accepted' || !receipt.turnId) return receipt;
6648
6663
  await progress?.(`Accepted message ${receipt.messageId}; observing turn ${receipt.turnId}`);
@@ -6933,7 +6948,9 @@ var __webpack_modules__ = {
6933
6948
  requestId: input.requestId,
6934
6949
  busyPolicy: input.whenBusy,
6935
6950
  hop: input.hop,
6936
- correlationId: input.correlationId
6951
+ correlationId: input.correlationId,
6952
+ model: input.model,
6953
+ effort: input.effort
6937
6954
  }, options(context)));
6938
6955
  }
6939
6956
  __webpack_require__.d(__webpack_exports__, {
@@ -7062,7 +7079,7 @@ var __webpack_modules__ = {
7062
7079
  var _core_claude_routes_js__rspack_import_2 = __webpack_require__("./src/core/claude-routes.ts");
7063
7080
  const __rspack_default_export = (0, agent_bundle_routes__rspack_import_1.uO)({
7064
7081
  title: 'Message Claude Code',
7065
- description: 'Send to a named, opted-in live Claude Code channel and wait for its reply. Unknown delivery must not be retried automatically.',
7082
+ 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.',
7066
7083
  annotations: {
7067
7084
  readOnlyHint: false
7068
7085
  },
@@ -7105,6 +7122,91 @@ var __webpack_modules__ = {
7105
7122
  "default": __rspack_default_export
7106
7123
  });
7107
7124
  },
7125
+ "./src/mcp/grok-bot/tools/codex_new.tsx" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7126
+ __webpack_require__.r(__webpack_exports__);
7127
+ var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.js");
7128
+ var _agent_bundle_runtime__rspack_import_6 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
7129
+ var agent_bundle_routes__rspack_import_1 = __webpack_require__("./node_modules/agent-bundle/dist/routes.js");
7130
+ var zod__rspack_import_5 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
7131
+ var _core_codex_bridge_js__rspack_import_2 = __webpack_require__("./src/core/codex-bridge.js");
7132
+ var _core_codex_contract_js__rspack_import_3 = __webpack_require__("./src/core/codex/contract.js");
7133
+ var _core_codex_routes_js__rspack_import_4 = __webpack_require__("./src/core/codex/routes.ts");
7134
+ const inputSchema = zod__rspack_import_5.Ikc({
7135
+ cwd: zod__rspack_import_5.YjP().min(1),
7136
+ expectedCwd: zod__rspack_import_5.YjP().min(1).optional(),
7137
+ model: zod__rspack_import_5.YjP().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/).optional(),
7138
+ effort: zod__rspack_import_5.k5n([
7139
+ 'none',
7140
+ 'minimal',
7141
+ 'low',
7142
+ 'medium',
7143
+ 'high',
7144
+ 'xhigh'
7145
+ ]).optional(),
7146
+ message: zod__rspack_import_5.YjP().min(1).optional()
7147
+ }).strict();
7148
+ const __rspack_default_export = (0, agent_bundle_routes__rspack_import_1.uO)({
7149
+ excludeClients: [
7150
+ 'codex'
7151
+ ],
7152
+ title: 'Codex new thread',
7153
+ 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.',
7154
+ annotations: {
7155
+ readOnlyHint: false
7156
+ },
7157
+ inputSchema,
7158
+ resultSchema: _core_codex_routes_js__rspack_import_4.FD,
7159
+ inputJsonSchema: {
7160
+ type: 'object',
7161
+ additionalProperties: false,
7162
+ properties: {
7163
+ cwd: {
7164
+ type: 'string'
7165
+ },
7166
+ expectedCwd: {
7167
+ type: 'string'
7168
+ },
7169
+ model: {
7170
+ type: 'string'
7171
+ },
7172
+ effort: {
7173
+ type: 'string',
7174
+ enum: [
7175
+ 'none',
7176
+ 'minimal',
7177
+ 'low',
7178
+ 'medium',
7179
+ 'high',
7180
+ 'xhigh'
7181
+ ]
7182
+ },
7183
+ message: {
7184
+ type: 'string'
7185
+ }
7186
+ },
7187
+ required: [
7188
+ 'cwd'
7189
+ ]
7190
+ }
7191
+ }, async (input)=>{
7192
+ let out;
7193
+ try {
7194
+ out = await (0, _core_codex_bridge_js__rspack_import_2.QC)(input);
7195
+ } catch (error) {
7196
+ out = (0, _core_codex_contract_js__rspack_import_3.DG)(error);
7197
+ }
7198
+ return (0, react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6.g.Result, {
7199
+ value: out,
7200
+ children: (0, react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6.g.Text, {
7201
+ children: out.threadId && !('delivery' in out) ? `Started Codex thread ${out.threadId}` : (0, _core_codex_routes_js__rspack_import_4.D6)(out)
7202
+ })
7203
+ });
7204
+ });
7205
+ __webpack_require__.d(__webpack_exports__, {}, {
7206
+ "default": __rspack_default_export,
7207
+ inputSchema: inputSchema
7208
+ });
7209
+ },
7108
7210
  "./src/mcp/grok-bot/tools/codex_send.tsx" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7109
7211
  __webpack_require__.r(__webpack_exports__);
7110
7212
  var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.js");
@@ -7132,13 +7234,13 @@ var __webpack_modules__ = {
7132
7234
  excludeClients: [
7133
7235
  'codex'
7134
7236
  ],
7135
- 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.',
7237
+ 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.',
7136
7238
  title: 'Codex send',
7137
7239
  annotations: {
7138
7240
  readOnlyHint: false
7139
7241
  },
7140
7242
  render: {
7141
- maxElapsedMs: 660000
7243
+ maxElapsedMs: 7260000
7142
7244
  },
7143
7245
  inputSchema,
7144
7246
  resultSchema,
@@ -7148,6 +7250,20 @@ var __webpack_modules__ = {
7148
7250
  expectedCwd: {
7149
7251
  type: 'string'
7150
7252
  },
7253
+ model: {
7254
+ type: 'string'
7255
+ },
7256
+ effort: {
7257
+ type: 'string',
7258
+ enum: [
7259
+ 'none',
7260
+ 'minimal',
7261
+ 'low',
7262
+ 'medium',
7263
+ 'high',
7264
+ 'xhigh'
7265
+ ]
7266
+ },
7151
7267
  threadId: {
7152
7268
  type: 'string'
7153
7269
  },
@@ -7243,7 +7359,7 @@ var __webpack_modules__ = {
7243
7359
  excludeClients: [
7244
7360
  'codex'
7245
7361
  ],
7246
- description: 'Discover a bounded page of Codex daemon threads.',
7362
+ 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.',
7247
7363
  title: 'Codex threads',
7248
7364
  annotations: {
7249
7365
  readOnlyHint: true
@@ -7294,13 +7410,13 @@ var __webpack_modules__ = {
7294
7410
  excludeClients: [
7295
7411
  'codex'
7296
7412
  ],
7297
- description: 'Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.',
7413
+ 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.',
7298
7414
  title: 'Codex wait',
7299
7415
  annotations: {
7300
7416
  readOnlyHint: true
7301
7417
  },
7302
7418
  render: {
7303
- maxElapsedMs: 660000
7419
+ maxElapsedMs: 7260000
7304
7420
  },
7305
7421
  inputSchema: _core_codex_routes_js__rspack_import_2.jS,
7306
7422
  resultSchema: _core_codex_routes_js__rspack_import_2.FD,
@@ -7316,7 +7432,7 @@ var __webpack_modules__ = {
7316
7432
  },
7317
7433
  "timeoutMs": {
7318
7434
  "type": "number",
7319
- "description": "Observation timeout: 1-600000 milliseconds."
7435
+ "description": "Observation timeout: 1-7200000 milliseconds."
7320
7436
  },
7321
7437
  "turnId": {
7322
7438
  "type": "string"
@@ -7363,7 +7479,7 @@ var __webpack_modules__ = {
7363
7479
  excludeClients: [
7364
7480
  'codex'
7365
7481
  ],
7366
- description: 'Watch bounded Codex thread events for diagnostics without answering approvals.',
7482
+ 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.',
7367
7483
  title: 'Codex watch',
7368
7484
  annotations: {
7369
7485
  readOnlyHint: true
@@ -56143,44 +56259,46 @@ var __webpack_modules__ = {
56143
56259
  "./.agent-bundle-virtual/mcp-grok-bot-b8c2461e-1.mjs" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
56144
56260
  __webpack_require__.r(__webpack_exports__);
56145
56261
  var node_url__rspack_import_0 = __webpack_require__("node:url");
56146
- var _agent_bundle_runtime__rspack_import_16 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
56262
+ var _agent_bundle_runtime__rspack_import_17 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
56147
56263
  var agent_bundle_mcp_server_runtime__rspack_import_1 = __webpack_require__("./node_modules/agent-bundle/dist/mcp-server-runtime.js");
56148
- var _agent_bundle_runtime_lineage__rspack_import_17 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/lineage.js");
56264
+ var _agent_bundle_runtime_lineage__rspack_import_18 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/lineage.js");
56149
56265
  var agent_bundle_mcp_apps__rspack_import_2 = __webpack_require__("./.agent-bundle-virtual/mcp-grok-bot-b8c2461e-0.mjs");
56150
56266
  var _src_mcp_grok_bot_tools_claude_send_tsx__rspack_import_3 = __webpack_require__("./src/mcp/grok-bot/tools/claude_send.tsx");
56151
- var _src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_4 = __webpack_require__("./src/mcp/grok-bot/tools/codex_send.tsx");
56152
- var _src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_5 = __webpack_require__("./src/mcp/grok-bot/tools/codex_threads.tsx");
56153
- var _src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_6 = __webpack_require__("./src/mcp/grok-bot/tools/codex_wait.tsx");
56154
- var _src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_7 = __webpack_require__("./src/mcp/grok-bot/tools/codex_watch.tsx");
56155
- var _src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_8 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_start.tsx");
56156
- var _src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_9 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_status.tsx");
56157
- var _src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_10 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_stop.tsx");
56158
- var _src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_11 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_codex_respond.tsx");
56159
- var _src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_12 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_approvals.tsx");
56160
- var _src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_13 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_respond.tsx");
56161
- var _src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_14 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_send.tsx");
56162
- var _src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_15 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_thread.tsx");
56267
+ var _src_mcp_grok_bot_tools_codex_new_tsx__rspack_import_4 = __webpack_require__("./src/mcp/grok-bot/tools/codex_new.tsx");
56268
+ var _src_mcp_grok_bot_tools_codex_send_tsx__rspack_import_5 = __webpack_require__("./src/mcp/grok-bot/tools/codex_send.tsx");
56269
+ var _src_mcp_grok_bot_tools_codex_threads_tsx__rspack_import_6 = __webpack_require__("./src/mcp/grok-bot/tools/codex_threads.tsx");
56270
+ var _src_mcp_grok_bot_tools_codex_wait_tsx__rspack_import_7 = __webpack_require__("./src/mcp/grok-bot/tools/codex_wait.tsx");
56271
+ var _src_mcp_grok_bot_tools_codex_watch_tsx__rspack_import_8 = __webpack_require__("./src/mcp/grok-bot/tools/codex_watch.tsx");
56272
+ var _src_mcp_grok_bot_tools_gbot_bridge_start_tsx__rspack_import_9 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_start.tsx");
56273
+ var _src_mcp_grok_bot_tools_gbot_bridge_status_tsx__rspack_import_10 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_status.tsx");
56274
+ var _src_mcp_grok_bot_tools_gbot_bridge_stop_tsx__rspack_import_11 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_bridge_stop.tsx");
56275
+ var _src_mcp_grok_bot_tools_gbot_codex_respond_tsx__rspack_import_12 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_codex_respond.tsx");
56276
+ var _src_mcp_grok_bot_tools_gbot_grok_approvals_tsx__rspack_import_13 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_approvals.tsx");
56277
+ var _src_mcp_grok_bot_tools_gbot_grok_respond_tsx__rspack_import_14 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_grok_respond.tsx");
56278
+ var _src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_15 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_send.tsx");
56279
+ var _src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_16 = __webpack_require__("./src/mcp/grok-bot/tools/gbot_thread.tsx");
56163
56280
  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);
56164
- 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);
56165
- 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);
56166
- 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);
56167
- 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);
56168
- 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);
56169
- 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);
56170
- 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);
56171
- 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);
56172
- 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);
56173
- 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);
56174
- 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);
56175
- 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);
56176
- const ARTIFACT_EPOCH = "gbot@0.10.0";
56177
- const pluginRoot = (0, _agent_bundle_runtime__rspack_import_16.E7)({
56281
+ 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);
56282
+ 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);
56283
+ 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);
56284
+ 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);
56285
+ 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);
56286
+ 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);
56287
+ 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);
56288
+ 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);
56289
+ 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);
56290
+ 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);
56291
+ 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);
56292
+ 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);
56293
+ 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);
56294
+ const ARTIFACT_EPOCH = "gbot@0.10.2";
56295
+ const pluginRoot = (0, _agent_bundle_runtime__rspack_import_17.E7)({
56178
56296
  fallback: (0, node_url__rspack_import_0.fileURLToPath)(new URL('..', import.meta.url)),
56179
56297
  stateAnchor: 'user-data'
56180
56298
  });
56181
56299
  const openLineage = async ()=>({
56182
56300
  dispose: async ()=>undefined,
56183
- registry: (0, _agent_bundle_runtime_lineage__rspack_import_17.Q5)()
56301
+ registry: (0, _agent_bundle_runtime_lineage__rspack_import_18.Q5)()
56184
56302
  });
56185
56303
  const routes = Object.freeze({
56186
56304
  "tool:grok-bot/claude_send": Object.freeze({
@@ -56188,7 +56306,7 @@ var __webpack_modules__ = {
56188
56306
  "annotations": {
56189
56307
  "readOnlyHint": false
56190
56308
  },
56191
- "description": "Send to a named, opted-in live Claude Code channel and wait for its reply. Unknown delivery must not be retried automatically.",
56309
+ "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.",
56192
56310
  "inputJsonSchema": {
56193
56311
  "additionalProperties": false,
56194
56312
  "properties": {
@@ -56218,12 +56336,60 @@ var __webpack_modules__ = {
56218
56336
  module: route0,
56219
56337
  name: "claude_send"
56220
56338
  }),
56339
+ "tool:grok-bot/codex_new": Object.freeze({
56340
+ config: {
56341
+ "annotations": {
56342
+ "readOnlyHint": false
56343
+ },
56344
+ "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.",
56345
+ "excludeClients": [
56346
+ "codex"
56347
+ ],
56348
+ "inputJsonSchema": {
56349
+ "additionalProperties": false,
56350
+ "properties": {
56351
+ "cwd": {
56352
+ "type": "string"
56353
+ },
56354
+ "effort": {
56355
+ "enum": [
56356
+ "none",
56357
+ "minimal",
56358
+ "low",
56359
+ "medium",
56360
+ "high",
56361
+ "xhigh"
56362
+ ],
56363
+ "type": "string"
56364
+ },
56365
+ "expectedCwd": {
56366
+ "type": "string"
56367
+ },
56368
+ "message": {
56369
+ "type": "string"
56370
+ },
56371
+ "model": {
56372
+ "type": "string"
56373
+ }
56374
+ },
56375
+ "required": [
56376
+ "cwd"
56377
+ ],
56378
+ "type": "object"
56379
+ },
56380
+ "title": "Codex new thread"
56381
+ },
56382
+ id: "tool:grok-bot/codex_new",
56383
+ kind: "tool",
56384
+ module: route1,
56385
+ name: "codex_new"
56386
+ }),
56221
56387
  "tool:grok-bot/codex_send": Object.freeze({
56222
56388
  config: {
56223
56389
  "annotations": {
56224
56390
  "readOnlyHint": false
56225
56391
  },
56226
- "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.",
56392
+ "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.",
56227
56393
  "excludeClients": [
56228
56394
  "codex"
56229
56395
  ],
@@ -56236,6 +56402,17 @@ var __webpack_modules__ = {
56236
56402
  "correlationId": {
56237
56403
  "type": "string"
56238
56404
  },
56405
+ "effort": {
56406
+ "enum": [
56407
+ "none",
56408
+ "minimal",
56409
+ "low",
56410
+ "medium",
56411
+ "high",
56412
+ "xhigh"
56413
+ ],
56414
+ "type": "string"
56415
+ },
56239
56416
  "envelope": {
56240
56417
  "type": "boolean"
56241
56418
  },
@@ -56254,6 +56431,9 @@ var __webpack_modules__ = {
56254
56431
  "message": {
56255
56432
  "type": "string"
56256
56433
  },
56434
+ "model": {
56435
+ "type": "string"
56436
+ },
56257
56437
  "replyTo": {
56258
56438
  "type": "string"
56259
56439
  },
@@ -56289,13 +56469,13 @@ var __webpack_modules__ = {
56289
56469
  "type": "object"
56290
56470
  },
56291
56471
  "render": {
56292
- "maxElapsedMs": 660000
56472
+ "maxElapsedMs": 7260000
56293
56473
  },
56294
56474
  "title": "Codex send"
56295
56475
  },
56296
56476
  id: "tool:grok-bot/codex_send",
56297
56477
  kind: "tool",
56298
- module: route1,
56478
+ module: route2,
56299
56479
  name: "codex_send"
56300
56480
  }),
56301
56481
  "tool:grok-bot/codex_threads": Object.freeze({
@@ -56303,7 +56483,7 @@ var __webpack_modules__ = {
56303
56483
  "annotations": {
56304
56484
  "readOnlyHint": true
56305
56485
  },
56306
- "description": "Discover a bounded page of Codex daemon threads.",
56486
+ "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.",
56307
56487
  "excludeClients": [
56308
56488
  "codex"
56309
56489
  ],
@@ -56328,7 +56508,7 @@ var __webpack_modules__ = {
56328
56508
  },
56329
56509
  id: "tool:grok-bot/codex_threads",
56330
56510
  kind: "tool",
56331
- module: route2,
56511
+ module: route3,
56332
56512
  name: "codex_threads"
56333
56513
  }),
56334
56514
  "tool:grok-bot/codex_wait": Object.freeze({
@@ -56336,7 +56516,7 @@ var __webpack_modules__ = {
56336
56516
  "annotations": {
56337
56517
  "readOnlyHint": true
56338
56518
  },
56339
- "description": "Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.",
56519
+ "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.",
56340
56520
  "excludeClients": [
56341
56521
  "codex"
56342
56522
  ],
@@ -56357,7 +56537,7 @@ var __webpack_modules__ = {
56357
56537
  "type": "string"
56358
56538
  },
56359
56539
  "timeoutMs": {
56360
- "description": "Observation timeout: 1-600000 milliseconds.",
56540
+ "description": "Observation timeout: 1-7200000 milliseconds.",
56361
56541
  "type": "number"
56362
56542
  },
56363
56543
  "turnId": {
@@ -56371,13 +56551,13 @@ var __webpack_modules__ = {
56371
56551
  "type": "object"
56372
56552
  },
56373
56553
  "render": {
56374
- "maxElapsedMs": 660000
56554
+ "maxElapsedMs": 7260000
56375
56555
  },
56376
56556
  "title": "Codex wait"
56377
56557
  },
56378
56558
  id: "tool:grok-bot/codex_wait",
56379
56559
  kind: "tool",
56380
- module: route3,
56560
+ module: route4,
56381
56561
  name: "codex_wait"
56382
56562
  }),
56383
56563
  "tool:grok-bot/codex_watch": Object.freeze({
@@ -56385,7 +56565,7 @@ var __webpack_modules__ = {
56385
56565
  "annotations": {
56386
56566
  "readOnlyHint": true
56387
56567
  },
56388
- "description": "Watch bounded Codex thread events for diagnostics without answering approvals.",
56568
+ "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.",
56389
56569
  "excludeClients": [
56390
56570
  "codex"
56391
56571
  ],
@@ -56419,7 +56599,7 @@ var __webpack_modules__ = {
56419
56599
  },
56420
56600
  id: "tool:grok-bot/codex_watch",
56421
56601
  kind: "tool",
56422
- module: route4,
56602
+ module: route5,
56423
56603
  name: "codex_watch"
56424
56604
  }),
56425
56605
  "tool:grok-bot/gbot_bridge_start": Object.freeze({
@@ -56460,7 +56640,7 @@ var __webpack_modules__ = {
56460
56640
  },
56461
56641
  id: "tool:grok-bot/gbot_bridge_start",
56462
56642
  kind: "tool",
56463
- module: route5,
56643
+ module: route6,
56464
56644
  name: "gbot_bridge_start"
56465
56645
  }),
56466
56646
  "tool:grok-bot/gbot_bridge_status": Object.freeze({
@@ -56485,7 +56665,7 @@ var __webpack_modules__ = {
56485
56665
  },
56486
56666
  id: "tool:grok-bot/gbot_bridge_status",
56487
56667
  kind: "tool",
56488
- module: route6,
56668
+ module: route7,
56489
56669
  name: "gbot_bridge_status"
56490
56670
  }),
56491
56671
  "tool:grok-bot/gbot_bridge_stop": Object.freeze({
@@ -56513,7 +56693,7 @@ var __webpack_modules__ = {
56513
56693
  },
56514
56694
  id: "tool:grok-bot/gbot_bridge_stop",
56515
56695
  kind: "tool",
56516
- module: route7,
56696
+ module: route8,
56517
56697
  name: "gbot_bridge_stop"
56518
56698
  }),
56519
56699
  "tool:grok-bot/gbot_codex_respond": Object.freeze({
@@ -56571,7 +56751,7 @@ var __webpack_modules__ = {
56571
56751
  },
56572
56752
  id: "tool:grok-bot/gbot_codex_respond",
56573
56753
  kind: "tool",
56574
- module: route8,
56754
+ module: route9,
56575
56755
  name: "gbot_codex_respond"
56576
56756
  }),
56577
56757
  "tool:grok-bot/gbot_grok_approvals": Object.freeze({
@@ -56601,7 +56781,7 @@ var __webpack_modules__ = {
56601
56781
  },
56602
56782
  id: "tool:grok-bot/gbot_grok_approvals",
56603
56783
  kind: "tool",
56604
- module: route9,
56784
+ module: route10,
56605
56785
  name: "gbot_grok_approvals"
56606
56786
  }),
56607
56787
  "tool:grok-bot/gbot_grok_respond": Object.freeze({
@@ -56647,7 +56827,7 @@ var __webpack_modules__ = {
56647
56827
  },
56648
56828
  id: "tool:grok-bot/gbot_grok_respond",
56649
56829
  kind: "tool",
56650
- module: route10,
56830
+ module: route11,
56651
56831
  name: "gbot_grok_respond"
56652
56832
  }),
56653
56833
  "tool:grok-bot/gbot_send": Object.freeze({
@@ -56707,7 +56887,7 @@ var __webpack_modules__ = {
56707
56887
  },
56708
56888
  id: "tool:grok-bot/gbot_send",
56709
56889
  kind: "tool",
56710
- module: route11,
56890
+ module: route12,
56711
56891
  name: "gbot_send"
56712
56892
  }),
56713
56893
  "tool:grok-bot/gbot_thread": Object.freeze({
@@ -56752,7 +56932,7 @@ var __webpack_modules__ = {
56752
56932
  },
56753
56933
  id: "tool:grok-bot/gbot_thread",
56754
56934
  kind: "tool",
56755
- module: route12,
56935
+ module: route13,
56756
56936
  name: "gbot_thread"
56757
56937
  })
56758
56938
  });
@@ -56766,7 +56946,7 @@ var __webpack_modules__ = {
56766
56946
  lineage: lineage.registry,
56767
56947
  plugin: {
56768
56948
  "name": "gbot",
56769
- "version": "0.10.0"
56949
+ "version": "0.10.2"
56770
56950
  },
56771
56951
  pluginRoot: pluginRoot.identity,
56772
56952
  routes
@@ -57007,6 +57187,7 @@ var __webpack_modules__ = {
57007
57187
  var node_net__rspack_import_2 = __webpack_require__("node:net");
57008
57188
  var node_os__rspack_import_3 = __webpack_require__("node:os");
57009
57189
  var node_path__rspack_import_4 = __webpack_require__("node:path");
57190
+ var _user_machine_guidance_js__rspack_import_5 = __webpack_require__("./src/core/user-machine-guidance.js");
57010
57191
  const MAX_BYTES = 65536;
57011
57192
  const FRAME_BYTES = MAX_BYTES * 6 + 1024;
57012
57193
  const defaultDirectory = ()=>(0, node_path__rspack_import_4.join)((0, node_os__rspack_import_3.homedir)(), '.grok-bot-cli', 'claude');
@@ -57017,6 +57198,18 @@ var __webpack_modules__ = {
57017
57198
  if (Buffer.byteLength(path) >= 104) throw Error('Claude channel socket path is too long');
57018
57199
  return path;
57019
57200
  }
57201
+ function absentClaudeChannelMessage(path, directory) {
57202
+ if ((0, _user_machine_guidance_js__rspack_import_5.R)({
57203
+ path,
57204
+ home: directory
57205
+ })) {
57206
+ return [
57207
+ 'No Claude channel socket at ' + path + '.',
57208
+ _user_machine_guidance_js__rspack_import_5.M
57209
+ ].join('\n');
57210
+ }
57211
+ 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).';
57212
+ }
57020
57213
  function messageText(message) {
57021
57214
  if (typeof message !== 'string' || !message.trim() || Buffer.byteLength(message) > MAX_BYTES) throw Error('Message must contain text within 64 KiB');
57022
57215
  return message;
@@ -57150,8 +57343,21 @@ var __webpack_modules__ = {
57150
57343
  const path = socketPath(name, directory);
57151
57344
  messageText(message);
57152
57345
  timeout(timeoutMs);
57153
- await privateDirectory(directory);
57154
- const info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
57346
+ try {
57347
+ await privateDirectory(directory);
57348
+ } catch (error) {
57349
+ if (error && (error.code === 'ENOENT' || /no such file|ENOENT/i.test(String(error.message)))) {
57350
+ throw Error(absentClaudeChannelMessage(path, directory));
57351
+ }
57352
+ throw error;
57353
+ }
57354
+ let info;
57355
+ try {
57356
+ info = await (0, node_fs_promises__rspack_import_1.lstat)(path);
57357
+ } catch (error) {
57358
+ if (error && error.code === 'ENOENT') throw Error(absentClaudeChannelMessage(path, directory));
57359
+ throw error;
57360
+ }
57155
57361
  if (!info.isSocket() || info.uid !== process.getuid() || info.mode & 63) throw Error('Claude channel socket is not private to this user');
57156
57362
  return new Promise((resolve, reject)=>{
57157
57363
  const socket = (0, node_net__rspack_import_2.connect)(path);
@@ -57201,7 +57407,8 @@ var __webpack_modules__ = {
57201
57407
  var _package_json__rspack_import_6 = __webpack_require__("./package.json");
57202
57408
  var _codex_contract_js__rspack_import_7 = __webpack_require__("./src/core/codex/contract.js");
57203
57409
  var _desktop_shim_js__rspack_import_8 = __webpack_require__("./src/core/desktop-shim.js");
57204
- const PINNED_CODEX_VERSION = "0.154.0";
57410
+ var _user_machine_guidance_js__rspack_import_9 = __webpack_require__("./src/core/user-machine-guidance.js");
57411
+ const PINNED_CODEX_VERSION = "0.158.0";
57205
57412
  const UPSTREAM_DESKTOP_ISSUES = [
57206
57413
  "https://github.com/openai/codex/issues/41014",
57207
57414
  "https://github.com/openai/codex/issues/41112"
@@ -57234,20 +57441,34 @@ var __webpack_modules__ = {
57234
57441
  function singleLine(text) {
57235
57442
  return stripTerminalControls(text).replace(/[\t\n\r\u2028\u2029]+/g, " ");
57236
57443
  }
57237
- function unreachableMessage(path, desktopAttached = "unknown") {
57444
+ function boxUnreachableMessage(path) {
57445
+ return [
57446
+ "No Codex app-server control socket at " + path + ".",
57447
+ _user_machine_guidance_js__rspack_import_9.M
57448
+ ].join("\n");
57449
+ }
57450
+ function unreachableMessage(path, desktopAttached = "unknown", env = process.env) {
57451
+ if ((0, _user_machine_guidance_js__rspack_import_9.R)({
57452
+ path,
57453
+ env,
57454
+ home: env.HOME || (0, node_os__rspack_import_3.homedir)()
57455
+ })) {
57456
+ return boxUnreachableMessage(path);
57457
+ }
57238
57458
  if (desktopAttached === "private-stdio") {
57239
57459
  return [
57240
57460
  "ChatGPT Desktop is running its private stdio app-server, which external clients cannot reach",
57241
57461
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
57242
- "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start`.",
57243
- "gbot codex targets daemon-managed threads only."
57462
+ "No Codex app-server control socket at " + path + ": start a managed standalone daemon with `codex app-server daemon start` (or bootstrap).",
57463
+ "gbot codex targets daemon-managed threads only; gbot has no remote transport."
57244
57464
  ].join("\n");
57245
57465
  }
57246
57466
  return [
57247
57467
  "No Codex app-server control socket at " + path + ".",
57248
- "Either no daemon is running (start one with `codex app-server daemon start`),",
57468
+ "Either no daemon is running (start one with `codex app-server daemon start` or bootstrap),",
57249
57469
  "or ChatGPT Desktop is running a private stdio app-server that external clients cannot reach",
57250
57470
  "(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
57471
+ "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.",
57251
57472
  "gbot codex targets daemon-managed threads only."
57252
57473
  ].join("\n");
57253
57474
  }
@@ -57891,6 +58112,47 @@ var __webpack_modules__ = {
57891
58112
  };
57892
58113
  }
57893
58114
  const openSession = openCodexSession;
58115
+ async function startCodexThread({ cwd, expectedCwd, model, effort, message, env = process.env, signal } = {}) {
58116
+ validateModelEffort(model, effort);
58117
+ if (typeof cwd !== "string" || !cwd.trim()) throw new RangeError("--cwd is required for a new Codex thread");
58118
+ const resolvedCwd = (0, node_fs__rspack_import_1.realpathSync)(cwd);
58119
+ if (expectedCwd !== undefined && (0, node_fs__rspack_import_1.realpathSync)(expectedCwd) !== resolvedCwd) throw new RangeError("New Codex thread cwd does not match expectedCwd");
58120
+ if (message !== undefined && (typeof message !== "string" || !message.trim())) throw new RangeError("Message must contain text");
58121
+ const { client } = await openSession(env, {
58122
+ signal
58123
+ });
58124
+ let threadId, started;
58125
+ try {
58126
+ started = await client.request("thread/start", {
58127
+ cwd: resolvedCwd,
58128
+ ...model ? {
58129
+ model
58130
+ } : {},
58131
+ ...effort ? {
58132
+ config: {
58133
+ model_reasoning_effort: effort
58134
+ }
58135
+ } : {}
58136
+ });
58137
+ threadId = started?.thread?.id;
58138
+ if (typeof threadId !== "string" || !ID_PATTERN.test(threadId)) throw new CodexProtocolError("thread/start", "missing `thread.id`");
58139
+ } finally{
58140
+ client.close();
58141
+ }
58142
+ if (message === undefined) return {
58143
+ threadId,
58144
+ cwd: resolvedCwd,
58145
+ model: started.model ?? model,
58146
+ exitCode: 0
58147
+ };
58148
+ return await sendToCodexThread(threadId, message, {
58149
+ env,
58150
+ expectedCwd: resolvedCwd,
58151
+ model,
58152
+ effort,
58153
+ signal
58154
+ });
58155
+ }
57894
58156
  const CODEX_VERSION_PROBE_TIMEOUT_MS = 3000;
57895
58157
  function probeLocalCodexVersion(timeoutMs = CODEX_VERSION_PROBE_TIMEOUT_MS) {
57896
58158
  const out = spawnSync("codex", [
@@ -57980,7 +58242,7 @@ var __webpack_modules__ = {
57980
58242
  session = await openSession(env);
57981
58243
  } catch (err) {
57982
58244
  if (err instanceof CodexRouteError) {
57983
- const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached) : err.message;
58245
+ const message = err.mode === "socket-absent" ? unreachableMessage(path, desktopAttached, env) : err.message;
57984
58246
  return withStatusExitCode({
57985
58247
  ...base,
57986
58248
  reachable: false,
@@ -58189,7 +58451,7 @@ var __webpack_modules__ = {
58189
58451
  }
58190
58452
  function requireExperimental(env, what) {
58191
58453
  if (experimentalEnabled(env)) return;
58192
- 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 + ".", {
58454
+ 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.", {
58193
58455
  delivery: "rejected",
58194
58456
  reason: "experimental-disabled"
58195
58457
  });
@@ -58197,7 +58459,7 @@ var __webpack_modules__ = {
58197
58459
  function unsupportedOrRpc(err, method, threadId, envelope, turnId) {
58198
58460
  const guarded = method === "turn/steer";
58199
58461
  if (err instanceof CodexRpcError && err.rpc && err.rpc.code === -32601) {
58200
- 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."), {
58462
+ 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."), {
58201
58463
  delivery: "rejected",
58202
58464
  reason: "unsupported",
58203
58465
  threadId,
@@ -58254,7 +58516,7 @@ var __webpack_modules__ = {
58254
58516
  }
58255
58517
  async function sendToCodexThread(threadId, text, { env = process.env, envelope = buildEnvelope({
58256
58518
  env
58257
- }), whenBusy = "reject", session, expectedTurnId, expectedCwd, signal } = {}) {
58519
+ }), whenBusy = "reject", session, expectedTurnId, expectedCwd, model, effort, signal } = {}) {
58258
58520
  try {
58259
58521
  const receipt = await sendToCodexThreadInner(threadId, text, {
58260
58522
  env,
@@ -58263,6 +58525,8 @@ var __webpack_modules__ = {
58263
58525
  session,
58264
58526
  expectedTurnId,
58265
58527
  expectedCwd,
58528
+ model,
58529
+ effort,
58266
58530
  signal
58267
58531
  });
58268
58532
  return (0, _codex_contract_js__rspack_import_7.Dz)(receipt);
@@ -58274,7 +58538,19 @@ var __webpack_modules__ = {
58274
58538
  return (0, _codex_contract_js__rspack_import_7.DG)(err);
58275
58539
  }
58276
58540
  }
58277
- async function sendToCodexThreadInner(threadId, text, { env, envelope, whenBusy, session, expectedTurnId, expectedCwd, signal }) {
58541
+ function validateModelEffort(model, effort) {
58542
+ 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");
58543
+ if (effort !== undefined && ![
58544
+ "none",
58545
+ "minimal",
58546
+ "low",
58547
+ "medium",
58548
+ "high",
58549
+ "xhigh"
58550
+ ].includes(effort)) throw new RangeError("--effort must be none, minimal, low, medium, high, or xhigh");
58551
+ }
58552
+ async function sendToCodexThreadInner(threadId, text, { env, envelope, whenBusy, session, expectedTurnId, expectedCwd, model, effort, signal }) {
58553
+ validateModelEffort(model, effort);
58278
58554
  if (![
58279
58555
  "reject",
58280
58556
  "queue",
@@ -58320,7 +58596,15 @@ var __webpack_modules__ = {
58320
58596
  try {
58321
58597
  resumed = await client.request("thread/resume", {
58322
58598
  threadId,
58323
- excludeTurns: true
58599
+ excludeTurns: true,
58600
+ ...model ? {
58601
+ model
58602
+ } : {},
58603
+ ...effort ? {
58604
+ config: {
58605
+ model_reasoning_effort: effort
58606
+ }
58607
+ } : {}
58324
58608
  });
58325
58609
  } catch (err) {
58326
58610
  assertNotCancelled();
@@ -58453,7 +58737,13 @@ var __webpack_modules__ = {
58453
58737
  }
58454
58738
  ],
58455
58739
  clientUserMessageId: envelope.messageId,
58456
- turnTrigger: "gbot"
58740
+ turnTrigger: "gbot",
58741
+ ...model ? {
58742
+ model
58743
+ } : {},
58744
+ ...effort ? {
58745
+ effort
58746
+ } : {}
58457
58747
  });
58458
58748
  } catch (err) {
58459
58749
  if (err instanceof CodexSendError) throw err;
@@ -58510,6 +58800,7 @@ var __webpack_modules__ = {
58510
58800
  __webpack_require__.d(__webpack_exports__, {
58511
58801
  $3: ()=>assertThreadAllowed,
58512
58802
  Mr: ()=>withEnvelopeHeader,
58803
+ QC: ()=>startCodexThread,
58513
58804
  X$: ()=>listCodexThreads,
58514
58805
  ZS: ()=>sendToCodexThread,
58515
58806
  e0: ()=>experimentalEnabled,
@@ -58724,10 +59015,10 @@ var __webpack_modules__ = {
58724
59015
  ];
58725
59016
  if (afterMessageId !== undefined) boundedInteger(anchors.length, 200, 'afterMessageId count');
58726
59017
  for (const anchor of anchors)conversationId(anchor, 'afterMessageId');
58727
- boundedInteger(timeoutMs, 600000, 'timeoutMs');
59018
+ boundedInteger(timeoutMs, 7200000, 'timeoutMs');
58728
59019
  boundedInteger(maxOutputBytes, BUDGET, 'maxOutputBytes');
58729
59020
  if (waitSignal !== undefined && !(waitSignal instanceof AbortSignal)) throw new TypeError('signal must be an AbortSignal');
58730
- let done = false, status = acceptedTurns.has(turnId) ? 'inProgress' : undefined, error, historyError, itemBytes = 0, truncated = overflow;
59021
+ let done = false, status = acceptedTurns.has(turnId) ? 'inProgress' : undefined, error, historyError, itemBytes = 0, truncated = false;
58731
59022
  const items = new Map();
58732
59023
  const add = (item)=>{
58733
59024
  if (!item || typeof item.id !== 'string' || typeof item.type !== 'string') throw new Error('Invalid history item');
@@ -58774,6 +59065,7 @@ var __webpack_modules__ = {
58774
59065
  };
58775
59066
  const result = (state, detail)=>{
58776
59067
  const interactions = scan();
59068
+ const overflowUncertain = state === 'unknown' && /Notification coverage overflow/.test(detail ?? '');
58777
59069
  const candidates = [
58778
59070
  ...items.values()
58779
59071
  ].map((x)=>x.item);
@@ -58782,7 +59074,7 @@ var __webpack_modules__ = {
58782
59074
  const reply = {
58783
59075
  text: '',
58784
59076
  items: [],
58785
- truncated: truncated || overflow
59077
+ truncated: truncated || overflowUncertain
58786
59078
  };
58787
59079
  for (const item of selected){
58788
59080
  const text = reply.text ? `${reply.text}\n${item.text}` : item.text;
@@ -58815,7 +59107,7 @@ var __webpack_modules__ = {
58815
59107
  interactions
58816
59108
  };
58817
59109
  };
58818
- let timer, notify;
59110
+ let timer, pollTimer, notify;
58819
59111
  const abortSignals = [
58820
59112
  signal,
58821
59113
  waitSignal
@@ -58831,10 +59123,18 @@ var __webpack_modules__ = {
58831
59123
  'Codex connection closed'
58832
59124
  ]);
58833
59125
  };
58834
- timer = setTimeout(()=>resolve([
59126
+ timer = setTimeout(()=>resolve(overflow ? [
59127
+ 'unknown',
59128
+ 'Notification coverage overflow; pending interaction status is uncertain'
59129
+ ] : [
58835
59130
  'timeout',
58836
59131
  'Observation deadline reached'
58837
59132
  ]), timeoutMs);
59133
+ pollTimer = setInterval(()=>{
59134
+ for (const listener of [
59135
+ ...wake
59136
+ ])listener();
59137
+ }, 2000);
58838
59138
  for (const s of abortSignals)s.addEventListener('abort', notify, {
58839
59139
  once: true
58840
59140
  });
@@ -58905,19 +59205,51 @@ var __webpack_modules__ = {
58905
59205
  historyError
58906
59206
  ];
58907
59207
  }
59208
+ let lastPoll = 0;
58908
59209
  while(!done){
58909
59210
  const interactions = scan();
58910
59211
  if (terminal(status)) return [
58911
59212
  status,
58912
59213
  error ?? historyError
58913
59214
  ];
58914
- if (historyError || overflow) return [
59215
+ if (historyError) return [
58915
59216
  'unknown',
58916
- historyError ?? 'Notification coverage overflow'
59217
+ historyError
58917
59218
  ];
58918
59219
  if (interactions.length) return [
58919
59220
  'waiting-for-input'
58920
59221
  ];
59222
+ if (Date.now() - lastPoll >= 2000) {
59223
+ lastPoll = Date.now();
59224
+ try {
59225
+ await visitCodexHistory(session, threadId, 'thread/turns/list', {}, (data)=>{
59226
+ const turn = data.find((t)=>t?.id === turnId);
59227
+ if (!turn) return false;
59228
+ if (terminal(turn.status)) {
59229
+ status = turn.status;
59230
+ error = turn.error;
59231
+ }
59232
+ return true;
59233
+ }, {
59234
+ stopped: ()=>done
59235
+ });
59236
+ if (terminal(status)) {
59237
+ await visitCodexHistory(session, threadId, 'thread/items/list', {
59238
+ turnId,
59239
+ sortDirection: 'asc'
59240
+ }, (data)=>{
59241
+ for (const row of data)if (row?.turnId === turnId && row.item) add(row.item);
59242
+ return false;
59243
+ }, {
59244
+ stopped: ()=>done
59245
+ });
59246
+ continue;
59247
+ }
59248
+ } catch (err) {
59249
+ historyError = err.message;
59250
+ truncated = true;
59251
+ }
59252
+ }
58921
59253
  await new Promise((resolve)=>{
58922
59254
  const listener = ()=>{
58923
59255
  wake.delete(listener);
@@ -58940,6 +59272,7 @@ var __webpack_modules__ = {
58940
59272
  } finally{
58941
59273
  done = true;
58942
59274
  clearTimeout(timer);
59275
+ clearInterval(pollTimer);
58943
59276
  wake.delete(notify);
58944
59277
  for (const s of abortSignals)s.removeEventListener('abort', notify);
58945
59278
  for (const listener of [
@@ -58987,7 +59320,7 @@ var __webpack_modules__ = {
58987
59320
  close,
58988
59321
  async send (text, { envelope = (0, _codex_bridge_js__rspack_import_2.nq)({
58989
59322
  env
58990
- }), whenBusy = 'reject', expectedTurnId, signal: sendSignal } = {}) {
59323
+ }), whenBusy = 'reject', expectedTurnId, model, effort, signal: sendSignal } = {}) {
58991
59324
  if (closed) return (0, _contract_js__rspack_import_0.DG)(Object.assign(new Error('Conversation closed'), {
58992
59325
  delivery: 'rejected',
58993
59326
  reason: 'closed',
@@ -59006,6 +59339,8 @@ var __webpack_modules__ = {
59006
59339
  expectedTurnId,
59007
59340
  session,
59008
59341
  expectedCwd,
59342
+ model,
59343
+ effort,
59009
59344
  signal: submissionSignal
59010
59345
  });
59011
59346
  if (receipt.delivery === 'accepted' && receipt.turnId) {
@@ -60907,9 +61242,30 @@ ts() { date -u +%Y-%m-%dT%H:%M:%SZ; }
60907
61242
  fp: ()=>redactSecrets
60908
61243
  });
60909
61244
  },
61245
+ "./src/core/user-machine-guidance.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
61246
+ const USER_MACHINE_CODEX_CLAUDE_GUIDANCE = [
61247
+ "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).",
61248
+ "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.",
61249
+ "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).",
61250
+ "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."
61251
+ ].join("\n");
61252
+ function looksLikeGrokBotBox({ path = "", env = process.env, home = env.HOME || "" } = {}) {
61253
+ const values = [
61254
+ home,
61255
+ env.HOME,
61256
+ path
61257
+ ].filter((value)=>value != null && value !== "").map(String);
61258
+ return values.some((value)=>value === "/home/box" || value.startsWith("/home/box/"));
61259
+ }
61260
+ __webpack_require__.d(__webpack_exports__, {
61261
+ R: ()=>looksLikeGrokBotBox
61262
+ }, {
61263
+ M: USER_MACHINE_CODEX_CLAUDE_GUIDANCE
61264
+ });
61265
+ },
60910
61266
  "./package.json" (module) {
60911
61267
  module.exports = {
60912
- "rE": "0.10.0"
61268
+ "rE": "0.10.2"
60913
61269
  };
60914
61270
  }
60915
61271
  };