grok-bot-cli 0.10.1 → 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.
- package/CHANGELOG.md +11 -0
- package/README.md +10 -5
- package/dist/.claude-plugin/marketplace.json +1 -1
- package/dist/.claude-plugin/plugin.json +1 -1
- package/dist/.codex-plugin/plugin.json +1 -1
- package/dist/.cursor-plugin/plugin.json +1 -1
- package/dist/INSTALL.md +1 -1
- package/dist/README.md +10 -5
- package/dist/agent-bundle.compile-evidence.json +1 -1
- package/dist/agent-bundle.manifest.json +1 -1
- package/dist/agent-bundle.package-compile-evidence.json +1 -1
- package/dist/bin/gbot-flight.mjs +346 -103
- package/dist/bin/gbot.mjs +427 -108
- package/dist/commands/codex-send.md +2 -0
- package/dist/commands/codex-threads.md +2 -0
- package/dist/commands/codex-wait.md +2 -0
- package/dist/install.mjs +1 -1
- package/dist/mcp/mcp-claude-channel-8029413c.mjs +1 -1
- package/dist/mcp/mcp-grok-bot-b8c2461e-flight.mjs +370 -75
- package/dist/mcp/mcp-grok-bot-b8c2461e.mjs +364 -70
- package/dist/package.json +2 -2
- package/dist/plugin.json +1 -1
- package/dist/scripts/gbot-relay.mjs +152 -18
- package/package.json +2 -2
|
@@ -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(
|
|
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
|
-
|
|
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__, {
|
|
@@ -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");
|
|
@@ -7138,7 +7240,7 @@ var __webpack_modules__ = {
|
|
|
7138
7240
|
readOnlyHint: false
|
|
7139
7241
|
},
|
|
7140
7242
|
render: {
|
|
7141
|
-
maxElapsedMs:
|
|
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
|
},
|
|
@@ -7300,7 +7416,7 @@ var __webpack_modules__ = {
|
|
|
7300
7416
|
readOnlyHint: true
|
|
7301
7417
|
},
|
|
7302
7418
|
render: {
|
|
7303
|
-
maxElapsedMs:
|
|
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-
|
|
7435
|
+
"description": "Observation timeout: 1-7200000 milliseconds."
|
|
7320
7436
|
},
|
|
7321
7437
|
"turnId": {
|
|
7322
7438
|
"type": "string"
|
|
@@ -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
|
|
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
|
|
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
|
|
56152
|
-
var
|
|
56153
|
-
var
|
|
56154
|
-
var
|
|
56155
|
-
var
|
|
56156
|
-
var
|
|
56157
|
-
var
|
|
56158
|
-
var
|
|
56159
|
-
var
|
|
56160
|
-
var
|
|
56161
|
-
var
|
|
56162
|
-
var
|
|
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(
|
|
56165
|
-
const route2 = Object.assign({}, Reflect.get(
|
|
56166
|
-
const route3 = Object.assign({}, Reflect.get(
|
|
56167
|
-
const route4 = Object.assign({}, Reflect.get(
|
|
56168
|
-
const route5 = Object.assign({}, Reflect.get(
|
|
56169
|
-
const route6 = Object.assign({}, Reflect.get(
|
|
56170
|
-
const route7 = Object.assign({}, Reflect.get(
|
|
56171
|
-
const route8 = Object.assign({}, Reflect.get(
|
|
56172
|
-
const route9 = Object.assign({}, Reflect.get(
|
|
56173
|
-
const route10 = Object.assign({}, Reflect.get(
|
|
56174
|
-
const route11 = Object.assign({}, Reflect.get(
|
|
56175
|
-
const route12 = Object.assign({}, Reflect.get(
|
|
56176
|
-
const
|
|
56177
|
-
const
|
|
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,
|
|
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({
|
|
@@ -56218,6 +56336,54 @@ 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": {
|
|
@@ -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":
|
|
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:
|
|
56478
|
+
module: route2,
|
|
56299
56479
|
name: "codex_send"
|
|
56300
56480
|
}),
|
|
56301
56481
|
"tool:grok-bot/codex_threads": Object.freeze({
|
|
@@ -56328,7 +56508,7 @@ var __webpack_modules__ = {
|
|
|
56328
56508
|
},
|
|
56329
56509
|
id: "tool:grok-bot/codex_threads",
|
|
56330
56510
|
kind: "tool",
|
|
56331
|
-
module:
|
|
56511
|
+
module: route3,
|
|
56332
56512
|
name: "codex_threads"
|
|
56333
56513
|
}),
|
|
56334
56514
|
"tool:grok-bot/codex_wait": Object.freeze({
|
|
@@ -56357,7 +56537,7 @@ var __webpack_modules__ = {
|
|
|
56357
56537
|
"type": "string"
|
|
56358
56538
|
},
|
|
56359
56539
|
"timeoutMs": {
|
|
56360
|
-
"description": "Observation timeout: 1-
|
|
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":
|
|
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:
|
|
56560
|
+
module: route4,
|
|
56381
56561
|
name: "codex_wait"
|
|
56382
56562
|
}),
|
|
56383
56563
|
"tool:grok-bot/codex_watch": Object.freeze({
|
|
@@ -56419,7 +56599,7 @@ var __webpack_modules__ = {
|
|
|
56419
56599
|
},
|
|
56420
56600
|
id: "tool:grok-bot/codex_watch",
|
|
56421
56601
|
kind: "tool",
|
|
56422
|
-
module:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
56949
|
+
"version": "0.10.2"
|
|
56770
56950
|
},
|
|
56771
56951
|
pluginRoot: pluginRoot.identity,
|
|
56772
56952
|
routes
|
|
@@ -57228,7 +57408,7 @@ var __webpack_modules__ = {
|
|
|
57228
57408
|
var _codex_contract_js__rspack_import_7 = __webpack_require__("./src/core/codex/contract.js");
|
|
57229
57409
|
var _desktop_shim_js__rspack_import_8 = __webpack_require__("./src/core/desktop-shim.js");
|
|
57230
57410
|
var _user_machine_guidance_js__rspack_import_9 = __webpack_require__("./src/core/user-machine-guidance.js");
|
|
57231
|
-
const PINNED_CODEX_VERSION = "0.
|
|
57411
|
+
const PINNED_CODEX_VERSION = "0.158.0";
|
|
57232
57412
|
const UPSTREAM_DESKTOP_ISSUES = [
|
|
57233
57413
|
"https://github.com/openai/codex/issues/41014",
|
|
57234
57414
|
"https://github.com/openai/codex/issues/41112"
|
|
@@ -57288,7 +57468,7 @@ var __webpack_modules__ = {
|
|
|
57288
57468
|
"Either no daemon is running (start one with `codex app-server daemon start` or bootstrap),",
|
|
57289
57469
|
"or ChatGPT Desktop is running a private stdio app-server that external clients cannot reach",
|
|
57290
57470
|
"(" + UPSTREAM_DESKTOP_ISSUES.join(", ") + ").",
|
|
57291
|
-
"gbot
|
|
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.",
|
|
57292
57472
|
"gbot codex targets daemon-managed threads only."
|
|
57293
57473
|
].join("\n");
|
|
57294
57474
|
}
|
|
@@ -57932,6 +58112,47 @@ var __webpack_modules__ = {
|
|
|
57932
58112
|
};
|
|
57933
58113
|
}
|
|
57934
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
|
+
}
|
|
57935
58156
|
const CODEX_VERSION_PROBE_TIMEOUT_MS = 3000;
|
|
57936
58157
|
function probeLocalCodexVersion(timeoutMs = CODEX_VERSION_PROBE_TIMEOUT_MS) {
|
|
57937
58158
|
const out = spawnSync("codex", [
|
|
@@ -58230,7 +58451,7 @@ var __webpack_modules__ = {
|
|
|
58230
58451
|
}
|
|
58231
58452
|
function requireExperimental(env, what) {
|
|
58232
58453
|
if (experimentalEnabled(env)) return;
|
|
58233
|
-
throw new CodexSendError(what + "
|
|
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.", {
|
|
58234
58455
|
delivery: "rejected",
|
|
58235
58456
|
reason: "experimental-disabled"
|
|
58236
58457
|
});
|
|
@@ -58238,7 +58459,7 @@ var __webpack_modules__ = {
|
|
|
58238
58459
|
function unsupportedOrRpc(err, method, threadId, envelope, turnId) {
|
|
58239
58460
|
const guarded = method === "turn/steer";
|
|
58240
58461
|
if (err instanceof CodexRpcError && err.rpc && err.rpc.code === -32601) {
|
|
58241
|
-
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." : "
|
|
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."), {
|
|
58242
58463
|
delivery: "rejected",
|
|
58243
58464
|
reason: "unsupported",
|
|
58244
58465
|
threadId,
|
|
@@ -58295,7 +58516,7 @@ var __webpack_modules__ = {
|
|
|
58295
58516
|
}
|
|
58296
58517
|
async function sendToCodexThread(threadId, text, { env = process.env, envelope = buildEnvelope({
|
|
58297
58518
|
env
|
|
58298
|
-
}), whenBusy = "reject", session, expectedTurnId, expectedCwd, signal } = {}) {
|
|
58519
|
+
}), whenBusy = "reject", session, expectedTurnId, expectedCwd, model, effort, signal } = {}) {
|
|
58299
58520
|
try {
|
|
58300
58521
|
const receipt = await sendToCodexThreadInner(threadId, text, {
|
|
58301
58522
|
env,
|
|
@@ -58304,6 +58525,8 @@ var __webpack_modules__ = {
|
|
|
58304
58525
|
session,
|
|
58305
58526
|
expectedTurnId,
|
|
58306
58527
|
expectedCwd,
|
|
58528
|
+
model,
|
|
58529
|
+
effort,
|
|
58307
58530
|
signal
|
|
58308
58531
|
});
|
|
58309
58532
|
return (0, _codex_contract_js__rspack_import_7.Dz)(receipt);
|
|
@@ -58315,7 +58538,19 @@ var __webpack_modules__ = {
|
|
|
58315
58538
|
return (0, _codex_contract_js__rspack_import_7.DG)(err);
|
|
58316
58539
|
}
|
|
58317
58540
|
}
|
|
58318
|
-
|
|
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);
|
|
58319
58554
|
if (![
|
|
58320
58555
|
"reject",
|
|
58321
58556
|
"queue",
|
|
@@ -58361,7 +58596,15 @@ var __webpack_modules__ = {
|
|
|
58361
58596
|
try {
|
|
58362
58597
|
resumed = await client.request("thread/resume", {
|
|
58363
58598
|
threadId,
|
|
58364
|
-
excludeTurns: true
|
|
58599
|
+
excludeTurns: true,
|
|
58600
|
+
...model ? {
|
|
58601
|
+
model
|
|
58602
|
+
} : {},
|
|
58603
|
+
...effort ? {
|
|
58604
|
+
config: {
|
|
58605
|
+
model_reasoning_effort: effort
|
|
58606
|
+
}
|
|
58607
|
+
} : {}
|
|
58365
58608
|
});
|
|
58366
58609
|
} catch (err) {
|
|
58367
58610
|
assertNotCancelled();
|
|
@@ -58494,7 +58737,13 @@ var __webpack_modules__ = {
|
|
|
58494
58737
|
}
|
|
58495
58738
|
],
|
|
58496
58739
|
clientUserMessageId: envelope.messageId,
|
|
58497
|
-
turnTrigger: "gbot"
|
|
58740
|
+
turnTrigger: "gbot",
|
|
58741
|
+
...model ? {
|
|
58742
|
+
model
|
|
58743
|
+
} : {},
|
|
58744
|
+
...effort ? {
|
|
58745
|
+
effort
|
|
58746
|
+
} : {}
|
|
58498
58747
|
});
|
|
58499
58748
|
} catch (err) {
|
|
58500
58749
|
if (err instanceof CodexSendError) throw err;
|
|
@@ -58551,6 +58800,7 @@ var __webpack_modules__ = {
|
|
|
58551
58800
|
__webpack_require__.d(__webpack_exports__, {
|
|
58552
58801
|
$3: ()=>assertThreadAllowed,
|
|
58553
58802
|
Mr: ()=>withEnvelopeHeader,
|
|
58803
|
+
QC: ()=>startCodexThread,
|
|
58554
58804
|
X$: ()=>listCodexThreads,
|
|
58555
58805
|
ZS: ()=>sendToCodexThread,
|
|
58556
58806
|
e0: ()=>experimentalEnabled,
|
|
@@ -58765,10 +59015,10 @@ var __webpack_modules__ = {
|
|
|
58765
59015
|
];
|
|
58766
59016
|
if (afterMessageId !== undefined) boundedInteger(anchors.length, 200, 'afterMessageId count');
|
|
58767
59017
|
for (const anchor of anchors)conversationId(anchor, 'afterMessageId');
|
|
58768
|
-
boundedInteger(timeoutMs,
|
|
59018
|
+
boundedInteger(timeoutMs, 7200000, 'timeoutMs');
|
|
58769
59019
|
boundedInteger(maxOutputBytes, BUDGET, 'maxOutputBytes');
|
|
58770
59020
|
if (waitSignal !== undefined && !(waitSignal instanceof AbortSignal)) throw new TypeError('signal must be an AbortSignal');
|
|
58771
|
-
let done = false, status = acceptedTurns.has(turnId) ? 'inProgress' : undefined, error, historyError, itemBytes = 0, truncated =
|
|
59021
|
+
let done = false, status = acceptedTurns.has(turnId) ? 'inProgress' : undefined, error, historyError, itemBytes = 0, truncated = false;
|
|
58772
59022
|
const items = new Map();
|
|
58773
59023
|
const add = (item)=>{
|
|
58774
59024
|
if (!item || typeof item.id !== 'string' || typeof item.type !== 'string') throw new Error('Invalid history item');
|
|
@@ -58815,6 +59065,7 @@ var __webpack_modules__ = {
|
|
|
58815
59065
|
};
|
|
58816
59066
|
const result = (state, detail)=>{
|
|
58817
59067
|
const interactions = scan();
|
|
59068
|
+
const overflowUncertain = state === 'unknown' && /Notification coverage overflow/.test(detail ?? '');
|
|
58818
59069
|
const candidates = [
|
|
58819
59070
|
...items.values()
|
|
58820
59071
|
].map((x)=>x.item);
|
|
@@ -58823,7 +59074,7 @@ var __webpack_modules__ = {
|
|
|
58823
59074
|
const reply = {
|
|
58824
59075
|
text: '',
|
|
58825
59076
|
items: [],
|
|
58826
|
-
truncated: truncated ||
|
|
59077
|
+
truncated: truncated || overflowUncertain
|
|
58827
59078
|
};
|
|
58828
59079
|
for (const item of selected){
|
|
58829
59080
|
const text = reply.text ? `${reply.text}\n${item.text}` : item.text;
|
|
@@ -58856,7 +59107,7 @@ var __webpack_modules__ = {
|
|
|
58856
59107
|
interactions
|
|
58857
59108
|
};
|
|
58858
59109
|
};
|
|
58859
|
-
let timer, notify;
|
|
59110
|
+
let timer, pollTimer, notify;
|
|
58860
59111
|
const abortSignals = [
|
|
58861
59112
|
signal,
|
|
58862
59113
|
waitSignal
|
|
@@ -58872,10 +59123,18 @@ var __webpack_modules__ = {
|
|
|
58872
59123
|
'Codex connection closed'
|
|
58873
59124
|
]);
|
|
58874
59125
|
};
|
|
58875
|
-
timer = setTimeout(()=>resolve([
|
|
59126
|
+
timer = setTimeout(()=>resolve(overflow ? [
|
|
59127
|
+
'unknown',
|
|
59128
|
+
'Notification coverage overflow; pending interaction status is uncertain'
|
|
59129
|
+
] : [
|
|
58876
59130
|
'timeout',
|
|
58877
59131
|
'Observation deadline reached'
|
|
58878
59132
|
]), timeoutMs);
|
|
59133
|
+
pollTimer = setInterval(()=>{
|
|
59134
|
+
for (const listener of [
|
|
59135
|
+
...wake
|
|
59136
|
+
])listener();
|
|
59137
|
+
}, 2000);
|
|
58879
59138
|
for (const s of abortSignals)s.addEventListener('abort', notify, {
|
|
58880
59139
|
once: true
|
|
58881
59140
|
});
|
|
@@ -58946,19 +59205,51 @@ var __webpack_modules__ = {
|
|
|
58946
59205
|
historyError
|
|
58947
59206
|
];
|
|
58948
59207
|
}
|
|
59208
|
+
let lastPoll = 0;
|
|
58949
59209
|
while(!done){
|
|
58950
59210
|
const interactions = scan();
|
|
58951
59211
|
if (terminal(status)) return [
|
|
58952
59212
|
status,
|
|
58953
59213
|
error ?? historyError
|
|
58954
59214
|
];
|
|
58955
|
-
if (historyError
|
|
59215
|
+
if (historyError) return [
|
|
58956
59216
|
'unknown',
|
|
58957
|
-
historyError
|
|
59217
|
+
historyError
|
|
58958
59218
|
];
|
|
58959
59219
|
if (interactions.length) return [
|
|
58960
59220
|
'waiting-for-input'
|
|
58961
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
|
+
}
|
|
58962
59253
|
await new Promise((resolve)=>{
|
|
58963
59254
|
const listener = ()=>{
|
|
58964
59255
|
wake.delete(listener);
|
|
@@ -58981,6 +59272,7 @@ var __webpack_modules__ = {
|
|
|
58981
59272
|
} finally{
|
|
58982
59273
|
done = true;
|
|
58983
59274
|
clearTimeout(timer);
|
|
59275
|
+
clearInterval(pollTimer);
|
|
58984
59276
|
wake.delete(notify);
|
|
58985
59277
|
for (const s of abortSignals)s.removeEventListener('abort', notify);
|
|
58986
59278
|
for (const listener of [
|
|
@@ -59028,7 +59320,7 @@ var __webpack_modules__ = {
|
|
|
59028
59320
|
close,
|
|
59029
59321
|
async send (text, { envelope = (0, _codex_bridge_js__rspack_import_2.nq)({
|
|
59030
59322
|
env
|
|
59031
|
-
}), whenBusy = 'reject', expectedTurnId, signal: sendSignal } = {}) {
|
|
59323
|
+
}), whenBusy = 'reject', expectedTurnId, model, effort, signal: sendSignal } = {}) {
|
|
59032
59324
|
if (closed) return (0, _contract_js__rspack_import_0.DG)(Object.assign(new Error('Conversation closed'), {
|
|
59033
59325
|
delivery: 'rejected',
|
|
59034
59326
|
reason: 'closed',
|
|
@@ -59047,6 +59339,8 @@ var __webpack_modules__ = {
|
|
|
59047
59339
|
expectedTurnId,
|
|
59048
59340
|
session,
|
|
59049
59341
|
expectedCwd,
|
|
59342
|
+
model,
|
|
59343
|
+
effort,
|
|
59050
59344
|
signal: submissionSignal
|
|
59051
59345
|
});
|
|
59052
59346
|
if (receipt.delivery === 'accepted' && receipt.turnId) {
|
|
@@ -60951,7 +61245,7 @@ ts() { date -u +%Y-%m-%dT%H:%M:%SZ; }
|
|
|
60951
61245
|
"./src/core/user-machine-guidance.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
60952
61246
|
const USER_MACHINE_CODEX_CLAUDE_GUIDANCE = [
|
|
60953
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).",
|
|
60954
|
-
"gbot
|
|
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.",
|
|
60955
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).",
|
|
60956
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."
|
|
60957
61251
|
].join("\n");
|
|
@@ -60971,7 +61265,7 @@ ts() { date -u +%Y-%m-%dT%H:%M:%SZ; }
|
|
|
60971
61265
|
},
|
|
60972
61266
|
"./package.json" (module) {
|
|
60973
61267
|
module.exports = {
|
|
60974
|
-
"rE": "0.10.
|
|
61268
|
+
"rE": "0.10.2"
|
|
60975
61269
|
};
|
|
60976
61270
|
}
|
|
60977
61271
|
};
|