grok-bot-cli 0.7.0 → 0.8.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/install.mjs CHANGED
@@ -7,7 +7,7 @@ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'nod
7
7
  import { fileURLToPath } from 'node:url';
8
8
 
9
9
  const pluginName = "gbot";
10
- const pluginVersion = "0.7.0";
10
+ const pluginVersion = "0.8.0";
11
11
  const receiptFile = ".agent-bundle-install.json";
12
12
  const receiptFormat = "agent-bundle-install-receipt/2";
13
13
  const legacyReceiptFormat = "agent-bundle-install-receipt/1";
@@ -39,7 +39,7 @@ const marketplacePlugin = join(marketplaceRepo, 'plugins', pluginName);
39
39
  const pluginData = join(cursorRoot, 'agent-bundle', 'plugin-data', pluginName);
40
40
  const receiptsRoot = join(cursorRoot, 'agent-bundle', 'receipts');
41
41
  const marketplaceReceipt = join(receiptsRoot, `${pluginName}.marketplace.json`);
42
- const usage = 'Usage: node install.mjs [--mode local|marketplace] [--replace] [--help]\n node install.mjs --uninstall [--mode local|marketplace] [--keep-data | --purge-data --confirm-purge] [--force] [--plan]';
42
+ const usage = 'Usage: node install.mjs [--mode local|marketplace] [--replace|--force] [--help]\n node install.mjs --uninstall [--mode local|marketplace] [--keep-data | --purge-data --confirm-purge] [--force] [--plan]';
43
43
 
44
44
  let replace = false;
45
45
  let force = false;
@@ -52,8 +52,7 @@ let mode = 'local';
52
52
  const argv = process.argv.slice(2);
53
53
  for (let index = 0; index < argv.length; index += 1) {
54
54
  const argument = argv[index];
55
- if (argument === '--replace') { replace = true; continue; }
56
- if (argument === '--force') { force = true; continue; }
55
+ if (argument === '--replace' || argument === '--force') { replace = true; force = argument === '--force'; continue; }
57
56
  if (argument === '--uninstall') { uninstall = true; continue; }
58
57
  if (argument === '--plan') { plan = true; continue; }
59
58
  if (argument === '--keep-data') { keepData = true; continue; }
@@ -69,8 +68,6 @@ for (let index = 0; index < argv.length; index += 1) {
69
68
  console.error(`Unknown installer argument ${JSON.stringify(argument)}.\n${usage}`);
70
69
  process.exit(2);
71
70
  }
72
- if (!uninstall && force) { console.error(`--force applies to --uninstall only. Use --replace to replace an install.\n${usage}`); process.exit(2); }
73
- if (uninstall && replace) { console.error(`--replace applies to installation only. Use --force to override uninstall ownership checks.\n${usage}`); process.exit(2); }
74
71
  if (!uninstall && (plan || keepData || purgeData || confirmPurge)) {
75
72
  console.error(`--plan, --keep-data, --purge-data, and --confirm-purge apply to --uninstall only.\n${usage}`);
76
73
  process.exit(2);
@@ -121,7 +118,7 @@ const hashEntry = (hash, relative, metadata, bytes) => {
121
118
  // Deterministic tree walk: symlinks and special files refused, the root receipt skipped. `transform`
122
119
  // maps a file's bytes to what the Cursor copy will hold (the Agent Plugins mcp.json expansion below), so
123
120
  // the artifact hash describes the installed form and reruns compare like for like.
124
- const inventory = async (root, transform) => {
121
+ const readTree = async (root, transform, selectedPaths) => {
125
122
  const rootMetadata = await lstat(root);
126
123
  if (rootMetadata.isSymbolicLink() || !rootMetadata.isDirectory()) throw unsupported('.');
127
124
  const hash = createHash('sha256');
@@ -142,10 +139,11 @@ const inventory = async (root, transform) => {
142
139
  const bytes = await readFile(absolute);
143
140
  hashEntry(hash, relative, metadata, transform === undefined ? bytes : transform(posixPath, bytes));
144
141
  };
145
- if (artifactManifest !== undefined) {
146
- const selected = new Set(['agent-bundle.manifest.json', ...artifactManifest.files.map((file) => file.path)]);
147
- for (const file of ['.env', '.env.local']) if (await exists(join(root, file))) selected.add(file);
148
- for (const file of [...selected].sort(compareTreePaths)) await visit(file);
142
+ if (selectedPaths !== undefined) {
143
+ for (const file of selectedPaths) {
144
+ if (!(await exists(join(root, file)))) throw new Error(`bundle does not match its manifest: ${file} is missing.`);
145
+ await visit(file);
146
+ }
149
147
  return { files, hash: hash.digest('hex') };
150
148
  }
151
149
  for (const entry of (await readdir(root)).sort((left, right) => left.localeCompare(right))) {
@@ -160,6 +158,13 @@ const inventory = async (root, transform) => {
160
158
  }
161
159
  return { files, hash: hash.digest('hex') };
162
160
  };
161
+ const inventory = (root, transform) => readTree(root, transform, undefined);
162
+ const artifactInventory = async (root, transform) => {
163
+ if (artifactManifest === undefined) return inventory(root, transform);
164
+ const selected = new Set(['agent-bundle.manifest.json', ...artifactManifest.files.map((file) => file.path)]);
165
+ for (const file of ['.env', '.env.local']) if (await exists(join(root, file))) selected.add(file);
166
+ return readTree(root, transform, [...selected].sort(compareTreePaths));
167
+ };
163
168
 
164
169
  const treeHash = async (root) => (await inventory(root)).hash;
165
170
 
@@ -548,7 +553,7 @@ const stage = async (tree, receiptOptions = {}) => {
548
553
  };
549
554
  await cp(source, root, { errorOnExist: true, filter, force: false, recursive: true, verbatimSymlinks: true });
550
555
  if (expansion !== undefined) await writeFile(join(root, expansion.mcpDocument), expansion.expanded, 'utf8');
551
- const staged = await inventory(root);
556
+ const staged = await artifactInventory(root);
552
557
  await writeFile(join(root, receiptFile), receiptFor(staged, receiptOptions), 'utf8');
553
558
  return { inventory: staged, parent, root };
554
559
  } catch (error) {
@@ -1021,7 +1026,7 @@ const marketplaceManifestPath = join(marketplaceRepo, '.cursor-plugin', 'marketp
1021
1026
  // commit lets --uninstall prove the repository is still the one staging wrote.
1022
1027
  const writeMarketplaceReceipt = async (commit) => {
1023
1028
  const previous = await readReceiptFile(marketplaceReceipt);
1024
- const tree = await inventory(source);
1029
+ const tree = await artifactInventory(source);
1025
1030
  if (previous !== undefined && previous.contentHash === tree.hash && previous.registrations[0]?.commit === commit) return;
1026
1031
  await mkdir(receiptsRoot, { recursive: true });
1027
1032
  // The committed repository is removed wholesale after a HEAD check; the receipt owns no individual files.
@@ -1084,6 +1089,7 @@ if (mode === 'marketplace') {
1084
1089
  if (nestedGit !== undefined) {
1085
1090
  throw new Error(`--mode marketplace refuses bundle-internal Git metadata at ${JSON.stringify(nestedGit)}: git would record it as an empty gitlink and Cursor would import a plugin without files. Stage from a built bundle directory without .git, or use the default local mode.`);
1086
1091
  }
1092
+ await artifactInventory(source);
1087
1093
  await mkdir(marketplaceRoot, { recursive: true });
1088
1094
  if (await exists(marketplaceRepo)) {
1089
1095
  let stagedVersion;
@@ -1092,6 +1098,7 @@ if (mode === 'marketplace') {
1092
1098
  if (stagedVersion !== undefined && stagedVersion !== pluginVersion) {
1093
1099
  throw new Error(`Refusing version collision at ${marketplaceRepo}: found ${stagedVersion}, requested ${pluginVersion}.`);
1094
1100
  }
1101
+ // The staged plugin is an unfiltered copy of the bundle, so both sides hash the files present.
1095
1102
  if (await exists(marketplacePlugin) && await exists(join(marketplaceRepo, '.git')) && await treeHash(source) === await treeHash(marketplacePlugin)) {
1096
1103
  let stagedManifest;
1097
1104
  try { stagedManifest = await readFile(marketplaceManifestPath, 'utf8'); }
@@ -1146,7 +1153,7 @@ if (mode === 'marketplace') {
1146
1153
  }
1147
1154
 
1148
1155
  // The artifact is inventoried (and any unsupported entry refused) before anything is created in the home.
1149
- const artifact = await inventory(source, cursorTransform);
1156
+ const artifact = await artifactInventory(source, cursorTransform);
1150
1157
  // The receipt records which host directories this run creates on the way to the plugin root (a fresh Cursor
1151
1158
  // home has no plugins/local), so --uninstall can prune exactly those and no more.
1152
1159
  const createdHostDirectories = [];
@@ -13999,6 +13999,9 @@ const resultSchema = zod__rspack_import_4/* .union */.KCZ([
13999
13999
  _core_relay_routes_js__rspack_import_3/* .relayResultSchema */.Ax
14000
14000
  ]);
14001
14001
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14002
+ excludeClients: [
14003
+ 'codex'
14004
+ ],
14002
14005
  description: 'Send to Codex. With replyToGrok or bindingId, managed delivery returns the terminal answer to Grok automatically. Otherwise optional wait observes completion and explicit steer requires expectedTurnId. Acceptance is not completion.',
14003
14006
  title: 'Codex send',
14004
14007
  annotations: {
@@ -14074,9 +14077,9 @@ const resultSchema = zod__rspack_import_4/* .union */.KCZ([
14074
14077
  const context = await (0,_agent_bundle_runtime__rspack_import_5/* .agent */.MA)();
14075
14078
  if (input.replyToGrok || input.bindingId) {
14076
14079
  const out = await (0,_core_relay_routes_js__rspack_import_3/* .codexReturnOperation */.lt)(input, context);
14077
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Result */.g.Result, {
14080
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Result */.g6.Result, {
14078
14081
  value: out,
14079
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Text */.g.Text, {
14082
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Text */.g6.Text, {
14080
14083
  children: `Delivery ${out.delivery}; terminal answer returns to Grok automatically.`
14081
14084
  })
14082
14085
  });
@@ -14087,9 +14090,9 @@ const resultSchema = zod__rspack_import_4/* .union */.KCZ([
14087
14090
  }, context.signal, (message)=>context.progress.report({
14088
14091
  message
14089
14092
  }));
14090
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Result */.g.Result, {
14093
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Result */.g6.Result, {
14091
14094
  value: out,
14092
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Text */.g.Text, {
14095
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_6/* .Agent.Text */.g6.Text, {
14093
14096
  children: (0,_core_codex_routes_js__rspack_import_2/* .resultText */.D6)(out)
14094
14097
  })
14095
14098
  });
@@ -14116,6 +14119,9 @@ __webpack_require__.r(__webpack_exports__);
14116
14119
 
14117
14120
 
14118
14121
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14122
+ excludeClients: [
14123
+ 'codex'
14124
+ ],
14119
14125
  description: 'Discover a bounded page of Codex daemon threads.',
14120
14126
  title: 'Codex threads',
14121
14127
  annotations: {
@@ -14143,9 +14149,9 @@ __webpack_require__.r(__webpack_exports__);
14143
14149
  }, async (input)=>{
14144
14150
  const context = await (0,_agent_bundle_runtime__rspack_import_3/* .agent */.MA)();
14145
14151
  const out = await (0,_core_codex_routes_js__rspack_import_2/* .threadsOperation */.$c)(input);
14146
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14152
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14147
14153
  value: out,
14148
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14154
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14149
14155
  children: (0,_core_codex_routes_js__rspack_import_2/* .resultText */.D6)(out)
14150
14156
  })
14151
14157
  });
@@ -14172,6 +14178,9 @@ __webpack_require__.r(__webpack_exports__);
14172
14178
 
14173
14179
 
14174
14180
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14181
+ excludeClients: [
14182
+ 'codex'
14183
+ ],
14175
14184
  description: 'Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.',
14176
14185
  title: 'Codex wait',
14177
14186
  annotations: {
@@ -14217,9 +14226,9 @@ __webpack_require__.r(__webpack_exports__);
14217
14226
  const out = await (0,_core_codex_routes_js__rspack_import_2/* .observeOperation */.gT)('wait', input, context.signal, (message)=>context.progress.report({
14218
14227
  message
14219
14228
  }));
14220
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14229
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14221
14230
  value: out,
14222
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14231
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14223
14232
  children: (0,_core_codex_routes_js__rspack_import_2/* .resultText */.D6)(out)
14224
14233
  })
14225
14234
  });
@@ -14246,6 +14255,9 @@ __webpack_require__.r(__webpack_exports__);
14246
14255
 
14247
14256
 
14248
14257
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14258
+ excludeClients: [
14259
+ 'codex'
14260
+ ],
14249
14261
  description: 'Watch bounded Codex thread events for diagnostics without answering approvals.',
14250
14262
  title: 'Codex watch',
14251
14263
  annotations: {
@@ -14284,9 +14296,9 @@ __webpack_require__.r(__webpack_exports__);
14284
14296
  const out = await (0,_core_codex_routes_js__rspack_import_2/* .observeOperation */.gT)('watch', input, context.signal, (message)=>context.progress.report({
14285
14297
  message
14286
14298
  }));
14287
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14299
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14288
14300
  value: out,
14289
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14301
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14290
14302
  children: (0,_core_codex_routes_js__rspack_import_2/* .resultText */.D6)(out)
14291
14303
  })
14292
14304
  });
@@ -14350,9 +14362,9 @@ __webpack_require__.r(__webpack_exports__);
14350
14362
  }
14351
14363
  }, async (input)=>{
14352
14364
  const out = await (0,_core_relay_routes_js__rspack_import_2/* .bridgeOperation */.n1)('startBinding', input, await (0,_agent_bundle_runtime__rspack_import_3/* .agent */.MA)());
14353
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14365
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14354
14366
  value: out,
14355
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14367
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14356
14368
  children: JSON.stringify(out)
14357
14369
  })
14358
14370
  });
@@ -14400,9 +14412,9 @@ __webpack_require__.r(__webpack_exports__);
14400
14412
  }
14401
14413
  }, async (input)=>{
14402
14414
  const out = await (0,_core_relay_routes_js__rspack_import_2/* .bridgeOperation */.n1)('status', input, await (0,_agent_bundle_runtime__rspack_import_3/* .agent */.MA)());
14403
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14415
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14404
14416
  value: out,
14405
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14417
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14406
14418
  children: JSON.stringify(out)
14407
14419
  })
14408
14420
  });
@@ -14453,9 +14465,9 @@ __webpack_require__.r(__webpack_exports__);
14453
14465
  }
14454
14466
  }, async (input)=>{
14455
14467
  const out = await (0,_core_relay_routes_js__rspack_import_2/* .bridgeOperation */.n1)('stop', input, await (0,_agent_bundle_runtime__rspack_import_3/* .agent */.MA)());
14456
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14468
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14457
14469
  value: out,
14458
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14470
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14459
14471
  children: JSON.stringify(out)
14460
14472
  })
14461
14473
  });
@@ -14482,6 +14494,9 @@ __webpack_require__.r(__webpack_exports__);
14482
14494
 
14483
14495
 
14484
14496
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14497
+ excludeClients: [
14498
+ 'codex'
14499
+ ],
14485
14500
  description: 'Explicit operator response to a current scoped Codex interaction. Supports only one-time accept/decline/cancel or exact question-ID answers. Never auto-approve.',
14486
14501
  title: 'gbot_codex_respond',
14487
14502
  annotations: {
@@ -14533,9 +14548,9 @@ __webpack_require__.r(__webpack_exports__);
14533
14548
  }
14534
14549
  }, async (input)=>{
14535
14550
  const out = await (0,_core_relay_routes_js__rspack_import_2/* .bridgeOperation */.n1)('respond', input, await (0,_agent_bundle_runtime__rspack_import_3/* .agent */.MA)());
14536
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14551
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14537
14552
  value: out,
14538
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14553
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14539
14554
  children: JSON.stringify(out)
14540
14555
  })
14541
14556
  });
@@ -14561,6 +14576,11 @@ __webpack_require__.r(__webpack_exports__);
14561
14576
 
14562
14577
 
14563
14578
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14579
+ excludeClients: [
14580
+ 'grok bot',
14581
+ 'grokbot',
14582
+ 'grok-bot'
14583
+ ],
14564
14584
  title: 'Pending Grok approvals',
14565
14585
  description: 'List pending auto-review and local-tool approval cards in the latest 200 entries for a Grok bot. Older or unsupported requests require the owning Grok UI.',
14566
14586
  annotations: {
@@ -14582,9 +14602,9 @@ __webpack_require__.r(__webpack_exports__);
14582
14602
  }
14583
14603
  }, async (input)=>{
14584
14604
  const out = await (0,_core_grok_approval_routes_js__rspack_import_2/* .listOperation */.gi)(input);
14585
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
14605
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
14586
14606
  value: out,
14587
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
14607
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
14588
14608
  children: JSON.stringify(out)
14589
14609
  })
14590
14610
  });
@@ -14610,6 +14630,11 @@ __webpack_require__.r(__webpack_exports__);
14610
14630
 
14611
14631
 
14612
14632
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14633
+ excludeClients: [
14634
+ 'grok bot',
14635
+ 'grokbot',
14636
+ 'grok-bot'
14637
+ ],
14613
14638
  title: 'Respond to Grok approval',
14614
14639
  description: 'Only after an explicit user decision: accept one current Grok approval once or decline it. Exact target, entryId and approval requestId required. Never auto-approve or grant persistent permissions. Success acknowledges response delivery, not execution.',
14615
14640
  annotations: {
@@ -14647,9 +14672,9 @@ __webpack_require__.r(__webpack_exports__);
14647
14672
  }
14648
14673
  }, async (input)=>{
14649
14674
  const out = await (0,_core_grok_approval_routes_js__rspack_import_2/* .respondOperation */.lr)(input);
14650
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g.Result, {
14675
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
14651
14676
  value: out,
14652
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g.Text, {
14677
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
14653
14678
  children: JSON.stringify(out)
14654
14679
  })
14655
14680
  });
@@ -14676,6 +14701,11 @@ __webpack_require__.r(__webpack_exports__);
14676
14701
 
14677
14702
 
14678
14703
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14704
+ excludeClients: [
14705
+ 'grok bot',
14706
+ 'grokbot',
14707
+ 'grok-bot'
14708
+ ],
14679
14709
  description: 'Send to Grok Bot. Native Codex calls automatically receive replies in their originating thread; send once and continue work. Without a native source, supply codexThreadId or use manual gbot_thread reading.',
14680
14710
  title: 'Send a message to Grok Bot',
14681
14711
  annotations: {
@@ -14727,9 +14757,9 @@ __webpack_require__.r(__webpack_exports__);
14727
14757
  }
14728
14758
  }, async (input)=>{
14729
14759
  const out = await (0,_core_relay_routes_js__rspack_import_2/* .grokSendOperation */.bv)(input, await (0,_agent_bundle_runtime__rspack_import_3/* .agent */.MA)());
14730
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14760
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14731
14761
  value: out,
14732
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14762
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14733
14763
  children: out.replyRoute.mode === 'auto' ? `Delivery ${out.delivery}; replies will arrive in Codex thread ${out.replyRoute.threadId}. Continue work; no polling needed.` : `Delivery ${out.delivery}${out.delivery === 'unknown' ? ' (no receipt; check the thread before resending)' : ''}; read the reply with gbot_thread.`
14734
14764
  })
14735
14765
  });
@@ -14764,6 +14794,11 @@ const inputSchema = zod__rspack_import_3/* .object */.Ikc({
14764
14794
  target: zod__rspack_import_3/* .string */.YjP().min(1)
14765
14795
  });
14766
14796
  /* export default */ const __rspack_default_export = ((0,agent_bundle_routes__rspack_import_1/* .defineTool */.uO)({
14797
+ excludeClients: [
14798
+ 'grok bot',
14799
+ 'grokbot',
14800
+ 'grok-bot'
14801
+ ],
14767
14802
  annotations: {
14768
14803
  readOnlyHint: true
14769
14804
  },
@@ -14821,9 +14856,9 @@ const inputSchema = zod__rspack_import_3/* .object */.Ikc({
14821
14856
  summary
14822
14857
  };
14823
14858
  if (!full) {
14824
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14859
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14825
14860
  value: receipt,
14826
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14861
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14827
14862
  children: summary
14828
14863
  })
14829
14864
  });
@@ -14832,9 +14867,9 @@ const inputSchema = zod__rspack_import_3/* .object */.Ikc({
14832
14867
  ...receipt,
14833
14868
  entries
14834
14869
  };
14835
- return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g.Result, {
14870
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Result */.g6.Result, {
14836
14871
  value: value,
14837
- children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g.Text, {
14872
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_4/* .Agent.Text */.g6.Text, {
14838
14873
  children: summary
14839
14874
  })
14840
14875
  });
@@ -15246,11 +15281,50 @@ const Agent = Object.freeze({
15246
15281
  Result: AgentResult,
15247
15282
  Text: AgentText
15248
15283
  });
15284
+ const Result = ({ children })=>createElement('agent-hook-result', null, children);
15285
+ const AdditionalContext = ({ children })=>createElement('agent-hook-additional-context', null, children);
15286
+ const Hook = (/* unused pure expression or super */ null && ({
15287
+ AdditionalContext: AdditionalContext,
15288
+ Result: Result
15289
+ }));
15290
+ const McpResult = ({ _meta, children, isError, structuredContent })=>createElement('mcp-result', {
15291
+ _meta,
15292
+ isError,
15293
+ structuredContent
15294
+ }, children);
15295
+ const McpText = ({ children })=>createElement('mcp-text', null, children);
15296
+ const McpImage = ({ data, mimeType })=>createElement('mcp-image', {
15297
+ data,
15298
+ mimeType
15299
+ });
15300
+ const McpAudio = ({ data, mimeType })=>createElement('mcp-audio', {
15301
+ data,
15302
+ mimeType
15303
+ });
15304
+ const McpResourceLink = ({ mimeType, name, uri })=>createElement('mcp-resource-link', {
15305
+ mimeType,
15306
+ name,
15307
+ uri
15308
+ });
15309
+ const McpEmbeddedResource = ({ blob, children, mimeType, text, uri })=>createElement('mcp-embedded-resource', {
15310
+ blob,
15311
+ mimeType,
15312
+ text,
15313
+ uri
15314
+ }, children);
15315
+ const Mcp = (/* unused pure expression or super */ null && ({
15316
+ Audio: McpAudio,
15317
+ EmbeddedResource: McpEmbeddedResource,
15318
+ Image: McpImage,
15319
+ ResourceLink: McpResourceLink,
15320
+ Result: McpResult,
15321
+ Text: McpText
15322
+ }));
15249
15323
 
15250
15324
 
15251
15325
  __webpack_require__.d(__webpack_exports__, {
15252
15326
  }, {
15253
- g: Agent
15327
+ g6: Agent
15254
15328
  });
15255
15329
 
15256
15330
 
@@ -30321,7 +30395,7 @@ __webpack_require__.d(__webpack_exports__, {
30321
30395
 
30322
30396
  },
30323
30397
  "./package.json"(module) {
30324
- module.exports = {"rE":"0.7.0"}
30398
+ module.exports = {"rE":"0.8.0"}
30325
30399
 
30326
30400
  },
30327
30401
 
@@ -30439,7 +30513,7 @@ globalThis.__rspack_rsc_manifest__ ??= Object.freeze({
30439
30513
  });
30440
30514
  if (node_worker_threads__rspack_import_0.parentPort === null) throw new Error('Generated Flight worker requires a parent port.');
30441
30515
  process.stdout.write = process.stderr.write.bind(process.stderr);
30442
- const ARTIFACT_EPOCH = "gbot@0.7.0";
30516
+ const ARTIFACT_EPOCH = "gbot@0.8.0";
30443
30517
  const processLifetime = {
30444
30518
  hits: 0,
30445
30519
  instanceId: crypto.randomUUID(),
@@ -30457,6 +30531,9 @@ const routes = Object.freeze({
30457
30531
  "readOnlyHint": false
30458
30532
  },
30459
30533
  "description": "Send to Codex. With replyToGrok or bindingId, managed delivery returns the terminal answer to Grok automatically. Otherwise optional wait observes completion and explicit steer requires expectedTurnId. Acceptance is not completion.",
30534
+ "excludeClients": [
30535
+ "codex"
30536
+ ],
30460
30537
  "inputJsonSchema": {
30461
30538
  "additionalProperties": false,
30462
30539
  "properties": {
@@ -30535,6 +30612,9 @@ const routes = Object.freeze({
30535
30612
  "readOnlyHint": true
30536
30613
  },
30537
30614
  "description": "Discover a bounded page of Codex daemon threads.",
30615
+ "excludeClients": [
30616
+ "codex"
30617
+ ],
30538
30618
  "inputJsonSchema": {
30539
30619
  "additionalProperties": false,
30540
30620
  "properties": {
@@ -30566,6 +30646,9 @@ const routes = Object.freeze({
30566
30646
  "readOnlyHint": true
30567
30647
  },
30568
30648
  "description": "Explicit diagnostic observation of one Codex turn; returns execution and final reply without interrupting it.",
30649
+ "excludeClients": [
30650
+ "codex"
30651
+ ],
30569
30652
  "inputJsonSchema": {
30570
30653
  "additionalProperties": false,
30571
30654
  "properties": {
@@ -30613,6 +30696,9 @@ const routes = Object.freeze({
30613
30696
  "readOnlyHint": true
30614
30697
  },
30615
30698
  "description": "Watch bounded Codex thread events for diagnostics without answering approvals.",
30699
+ "excludeClients": [
30700
+ "codex"
30701
+ ],
30616
30702
  "inputJsonSchema": {
30617
30703
  "additionalProperties": false,
30618
30704
  "properties": {
@@ -30750,6 +30836,9 @@ const routes = Object.freeze({
30750
30836
  "readOnlyHint": false
30751
30837
  },
30752
30838
  "description": "Explicit operator response to a current scoped Codex interaction. Supports only one-time accept/decline/cancel or exact question-ID answers. Never auto-approve.",
30839
+ "excludeClients": [
30840
+ "codex"
30841
+ ],
30753
30842
  "inputJsonSchema": {
30754
30843
  "additionalProperties": false,
30755
30844
  "properties": {
@@ -30806,6 +30895,11 @@ const routes = Object.freeze({
30806
30895
  "readOnlyHint": true
30807
30896
  },
30808
30897
  "description": "List pending auto-review and local-tool approval cards in the latest 200 entries for a Grok bot. Older or unsupported requests require the owning Grok UI.",
30898
+ "excludeClients": [
30899
+ "grok bot",
30900
+ "grokbot",
30901
+ "grok-bot"
30902
+ ],
30809
30903
  "inputJsonSchema": {
30810
30904
  "additionalProperties": false,
30811
30905
  "properties": {
@@ -30832,6 +30926,11 @@ const routes = Object.freeze({
30832
30926
  "readOnlyHint": false
30833
30927
  },
30834
30928
  "description": "Only after an explicit user decision: accept one current Grok approval once or decline it. Exact target, entryId and approval requestId required. Never auto-approve or grant persistent permissions. Success acknowledges response delivery, not execution.",
30929
+ "excludeClients": [
30930
+ "grok bot",
30931
+ "grokbot",
30932
+ "grok-bot"
30933
+ ],
30835
30934
  "inputJsonSchema": {
30836
30935
  "additionalProperties": false,
30837
30936
  "properties": {
@@ -30874,6 +30973,11 @@ const routes = Object.freeze({
30874
30973
  "readOnlyHint": false
30875
30974
  },
30876
30975
  "description": "Send to Grok Bot. Native Codex calls automatically receive replies in their originating thread; send once and continue work. Without a native source, supply codexThreadId or use manual gbot_thread reading.",
30976
+ "excludeClients": [
30977
+ "grok bot",
30978
+ "grokbot",
30979
+ "grok-bot"
30980
+ ],
30877
30981
  "inputJsonSchema": {
30878
30982
  "additionalProperties": false,
30879
30983
  "properties": {
@@ -30930,6 +31034,11 @@ const routes = Object.freeze({
30930
31034
  "readOnlyHint": true
30931
31035
  },
30932
31036
  "description": "Read a bounded Grok Bot thread tail. Returns a small receipt by default; pass the last cursor as after for an exclusive client-side delta, or full:true to include bounded entry text.",
31037
+ "excludeClients": [
31038
+ "grok bot",
31039
+ "grokbot",
31040
+ "grok-bot"
31041
+ ],
30933
31042
  "inputJsonSchema": {
30934
31043
  "additionalProperties": false,
30935
31044
  "properties": {
@@ -31074,7 +31183,7 @@ const render = async (message)=>{
31074
31183
  type: 'observed-render-start'
31075
31184
  });
31076
31185
  const renderStartedAt = performance.now();
31077
- const element = validationError === undefined ? composeLayouts(observedRoute, props, controller.signal) : /*#__PURE__*/ (0,react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_17/* .Agent.Result */.g.Result, null, /*#__PURE__*/ (0,react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_17/* .Agent.Error */.g.Error, {
31186
+ const element = validationError === undefined ? composeLayouts(observedRoute, props, controller.signal) : /*#__PURE__*/ (0,react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_17/* .Agent.Result */.g6.Result, null, /*#__PURE__*/ (0,react__rspack_import_1.createElement)(_agent_bundle_runtime__rspack_import_17/* .Agent.Error */.g6.Error, {
31078
31187
  code: 'invalid-input'
31079
31188
  }, `Input validation error: ${validationError instanceof Error ? validationError.message : String(validationError)}`));
31080
31189
  const flight = (0,_agent_bundle_runtime_flight_server__rspack_import_18/* .renderAgentFlight */.y)(element, {