grok-bot-cli 0.6.0 → 0.7.0

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/dist/bin/gbot.mjs CHANGED
@@ -11096,6 +11096,113 @@ __webpack_require__.d(__webpack_exports__, {
11096
11096
  });
11097
11097
 
11098
11098
 
11099
+ },
11100
+ "./src/cli/approvals/list.tsx"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
11101
+ __webpack_require__.r(__webpack_exports__);
11102
+ /* import */ var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.js");
11103
+ /* import */ var _agent_bundle_runtime__rspack_import_2 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
11104
+ /* import */ var _core_grok_approval_routes_js__rspack_import_1 = __webpack_require__("./src/core/grok-approval-routes.ts");
11105
+
11106
+
11107
+
11108
+
11109
+ const config = {
11110
+ description: 'List current Grok approval cards (latest 200 entries).',
11111
+ positionals: [
11112
+ 'target'
11113
+ ],
11114
+ inputJsonSchema: {
11115
+ type: 'object',
11116
+ properties: {
11117
+ target: {
11118
+ type: 'string'
11119
+ }
11120
+ },
11121
+ required: [
11122
+ 'target'
11123
+ ],
11124
+ additionalProperties: false
11125
+ }
11126
+ };
11127
+ async function route({ input }) {
11128
+ const out = await (0,_core_grok_approval_routes_js__rspack_import_1/* .listOperation */.gi)(input);
11129
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Result */.g.Result, {
11130
+ value: out,
11131
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Text */.g.Text, {
11132
+ children: JSON.stringify(out)
11133
+ })
11134
+ });
11135
+ }
11136
+
11137
+ __webpack_require__.d(__webpack_exports__, {
11138
+ "default": () => (route),
11139
+ inputSchema: () => (/* reexport safe */ _core_grok_approval_routes_js__rspack_import_1.cE),
11140
+ resultSchema: () => (/* reexport safe */ _core_grok_approval_routes_js__rspack_import_1.FD)
11141
+ }, {
11142
+ config: config
11143
+ });
11144
+
11145
+
11146
+ },
11147
+ "./src/cli/approvals/respond.tsx"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
11148
+ __webpack_require__.r(__webpack_exports__);
11149
+ /* import */ var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.js");
11150
+ /* import */ var _agent_bundle_runtime__rspack_import_2 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
11151
+ /* import */ var _core_grok_approval_routes_js__rspack_import_1 = __webpack_require__("./src/core/grok-approval-routes.ts");
11152
+
11153
+
11154
+
11155
+
11156
+ const config = {
11157
+ description: 'Explicit user decision: accept a Grok request once or decline; never grant persistent permissions.',
11158
+ inputJsonSchema: {
11159
+ type: 'object',
11160
+ properties: {
11161
+ target: {
11162
+ type: 'string'
11163
+ },
11164
+ entryId: {
11165
+ type: 'string'
11166
+ },
11167
+ requestId: {
11168
+ type: 'string'
11169
+ },
11170
+ decision: {
11171
+ type: 'string',
11172
+ enum: [
11173
+ 'accept',
11174
+ 'decline'
11175
+ ]
11176
+ }
11177
+ },
11178
+ required: [
11179
+ 'target',
11180
+ 'entryId',
11181
+ 'requestId',
11182
+ 'decision'
11183
+ ],
11184
+ additionalProperties: false
11185
+ }
11186
+ };
11187
+ async function route({ input }) {
11188
+ const out = await (0,_core_grok_approval_routes_js__rspack_import_1/* .respondOperation */.lr)(input);
11189
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Result */.g.Result, {
11190
+ value: out,
11191
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Text */.g.Text, {
11192
+ children: JSON.stringify(out)
11193
+ })
11194
+ });
11195
+ }
11196
+
11197
+ __webpack_require__.d(__webpack_exports__, {
11198
+ "default": () => (route),
11199
+ inputSchema: () => (/* reexport safe */ _core_grok_approval_routes_js__rspack_import_1.v1),
11200
+ resultSchema: () => (/* reexport safe */ _core_grok_approval_routes_js__rspack_import_1.FD)
11201
+ }, {
11202
+ config: config
11203
+ });
11204
+
11205
+
11099
11206
  },
11100
11207
  "./src/cli/bots/create.tsx"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
11101
11208
  __webpack_require__.r(__webpack_exports__);
@@ -11153,9 +11260,9 @@ async function botsCreate({ input }) {
11153
11260
  const { dir: _d, files: _f, gateway: _g, ...fields } = input;
11154
11261
  const rec = await backend.createAgent((0,_shared_js__rspack_import_1/* .toCreateInput */.cp)(fields));
11155
11262
  if (rec == null) throw new Error('createAgent returned no record');
11156
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Result */.g6.Result, {
11263
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Result */.g.Result, {
11157
11264
  value: (0,_core_format_js__rspack_import_3/* .summarize */.eh)(rec),
11158
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Text */.g6.Text, {
11265
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_2/* .Agent.Text */.g.Text, {
11159
11266
  children: `Created bot ${rec.name} (${rec.id})`
11160
11267
  })
11161
11268
  });
@@ -11221,9 +11328,9 @@ const resultSchema = _shared_js__rspack_import_1/* .agentSummarySchema */.t_;
11221
11328
  async function botsDelete({ input }) {
11222
11329
  const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
11223
11330
  const rec = await backend.deleteAgent(input.ref);
11224
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
11331
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11225
11332
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
11226
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
11333
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11227
11334
  children: `Deleted ${rec.isGroup ? 'group' : 'bot'} ${rec.name} (${rec.id})`
11228
11335
  })
11229
11336
  });
@@ -11290,9 +11397,9 @@ async function botsGet({ input }) {
11290
11397
  const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
11291
11398
  const rec = await backend.resolve(input.ref);
11292
11399
  const all = await backend.list();
11293
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
11400
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11294
11401
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
11295
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
11402
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11296
11403
  children: (0,_core_format_js__rspack_import_4/* .formatRecord */.bM)(rec, all)
11297
11404
  })
11298
11405
  });
@@ -11349,9 +11456,9 @@ async function botsList({ input }) {
11349
11456
  const rows = all.filter((r)=>!r.isGroup);
11350
11457
  const bots = rows.map(_core_format_js__rspack_import_3/* .summarize */.eh);
11351
11458
  const text = rows.length === 0 ? 'No bots.' : rows.map((r)=>(0,_core_format_js__rspack_import_3/* .formatRecord */.bM)(r, all)).join('\n\n');
11352
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
11459
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
11353
11460
  value: bots,
11354
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
11461
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
11355
11462
  children: text
11356
11463
  })
11357
11464
  });
@@ -11439,9 +11546,9 @@ async function botsUpdate({ input }) {
11439
11546
  const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
11440
11547
  const { dir: _d, files: _f, gateway: _g, ref, ...fields } = input;
11441
11548
  const rec = await backend.updateAgent(ref, (0,_shared_js__rspack_import_1/* .toUpdatePatch */.li)(fields));
11442
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
11549
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11443
11550
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
11444
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
11551
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11445
11552
  children: `Updated ${rec.isGroup ? 'group' : 'bot'} ${rec.name} (${rec.id})`
11446
11553
  })
11447
11554
  });
@@ -11525,9 +11632,9 @@ async function route({ input }) {
11525
11632
  } catch (error) {
11526
11633
  out = (0,_core_codex_contract_js__rspack_import_2/* .outcomeFromError */.DG)(error);
11527
11634
  }
11528
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
11635
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
11529
11636
  value: out,
11530
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
11637
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
11531
11638
  children: JSON.stringify(out)
11532
11639
  })
11533
11640
  });
@@ -11616,12 +11723,12 @@ async function route({ signal, input }) {
11616
11723
  } finally{
11617
11724
  signal.removeEventListener('abort', stop);
11618
11725
  }
11619
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
11726
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g.Result, {
11620
11727
  value: {
11621
11728
  state: 'stopped',
11622
11729
  exitCode
11623
11730
  },
11624
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
11731
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g.Text, {
11625
11732
  children: "Relay worker stopped."
11626
11733
  })
11627
11734
  });
@@ -11694,9 +11801,9 @@ async function route({ input }) {
11694
11801
  } catch (error) {
11695
11802
  out = (0,_core_codex_contract_js__rspack_import_2/* .outcomeFromError */.DG)(error);
11696
11803
  }
11697
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
11804
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
11698
11805
  value: out,
11699
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
11806
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
11700
11807
  children: JSON.stringify(out)
11701
11808
  })
11702
11809
  });
@@ -11750,9 +11857,9 @@ async function route({ input }) {
11750
11857
  } catch (error) {
11751
11858
  out = (0,_core_codex_contract_js__rspack_import_2/* .outcomeFromError */.DG)(error);
11752
11859
  }
11753
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
11860
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
11754
11861
  value: out,
11755
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
11862
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
11756
11863
  children: JSON.stringify(out)
11757
11864
  })
11758
11865
  });
@@ -11809,9 +11916,9 @@ async function route({ input }) {
11809
11916
  } catch (error) {
11810
11917
  out = (0,_core_codex_contract_js__rspack_import_2/* .outcomeFromError */.DG)(error);
11811
11918
  }
11812
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
11919
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
11813
11920
  value: out,
11814
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
11921
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
11815
11922
  children: JSON.stringify(out)
11816
11923
  })
11817
11924
  });
@@ -11887,21 +11994,21 @@ async function codexDesktopShim({ input }) {
11887
11994
  out = (0,_core_desktop_shim_js__rspack_import_1/* .installDesktopShim */.B0)();
11888
11995
  } catch (error) {
11889
11996
  const message = error instanceof Error ? error.message : String(error);
11890
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
11997
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11891
11998
  value: {
11892
11999
  action: 'install',
11893
12000
  error: message,
11894
12001
  exitCode: 1
11895
12002
  },
11896
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12003
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11897
12004
  children: `Desktop shim install failed: ${message}`
11898
12005
  })
11899
12006
  });
11900
12007
  }
11901
12008
  const text = `Installed ChatGPT Desktop shim:\n` + ` wrapper: ${out.wrapperPath}\n` + ` bridge: ${out.bridgePath}\n` + ` login env: ${out.envScriptPath}` + (out.plistPath ? `\n LaunchAgent: ${out.plistPath}` : '\n LaunchAgent: n/a (macOS-only)') + `\nFully quit and relaunch ChatGPT.app so it inherits CODEX_CLI_PATH; ` + `Desktop falls back to stock Codex if the shim is ever removed.` + formatWarnings(out.warnings);
11902
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12009
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11903
12010
  value: out,
11904
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12011
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11905
12012
  children: text
11906
12013
  })
11907
12014
  });
@@ -11913,22 +12020,22 @@ async function codexDesktopShim({ input }) {
11913
12020
  out = (0,_core_desktop_shim_js__rspack_import_1/* .uninstallDesktopShim */.gM)();
11914
12021
  } catch (error) {
11915
12022
  const message = error instanceof Error ? error.message : String(error);
11916
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12023
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11917
12024
  value: {
11918
12025
  action: 'uninstall',
11919
12026
  error: message,
11920
12027
  exitCode: 1
11921
12028
  },
11922
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12029
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11923
12030
  children: `Desktop shim uninstall failed: ${message}`
11924
12031
  })
11925
12032
  });
11926
12033
  }
11927
12034
  const removed = out.removed.length === 0 ? '(nothing installed)' : out.removed.join(', ');
11928
12035
  const text = `Removed ChatGPT Desktop shim: ${removed}. ` + `Desktop and Codex fall back to stock behavior; relaunch ChatGPT.app to pick it up.` + formatWarnings(out.warnings);
11929
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12036
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11930
12037
  value: out,
11931
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12038
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11932
12039
  children: text
11933
12040
  })
11934
12041
  });
@@ -11936,9 +12043,9 @@ async function codexDesktopShim({ input }) {
11936
12043
  case 'status':
11937
12044
  {
11938
12045
  const out = (0,_core_desktop_shim_js__rspack_import_1/* .desktopShimStatus */.em)();
11939
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12046
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
11940
12047
  value: out,
11941
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12048
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
11942
12049
  children: (0,_core_format_js__rspack_import_4/* .formatDesktopShimStatus */.fX)(out)
11943
12050
  })
11944
12051
  });
@@ -12018,21 +12125,21 @@ async function codexListThreads({ input }) {
12018
12125
  });
12019
12126
  } catch (error) {
12020
12127
  const failure = (0,_core_codex_contract_js__rspack_import_2/* .outcomeFromError */.DG)(error);
12021
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
12128
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g.Result, {
12022
12129
  value: failure,
12023
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
12130
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g.Text, {
12024
12131
  children: failure.error
12025
12132
  })
12026
12133
  });
12027
12134
  }
12028
12135
  const more = out.nextCursor ? `\n\nmore: --cursor ${JSON.stringify((0,_core_codex_bridge_js__rspack_import_1/* .singleLine */.pF)(out.nextCursor))}` : '';
12029
12136
  const text = out.threads.length === 0 ? 'No Codex threads.' : out.threads.map(_core_format_js__rspack_import_6/* .formatCodexThread */.nz).join('\n\n') + more;
12030
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
12137
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g.Result, {
12031
12138
  value: {
12032
12139
  ...out,
12033
12140
  exitCode: 0
12034
12141
  },
12035
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
12142
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g.Text, {
12036
12143
  children: text
12037
12144
  })
12038
12145
  });
@@ -12105,19 +12212,19 @@ async function codexQueue({ input }) {
12105
12212
  out = await (0,_core_codex_bridge_js__rspack_import_1/* .listCodexQueue */.Bt)(input.threadId);
12106
12213
  } catch (error) {
12107
12214
  const failure = (0,_core_codex_contract_js__rspack_import_2/* .outcomeFromError */.DG)(error);
12108
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
12215
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g.Result, {
12109
12216
  value: failure,
12110
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
12217
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g.Text, {
12111
12218
  children: failure.error
12112
12219
  })
12113
12220
  });
12114
12221
  }
12115
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
12222
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g.Result, {
12116
12223
  value: {
12117
12224
  ...out,
12118
12225
  exitCode: 0
12119
12226
  },
12120
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
12227
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g.Text, {
12121
12228
  children: (0,_core_format_js__rspack_import_6/* .formatCodexQueue */.e_)(out)
12122
12229
  })
12123
12230
  });
@@ -12248,12 +12355,12 @@ async function route({ input, signal }) {
12248
12355
  ...input,
12249
12356
  message: input.message.join(' ').trim()
12250
12357
  }, context);
12251
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
12358
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g.Result, {
12252
12359
  value: {
12253
12360
  ...out,
12254
12361
  exitCode: out.delivery === 'rejected' ? 1 : 0
12255
12362
  },
12256
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
12363
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g.Text, {
12257
12364
  children: `Delivery ${out.delivery}; terminal answer returns to Grok automatically.`
12258
12365
  })
12259
12366
  });
@@ -12265,9 +12372,9 @@ async function route({ input, signal }) {
12265
12372
  }, signal, (message)=>context.progress.report({
12266
12373
  message
12267
12374
  }), true);
12268
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
12375
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g.Result, {
12269
12376
  value: out,
12270
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
12377
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g.Text, {
12271
12378
  children: (0,_core_codex_routes_js__rspack_import_1/* .resultText */.D6)(out)
12272
12379
  })
12273
12380
  });
@@ -12313,9 +12420,9 @@ const resultSchema = zod__rspack_import_2/* .object */.Ikc({
12313
12420
  }).passthrough();
12314
12421
  async function codexStatusCmd(_props) {
12315
12422
  const status = await (0,_core_codex_bridge_js__rspack_import_1/* .codexStatus */.MU)();
12316
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12423
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12317
12424
  value: status,
12318
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12425
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12319
12426
  children: (0,_core_format_js__rspack_import_4/* .formatCodexStatus */.P2)(status)
12320
12427
  })
12321
12428
  });
@@ -12387,9 +12494,9 @@ async function route({ input, signal }) {
12387
12494
  const out = await (0,_core_codex_routes_js__rspack_import_1/* .observeOperation */.gT)('wait', input, signal, (message)=>context.progress.report({
12388
12495
  message
12389
12496
  }));
12390
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12497
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12391
12498
  value: out,
12392
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12499
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12393
12500
  children: (0,_core_codex_routes_js__rspack_import_1/* .resultText */.D6)(out)
12394
12501
  })
12395
12502
  });
@@ -12453,9 +12560,9 @@ async function route({ input, signal }) {
12453
12560
  const out = await (0,_core_codex_routes_js__rspack_import_1/* .observeOperation */.gT)('watch', input, signal, (message)=>context.progress.report({
12454
12561
  message
12455
12562
  }));
12456
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12563
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12457
12564
  value: out,
12458
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12565
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12459
12566
  children: (0,_core_codex_routes_js__rspack_import_1/* .resultText */.D6)(out)
12460
12567
  })
12461
12568
  });
@@ -12558,9 +12665,9 @@ async function doctor({ input }) {
12558
12665
  ...candidates.map((c)=>` ${c}`),
12559
12666
  note
12560
12667
  ].join('\n');
12561
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Result */.g6.Result, {
12668
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Result */.g.Result, {
12562
12669
  value: value,
12563
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Text */.g6.Text, {
12670
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Text */.g.Text, {
12564
12671
  children: text
12565
12672
  })
12566
12673
  });
@@ -12631,9 +12738,9 @@ const resultSchema = _shared_js__rspack_import_1/* .agentSummarySchema */.t_;
12631
12738
  async function groupsAdd({ input }) {
12632
12739
  const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
12633
12740
  const rec = await backend.addGroupMember(input.group, input.bot);
12634
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12741
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12635
12742
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
12636
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12743
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12637
12744
  children: `Added to ${rec.name}. Members: ${rec.memberIds.length}`
12638
12745
  })
12639
12746
  });
@@ -12719,9 +12826,9 @@ async function groupsCreate({ input }) {
12719
12826
  ...(0,_shared_js__rspack_import_1/* .toCreateInput */.cp)(fields),
12720
12827
  memberIds: member
12721
12828
  });
12722
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12829
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12723
12830
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
12724
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12831
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12725
12832
  children: `Created group ${rec.name} (${rec.id}) with ${rec.memberIds.length} members`
12726
12833
  })
12727
12834
  });
@@ -12789,9 +12896,9 @@ async function groupsDelete({ input }) {
12789
12896
  const rec = await backend.resolve(input.ref);
12790
12897
  if (!rec.isGroup) throw new Error(`"${rec.name}" is a bot, not a group. Use bots delete.`);
12791
12898
  const deleted = await backend.deleteAgent(input.ref);
12792
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12899
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12793
12900
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(deleted),
12794
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12901
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12795
12902
  children: `Deleted group ${deleted.name} (${deleted.id})`
12796
12903
  })
12797
12904
  });
@@ -12859,9 +12966,9 @@ async function groupsGet({ input }) {
12859
12966
  const rec = await backend.resolve(input.ref);
12860
12967
  if (!rec.isGroup) throw new Error(`"${rec.name}" is a bot, not a group.`);
12861
12968
  const all = await backend.list();
12862
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
12969
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12863
12970
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
12864
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
12971
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12865
12972
  children: (0,_core_format_js__rspack_import_4/* .formatRecord */.bM)(rec, all)
12866
12973
  })
12867
12974
  });
@@ -12918,9 +13025,9 @@ async function groupsList({ input }) {
12918
13025
  const rows = all.filter((r)=>r.isGroup);
12919
13026
  const groups = rows.map(_core_format_js__rspack_import_3/* .summarize */.eh);
12920
13027
  const text = rows.length === 0 ? 'No groups.' : rows.map((r)=>(0,_core_format_js__rspack_import_3/* .formatRecord */.bM)(r, all)).join('\n\n');
12921
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
13028
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
12922
13029
  value: groups,
12923
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
13030
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
12924
13031
  children: text
12925
13032
  })
12926
13033
  });
@@ -12988,9 +13095,9 @@ async function groupsMembers({ input }) {
12988
13095
  const rec = await backend.resolve(input.ref);
12989
13096
  if (!rec.isGroup) throw new Error(`"${rec.name}" is a bot, not a group.`);
12990
13097
  const all = await backend.list();
12991
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
13098
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
12992
13099
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
12993
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
13100
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
12994
13101
  children: (0,_core_format_js__rspack_import_4/* .formatRecord */.bM)(rec, all)
12995
13102
  })
12996
13103
  });
@@ -13061,9 +13168,9 @@ const resultSchema = _shared_js__rspack_import_1/* .agentSummarySchema */.t_;
13061
13168
  async function groupsRemove({ input }) {
13062
13169
  const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
13063
13170
  const rec = await backend.removeGroupMember(input.group, input.bot);
13064
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
13171
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
13065
13172
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
13066
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
13173
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
13067
13174
  children: `Removed from ${rec.name}. Members: ${rec.memberIds.length}`
13068
13175
  })
13069
13176
  });
@@ -13137,9 +13244,9 @@ const resultSchema = _shared_js__rspack_import_1/* .agentSummarySchema */.t_;
13137
13244
  async function groupsSet({ input }) {
13138
13245
  const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
13139
13246
  const rec = await backend.setGroupMembers(input.group, input.member);
13140
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
13247
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
13141
13248
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
13142
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
13249
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
13143
13250
  children: `Updated ${rec.name}. Members: ${rec.memberIds.length}`
13144
13251
  })
13145
13252
  });
@@ -13229,9 +13336,9 @@ async function groupsUpdate({ input }) {
13229
13336
  if (!current.isGroup) throw new Error(`"${current.name}" is a bot, not a group. Use bots update.`);
13230
13337
  const { dir: _d, files: _f, gateway: _g, ref, ...fields } = input;
13231
13338
  const rec = await backend.updateAgent(ref, (0,_shared_js__rspack_import_1/* .toUpdatePatch */.li)(fields));
13232
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
13339
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
13233
13340
  value: (0,_core_format_js__rspack_import_4/* .summarize */.eh)(rec),
13234
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
13341
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
13235
13342
  children: `Updated group ${rec.name} (${rec.id})`
13236
13343
  })
13237
13344
  });
@@ -13307,11 +13414,11 @@ const resultSchema = zod__rspack_import_2/* .union */.KCZ([
13307
13414
  async function history({ input }) {
13308
13415
  const file = (0,_core_history_js__rspack_import_1/* .historyPath */.ae)(input.historyDir);
13309
13416
  if (input.path) {
13310
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
13417
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
13311
13418
  value: {
13312
13419
  path: file
13313
13420
  },
13314
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
13421
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
13315
13422
  children: file
13316
13423
  })
13317
13424
  });
@@ -13322,9 +13429,9 @@ async function history({ input }) {
13322
13429
  search: input.search
13323
13430
  });
13324
13431
  const text = rows.length ? rows.map((row)=>`[${row.recordedAt}] ${row.target.name} (${row.target.id}) [${row.role}] ${row.text}`).join('\n') : 'No local history.';
13325
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
13432
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
13326
13433
  value: rows,
13327
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
13434
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
13328
13435
  children: text
13329
13436
  })
13330
13437
  });
@@ -13534,12 +13641,12 @@ async function send({ input }) {
13534
13641
  hop: input.hop,
13535
13642
  correlationId: input.correlationId
13536
13643
  }, await (0,_agent_bundle_runtime__rspack_import_7/* .agent */.MA)());
13537
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Result */.g6.Result, {
13644
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Result */.g.Result, {
13538
13645
  value: {
13539
13646
  ...out,
13540
13647
  exitCode: out.delivery === 'rejected' ? 1 : 0
13541
13648
  },
13542
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Text */.g6.Text, {
13649
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Text */.g.Text, {
13543
13650
  children: `Delivery ${out.delivery}; inspect codex bridge status for automatic reply delivery.`
13544
13651
  })
13545
13652
  });
@@ -13549,9 +13656,9 @@ async function send({ input }) {
13549
13656
  value = (0,_core_codex_contract_js__rspack_import_3/* .outcomeFromError */.DG)(error);
13550
13657
  }
13551
13658
  const text = value.exitCode === 0 ? `Sent to ${value.kind} ${value.name} (${value.id})${value.messageId ? ` message ${value.messageId}` : ''}; envelope ${value.envelopeId}` : value.error;
13552
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Result */.g6.Result, {
13659
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Result */.g.Result, {
13553
13660
  value: value,
13554
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Text */.g6.Text, {
13661
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_8/* .Agent.Text */.g.Text, {
13555
13662
  children: text
13556
13663
  })
13557
13664
  });
@@ -13658,9 +13765,9 @@ async function thread({ input }) {
13658
13765
  event: 'thread',
13659
13766
  rootId: input.root
13660
13767
  });
13661
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
13768
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
13662
13769
  value: rooted,
13663
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
13770
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
13664
13771
  children: (0,_core_format_js__rspack_import_5/* .formatTranscript */.oZ)(rooted, {
13665
13772
  full: input.full
13666
13773
  })
@@ -13690,9 +13797,9 @@ async function thread({ input }) {
13690
13797
  const text = (0,_core_format_js__rspack_import_5/* .formatTranscript */.oZ)(selected, {
13691
13798
  full: input.full
13692
13799
  });
13693
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
13800
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
13694
13801
  value: selected,
13695
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
13802
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
13696
13803
  children: `${text}\n\ncursor: ${delta.cursor}${delta.gapReset ? ' (gap reset)' : ''}`
13697
13804
  })
13698
13805
  });
@@ -13702,9 +13809,9 @@ async function thread({ input }) {
13702
13809
  disabled: input.noHistory,
13703
13810
  event: 'thread'
13704
13811
  });
13705
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
13812
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
13706
13813
  value: out,
13707
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
13814
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
13708
13815
  children: (0,_core_format_js__rspack_import_5/* .formatTranscript */.oZ)(out, {
13709
13816
  full: input.full
13710
13817
  })
@@ -13955,6 +14062,37 @@ __webpack_require__.d(__webpack_exports__, {
13955
14062
  });
13956
14063
 
13957
14064
 
14065
+ },
14066
+ "./src/core/grok-approval-routes.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
14067
+ /* import */ var zod__rspack_import_3 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
14068
+ /* import */ var _gateway_js__rspack_import_0 = __webpack_require__("./src/core/gateway.js");
14069
+ /* import */ var _grok_approvals_js__rspack_import_1 = __webpack_require__("./src/core/grok-approvals.js");
14070
+ /* import */ var _gbot_js__rspack_import_2 = __webpack_require__("./src/gbot.ts");
14071
+
14072
+
14073
+
14074
+
14075
+ const listSchema = zod__rspack_import_3/* .strictObject */.rej({
14076
+ target: zod__rspack_import_3/* .string */.YjP().min(1).max(1024)
14077
+ });
14078
+ const respondSchema = _grok_approvals_js__rspack_import_1/* .grokApprovalResponseSchema */.T5;
14079
+ const resultSchema = zod__rspack_import_3/* .record */.g1P(zod__rspack_import_3/* .string */.YjP(), zod__rspack_import_3/* .json */.Pq9());
14080
+ const listOperation = (input)=>(0,_gbot_js__rspack_import_2/* .withRedactedErrors */.yF)(async ()=>(0,_gateway_js__rspack_import_0/* .listGrokApprovals */.MI)(await (0,_gateway_js__rspack_import_0/* .connectGateway */.Vq)(), listSchema.parse(input).target));
14081
+ const respondOperation = (input)=>(0,_gbot_js__rspack_import_2/* .withRedactedErrors */.yF)(async ()=>{
14082
+ const { target, ...response } = respondSchema.parse(input);
14083
+ return (0,_gateway_js__rspack_import_0/* .respondGrokApproval */.OR)(await (0,_gateway_js__rspack_import_0/* .connectGateway */.Vq)(), target, response);
14084
+ });
14085
+
14086
+ __webpack_require__.d(__webpack_exports__, {
14087
+ }, {
14088
+ FD: resultSchema,
14089
+ cE: listSchema,
14090
+ gi: listOperation,
14091
+ lr: respondOperation,
14092
+ v1: respondSchema
14093
+ });
14094
+
14095
+
13958
14096
  },
13959
14097
  "./src/core/relay/routes.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
13960
14098
  /* import */ var _agent_bundle_runtime__rspack_import_4 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/40.js");
@@ -14323,28 +14461,7 @@ module.exports = __rspack_createRequire_require("util");
14323
14461
  },
14324
14462
  "./node_modules/@agent-bundle/runtime/dist/302.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
14325
14463
  /* import */ var node_buffer__rspack_import_0 = __webpack_require__("node:buffer");
14326
- /* import */ var react__rspack_import_1 = __webpack_require__("./node_modules/react/index.js");
14327
-
14328
14464
 
14329
- const isServerComponent = (value)=>'function' == typeof value;
14330
- const asMcpElement = (node)=>{
14331
- let element = node;
14332
- while(isValidElement(element) && isServerComponent(element.type))element = element.type(element.props);
14333
- if (!isValidElement(element) || 'string' != typeof element.type || !element.type.startsWith('mcp-')) throw new Error('Expected an MCP result element');
14334
- return {
14335
- props: element.props,
14336
- type: element.type
14337
- };
14338
- };
14339
- const requiredString = (value, message)=>{
14340
- if ('string' != typeof value || '' === value.trim()) throw new Error(message);
14341
- return value;
14342
- };
14343
- const textChild = (children, message)=>{
14344
- const values = Children.toArray(children);
14345
- if (1 !== values.length || 'string' != typeof values[0]) throw new Error(message);
14346
- return values[0];
14347
- };
14348
14465
  const jsonLeafBytes = (value)=>node_buffer__rspack_import_0.Buffer.byteLength(JSON.stringify(value), 'utf8');
14349
14466
  const isArrayIndex = (key, length)=>{
14350
14467
  if ('0' === key) return length > 0;
@@ -14406,16 +14523,6 @@ const cloneJsonValue = (value, ancestors, path, depth = 0, budget)=>{
14406
14523
  ancestors.delete(value);
14407
14524
  }
14408
14525
  };
14409
- const jsonRecord = (value, message)=>{
14410
- try {
14411
- if (null === value || 'object' != typeof value || Array.isArray(value)) throw new Error('not a plain object');
14412
- return cloneJsonValue(value, new Set(), '');
14413
- } catch (error) {
14414
- throw new Error(`${message} (${error instanceof Error ? error.message : String(error)})`, {
14415
- cause: error
14416
- });
14417
- }
14418
- };
14419
14526
  const deepFreezeJson = (value)=>{
14420
14527
  if ('object' == typeof value && null !== value) {
14421
14528
  for (const child of Object.values(value))deepFreezeJson(child);
@@ -14433,89 +14540,6 @@ const snapshotJsonValue = (value, message, budget)=>{
14433
14540
  });
14434
14541
  }
14435
14542
  };
14436
- const lowerContent = (node)=>{
14437
- const element = asMcpElement(node);
14438
- const { props } = element;
14439
- switch(element.type){
14440
- case 'mcp-text':
14441
- return {
14442
- text: textChild(props.children, 'mcp-text requires one text child'),
14443
- type: 'text'
14444
- };
14445
- case 'mcp-image':
14446
- return {
14447
- data: requiredString(props.data, 'mcp-image requires non-empty data and mimeType'),
14448
- mimeType: requiredString(props.mimeType, 'mcp-image requires non-empty data and mimeType'),
14449
- type: 'image'
14450
- };
14451
- case 'mcp-audio':
14452
- return {
14453
- data: requiredString(props.data, 'mcp-audio requires non-empty data and mimeType'),
14454
- mimeType: requiredString(props.mimeType, 'mcp-audio requires non-empty data and mimeType'),
14455
- type: 'audio'
14456
- };
14457
- case 'mcp-resource-link':
14458
- {
14459
- const mimeType = props.mimeType;
14460
- if (void 0 !== mimeType && 'string' != typeof mimeType) throw new Error('mcp-resource-link mimeType must be a string');
14461
- return {
14462
- ...void 0 === mimeType ? {} : {
14463
- mimeType
14464
- },
14465
- name: requiredString(props.name, 'mcp-resource-link requires non-empty uri and name'),
14466
- type: 'resource_link',
14467
- uri: requiredString(props.uri, 'mcp-resource-link requires non-empty uri and name')
14468
- };
14469
- }
14470
- case 'mcp-embedded-resource':
14471
- {
14472
- const hasText = void 0 !== props.text;
14473
- const hasTextChild = void 0 !== props.children;
14474
- const hasBlob = void 0 !== props.blob;
14475
- if (Number(hasText) + Number(hasTextChild) + Number(hasBlob) !== 1) throw new Error('mcp-embedded-resource accepts exactly one text or blob value');
14476
- const mimeType = props.mimeType;
14477
- if (void 0 !== mimeType && 'string' != typeof mimeType) throw new Error('mcp-embedded-resource mimeType must be a string');
14478
- const resource = {
14479
- ...void 0 === mimeType ? {} : {
14480
- mimeType
14481
- },
14482
- uri: requiredString(props.uri, 'mcp-embedded-resource requires a non-empty uri'),
14483
- ...hasBlob ? {
14484
- blob: requiredString(props.blob, 'mcp-embedded-resource blob must be non-empty')
14485
- } : {
14486
- text: hasTextChild ? textChild(props.children, 'mcp-embedded-resource requires one text child') : requiredString(props.text, 'mcp-embedded-resource text must be non-empty')
14487
- }
14488
- };
14489
- return {
14490
- resource,
14491
- type: 'resource'
14492
- };
14493
- }
14494
- case 'mcp-result':
14495
- throw new Error('mcp-result may not be nested');
14496
- default:
14497
- throw new Error(`Unsupported MCP result element: ${element.type}`);
14498
- }
14499
- };
14500
- const lowerMcpResult = (node)=>{
14501
- const root = asMcpElement(node);
14502
- if ('mcp-result' !== root.type) throw new Error('Expected mcp-result as the root element');
14503
- if (void 0 !== root.props.isError && 'boolean' != typeof root.props.isError) throw new Error('mcp-result isError must be a boolean');
14504
- const structuredContent = root.props.structuredContent;
14505
- const metadata = root.props._meta;
14506
- return {
14507
- content: Children.toArray(root.props.children).map(lowerContent),
14508
- ...void 0 === metadata ? {} : {
14509
- _meta: jsonRecord(metadata, 'mcp-result _meta must be JSON-serializable')
14510
- },
14511
- ...void 0 === structuredContent ? {} : {
14512
- structuredContent: jsonRecord(structuredContent, 'mcp-result structuredContent must be JSON-serializable')
14513
- },
14514
- ...void 0 === root.props.isError ? {} : {
14515
- isError: root.props.isError
14516
- }
14517
- };
14518
- };
14519
14543
  const AGENT_DOCUMENT_VERSION = 1;
14520
14544
  const agentRenderAbortError = ()=>new DOMException('Agent render was aborted', 'AbortError');
14521
14545
  const DEFAULT_AGENT_RENDER_LIMITS = Object.freeze({
@@ -14543,7 +14567,7 @@ const resolveAgentRenderLimits = (overrides = {})=>{
14543
14567
  for (const [name, value] of Object.entries(limits))if (!Number.isSafeInteger(value) || value <= 0) throw new AgentContractError('invalid-document', `${name} must be a positive safe integer`);
14544
14568
  return Object.freeze(limits);
14545
14569
  };
14546
- const agent_document_requiredString = (value, field)=>{
14570
+ const requiredString = (value, field)=>{
14547
14571
  if ('string' != typeof value || '' === value.trim()) throw new AgentContractError('invalid-document', `${field} must be a non-empty string`);
14548
14572
  return value;
14549
14573
  };
@@ -14551,7 +14575,7 @@ const agent_document_text = (value, field)=>{
14551
14575
  if ('string' != typeof value) throw new AgentContractError('invalid-document', `${field} must be a string`);
14552
14576
  return value;
14553
14577
  };
14554
- const optionalString = (value, field)=>void 0 === value ? void 0 : agent_document_requiredString(value, field);
14578
+ const optionalString = (value, field)=>void 0 === value ? void 0 : requiredString(value, field);
14555
14579
  const elapsedTimeExceeded = (maxElapsedMs)=>new AgentContractError('elapsed-time-exceeded', `Agent render elapsed time exceeds ${String(maxElapsedMs)}ms`);
14556
14580
  const expectDocumentDepth = (depth, limits)=>{
14557
14581
  if (depth > limits.maxDocumentDepth) throw new AgentContractError('document-depth-exceeded', `Agent Document depth exceeds ${String(limits.maxDocumentDepth)}`);
@@ -14649,15 +14673,15 @@ const snapshotNode = (node, depth, state)=>{
14649
14673
  }
14650
14674
  case 'image':
14651
14675
  return Object.freeze({
14652
- data: agent_document_requiredString(node.data, 'Agent image data'),
14676
+ data: requiredString(node.data, 'Agent image data'),
14653
14677
  kind: 'image',
14654
- mimeType: agent_document_requiredString(node.mimeType, 'Agent image mimeType')
14678
+ mimeType: requiredString(node.mimeType, 'Agent image mimeType')
14655
14679
  });
14656
14680
  case 'audio':
14657
14681
  return Object.freeze({
14658
- data: agent_document_requiredString(node.data, 'Agent audio data'),
14682
+ data: requiredString(node.data, 'Agent audio data'),
14659
14683
  kind: 'audio',
14660
- mimeType: agent_document_requiredString(node.mimeType, 'Agent audio mimeType')
14684
+ mimeType: requiredString(node.mimeType, 'Agent audio mimeType')
14661
14685
  });
14662
14686
  case 'resource':
14663
14687
  {
@@ -14667,13 +14691,13 @@ const snapshotNode = (node, depth, state)=>{
14667
14691
  ...void 0 === mimeType ? {} : {
14668
14692
  mimeType
14669
14693
  },
14670
- name: agent_document_requiredString(node.name, 'Agent resource name'),
14671
- uri: agent_document_requiredString(node.uri, 'Agent resource uri')
14694
+ name: requiredString(node.name, 'Agent resource name'),
14695
+ uri: requiredString(node.uri, 'Agent resource uri')
14672
14696
  });
14673
14697
  }
14674
14698
  case 'error':
14675
14699
  return Object.freeze({
14676
- code: agent_document_requiredString(node.code, 'Agent error code'),
14700
+ code: requiredString(node.code, 'Agent error code'),
14677
14701
  kind: 'error',
14678
14702
  message: agent_document_text(node.message, 'Agent error message')
14679
14703
  });
@@ -14731,7 +14755,7 @@ const snapshotRenderError = (error, limits)=>{
14731
14755
  nodes: 0
14732
14756
  });
14733
14757
  return Object.freeze({
14734
- code: agent_document_requiredString(error.code, 'Agent render error code'),
14758
+ code: requiredString(error.code, 'Agent render error code'),
14735
14759
  ...void 0 === data ? {} : {
14736
14760
  data
14737
14761
  },
@@ -14766,7 +14790,7 @@ const snapshotEvent = (input, sequence, limits)=>{
14766
14790
  }
14767
14791
  case 'replace':
14768
14792
  return Object.freeze({
14769
- boundaryId: agent_document_requiredString(input.boundaryId, 'Agent render boundaryId'),
14793
+ boundaryId: requiredString(input.boundaryId, 'Agent render boundaryId'),
14770
14794
  document: createAgentDocument(input.document, limits),
14771
14795
  sequence,
14772
14796
  type: 'replace'
@@ -15334,51 +15358,11 @@ const Agent = Object.freeze({
15334
15358
  Result: AgentResult,
15335
15359
  Text: AgentText
15336
15360
  });
15337
- const Result = ({ children })=>(0,react__rspack_import_0.createElement)('agent-hook-result', null, children);
15338
- const AdditionalContext = ({ children })=>(0,react__rspack_import_0.createElement)('agent-hook-additional-context', null, children);
15339
- const Hook = {
15340
- AdditionalContext: AdditionalContext,
15341
- Result: Result
15342
- };
15343
- const McpResult = ({ _meta, children, isError, structuredContent })=>createElement('mcp-result', {
15344
- _meta,
15345
- isError,
15346
- structuredContent
15347
- }, children);
15348
- const McpText = ({ children })=>createElement('mcp-text', null, children);
15349
- const McpImage = ({ data, mimeType })=>createElement('mcp-image', {
15350
- data,
15351
- mimeType
15352
- });
15353
- const McpAudio = ({ data, mimeType })=>createElement('mcp-audio', {
15354
- data,
15355
- mimeType
15356
- });
15357
- const McpResourceLink = ({ mimeType, name, uri })=>createElement('mcp-resource-link', {
15358
- mimeType,
15359
- name,
15360
- uri
15361
- });
15362
- const McpEmbeddedResource = ({ blob, children, mimeType, text, uri })=>createElement('mcp-embedded-resource', {
15363
- blob,
15364
- mimeType,
15365
- text,
15366
- uri
15367
- }, children);
15368
- const Mcp = (/* unused pure expression or super */ null && ({
15369
- Audio: McpAudio,
15370
- EmbeddedResource: McpEmbeddedResource,
15371
- Image: McpImage,
15372
- ResourceLink: McpResourceLink,
15373
- Result: McpResult,
15374
- Text: McpText
15375
- }));
15376
15361
 
15377
15362
 
15378
15363
  __webpack_require__.d(__webpack_exports__, {
15379
15364
  }, {
15380
- g6: Agent,
15381
- qn: Hook
15365
+ g: Agent
15382
15366
  });
15383
15367
 
15384
15368
 
@@ -15695,23 +15679,20 @@ __webpack_require__.d(__webpack_exports__, {
15695
15679
 
15696
15680
  },
15697
15681
  "./node_modules/@agent-bundle/runtime/dist/index.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
15698
- /* import */ var effect__rspack_import_3 = __webpack_require__("./node_modules/effect/dist/Latch.js");
15699
- /* import */ var effect__rspack_import_4 = __webpack_require__("./node_modules/effect/dist/Effect.js");
15700
- /* import */ var effect__rspack_import_7 = __webpack_require__("./node_modules/effect/dist/Duration.js");
15701
- /* import */ var effect__rspack_import_8 = __webpack_require__("./node_modules/effect/dist/Stream.js");
15702
- /* import */ var effect__rspack_import_9 = __webpack_require__("./node_modules/effect/dist/Deferred.js");
15703
- /* import */ var effect__rspack_import_10 = __webpack_require__("./node_modules/effect/dist/Queue.js");
15704
- /* import */ var effect__rspack_import_11 = __webpack_require__("./node_modules/effect/dist/Option.js");
15705
- /* import */ var effect__rspack_import_12 = __webpack_require__("./node_modules/effect/dist/Exit.js");
15706
- /* import */ var effect__rspack_import_14 = __webpack_require__("./node_modules/effect/dist/Clock.js");
15682
+ /* import */ var effect__rspack_import_2 = __webpack_require__("./node_modules/effect/dist/Latch.js");
15683
+ /* import */ var effect__rspack_import_3 = __webpack_require__("./node_modules/effect/dist/Effect.js");
15684
+ /* import */ var effect__rspack_import_6 = __webpack_require__("./node_modules/effect/dist/Duration.js");
15685
+ /* import */ var effect__rspack_import_7 = __webpack_require__("./node_modules/effect/dist/Stream.js");
15686
+ /* import */ var effect__rspack_import_8 = __webpack_require__("./node_modules/effect/dist/Deferred.js");
15687
+ /* import */ var effect__rspack_import_9 = __webpack_require__("./node_modules/effect/dist/Queue.js");
15688
+ /* import */ var effect__rspack_import_10 = __webpack_require__("./node_modules/effect/dist/Option.js");
15689
+ /* import */ var effect__rspack_import_11 = __webpack_require__("./node_modules/effect/dist/Exit.js");
15690
+ /* import */ var effect__rspack_import_13 = __webpack_require__("./node_modules/effect/dist/Clock.js");
15707
15691
  /* import */ var react__rspack_import_0 = __webpack_require__("./node_modules/react/index.js");
15708
15692
  /* import */ var react_server_dom_rspack_client_node__rspack_import_1 = __webpack_require__("./node_modules/react-server-dom-rspack/client.node.js");
15709
- /* import */ var node_async_hooks__rspack_import_2 = __webpack_require__("node:async_hooks");
15710
- /* import */ var _315_js__rspack_import_5 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/315.js");
15711
- /* import */ var _302_js__rspack_import_6 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/302.js");
15712
- /* import */ var _707_js__rspack_import_13 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/707.js");
15713
- /* import */ var _506_js__rspack_import_15 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
15714
-
15693
+ /* import */ var _315_js__rspack_import_4 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/315.js");
15694
+ /* import */ var _302_js__rspack_import_5 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/302.js");
15695
+ /* import */ var _707_js__rspack_import_12 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/707.js");
15715
15696
 
15716
15697
 
15717
15698
 
@@ -15722,10 +15703,10 @@ __webpack_require__.d(__webpack_exports__, {
15722
15703
 
15723
15704
 
15724
15705
  const createFlightDemand = ()=>{
15725
- const pulling = effect__rspack_import_3/* .makeUnsafe */.LZ(false);
15706
+ const pulling = effect__rspack_import_2/* .makeUnsafe */.LZ(false);
15726
15707
  let shellEmitted = false;
15727
15708
  return {
15728
- markShell: effect__rspack_import_4/* .sync */.OH5(()=>{
15709
+ markShell: effect__rspack_import_3/* .sync */.OH5(()=>{
15729
15710
  shellEmitted = true;
15730
15711
  }),
15731
15712
  notePull () {
@@ -15734,11 +15715,11 @@ const createFlightDemand = ()=>{
15734
15715
  notePullEnd () {
15735
15716
  pulling.closeUnsafe();
15736
15717
  },
15737
- wait: effect__rspack_import_4/* .suspend */.DYE(()=>shellEmitted ? pulling.await : effect__rspack_import_4/* ["void"] */.rIH)
15718
+ wait: effect__rspack_import_3/* .suspend */.DYE(()=>shellEmitted ? pulling.await : effect__rspack_import_3/* ["void"] */.rIH)
15738
15719
  };
15739
15720
  };
15740
- const emitBoundRenderEvent = (sequence, input)=>effect__rspack_import_4/* ["try"] */.SvU({
15741
- catch: (error)=>(0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error),
15721
+ const emitBoundRenderEvent = (sequence, input)=>effect__rspack_import_3/* ["try"] */.SvU({
15722
+ catch: (error)=>(0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error),
15742
15723
  try: ()=>sequence.emit(input)
15743
15724
  });
15744
15725
  const agentElementTypes = Object.freeze([
@@ -15755,7 +15736,7 @@ const agentElementTypes = Object.freeze([
15755
15736
  ]);
15756
15737
  const isAgentElementType = (value)=>agentElementTypes.includes(value);
15757
15738
  const protocolElement = (node)=>{
15758
- if (!(0,react__rspack_import_0.isValidElement)(node) || 'string' != typeof node.type || !isAgentElementType(node.type)) throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', 'Flight output must contain only Agent protocol elements; function components and HTML are unsupported');
15739
+ if (!(0,react__rspack_import_0.isValidElement)(node) || 'string' != typeof node.type || !isAgentElementType(node.type)) throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', 'Flight output must contain only Agent protocol elements; function components and HTML are unsupported');
15759
15740
  return {
15760
15741
  props: node.props,
15761
15742
  type: node.type
@@ -15763,31 +15744,31 @@ const protocolElement = (node)=>{
15763
15744
  };
15764
15745
  const textChild = (children, type)=>{
15765
15746
  const values = react__rspack_import_0.Children.toArray(children);
15766
- if (1 !== values.length || 'string' != typeof values[0]) throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', `${type} requires exactly one string child`);
15747
+ if (1 !== values.length || 'string' != typeof values[0]) throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', `${type} requires exactly one string child`);
15767
15748
  return values[0];
15768
15749
  };
15769
15750
  const decodeBudget = (state)=>({
15770
15751
  addBytes (n) {
15771
15752
  state.bytes += n;
15772
- if (state.bytes > state.limits.maxDocumentBytes) throw new _302_js__rspack_import_6/* .AgentContractError */.I2('document-bytes-exceeded', `Agent Document bytes exceed ${String(state.limits.maxDocumentBytes)}`);
15753
+ if (state.bytes > state.limits.maxDocumentBytes) throw new _302_js__rspack_import_5/* .AgentContractError */.I2('document-bytes-exceeded', `Agent Document bytes exceed ${String(state.limits.maxDocumentBytes)}`);
15773
15754
  },
15774
15755
  addNode () {
15775
- (0,_302_js__rspack_import_6/* .admitDocumentNode */.Dy)(state);
15756
+ (0,_302_js__rspack_import_5/* .admitDocumentNode */.Dy)(state);
15776
15757
  },
15777
15758
  checkDepth (depth) {
15778
- (0,_302_js__rspack_import_6/* .expectDocumentDepth */.MI)(depth, state.limits);
15759
+ (0,_302_js__rspack_import_5/* .expectDocumentDepth */.MI)(depth, state.limits);
15779
15760
  }
15780
15761
  });
15781
15762
  const isJsonObject = (value)=>null != value && 'object' == typeof value && !Array.isArray(value);
15782
15763
  const budgetedJson = (value, message, depth, state)=>{
15783
15764
  try {
15784
- return (0,_302_js__rspack_import_6/* .snapshotJsonValue */.mY)(value, message, {
15765
+ return (0,_302_js__rspack_import_5/* .snapshotJsonValue */.mY)(value, message, {
15785
15766
  depth,
15786
15767
  limits: decodeBudget(state)
15787
15768
  });
15788
15769
  } catch (error) {
15789
- if (error instanceof _302_js__rspack_import_6/* .AgentContractError */.I2) throw error;
15790
- throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', error instanceof Error ? error.message : message, {
15770
+ if (error instanceof _302_js__rspack_import_5/* .AgentContractError */.I2) throw error;
15771
+ throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', error instanceof Error ? error.message : message, {
15791
15772
  cause: error
15792
15773
  });
15793
15774
  }
@@ -15846,8 +15827,8 @@ const decodeResult = (props, depth, state)=>{
15846
15827
  return node;
15847
15828
  };
15848
15829
  const decodeNode = (node, depth, state)=>{
15849
- (0,_302_js__rspack_import_6/* .expectDocumentDepth */.MI)(depth, state.limits);
15850
- (0,_302_js__rspack_import_6/* .admitDocumentNode */.Dy)(state);
15830
+ (0,_302_js__rspack_import_5/* .expectDocumentDepth */.MI)(depth, state.limits);
15831
+ (0,_302_js__rspack_import_5/* .admitDocumentNode */.Dy)(state);
15851
15832
  const element = protocolElement(node);
15852
15833
  const { props } = element;
15853
15834
  switch(element.type){
@@ -15915,14 +15896,14 @@ const decodeNode = (node, depth, state)=>{
15915
15896
  default:
15916
15897
  {
15917
15898
  const exhaustive = element.type;
15918
- throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', `Unsupported Agent protocol element: ${String(exhaustive)}`);
15899
+ throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', `Unsupported Agent protocol element: ${String(exhaustive)}`);
15919
15900
  }
15920
15901
  }
15921
15902
  };
15922
15903
  const decodeAgentDocument = (node, limits = {})=>{
15923
- const resolved = (0,_302_js__rspack_import_6/* .resolveAgentRenderLimits */.i0)(limits);
15904
+ const resolved = (0,_302_js__rspack_import_5/* .resolveAgentRenderLimits */.i0)(limits);
15924
15905
  const root = protocolElement(node);
15925
- if ('agent-result' !== root.type) throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', 'Flight output must have Agent.Result as its root');
15906
+ if ('agent-result' !== root.type) throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', 'Flight output must have Agent.Result as its root');
15926
15907
  const state = {
15927
15908
  bytes: 0,
15928
15909
  discardedBytes: 0,
@@ -15933,7 +15914,7 @@ const decodeAgentDocument = (node, limits = {})=>{
15933
15914
  };
15934
15915
  const documentRoot = decodeNode(node, 1, state);
15935
15916
  const value = state.resultValues.get(documentRoot)?.value;
15936
- const document = (0,_302_js__rspack_import_6/* .createAgentDocument */.ZX)({
15917
+ const document = (0,_302_js__rspack_import_5/* .createAgentDocument */.ZX)({
15937
15918
  root: documentRoot,
15938
15919
  status: state.representedError ? 'represented-error' : 'success',
15939
15920
  ...void 0 === value ? {} : {
@@ -15941,13 +15922,13 @@ const decodeAgentDocument = (node, limits = {})=>{
15941
15922
  },
15942
15923
  version: 1
15943
15924
  }, resolved);
15944
- if (state.discardedBytes > 0 && state.discardedBytes + jsonBytes(document) > resolved.maxDocumentBytes) throw new _302_js__rspack_import_6/* .AgentContractError */.I2('document-bytes-exceeded', `Agent Document bytes exceed ${String(resolved.maxDocumentBytes)}`);
15925
+ if (state.discardedBytes > 0 && state.discardedBytes + jsonBytes(document) > resolved.maxDocumentBytes) throw new _302_js__rspack_import_5/* .AgentContractError */.I2('document-bytes-exceeded', `Agent Document bytes exceed ${String(resolved.maxDocumentBytes)}`);
15945
15926
  return document;
15946
15927
  };
15947
15928
  const REACT_FRAGMENT = Symbol.for('react.fragment');
15948
15929
  const REACT_LAZY = Symbol.for('react.lazy');
15949
15930
  const REACT_SUSPENSE = Symbol.for('react.suspense');
15950
- const abortError = _302_js__rspack_import_6/* .agentRenderAbortError */.k2;
15931
+ const abortError = _302_js__rspack_import_5/* .agentRenderAbortError */.k2;
15951
15932
  const isObject = (value)=>'object' == typeof value && null !== value;
15952
15933
  const isThenable = (value)=>isObject(value) && 'function' == typeof value.then;
15953
15934
  const isLazyElement = (value)=>isObject(value) && value.$$typeof === REACT_LAZY && isThenable(value._payload);
@@ -15978,7 +15959,7 @@ const classifyNode = (node)=>{
15978
15959
  kind: 'thenable',
15979
15960
  value: node
15980
15961
  };
15981
- if (!(0,react__rspack_import_0.isValidElement)(node)) throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', 'Flight output contained an unsupported node');
15962
+ if (!(0,react__rspack_import_0.isValidElement)(node)) throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', 'Flight output contained an unsupported node');
15982
15963
  const type = node.type;
15983
15964
  if (type === REACT_SUSPENSE) return {
15984
15965
  kind: 'suspense',
@@ -15992,7 +15973,7 @@ const classifyNode = (node)=>{
15992
15973
  kind: 'protocol',
15993
15974
  value: node
15994
15975
  };
15995
- throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', "Flight output must contain only Agent protocol elements; function components and HTML are unsupported");
15976
+ throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', "Flight output must contain only Agent protocol elements; function components and HTML are unsupported");
15996
15977
  };
15997
15978
  const thenableStatus = (thenable)=>{
15998
15979
  switch(thenable.status){
@@ -16167,8 +16148,8 @@ const snapshotTree = (root, ids)=>{
16167
16148
  tree: materializeNode(root, '', ctx)
16168
16149
  };
16169
16150
  };
16170
- const hostError = (signal, error)=>signal.aborted || (0,_315_js__rspack_import_5/* .isAbortError */.zf)(error) ? abortError() : (0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error);
16171
- const waitSettledBoundary = (pending)=>effect__rspack_import_4/* .raceAll */.Vdx(pending.map((boundary)=>effect__rspack_import_4/* .promise */.ivC(()=>Promise.resolve(boundary.thenable).then(()=>({
16151
+ const hostError = (signal, error)=>signal.aborted || (0,_315_js__rspack_import_4/* .isAbortError */.zf)(error) ? abortError() : (0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error);
16152
+ const waitSettledBoundary = (pending)=>effect__rspack_import_3/* .raceAll */.Vdx(pending.map((boundary)=>effect__rspack_import_3/* .promise */.ivC(()=>Promise.resolve(boundary.thenable).then(()=>({
16172
16153
  boundary,
16173
16154
  ok: true
16174
16155
  }), (error)=>({
@@ -16178,8 +16159,8 @@ const waitSettledBoundary = (pending)=>effect__rspack_import_4/* .raceAll */.Vdx
16178
16159
  })))));
16179
16160
  const waitOrDeadline = (wait, sequence)=>{
16180
16161
  const remaining = sequence.remainingMs;
16181
- if (remaining <= 0) return effect__rspack_import_4/* .fail */.fJG((0,_302_js__rspack_import_6/* .elapsedTimeExceeded */.zm)(sequence.maxElapsedMs));
16182
- return effect__rspack_import_4/* .raceFirst */.KT6(wait, effect__rspack_import_4/* .sleep */.yy4(effect__rspack_import_7/* .millis */.ne(remaining)).pipe(effect__rspack_import_4/* .flatMap */.qIB(()=>effect__rspack_import_4/* .fail */.fJG((0,_302_js__rspack_import_6/* .elapsedTimeExceeded */.zm)(sequence.maxElapsedMs)))));
16162
+ if (remaining <= 0) return effect__rspack_import_3/* .fail */.fJG((0,_302_js__rspack_import_5/* .elapsedTimeExceeded */.zm)(sequence.maxElapsedMs));
16163
+ return effect__rspack_import_3/* .raceFirst */.KT6(wait, effect__rspack_import_3/* .sleep */.yy4(effect__rspack_import_6/* .millis */.ne(remaining)).pipe(effect__rspack_import_3/* .flatMap */.qIB(()=>effect__rspack_import_3/* .fail */.fJG((0,_302_js__rspack_import_5/* .elapsedTimeExceeded */.zm)(sequence.maxElapsedMs)))));
16183
16164
  };
16184
16165
  const settledBoundaryInputs = (previous, next, winner, limits)=>{
16185
16166
  const stillPending = new Set(next.pending.map((boundary)=>boundary.id));
@@ -16212,9 +16193,9 @@ const settledBoundaryInputs = (previous, next, winner, limits)=>{
16212
16193
  for (const boundary of previous.pending)if (boundary.id !== winner.boundary.id) emitFor(boundary.id);
16213
16194
  return inputs;
16214
16195
  };
16215
- const reconcileLoopStream = (root, ids, initial, limits, flightDone, progressInputs, sequence)=>effect__rspack_import_8/* .paginate */.EnV(initial, (snapshot)=>{
16216
- if (0 === snapshot.pending.length) return waitOrDeadline(effect__rspack_import_9/* ["await"] */.Tx(flightDone), sequence).pipe(effect__rspack_import_4/* .andThen */.hgn(effect__rspack_import_10/* .clear */.IU(progressInputs)), effect__rspack_import_4/* .flatMap */.qIB((queued)=>effect__rspack_import_4/* ["try"] */.SvU({
16217
- catch: (error)=>(0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error),
16196
+ const reconcileLoopStream = (root, ids, initial, limits, flightDone, progressInputs, sequence)=>effect__rspack_import_7/* .paginate */.EnV(initial, (snapshot)=>{
16197
+ if (0 === snapshot.pending.length) return waitOrDeadline(effect__rspack_import_8/* ["await"] */.Tx(flightDone), sequence).pipe(effect__rspack_import_3/* .andThen */.hgn(effect__rspack_import_9/* .clear */.IU(progressInputs)), effect__rspack_import_3/* .flatMap */.qIB((queued)=>effect__rspack_import_3/* ["try"] */.SvU({
16198
+ catch: (error)=>(0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error),
16218
16199
  try: ()=>[
16219
16200
  [
16220
16201
  ...queued,
@@ -16223,32 +16204,32 @@ const reconcileLoopStream = (root, ids, initial, limits, flightDone, progressInp
16223
16204
  type: 'complete'
16224
16205
  }
16225
16206
  ],
16226
- effect__rspack_import_11.none()
16207
+ effect__rspack_import_10.none()
16227
16208
  ]
16228
16209
  })));
16229
- return effect__rspack_import_4/* .raceFirst */.KT6(waitOrDeadline(waitSettledBoundary(snapshot.pending), sequence).pipe(effect__rspack_import_4/* .map */.TjK((winner)=>({
16210
+ return effect__rspack_import_3/* .raceFirst */.KT6(waitOrDeadline(waitSettledBoundary(snapshot.pending), sequence).pipe(effect__rspack_import_3/* .map */.TjK((winner)=>({
16230
16211
  kind: 'boundary',
16231
16212
  winner
16232
- }))), effect__rspack_import_10/* .take */.s(progressInputs).pipe(effect__rspack_import_4/* .map */.TjK((input)=>({
16213
+ }))), effect__rspack_import_9/* .take */.s(progressInputs).pipe(effect__rspack_import_3/* .map */.TjK((input)=>({
16233
16214
  kind: 'progress',
16234
16215
  input
16235
- })))).pipe(effect__rspack_import_4/* .flatMap */.qIB((event)=>{
16216
+ })))).pipe(effect__rspack_import_3/* .flatMap */.qIB((event)=>{
16236
16217
  switch(event.kind){
16237
16218
  case 'progress':
16238
- return effect__rspack_import_4/* .succeed */.PyW([
16219
+ return effect__rspack_import_3/* .succeed */.PyW([
16239
16220
  [
16240
16221
  event.input
16241
16222
  ],
16242
- effect__rspack_import_11.some(snapshot)
16223
+ effect__rspack_import_10.some(snapshot)
16243
16224
  ]);
16244
16225
  case 'boundary':
16245
- return effect__rspack_import_4/* ["try"] */.SvU({
16246
- catch: (error)=>(0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error),
16226
+ return effect__rspack_import_3/* ["try"] */.SvU({
16227
+ catch: (error)=>(0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error),
16247
16228
  try: ()=>{
16248
16229
  const next = snapshotTree(root, ids);
16249
16230
  return [
16250
16231
  settledBoundaryInputs(snapshot, next, event.winner, limits),
16251
- effect__rspack_import_11.some(next)
16232
+ effect__rspack_import_10.some(next)
16252
16233
  ];
16253
16234
  }
16254
16235
  });
@@ -16260,38 +16241,38 @@ const reconcileLoopStream = (root, ids, initial, limits, flightDone, progressInp
16260
16241
  }
16261
16242
  }));
16262
16243
  });
16263
- const gatedFlightStream = (flight, demand, flightDone)=>effect__rspack_import_8/* .unwrap */.oAg(effect__rspack_import_4/* .gen */.JkU(function*() {
16264
- const reader = yield* effect__rspack_import_4/* .acquireRelease */.Q56(effect__rspack_import_4/* .sync */.OH5(()=>flight.getReader()), (handle, exit)=>effect__rspack_import_4/* .gen */.JkU(function*() {
16265
- const cancelExit = yield* effect__rspack_import_4/* .exit */.NS5(effect__rspack_import_4/* .tryPromise */.$mh({
16266
- catch: (error)=>(0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error),
16244
+ const gatedFlightStream = (flight, demand, flightDone)=>effect__rspack_import_7/* .unwrap */.oAg(effect__rspack_import_3/* .gen */.JkU(function*() {
16245
+ const reader = yield* effect__rspack_import_3/* .acquireRelease */.Q56(effect__rspack_import_3/* .sync */.OH5(()=>flight.getReader()), (handle, exit)=>effect__rspack_import_3/* .gen */.JkU(function*() {
16246
+ const cancelExit = yield* effect__rspack_import_3/* .exit */.NS5(effect__rspack_import_3/* .tryPromise */.$mh({
16247
+ catch: (error)=>(0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error),
16267
16248
  try: ()=>handle.cancel()
16268
16249
  }));
16269
- if (effect__rspack_import_12/* .isFailure */.N6(exit)) return void (yield* effect__rspack_import_9/* .fail */.fJ(flightDone, (0,_315_js__rspack_import_5/* .mapCause */.K0)(exit.cause)));
16270
- if (effect__rspack_import_12/* .isFailure */.N6(cancelExit)) {
16271
- const error = (0,_315_js__rspack_import_5/* .mapCause */.K0)(cancelExit.cause);
16272
- yield* effect__rspack_import_9/* .fail */.fJ(flightDone, error);
16273
- return yield* effect__rspack_import_4/* .die */.F_Q(error);
16250
+ if (effect__rspack_import_11/* .isFailure */.N6(exit)) return void (yield* effect__rspack_import_8/* .fail */.fJ(flightDone, (0,_315_js__rspack_import_4/* .mapCause */.K0)(exit.cause)));
16251
+ if (effect__rspack_import_11/* .isFailure */.N6(cancelExit)) {
16252
+ const error = (0,_315_js__rspack_import_4/* .mapCause */.K0)(cancelExit.cause);
16253
+ yield* effect__rspack_import_8/* .fail */.fJ(flightDone, error);
16254
+ return yield* effect__rspack_import_3/* .die */.F_Q(error);
16274
16255
  }
16275
- yield* effect__rspack_import_9/* .succeed */.Py(flightDone, void 0);
16256
+ yield* effect__rspack_import_8/* .succeed */.Py(flightDone, void 0);
16276
16257
  }));
16277
- return effect__rspack_import_8/* .unfold */.t8s(void 0, ()=>demand.wait.pipe(effect__rspack_import_4/* .flatMap */.qIB(()=>effect__rspack_import_4/* .tryPromise */.$mh({
16278
- catch: (error)=>(0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error),
16258
+ return effect__rspack_import_7/* .unfold */.t8s(void 0, ()=>demand.wait.pipe(effect__rspack_import_3/* .flatMap */.qIB(()=>effect__rspack_import_3/* .tryPromise */.$mh({
16259
+ catch: (error)=>(0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error),
16279
16260
  try: ()=>reader.read()
16280
- })), effect__rspack_import_4/* .map */.TjK((next)=>next.done ? void 0 : [
16261
+ })), effect__rspack_import_3/* .map */.TjK((next)=>next.done ? void 0 : [
16281
16262
  next.value,
16282
16263
  void 0
16283
16264
  ])));
16284
16265
  }));
16285
- const decodeFlightRoot = (flight, demand, signal, flightDone)=>effect__rspack_import_4/* .gen */.JkU(function*() {
16286
- (0,_707_js__rspack_import_13/* .ensureAgentFlightManifest */.n)();
16287
- const flightAbort = yield* _315_js__rspack_import_5/* .scopedAbortSignal */.lQ;
16288
- const readable = (0,_315_js__rspack_import_5/* .streamToReadableStream */._I)(gatedFlightStream(flight, demand, flightDone), {
16266
+ const decodeFlightRoot = (flight, demand, signal, flightDone)=>effect__rspack_import_3/* .gen */.JkU(function*() {
16267
+ (0,_707_js__rspack_import_12/* .ensureAgentFlightManifest */.n)();
16268
+ const flightAbort = yield* _315_js__rspack_import_4/* .scopedAbortSignal */.lQ;
16269
+ const readable = (0,_315_js__rspack_import_4/* .streamToReadableStream */._I)(gatedFlightStream(flight, demand, flightDone), {
16289
16270
  signal: flightAbort,
16290
16271
  strategy: {
16291
16272
  highWaterMark: 1
16292
16273
  }
16293
16274
  });
16294
- return yield* effect__rspack_import_4/* .tryPromise */.$mh({
16275
+ return yield* effect__rspack_import_3/* .tryPromise */.$mh({
16295
16276
  catch: (error)=>hostError(signal, error),
16296
16277
  try: ()=>(0,react_server_dom_rspack_client_node__rspack_import_1.createFromReadableStream)(readable, {
16297
16278
  unstable_allowPartialStream: true
@@ -16308,11 +16289,11 @@ const progressInput = (update)=>({
16308
16289
  },
16309
16290
  type: 'progress'
16310
16291
  });
16311
- const handoffRequired = ()=>new _302_js__rspack_import_6/* .AgentContractError */.I2('handoff-required', 'The render is complete; later work requires a new invocation handoff');
16292
+ const handoffRequired = ()=>new _302_js__rspack_import_5/* .AgentContractError */.I2('handoff-required', 'The render is complete; later work requires a new invocation handoff');
16312
16293
  const createAgentRenderEventSession = (options)=>{
16313
16294
  const clock = options.clock;
16314
- const sequence = (0,_302_js__rspack_import_6/* .createAgentRenderEventSequence */.n4)(options.limits, void 0 === clock ? void 0 : ()=>clock.currentTimeMillisUnsafe());
16315
- const maxBufferedProgress = (0,_302_js__rspack_import_6/* .resolveAgentRenderLimits */.i0)(options.limits).maxEvents;
16295
+ const sequence = (0,_302_js__rspack_import_5/* .createAgentRenderEventSequence */.n4)(options.limits, void 0 === clock ? void 0 : ()=>clock.currentTimeMillisUnsafe());
16296
+ const maxBufferedProgress = (0,_302_js__rspack_import_5/* .resolveAgentRenderLimits */.i0)(options.limits).maxEvents;
16316
16297
  let offerProgress;
16317
16298
  let progressFailure;
16318
16299
  const bufferedProgress = [];
@@ -16322,36 +16303,36 @@ const createAgentRenderEventSession = (options)=>{
16322
16303
  if (sequence.completed) throw handoffRequired();
16323
16304
  const input = progressInput(update);
16324
16305
  if (void 0 === offerProgress) {
16325
- if (bufferedProgress.length >= maxBufferedProgress) throw new _302_js__rspack_import_6/* .AgentContractError */.I2('event-count-exceeded', `Agent render event count exceeds ${String(maxBufferedProgress)}`);
16306
+ if (bufferedProgress.length >= maxBufferedProgress) throw new _302_js__rspack_import_5/* .AgentContractError */.I2('event-count-exceeded', `Agent render event count exceeds ${String(maxBufferedProgress)}`);
16326
16307
  bufferedProgress.push(input);
16327
16308
  return;
16328
16309
  }
16329
- await (0,_315_js__rspack_import_5/* .runPromise */.pR)(offerProgress(input));
16310
+ await (0,_315_js__rspack_import_4/* .runPromise */.pR)(offerProgress(input));
16330
16311
  }
16331
16312
  });
16332
- const events = effect__rspack_import_8/* .unwrap */.oAg(effect__rspack_import_4/* .gen */.JkU(function*() {
16333
- const progressInputs = yield* effect__rspack_import_10/* .bounded */.Mm(0);
16334
- const flightDone = yield* effect__rspack_import_9/* .make */.L8();
16313
+ const events = effect__rspack_import_7/* .unwrap */.oAg(effect__rspack_import_3/* .gen */.JkU(function*() {
16314
+ const progressInputs = yield* effect__rspack_import_9/* .bounded */.Mm(0);
16315
+ const flightDone = yield* effect__rspack_import_8/* .make */.L8();
16335
16316
  const bindProgress = ()=>{
16336
- offerProgress = (input)=>effect__rspack_import_10/* .offer */.x(progressInputs, input).pipe(effect__rspack_import_4/* .flatMap */.qIB((accepted)=>{
16337
- if (void 0 !== progressFailure) return effect__rspack_import_4/* .fail */.fJG(progressFailure);
16338
- if (!accepted) return effect__rspack_import_4/* .fail */.fJG(handoffRequired());
16339
- return effect__rspack_import_4/* ["void"] */.rIH;
16317
+ offerProgress = (input)=>effect__rspack_import_9/* .offer */.x(progressInputs, input).pipe(effect__rspack_import_3/* .flatMap */.qIB((accepted)=>{
16318
+ if (void 0 !== progressFailure) return effect__rspack_import_3/* .fail */.fJG(progressFailure);
16319
+ if (!accepted) return effect__rspack_import_3/* .fail */.fJG(handoffRequired());
16320
+ return effect__rspack_import_3/* ["void"] */.rIH;
16340
16321
  }));
16341
16322
  };
16342
- const finalizeProgress = (error)=>effect__rspack_import_4/* .sync */.OH5(()=>{
16323
+ const finalizeProgress = (error)=>effect__rspack_import_3/* .sync */.OH5(()=>{
16343
16324
  progressFailure = error;
16344
- }).pipe(effect__rspack_import_4/* .andThen */.hgn(effect__rspack_import_10/* .shutdown */.n_(progressInputs)));
16345
- const setup = effect__rspack_import_4/* .gen */.JkU(function*() {
16346
- const flight = yield* effect__rspack_import_4/* .tryPromise */.$mh({
16325
+ }).pipe(effect__rspack_import_3/* .andThen */.hgn(effect__rspack_import_9/* .shutdown */.n_(progressInputs)));
16326
+ const setup = effect__rspack_import_3/* .gen */.JkU(function*() {
16327
+ const flight = yield* effect__rspack_import_3/* .tryPromise */.$mh({
16347
16328
  catch: (error)=>hostError(options.signal, error),
16348
16329
  try: ()=>options.flight
16349
16330
  });
16350
- if (options.signal.aborted) return yield* effect__rspack_import_4/* .fail */.fJG(abortError());
16331
+ if (options.signal.aborted) return yield* effect__rspack_import_3/* .fail */.fJG(abortError());
16351
16332
  const root = yield* decodeFlightRoot(flight, options.demand, options.signal, flightDone);
16352
- if (options.signal.aborted) return yield* effect__rspack_import_4/* .fail */.fJG(abortError());
16353
- const prepared = yield* effect__rspack_import_4/* ["try"] */.SvU({
16354
- catch: (error)=>(0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error),
16333
+ if (options.signal.aborted) return yield* effect__rspack_import_3/* .fail */.fJG(abortError());
16334
+ const prepared = yield* effect__rspack_import_3/* ["try"] */.SvU({
16335
+ catch: (error)=>(0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error),
16355
16336
  try: ()=>{
16356
16337
  const ids = new Map();
16357
16338
  const initial = snapshotTree(root, ids);
@@ -16366,23 +16347,23 @@ const createAgentRenderEventSession = (options)=>{
16366
16347
  }
16367
16348
  });
16368
16349
  bindProgress();
16369
- return effect__rspack_import_8/* .concat */.xWs(effect__rspack_import_8/* .fromArray */.ciY([
16350
+ return effect__rspack_import_7/* .concat */.xWs(effect__rspack_import_7/* .fromArray */.ciY([
16370
16351
  prepared.shellInput,
16371
16352
  ...bufferedProgress
16372
- ]), reconcileLoopStream(root, prepared.ids, prepared.initial, options.limits, flightDone, progressInputs, sequence)).pipe(effect__rspack_import_8/* .mapEffect */.WK$((input)=>emitBoundRenderEvent(sequence, input)), effect__rspack_import_8/* .tap */.Mim((event)=>'shell' === event.type ? options.demand.markShell : effect__rspack_import_4/* ["void"] */.rIH), effect__rspack_import_8/* .takeUntil */.QKh((event)=>'complete' === event.type), effect__rspack_import_8/* .onExit */.cfM((exit)=>{
16373
- if (effect__rspack_import_12/* .isSuccess */.oJ(exit)) return finalizeProgress(handoffRequired());
16374
- const error = (0,_315_js__rspack_import_5/* .mapCause */.K0)(exit.cause);
16375
- return finalizeProgress(sequence.completed && (0,_315_js__rspack_import_5/* .isAbortError */.zf)(error) ? handoffRequired() : error);
16353
+ ]), reconcileLoopStream(root, prepared.ids, prepared.initial, options.limits, flightDone, progressInputs, sequence)).pipe(effect__rspack_import_7/* .mapEffect */.WK$((input)=>emitBoundRenderEvent(sequence, input)), effect__rspack_import_7/* .tap */.Mim((event)=>'shell' === event.type ? options.demand.markShell : effect__rspack_import_3/* ["void"] */.rIH), effect__rspack_import_7/* .takeUntil */.QKh((event)=>'complete' === event.type), effect__rspack_import_7/* .onExit */.cfM((exit)=>{
16354
+ if (effect__rspack_import_11/* .isSuccess */.oJ(exit)) return finalizeProgress(handoffRequired());
16355
+ const error = (0,_315_js__rspack_import_4/* .mapCause */.K0)(exit.cause);
16356
+ return finalizeProgress(sequence.completed && (0,_315_js__rspack_import_4/* .isAbortError */.zf)(error) ? handoffRequired() : error);
16376
16357
  }));
16377
16358
  });
16378
- return yield* setup.pipe(effect__rspack_import_4/* .onExit */.cfM((exit)=>effect__rspack_import_12/* .isFailure */.N6(exit) ? finalizeProgress((0,_315_js__rspack_import_5/* .mapCause */.K0)(exit.cause)) : effect__rspack_import_4/* ["void"] */.rIH));
16359
+ return yield* setup.pipe(effect__rspack_import_3/* .onExit */.cfM((exit)=>effect__rspack_import_11/* .isFailure */.N6(exit) ? finalizeProgress((0,_315_js__rspack_import_4/* .mapCause */.K0)(exit.cause)) : effect__rspack_import_3/* ["void"] */.rIH));
16379
16360
  }));
16380
16361
  return {
16381
- events: void 0 === clock ? events : effect__rspack_import_8/* .provideService */.PfK(events, effect__rspack_import_14/* .Clock */.zD, clock),
16362
+ events: void 0 === clock ? events : effect__rspack_import_7/* .provideService */.PfK(events, effect__rspack_import_13/* .Clock */.zD, clock),
16382
16363
  progress
16383
16364
  };
16384
16365
  };
16385
- const toPublicEventStream = (events, demand, signal)=>(0,_315_js__rspack_import_5/* .streamToReadableStream */._I)(effect__rspack_import_8/* .interruptWhen */.S67(events, (0,_315_js__rspack_import_5/* .abortToInterrupt */.p7)(signal)), {
16366
+ const toPublicEventStream = (events, demand, signal)=>(0,_315_js__rspack_import_4/* .streamToReadableStream */._I)(effect__rspack_import_7/* .interruptWhen */.S67(events, (0,_315_js__rspack_import_4/* .abortToInterrupt */.p7)(signal)), {
16386
16367
  closeOn: (event)=>'complete' === event.type,
16387
16368
  onPull: demand.notePull,
16388
16369
  onPullDelivered: demand.notePullEnd,
@@ -16400,7 +16381,7 @@ const decodeAgentFlightStream = (flight, options = {})=>{
16400
16381
  signal
16401
16382
  }).events, demand, signal);
16402
16383
  };
16403
- const dispatcher_abortError = _302_js__rspack_import_6/* .agentRenderAbortError */.k2;
16384
+ const dispatcher_abortError = _302_js__rspack_import_5/* .agentRenderAbortError */.k2;
16404
16385
  const abortedStream = ()=>new ReadableStream({
16405
16386
  start (controller) {
16406
16387
  controller.error(dispatcher_abortError());
@@ -16435,7 +16416,7 @@ const drainCompleteDocument = async (events, signal)=>{
16435
16416
  }
16436
16417
  if (void 0 !== complete) return complete;
16437
16418
  if (signal.aborted) throw dispatcher_abortError();
16438
- throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', 'Flight stream ended without a complete document');
16419
+ throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', 'Flight stream ended without a complete document');
16439
16420
  };
16440
16421
  const createAgentRenderDispatcher = (host, options = {})=>{
16441
16422
  const stream = (request)=>{
@@ -16446,7 +16427,7 @@ const createAgentRenderDispatcher = (host, options = {})=>{
16446
16427
  demand,
16447
16428
  get flight () {
16448
16429
  const current = pendingFlight.current;
16449
- if (void 0 === current) return Promise.reject(new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', 'Flight worker is not running'));
16430
+ if (void 0 === current) return Promise.reject(new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', 'Flight worker is not running'));
16450
16431
  return current;
16451
16432
  },
16452
16433
  limits: {
@@ -16577,21 +16558,21 @@ const appendNode = (node, content, capabilities, fallback)=>{
16577
16558
  default:
16578
16559
  {
16579
16560
  const exhaustive = node;
16580
- throw new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', `Unsupported Agent Document node: ${String(exhaustive.kind)}`);
16561
+ throw new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', `Unsupported Agent Document node: ${String(exhaustive.kind)}`);
16581
16562
  }
16582
16563
  }
16583
16564
  };
16584
16565
  const project_mcp_isJsonObject = (value)=>null !== value && 'object' == typeof value && !Array.isArray(value);
16585
16566
  const objectStructuredContent = (value)=>{
16586
16567
  if (void 0 === value) return;
16587
- const snapshot = (0,_302_js__rspack_import_6/* .snapshotJsonValue */.mY)(value, 'MCP structured content must be JSON-serializable');
16568
+ const snapshot = (0,_302_js__rspack_import_5/* .snapshotJsonValue */.mY)(value, 'MCP structured content must be JSON-serializable');
16588
16569
  return project_mcp_isJsonObject(snapshot) ? snapshot : void 0;
16589
16570
  };
16590
16571
  const resultMetadata = (document)=>{
16591
16572
  if ('result' !== document.root.kind) return;
16592
16573
  const metadata = document.root.metadata;
16593
16574
  if (void 0 === metadata) return;
16594
- const snapshot = (0,_302_js__rspack_import_6/* .snapshotJsonValue */.mY)(metadata, 'MCP result _meta must be JSON-serializable');
16575
+ const snapshot = (0,_302_js__rspack_import_5/* .snapshotJsonValue */.mY)(metadata, 'MCP result _meta must be JSON-serializable');
16595
16576
  if (!project_mcp_isJsonObject(snapshot)) throw new McpProjectionError('invalid-result-metadata', 'MCP result _meta must be a JSON object; Agent.Result metadata projects to CallToolResult._meta');
16596
16577
  return snapshot;
16597
16578
  };
@@ -16621,8 +16602,8 @@ const attachMcpStructuredContent = (result, value)=>{
16621
16602
  structuredContent: structured
16622
16603
  };
16623
16604
  };
16624
- const notifyProgress = (source, token, sendProgress)=>effect__rspack_import_4/* .tryPromise */.$mh({
16625
- catch: (error)=>(0,_315_js__rspack_import_5/* .toRuntimeError */.qN)(error),
16605
+ const notifyProgress = (source, token, sendProgress)=>effect__rspack_import_3/* .tryPromise */.$mh({
16606
+ catch: (error)=>(0,_315_js__rspack_import_4/* .toRuntimeError */.qN)(error),
16626
16607
  try: ()=>sendProgress({
16627
16608
  progress: source.completed,
16628
16609
  progressToken: token,
@@ -16663,18 +16644,18 @@ const documentProgressNodes = (document)=>{
16663
16644
  appendProgressNodes(document.root, nodes);
16664
16645
  return nodes;
16665
16646
  };
16666
- const projectMcpEventStream = effect__rspack_import_4/* .fnUntraced */.D9k(function*(events, options = {}) {
16647
+ const projectMcpEventStream = effect__rspack_import_3/* .fnUntraced */.D9k(function*(events, options = {}) {
16667
16648
  let lastProgress = -1 / 0;
16668
16649
  let complete;
16669
16650
  const token = options.progressToken;
16670
16651
  const sendProgress = options.sendProgress;
16671
16652
  const notify = (source)=>{
16672
- if (void 0 === token || void 0 === sendProgress) return effect__rspack_import_4/* ["void"] */.rIH;
16673
- if (!(source.completed > lastProgress)) return effect__rspack_import_4/* ["void"] */.rIH;
16653
+ if (void 0 === token || void 0 === sendProgress) return effect__rspack_import_3/* ["void"] */.rIH;
16654
+ if (!(source.completed > lastProgress)) return effect__rspack_import_3/* ["void"] */.rIH;
16674
16655
  lastProgress = source.completed;
16675
16656
  return notifyProgress(source, token, sendProgress);
16676
16657
  };
16677
- yield* effect__rspack_import_8/* .runForEach */.o1d(events, (event)=>effect__rspack_import_4/* .gen */.JkU(function*() {
16658
+ yield* effect__rspack_import_7/* .runForEach */.o1d(events, (event)=>effect__rspack_import_3/* .gen */.JkU(function*() {
16678
16659
  switch(event.type){
16679
16660
  case 'progress':
16680
16661
  yield* notify(event);
@@ -16695,7 +16676,7 @@ const projectMcpEventStream = effect__rspack_import_4/* .fnUntraced */.D9k(funct
16695
16676
  }
16696
16677
  }
16697
16678
  }));
16698
- if (void 0 === complete) return yield* effect__rspack_import_4/* .fail */.fJG(new _302_js__rspack_import_6/* .AgentContractError */.I2('invalid-document', 'MCP projector requires a complete document; the stream ended without one'));
16679
+ if (void 0 === complete) return yield* effect__rspack_import_3/* .fail */.fJG(new _302_js__rspack_import_5/* .AgentContractError */.I2('invalid-document', 'MCP projector requires a complete document; the stream ended without one'));
16699
16680
  return Object.freeze({
16700
16681
  document: complete,
16701
16682
  result: documentToCallToolResult(complete, options)
@@ -16778,53 +16759,6 @@ const MarkdownContent = async ({ children, components })=>{
16778
16759
  });
16779
16760
  return createElement(Agent.Markdown, null, markdown.replace(/\n+$/u, ''));
16780
16761
  };
16781
- const hookComponents = new Set(Object.values(_506_js__rspack_import_15/* .Hook */.qn));
16782
- const isHookComponent = (value)=>hookComponents.has(value);
16783
- const resolveHookElement = (node)=>{
16784
- let element = node;
16785
- while(isValidElement(element) && isHookComponent(element.type))element = element.type(element.props);
16786
- return element;
16787
- };
16788
- const isAgentElement = (node, name)=>{
16789
- const resolved = resolveHookElement(node);
16790
- return isValidElement(resolved) && resolved.type === name;
16791
- };
16792
- const flattenText = (node)=>{
16793
- if ('string' == typeof node || 'number' == typeof node) return String(node);
16794
- if (Array.isArray(node)) return node.map(flattenText).join('');
16795
- if (isAgentElement(node, 'agent-hook-result')) throw new Error('Hook result contains duplicate roots');
16796
- throw new Error('Hook additional context may contain only string or number children');
16797
- };
16798
- const lowerHookResult = (node)=>{
16799
- const roots = Children.toArray(node).map(resolveHookElement);
16800
- if (1 !== roots.length || !isAgentElement(roots[0], 'agent-hook-result')) throw new Error('Expected exactly one agent-hook-result root');
16801
- const result = roots[0];
16802
- const contexts = Children.toArray(result.props.children).map(resolveHookElement).map((child)=>{
16803
- if (isAgentElement(child, 'agent-hook-result')) throw new Error('Hook result contains duplicate roots');
16804
- if (!isAgentElement(child, 'agent-hook-additional-context')) throw new Error('Hook result may contain only agent-hook-additional-context elements');
16805
- return flattenText(child.props.children);
16806
- });
16807
- if (0 === contexts.length) throw new Error('Hook result requires additional context');
16808
- return {
16809
- hookSpecificOutput: {
16810
- additionalContext: contexts.join(''),
16811
- hookEventName: 'PostToolUse'
16812
- }
16813
- };
16814
- };
16815
- const createRscRequestContext = (label)=>{
16816
- const storage = new AsyncLocalStorage();
16817
- return Object.freeze({
16818
- run (value, operation) {
16819
- return storage.run(value, operation);
16820
- },
16821
- use () {
16822
- const value = storage.getStore();
16823
- if (void 0 === value) throw new Error(`${label} used outside a render request`);
16824
- return value;
16825
- }
16826
- });
16827
- };
16828
16762
  var src_AGENT_DOCUMENT_VERSION = 1;
16829
16763
  var src_AGENT_REQUEST_STORE_VERSION = 6;
16830
16764
  var src_PLUGIN_STATE_DIRECTORY = "state";
@@ -16889,6 +16823,26 @@ __webpack_require__.d(__webpack_exports__, {
16889
16823
  });
16890
16824
 
16891
16825
 
16826
+ },
16827
+ "./node_modules/agent-bundle/dist/790~1.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
16828
+ const isErrno = (error, code)=>'object' == typeof error && null !== error && 'code' in error && error.code === code;
16829
+ const errorMessage = (error)=>error instanceof Error ? error.message : String(error);
16830
+ class CodedError extends Error {
16831
+ code;
16832
+ constructor(name, code, message, options){
16833
+ super(message, options);
16834
+ this.name = name;
16835
+ this.code = code;
16836
+ }
16837
+ }
16838
+
16839
+
16840
+ __webpack_require__.d(__webpack_exports__, {
16841
+ }, {
16842
+ gJ: errorMessage
16843
+ });
16844
+
16845
+
16892
16846
  },
16893
16847
  "./node_modules/agent-bundle/dist/991~1.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
16894
16848
  const isJsonWhitespace = (code)=>0x09 === code || 0x0a === code || 0x0d === code || 0x20 === code;
@@ -17073,7 +17027,9 @@ __webpack_require__.d(__webpack_exports__, {
17073
17027
  },
17074
17028
  "./node_modules/agent-bundle/dist/cli-entry.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
17075
17029
  /* import */ var _667_1_js__rspack_import_0 = __webpack_require__("./node_modules/agent-bundle/dist/667~1.js");
17076
- /* import */ var _terminal_capability_js__rspack_import_1 = __webpack_require__("./node_modules/agent-bundle/dist/terminal-capability.js");
17030
+ /* import */ var _790_1_js__rspack_import_1 = __webpack_require__("./node_modules/agent-bundle/dist/790~1.js");
17031
+ /* import */ var _terminal_capability_js__rspack_import_2 = __webpack_require__("./node_modules/agent-bundle/dist/terminal-capability.js");
17032
+
17077
17033
 
17078
17034
 
17079
17035
  class CliUsageError extends Error {
@@ -17192,19 +17148,7 @@ const cliInputError = (command, input, error)=>{
17192
17148
  });
17193
17149
  return new CliInputError(issues.map(cliInputIssueLine).join('\n'), issues);
17194
17150
  };
17195
- const resolveTerminal = (hostSurface, options)=>{
17196
- if (void 0 !== options.terminal) return options.terminal;
17197
- if (void 0 === options.isTty) return (0,_terminal_capability_js__rspack_import_1/* .detectProcessTerminal */.JH)(hostSurface);
17198
- const stdout = {
17199
- columns: process.stdout.columns,
17200
- fd: 1,
17201
- isTTY: options.isTty(),
17202
- rows: process.stdout.rows
17203
- };
17204
- return (0,_terminal_capability_js__rspack_import_1/* .detectProcessTerminal */.JH)(hostSurface, {
17205
- stdout
17206
- });
17207
- };
17151
+ const resolveTerminal = (hostSurface, options)=>options.terminal ?? (0,_terminal_capability_js__rspack_import_2/* .detectProcessTerminal */.JH)(hostSurface);
17208
17152
  const webCommandRow = [
17209
17153
  'web',
17210
17154
  "Open one of the plugin's MCP Apps in a browser."
@@ -17638,6 +17582,16 @@ const progressNodes = (node)=>{
17638
17582
  }
17639
17583
  };
17640
17584
  const clearProgressLine = '\r\u001B[2K';
17585
+ const renderFailedCode = 'render-failed';
17586
+ const writeRenderFailure = (mode, error, writeErr)=>{
17587
+ const message = (0,_790_1_js__rspack_import_1/* .errorMessage */.gJ)(error);
17588
+ writeErr('json' === mode ? `${(0,_667_1_js__rspack_import_0/* .stableJson */._Y)({
17589
+ error: {
17590
+ code: renderFailedCode,
17591
+ message
17592
+ }
17593
+ })}\n` : `[${renderFailedCode}] ${message}\n`);
17594
+ };
17641
17595
  const runRenderedInvocation = async (options)=>{
17642
17596
  const { mode, writeErr, writeOut } = options;
17643
17597
  const reader = options.session.events().getReader();
@@ -17701,7 +17655,7 @@ const runRenderedInvocation = async (options)=>{
17701
17655
  writeErr('Aborted.\n');
17702
17656
  return 1;
17703
17657
  }
17704
- writeErr(`${error instanceof Error ? error.message : String(error)}\n`);
17658
+ writeRenderFailure(mode, error, writeErr);
17705
17659
  return 1;
17706
17660
  }
17707
17661
  clearProgress();
@@ -75162,7 +75116,7 @@ function strictObject(shape, params) {
75162
75116
  type: "object",
75163
75117
  shape,
75164
75118
  catchall: never(),
75165
- ...util.normalizeParams(params),
75119
+ ..._core_index_js__rspack_import_4/* .normalizeParams */.A2(params),
75166
75120
  });
75167
75121
  }
75168
75122
  // looseObject
@@ -75796,6 +75750,7 @@ __webpack_require__.d(__webpack_exports__, {
75796
75750
  euz: () => (literal),
75797
75751
  g1P: () => (record),
75798
75752
  k5n: () => (_enum),
75753
+ rej: () => (strictObject),
75799
75754
  zMY: () => (boolean)
75800
75755
  });
75801
75756
 
@@ -84066,107 +84021,113 @@ __webpack_require__.d(__webpack_exports__, {
84066
84021
  __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_deps, __rspack_async_done) { try {
84067
84022
  /* import */ var agent_bundle_launch_env_layer__rspack_import_0 = __webpack_require__("./.agent-bundle-virtual/bin-gbot-0.mjs");
84068
84023
  /* import */ var agent_bundle_cli_entry__rspack_import_1 = __webpack_require__("./node_modules/agent-bundle/dist/cli-entry.js");
84069
- /* import */ var _agent_bundle_runtime__rspack_import_34 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
84070
- /* import */ var _agent_bundle_runtime__rspack_import_35 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/736.js");
84071
- /* import */ var _agent_bundle_runtime__rspack_import_36 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/index.js");
84024
+ /* import */ var _agent_bundle_runtime__rspack_import_36 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
84025
+ /* import */ var _agent_bundle_runtime__rspack_import_37 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/736.js");
84026
+ /* import */ var _agent_bundle_runtime__rspack_import_38 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/index.js");
84072
84027
  /* import */ var node_url__rspack_import_2 = __webpack_require__("node:url");
84073
84028
  /* import */ var node_worker_threads__rspack_import_3 = __webpack_require__("node:worker_threads");
84074
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_create_tsx__rspack_import_4 = __webpack_require__("./src/cli/bots/create.tsx");
84075
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_delete_tsx__rspack_import_5 = __webpack_require__("./src/cli/bots/delete.tsx");
84076
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_get_tsx__rspack_import_6 = __webpack_require__("./src/cli/bots/get.tsx");
84077
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_list_tsx__rspack_import_7 = __webpack_require__("./src/cli/bots/list.tsx");
84078
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_update_tsx__rspack_import_8 = __webpack_require__("./src/cli/bots/update.tsx");
84079
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_respond_tsx__rspack_import_9 = __webpack_require__("./src/cli/codex/bridge/respond.tsx");
84080
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_run_tsx__rspack_import_10 = __webpack_require__("./src/cli/codex/bridge/run.tsx");
84081
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_start_tsx__rspack_import_11 = __webpack_require__("./src/cli/codex/bridge/start.tsx");
84082
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_status_tsx__rspack_import_12 = __webpack_require__("./src/cli/codex/bridge/status.tsx");
84083
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_stop_tsx__rspack_import_13 = __webpack_require__("./src/cli/codex/bridge/stop.tsx");
84084
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_desktop_shim_tsx__rspack_import_14 = __webpack_require__("./src/cli/codex/desktop-shim.tsx");
84085
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_list_threads_tsx__rspack_import_15 = __webpack_require__("./src/cli/codex/list-threads.tsx");
84086
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_queue_tsx__rspack_import_16 = __webpack_require__("./src/cli/codex/queue.tsx");
84087
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_send_tsx__rspack_import_17 = __webpack_require__("./src/cli/codex/send.tsx");
84088
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_status_tsx__rspack_import_18 = __webpack_require__("./src/cli/codex/status.tsx");
84089
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_wait_tsx__rspack_import_19 = __webpack_require__("./src/cli/codex/wait.tsx");
84090
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_watch_tsx__rspack_import_20 = __webpack_require__("./src/cli/codex/watch.tsx");
84091
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_doctor_tsx__rspack_import_21 = __webpack_require__("./src/cli/doctor.tsx");
84092
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_add_tsx__rspack_import_22 = __webpack_require__("./src/cli/groups/add.tsx");
84093
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_create_tsx__rspack_import_23 = __webpack_require__("./src/cli/groups/create.tsx");
84094
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_delete_tsx__rspack_import_24 = __webpack_require__("./src/cli/groups/delete.tsx");
84095
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_get_tsx__rspack_import_25 = __webpack_require__("./src/cli/groups/get.tsx");
84096
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_list_tsx__rspack_import_26 = __webpack_require__("./src/cli/groups/list.tsx");
84097
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_members_tsx__rspack_import_27 = __webpack_require__("./src/cli/groups/members.tsx");
84098
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_remove_tsx__rspack_import_28 = __webpack_require__("./src/cli/groups/remove.tsx");
84099
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_set_tsx__rspack_import_29 = __webpack_require__("./src/cli/groups/set.tsx");
84100
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_update_tsx__rspack_import_30 = __webpack_require__("./src/cli/groups/update.tsx");
84101
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_history_tsx__rspack_import_31 = __webpack_require__("./src/cli/history.tsx");
84102
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_32 = __webpack_require__("./src/cli/send.tsx");
84103
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_33 = __webpack_require__("./src/cli/thread.tsx");
84029
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_list_tsx__rspack_import_4 = __webpack_require__("./src/cli/approvals/list.tsx");
84030
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_respond_tsx__rspack_import_5 = __webpack_require__("./src/cli/approvals/respond.tsx");
84031
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_create_tsx__rspack_import_6 = __webpack_require__("./src/cli/bots/create.tsx");
84032
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_delete_tsx__rspack_import_7 = __webpack_require__("./src/cli/bots/delete.tsx");
84033
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_get_tsx__rspack_import_8 = __webpack_require__("./src/cli/bots/get.tsx");
84034
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_list_tsx__rspack_import_9 = __webpack_require__("./src/cli/bots/list.tsx");
84035
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_update_tsx__rspack_import_10 = __webpack_require__("./src/cli/bots/update.tsx");
84036
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_respond_tsx__rspack_import_11 = __webpack_require__("./src/cli/codex/bridge/respond.tsx");
84037
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_run_tsx__rspack_import_12 = __webpack_require__("./src/cli/codex/bridge/run.tsx");
84038
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_start_tsx__rspack_import_13 = __webpack_require__("./src/cli/codex/bridge/start.tsx");
84039
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_status_tsx__rspack_import_14 = __webpack_require__("./src/cli/codex/bridge/status.tsx");
84040
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_stop_tsx__rspack_import_15 = __webpack_require__("./src/cli/codex/bridge/stop.tsx");
84041
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_desktop_shim_tsx__rspack_import_16 = __webpack_require__("./src/cli/codex/desktop-shim.tsx");
84042
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_list_threads_tsx__rspack_import_17 = __webpack_require__("./src/cli/codex/list-threads.tsx");
84043
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_queue_tsx__rspack_import_18 = __webpack_require__("./src/cli/codex/queue.tsx");
84044
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_send_tsx__rspack_import_19 = __webpack_require__("./src/cli/codex/send.tsx");
84045
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_status_tsx__rspack_import_20 = __webpack_require__("./src/cli/codex/status.tsx");
84046
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_wait_tsx__rspack_import_21 = __webpack_require__("./src/cli/codex/wait.tsx");
84047
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_watch_tsx__rspack_import_22 = __webpack_require__("./src/cli/codex/watch.tsx");
84048
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_doctor_tsx__rspack_import_23 = __webpack_require__("./src/cli/doctor.tsx");
84049
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_add_tsx__rspack_import_24 = __webpack_require__("./src/cli/groups/add.tsx");
84050
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_create_tsx__rspack_import_25 = __webpack_require__("./src/cli/groups/create.tsx");
84051
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_delete_tsx__rspack_import_26 = __webpack_require__("./src/cli/groups/delete.tsx");
84052
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_get_tsx__rspack_import_27 = __webpack_require__("./src/cli/groups/get.tsx");
84053
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_list_tsx__rspack_import_28 = __webpack_require__("./src/cli/groups/list.tsx");
84054
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_members_tsx__rspack_import_29 = __webpack_require__("./src/cli/groups/members.tsx");
84055
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_remove_tsx__rspack_import_30 = __webpack_require__("./src/cli/groups/remove.tsx");
84056
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_set_tsx__rspack_import_31 = __webpack_require__("./src/cli/groups/set.tsx");
84057
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_update_tsx__rspack_import_32 = __webpack_require__("./src/cli/groups/update.tsx");
84058
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_history_tsx__rspack_import_33 = __webpack_require__("./src/cli/history.tsx");
84059
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_34 = __webpack_require__("./src/cli/send.tsx");
84060
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_35 = __webpack_require__("./src/cli/thread.tsx");
84061
+
84062
+
84104
84063
 
84105
84064
 
84106
84065
 
84107
84066
 
84067
+ const route0 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_list_tsx__rspack_import_4, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_list_tsx__rspack_import_4);
84108
84068
 
84069
+ const route1 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_respond_tsx__rspack_import_5, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_respond_tsx__rspack_import_5);
84109
84070
 
84110
- const route0 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_create_tsx__rspack_import_4, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_create_tsx__rspack_import_4);
84071
+ const route2 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_create_tsx__rspack_import_6, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_create_tsx__rspack_import_6);
84111
84072
 
84112
- const route1 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_delete_tsx__rspack_import_5, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_delete_tsx__rspack_import_5);
84073
+ const route3 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_delete_tsx__rspack_import_7, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_delete_tsx__rspack_import_7);
84113
84074
 
84114
- const route2 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_get_tsx__rspack_import_6, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_get_tsx__rspack_import_6);
84075
+ const route4 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_get_tsx__rspack_import_8, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_get_tsx__rspack_import_8);
84115
84076
 
84116
- const route3 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_list_tsx__rspack_import_7, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_list_tsx__rspack_import_7);
84077
+ const route5 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_list_tsx__rspack_import_9, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_list_tsx__rspack_import_9);
84117
84078
 
84118
- const route4 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_update_tsx__rspack_import_8, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_update_tsx__rspack_import_8);
84079
+ const route6 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_update_tsx__rspack_import_10, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_bots_update_tsx__rspack_import_10);
84119
84080
 
84120
- const route5 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_respond_tsx__rspack_import_9, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_respond_tsx__rspack_import_9);
84081
+ const route7 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_respond_tsx__rspack_import_11, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_respond_tsx__rspack_import_11);
84121
84082
 
84122
- const route6 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_run_tsx__rspack_import_10, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_run_tsx__rspack_import_10);
84083
+ const route8 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_run_tsx__rspack_import_12, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_run_tsx__rspack_import_12);
84123
84084
 
84124
- const route7 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_start_tsx__rspack_import_11, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_start_tsx__rspack_import_11);
84085
+ const route9 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_start_tsx__rspack_import_13, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_start_tsx__rspack_import_13);
84125
84086
 
84126
- const route8 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_status_tsx__rspack_import_12, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_status_tsx__rspack_import_12);
84087
+ const route10 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_status_tsx__rspack_import_14, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_status_tsx__rspack_import_14);
84127
84088
 
84128
- const route9 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_stop_tsx__rspack_import_13, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_stop_tsx__rspack_import_13);
84089
+ const route11 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_stop_tsx__rspack_import_15, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_bridge_stop_tsx__rspack_import_15);
84129
84090
 
84130
- const route10 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_desktop_shim_tsx__rspack_import_14, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_desktop_shim_tsx__rspack_import_14);
84091
+ const route12 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_desktop_shim_tsx__rspack_import_16, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_desktop_shim_tsx__rspack_import_16);
84131
84092
 
84132
- const route11 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_list_threads_tsx__rspack_import_15, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_list_threads_tsx__rspack_import_15);
84093
+ const route13 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_list_threads_tsx__rspack_import_17, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_list_threads_tsx__rspack_import_17);
84133
84094
 
84134
- const route12 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_queue_tsx__rspack_import_16, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_queue_tsx__rspack_import_16);
84095
+ const route14 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_queue_tsx__rspack_import_18, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_queue_tsx__rspack_import_18);
84135
84096
 
84136
- const route13 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_send_tsx__rspack_import_17, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_send_tsx__rspack_import_17);
84097
+ const route15 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_send_tsx__rspack_import_19, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_send_tsx__rspack_import_19);
84137
84098
 
84138
- const route14 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_status_tsx__rspack_import_18, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_status_tsx__rspack_import_18);
84099
+ const route16 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_status_tsx__rspack_import_20, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_status_tsx__rspack_import_20);
84139
84100
 
84140
- const route15 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_wait_tsx__rspack_import_19, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_wait_tsx__rspack_import_19);
84101
+ const route17 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_wait_tsx__rspack_import_21, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_wait_tsx__rspack_import_21);
84141
84102
 
84142
- const route16 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_watch_tsx__rspack_import_20, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_watch_tsx__rspack_import_20);
84103
+ const route18 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_watch_tsx__rspack_import_22, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_codex_watch_tsx__rspack_import_22);
84143
84104
 
84144
- const route17 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_doctor_tsx__rspack_import_21, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_doctor_tsx__rspack_import_21);
84105
+ const route19 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_doctor_tsx__rspack_import_23, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_doctor_tsx__rspack_import_23);
84145
84106
 
84146
- const route18 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_add_tsx__rspack_import_22, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_add_tsx__rspack_import_22);
84107
+ const route20 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_add_tsx__rspack_import_24, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_add_tsx__rspack_import_24);
84147
84108
 
84148
- const route19 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_create_tsx__rspack_import_23, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_create_tsx__rspack_import_23);
84109
+ const route21 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_create_tsx__rspack_import_25, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_create_tsx__rspack_import_25);
84149
84110
 
84150
- const route20 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_delete_tsx__rspack_import_24, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_delete_tsx__rspack_import_24);
84111
+ const route22 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_delete_tsx__rspack_import_26, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_delete_tsx__rspack_import_26);
84151
84112
 
84152
- const route21 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_get_tsx__rspack_import_25, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_get_tsx__rspack_import_25);
84113
+ const route23 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_get_tsx__rspack_import_27, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_get_tsx__rspack_import_27);
84153
84114
 
84154
- const route22 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_list_tsx__rspack_import_26, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_list_tsx__rspack_import_26);
84115
+ const route24 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_list_tsx__rspack_import_28, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_list_tsx__rspack_import_28);
84155
84116
 
84156
- const route23 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_members_tsx__rspack_import_27, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_members_tsx__rspack_import_27);
84117
+ const route25 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_members_tsx__rspack_import_29, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_members_tsx__rspack_import_29);
84157
84118
 
84158
- const route24 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_remove_tsx__rspack_import_28, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_remove_tsx__rspack_import_28);
84119
+ const route26 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_remove_tsx__rspack_import_30, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_remove_tsx__rspack_import_30);
84159
84120
 
84160
- const route25 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_set_tsx__rspack_import_29, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_set_tsx__rspack_import_29);
84121
+ const route27 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_set_tsx__rspack_import_31, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_set_tsx__rspack_import_31);
84161
84122
 
84162
- const route26 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_update_tsx__rspack_import_30, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_update_tsx__rspack_import_30);
84123
+ const route28 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_update_tsx__rspack_import_32, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_update_tsx__rspack_import_32);
84163
84124
 
84164
- const route27 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_history_tsx__rspack_import_31, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_history_tsx__rspack_import_31);
84125
+ const route29 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_history_tsx__rspack_import_33, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_history_tsx__rspack_import_33);
84165
84126
 
84166
- const route28 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_32, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_32);
84127
+ const route30 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_34, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_34);
84167
84128
 
84168
- const route29 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_33, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_33);
84169
- const pluginRoot = (0,_agent_bundle_runtime__rspack_import_34/* .resolvePluginRoot */.E7)({
84129
+ const route31 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_35, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_35);
84130
+ const pluginRoot = (0,_agent_bundle_runtime__rspack_import_36/* .resolvePluginRoot */.E7)({
84170
84131
  fallback: (0,node_url__rspack_import_2.fileURLToPath)(new URL('..', import.meta.url)),
84171
84132
  stateAnchor: 'user-data'
84172
84133
  });
@@ -84176,98 +84137,170 @@ const processLifetime = {
84176
84137
  pid: process.pid
84177
84138
  };
84178
84139
  const routes = Object.freeze({
84179
- "cli:bots/create": Object.freeze({
84140
+ "cli:approvals/list": Object.freeze({
84180
84141
  module: route0
84181
84142
  }),
84182
- "cli:bots/delete": Object.freeze({
84143
+ "cli:approvals/respond": Object.freeze({
84183
84144
  module: route1
84184
84145
  }),
84185
- "cli:bots/get": Object.freeze({
84146
+ "cli:bots/create": Object.freeze({
84186
84147
  module: route2
84187
84148
  }),
84188
- "cli:bots/list": Object.freeze({
84149
+ "cli:bots/delete": Object.freeze({
84189
84150
  module: route3
84190
84151
  }),
84191
- "cli:bots/update": Object.freeze({
84152
+ "cli:bots/get": Object.freeze({
84192
84153
  module: route4
84193
84154
  }),
84194
- "cli:codex/bridge/respond": Object.freeze({
84155
+ "cli:bots/list": Object.freeze({
84195
84156
  module: route5
84196
84157
  }),
84197
- "cli:codex/bridge/run": Object.freeze({
84158
+ "cli:bots/update": Object.freeze({
84198
84159
  module: route6
84199
84160
  }),
84200
- "cli:codex/bridge/start": Object.freeze({
84161
+ "cli:codex/bridge/respond": Object.freeze({
84201
84162
  module: route7
84202
84163
  }),
84203
- "cli:codex/bridge/status": Object.freeze({
84164
+ "cli:codex/bridge/run": Object.freeze({
84204
84165
  module: route8
84205
84166
  }),
84206
- "cli:codex/bridge/stop": Object.freeze({
84167
+ "cli:codex/bridge/start": Object.freeze({
84207
84168
  module: route9
84208
84169
  }),
84209
- "cli:codex/desktop-shim": Object.freeze({
84170
+ "cli:codex/bridge/status": Object.freeze({
84210
84171
  module: route10
84211
84172
  }),
84212
- "cli:codex/list-threads": Object.freeze({
84173
+ "cli:codex/bridge/stop": Object.freeze({
84213
84174
  module: route11
84214
84175
  }),
84215
- "cli:codex/queue": Object.freeze({
84176
+ "cli:codex/desktop-shim": Object.freeze({
84216
84177
  module: route12
84217
84178
  }),
84218
- "cli:codex/send": Object.freeze({
84179
+ "cli:codex/list-threads": Object.freeze({
84219
84180
  module: route13
84220
84181
  }),
84221
- "cli:codex/status": Object.freeze({
84182
+ "cli:codex/queue": Object.freeze({
84222
84183
  module: route14
84223
84184
  }),
84224
- "cli:codex/wait": Object.freeze({
84185
+ "cli:codex/send": Object.freeze({
84225
84186
  module: route15
84226
84187
  }),
84227
- "cli:codex/watch": Object.freeze({
84188
+ "cli:codex/status": Object.freeze({
84228
84189
  module: route16
84229
84190
  }),
84230
- "cli:doctor": Object.freeze({
84191
+ "cli:codex/wait": Object.freeze({
84231
84192
  module: route17
84232
84193
  }),
84233
- "cli:groups/add": Object.freeze({
84194
+ "cli:codex/watch": Object.freeze({
84234
84195
  module: route18
84235
84196
  }),
84236
- "cli:groups/create": Object.freeze({
84197
+ "cli:doctor": Object.freeze({
84237
84198
  module: route19
84238
84199
  }),
84239
- "cli:groups/delete": Object.freeze({
84200
+ "cli:groups/add": Object.freeze({
84240
84201
  module: route20
84241
84202
  }),
84242
- "cli:groups/get": Object.freeze({
84203
+ "cli:groups/create": Object.freeze({
84243
84204
  module: route21
84244
84205
  }),
84245
- "cli:groups/list": Object.freeze({
84206
+ "cli:groups/delete": Object.freeze({
84246
84207
  module: route22
84247
84208
  }),
84248
- "cli:groups/members": Object.freeze({
84209
+ "cli:groups/get": Object.freeze({
84249
84210
  module: route23
84250
84211
  }),
84251
- "cli:groups/remove": Object.freeze({
84212
+ "cli:groups/list": Object.freeze({
84252
84213
  module: route24
84253
84214
  }),
84254
- "cli:groups/set": Object.freeze({
84215
+ "cli:groups/members": Object.freeze({
84255
84216
  module: route25
84256
84217
  }),
84257
- "cli:groups/update": Object.freeze({
84218
+ "cli:groups/remove": Object.freeze({
84258
84219
  module: route26
84259
84220
  }),
84260
- "cli:history": Object.freeze({
84221
+ "cli:groups/set": Object.freeze({
84261
84222
  module: route27
84262
84223
  }),
84263
- "cli:send": Object.freeze({
84224
+ "cli:groups/update": Object.freeze({
84264
84225
  module: route28
84265
84226
  }),
84266
- "cli:thread": Object.freeze({
84227
+ "cli:history": Object.freeze({
84267
84228
  module: route29
84229
+ }),
84230
+ "cli:send": Object.freeze({
84231
+ module: route30
84232
+ }),
84233
+ "cli:thread": Object.freeze({
84234
+ module: route31
84268
84235
  })
84269
84236
  });
84270
84237
  const commands = Object.freeze([
84238
+ {
84239
+ "aliases": [],
84240
+ "description": "List current Grok approval cards (latest 200 entries).",
84241
+ "exitCode": "zero",
84242
+ "options": [
84243
+ {
84244
+ "key": "target",
84245
+ "kind": "string",
84246
+ "option": "target",
84247
+ "positional": 0,
84248
+ "repeated": false,
84249
+ "required": true
84250
+ }
84251
+ ],
84252
+ "path": [
84253
+ "approvals",
84254
+ "list"
84255
+ ],
84256
+ "rendered": true,
84257
+ "routeId": "cli:approvals/list"
84258
+ },
84259
+ {
84260
+ "aliases": [],
84261
+ "description": "Explicit user decision: accept a Grok request once or decline; never grant persistent permissions.",
84262
+ "exitCode": "zero",
84263
+ "options": [
84264
+ {
84265
+ "choices": [
84266
+ "accept",
84267
+ "decline"
84268
+ ],
84269
+ "key": "decision",
84270
+ "kind": "enum",
84271
+ "option": "decision",
84272
+ "repeated": false,
84273
+ "required": true
84274
+ },
84275
+ {
84276
+ "key": "entryId",
84277
+ "kind": "string",
84278
+ "option": "entry-id",
84279
+ "repeated": false,
84280
+ "required": true
84281
+ },
84282
+ {
84283
+ "key": "requestId",
84284
+ "kind": "string",
84285
+ "option": "request-id",
84286
+ "repeated": false,
84287
+ "required": true
84288
+ },
84289
+ {
84290
+ "key": "target",
84291
+ "kind": "string",
84292
+ "option": "target",
84293
+ "repeated": false,
84294
+ "required": true
84295
+ }
84296
+ ],
84297
+ "path": [
84298
+ "approvals",
84299
+ "respond"
84300
+ ],
84301
+ "rendered": true,
84302
+ "routeId": "cli:approvals/respond"
84303
+ },
84271
84304
  {
84272
84305
  "aliases": [],
84273
84306
  "description": "Create a Grok Bot bot.",
@@ -85978,27 +86011,27 @@ const execute = async (command, input, context)=>{
85978
86011
  instanceId: processLifetime.instanceId,
85979
86012
  pid: processLifetime.pid
85980
86013
  };
85981
- const result = await (0,_agent_bundle_runtime__rspack_import_35/* .runAgentRequest */.iC)({
86014
+ const result = await (0,_agent_bundle_runtime__rspack_import_37/* .runAgentRequest */.iC)({
85982
86015
  capabilities: {
85983
- command: (0,_agent_bundle_runtime__rspack_import_35/* .unavailable */.hU)(),
85984
- filesystem: (0,_agent_bundle_runtime__rspack_import_35/* .unavailable */.hU)(),
85985
- network: (0,_agent_bundle_runtime__rspack_import_35/* .unavailable */.hU)(),
85986
- projectRoot: (0,_agent_bundle_runtime__rspack_import_35/* .available */.qC)({
86016
+ command: (0,_agent_bundle_runtime__rspack_import_37/* .unavailable */.hU)(),
86017
+ filesystem: (0,_agent_bundle_runtime__rspack_import_37/* .unavailable */.hU)(),
86018
+ network: (0,_agent_bundle_runtime__rspack_import_37/* .unavailable */.hU)(),
86019
+ projectRoot: (0,_agent_bundle_runtime__rspack_import_37/* .available */.qC)({
85987
86020
  root: cwd
85988
86021
  }, 'derived')
85989
86022
  },
85990
- host: (0,_agent_bundle_runtime__rspack_import_35/* .unavailable */.hU)('unsupported-surface'),
86023
+ host: (0,_agent_bundle_runtime__rspack_import_37/* .unavailable */.hU)('unsupported-surface'),
85991
86024
  invocation: {
85992
86025
  kind: 'cli',
85993
86026
  operationId: command.routeId,
85994
86027
  surface: command.path.join(' ')
85995
86028
  },
85996
- lineage: (0,_agent_bundle_runtime__rspack_import_35/* .unavailable */.hU)('unsupported-surface'),
86029
+ lineage: (0,_agent_bundle_runtime__rspack_import_37/* .unavailable */.hU)('unsupported-surface'),
85997
86030
  plugin: pluginRoot.identity,
85998
86031
  process: processHit,
85999
86032
  signal: context.signal,
86000
- terminal: (0,_agent_bundle_runtime__rspack_import_35/* .available */.qC)(context.terminal, 'native'),
86001
- workspace: (0,_agent_bundle_runtime__rspack_import_35/* .available */.qC)({
86033
+ terminal: (0,_agent_bundle_runtime__rspack_import_37/* .available */.qC)(context.terminal, 'native'),
86034
+ workspace: (0,_agent_bundle_runtime__rspack_import_37/* .available */.qC)({
86002
86035
  root: cwd
86003
86036
  }, 'derived')
86004
86037
  }, async ()=>route.module.default({
@@ -86105,7 +86138,7 @@ const openRenderedSession = ({ invocation, limits, props, request, routeId, sign
86105
86138
  return stream;
86106
86139
  }
86107
86140
  });
86108
- const dispatcher = (0,_agent_bundle_runtime__rspack_import_36/* .createAgentRenderDispatcher */.jK)(host);
86141
+ const dispatcher = (0,_agent_bundle_runtime__rspack_import_38/* .createAgentRenderDispatcher */.jK)(host);
86109
86142
  return Object.freeze({
86110
86143
  close: async ()=>{
86111
86144
  await worker.terminate();
@@ -86153,7 +86186,7 @@ if (import.meta.main) {
86153
86186
  execute,
86154
86187
  name: "gbot",
86155
86188
  render,
86156
- version: "0.6.0"
86189
+ version: "0.7.0"
86157
86190
  });
86158
86191
  }
86159
86192
 
@@ -87195,10 +87228,10 @@ function listDesktopProcesses(timeoutMs = DESKTOP_PROCESS_LIST_TIMEOUT_MS) {
87195
87228
  const lines = Array.isArray(listProcesses) ? listProcesses : String(listProcesses ?? "").split(/\r?\n/);
87196
87229
  for (const line of lines){
87197
87230
  if (!/app-server/.test(line)) continue;
87198
- // Desktop's bundled binary, Mac or Windows-style separators with optional .exe.
87231
+ // Desktop's bundled binary only (Mac/Windows separators, optional .exe).
87232
+ // Do NOT match probe shells whose cmdline merely mentions ChatGPT.app +
87233
+ // app-server + codex-app-tools — that false-positives MATCH2 / Scout noise.
87199
87234
  if (/ChatGPT\.app[\\/].*Resources[\\/]codex(\.exe)?(["'\s]|$)/.test(line)) return "private-stdio";
87200
- // Same app-server line owned by ChatGPT.app carrying the app-tools override.
87201
- if (/ChatGPT\.app/.test(line) && /(codex_app|mcp_servers\.codex_app|codex-app-tools)/.test(line)) return "private-stdio";
87202
87235
  }
87203
87236
  return "unknown";
87204
87237
  }
@@ -89136,10 +89169,12 @@ __webpack_require__.d(__webpack_exports__, {
89136
89169
  },
89137
89170
  "./src/core/gateway.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
89138
89171
  /* import */ var node_crypto__rspack_import_0 = __webpack_require__("node:crypto");
89139
- /* import */ var _headers_js__rspack_import_4 = __webpack_require__("./src/core/headers.js");
89172
+ /* import */ var _headers_js__rspack_import_5 = __webpack_require__("./src/core/headers.js");
89140
89173
  /* import */ var _app_session_js__rspack_import_1 = __webpack_require__("./src/core/app-session.js");
89141
89174
  /* import */ var _store_js__rspack_import_2 = __webpack_require__("./src/core/store.js");
89142
89175
  /* import */ var _url_policy_js__rspack_import_3 = __webpack_require__("./src/core/url-policy.js");
89176
+ /* import */ var _grok_approvals_js__rspack_import_4 = __webpack_require__("./src/core/grok-approvals.js");
89177
+
89143
89178
 
89144
89179
 
89145
89180
 
@@ -89189,7 +89224,7 @@ function gatewayOverride() {
89189
89224
  kind: "gateway"
89190
89225
  }),
89191
89226
  gatewayToken: token,
89192
- gatewayHeaders: (0,_headers_js__rspack_import_4/* .headersFromEnv */.gx)()
89227
+ gatewayHeaders: (0,_headers_js__rspack_import_5/* .headersFromEnv */.gx)()
89193
89228
  };
89194
89229
  }
89195
89230
  return null;
@@ -89210,7 +89245,7 @@ function sessionFromApp() {
89210
89245
  kind: "gateway"
89211
89246
  }),
89212
89247
  gatewayToken: loaded.gatewayToken,
89213
- gatewayHeaders: (0,_headers_js__rspack_import_4/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_4/* .normalizeHeaderMap */.dk)(loaded.headers), (0,_headers_js__rspack_import_4/* .headersFromEnv */.gx)())
89248
+ gatewayHeaders: (0,_headers_js__rspack_import_5/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_5/* .normalizeHeaderMap */.dk)(loaded.headers), (0,_headers_js__rspack_import_5/* .headersFromEnv */.gx)())
89214
89249
  };
89215
89250
  }
89216
89251
  function hasGatewayAuth() {
@@ -89270,7 +89305,7 @@ async function ensureSandbox(accessToken, { signal } = {}) {
89270
89305
  method: "POST",
89271
89306
  redirect: "error",
89272
89307
  signal: gatewayDeadline(signal),
89273
- headers: (0,_headers_js__rspack_import_4/* .ensureSandboxHeaders */._6)(accessToken),
89308
+ headers: (0,_headers_js__rspack_import_5/* .ensureSandboxHeaders */._6)(accessToken),
89274
89309
  body: "{}"
89275
89310
  });
89276
89311
  body = await readJson(res);
@@ -89296,7 +89331,7 @@ async function ensureSandbox(accessToken, { signal } = {}) {
89296
89331
  kind: "gateway"
89297
89332
  }),
89298
89333
  gatewayToken: String(gatewayToken),
89299
- gatewayHeaders: (0,_headers_js__rspack_import_4/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_4/* .headersFromEnsureSandbox */.Ew)(body), (0,_headers_js__rspack_import_4/* .headersFromEnv */.gx)())
89334
+ gatewayHeaders: (0,_headers_js__rspack_import_5/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_5/* .headersFromEnsureSandbox */.Ew)(body), (0,_headers_js__rspack_import_5/* .headersFromEnv */.gx)())
89300
89335
  };
89301
89336
  }
89302
89337
  async function connectGateway({ signal } = {}) {
@@ -89326,7 +89361,7 @@ async function gatewayCall(session, method, body = {}, { signal } = {}) {
89326
89361
  method: "POST",
89327
89362
  redirect: "error",
89328
89363
  signal: gatewayDeadline(prompt ? undefined : signal),
89329
- headers: (0,_headers_js__rspack_import_4/* .requestHeaders */.A1)(session),
89364
+ headers: (0,_headers_js__rspack_import_5/* .requestHeaders */.A1)(session),
89330
89365
  body: JSON.stringify(body)
89331
89366
  };
89332
89367
  assertGatewayActive(signal); // Final synchronous boundary before transmission.
@@ -89593,10 +89628,49 @@ async function getThread(session, ref, rootId) {
89593
89628
  thread: data
89594
89629
  };
89595
89630
  }
89631
+ async function listGrokApprovals(session, ref) {
89632
+ const { target, transcript } = await getTranscriptTail(session, ref, 200);
89633
+ if (!Array.isArray(transcript?.entries) || transcript.entries.length > 200) throw new GatewayError("Invalid approval transcript coverage");
89634
+ return {
89635
+ target: {
89636
+ id: target.id,
89637
+ name: target.name
89638
+ },
89639
+ approvals: transcript.entries.map(_grok_approvals_js__rspack_import_4/* .grokApproval */.Ny).filter(Boolean),
89640
+ coverage: "Latest 200 transcript entries only; older requests require the owning Grok UI."
89641
+ };
89642
+ }
89643
+ async function respondGrokApproval(session, ref, input) {
89644
+ const { entryId, requestId, decision } = _grok_approvals_js__rspack_import_4/* .grokApprovalResponseSchema.parse */.T5.parse({
89645
+ ...input,
89646
+ target: ref
89647
+ });
89648
+ const { target, approvals } = await listGrokApprovals(session, ref);
89649
+ const matches = approvals.filter((card)=>card.entryId === entryId && card.requestId === requestId);
89650
+ if (matches.length !== 1) throw new GatewayError("Stale, foreign or unsupported Grok approval; refresh pending requests or use the owning Grok UI");
89651
+ const approval = matches[0];
89652
+ if (decision === "accept" && approval.truncated) throw new GatewayError("Approval details are truncated; acceptance requires the owning Grok UI");
89653
+ const local = approval.type === "local-tool-permission";
89654
+ await gatewayCall(session, local ? "resolveLocalToolPermission" : "resolveAutoReviewApproval", {
89655
+ agentId: target.id,
89656
+ entryId,
89657
+ requestId,
89658
+ resolution: local ? decision === "accept" ? "allow-once" : "deny" : decision === "accept" ? "approved" : "denied"
89659
+ });
89660
+ return {
89661
+ target,
89662
+ entryId,
89663
+ requestId,
89664
+ decision,
89665
+ delivery: "accepted"
89666
+ };
89667
+ }
89596
89668
 
89597
89669
  __webpack_require__.d(__webpack_exports__, {
89598
89670
  A0: () => (removeGroupMember),
89599
89671
  LV: () => (sendPrompt),
89672
+ MI: () => (listGrokApprovals),
89673
+ OR: () => (respondGrokApproval),
89600
89674
  RB: () => (deleteAgent),
89601
89675
  Sn: () => (createAgent),
89602
89676
  Td: () => (setGroupMembers),
@@ -89612,6 +89686,68 @@ __webpack_require__.d(__webpack_exports__, {
89612
89686
  });
89613
89687
 
89614
89688
 
89689
+ },
89690
+ "./src/core/grok-approvals.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
89691
+ /* import */ var zod__rspack_import_1 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
89692
+ /* import */ var _url_policy_js__rspack_import_0 = __webpack_require__("./src/core/url-policy.js");
89693
+
89694
+
89695
+ const id = zod__rspack_import_1/* .string */.YjP().min(1).max(1024);
89696
+ const grokApprovalResponseSchema = zod__rspack_import_1/* .strictObject */.rej({
89697
+ target: id,
89698
+ entryId: id,
89699
+ requestId: id,
89700
+ decision: zod__rspack_import_1/* ["enum"] */.k5n([
89701
+ "accept",
89702
+ "decline"
89703
+ ])
89704
+ });
89705
+ function grokApproval(entry) {
89706
+ if (entry?.kind !== "send-message") return null;
89707
+ const type = entry.message?.type;
89708
+ const card = type === "auto-review-approval" ? entry.message.approval : type === "local-tool-permission" ? entry.message.ask : null;
89709
+ if (card?.status !== "pending" || !id.safeParse(card.requestId).success || !id.safeParse(entry.id).success) return null;
89710
+ const details = {};
89711
+ let truncated = false;
89712
+ for (const key of [
89713
+ "reason",
89714
+ "command",
89715
+ "summary",
89716
+ "action",
89717
+ "description",
89718
+ "target",
89719
+ "machineId",
89720
+ "surface",
89721
+ "workingDirectory"
89722
+ ]){
89723
+ if (typeof card[key] !== "string") continue;
89724
+ const text = (0,_url_policy_js__rspack_import_0/* .redactSecrets */.fp)(card[key]);
89725
+ truncated ||= text.length > 2048;
89726
+ details[key] = text.slice(0, 2048);
89727
+ }
89728
+ return {
89729
+ entryId: entry.id,
89730
+ requestId: card.requestId,
89731
+ type,
89732
+ ...details,
89733
+ truncated
89734
+ };
89735
+ }
89736
+ function grokApprovalNotice(entry, target) {
89737
+ const approval = grokApproval(entry);
89738
+ return approval ? `Grok approval pending. Requires an explicit user decision; never approve automatically.\n${JSON.stringify({
89739
+ botTarget: target,
89740
+ ...approval
89741
+ })}\nUse gbot_grok_respond with target=${JSON.stringify(target)}, entryId, requestId and decision accept (once) or decline.${approval.truncated ? " Details are truncated; acceptance requires the owning Grok UI." : ""} A chat reply is not authorization.` : null;
89742
+ }
89743
+
89744
+ __webpack_require__.d(__webpack_exports__, {
89745
+ Ny: () => (grokApproval)
89746
+ }, {
89747
+ T5: grokApprovalResponseSchema
89748
+ });
89749
+
89750
+
89615
89751
  },
89616
89752
  "./src/core/headers.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
89617
89753
  function normalizeHeaderMap(obj) {
@@ -90028,7 +90164,10 @@ function relayProfile(env = process.env) {
90028
90164
  "GROK_BOT_ALLOW_LOCAL_GATEWAY",
90029
90165
  "GROK_BOT_ALLOW_ANY_GATEWAY",
90030
90166
  "GROK_BOT_TEST",
90031
- "NODE_ENV"
90167
+ "NODE_ENV",
90168
+ // Secret Service credentials depend on the caller's desktop session.
90169
+ "DBUS_SESSION_BUS_ADDRESS",
90170
+ "DISPLAY"
90032
90171
  ];
90033
90172
  return digest(JSON.stringify([
90034
90173
  (0,node_path__rspack_import_2.resolve)((0,_codex_bridge_js__rspack_import_3/* .codexSocketPath */.ql)(env)),
@@ -90626,7 +90765,7 @@ __webpack_require__.d(__webpack_exports__, {
90626
90765
 
90627
90766
  },
90628
90767
  "./package.json"(module) {
90629
- module.exports = {"rE":"0.6.0"}
90768
+ module.exports = {"rE":"0.7.0"}
90630
90769
 
90631
90770
  },
90632
90771