grok-bot-cli 0.4.1 → 0.4.5

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.4.1";
10
+ const pluginVersion = "0.4.5";
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";
@@ -25987,6 +25987,8 @@ __webpack_require__.d(__webpack_exports__, {
25987
25987
  * never *.cursorvm.com, so a CURSOR_ACCESS_TOKEN cannot be pointed at a box host.
25988
25988
  * Local/dev gateways: http(s)://127.0.0.1|localhost|::1 when GROK_BOT_ALLOW_LOCAL_GATEWAY=1.
25989
25989
  * Escape hatch: GROK_BOT_ALLOW_ANY_GATEWAY=1 (unsafe; disables host checks; warns once).
25990
+ * Test mode (GROK_BOT_TEST=1 or NODE_ENV=test): loopback only, for gateway and backend
25991
+ * alike, and the escape hatches are ignored — a test can never reach a live thread.
25990
25992
  */ function truthyEnv(name) {
25991
25993
  const v = (process.env[name] || "").trim().toLowerCase();
25992
25994
  return v === "1" || v === "true" || v === "yes";
@@ -25997,6 +25999,9 @@ function allowAnyGateway() {
25997
25999
  function allowLocalGateway() {
25998
26000
  return truthyEnv("GROK_BOT_ALLOW_LOCAL_GATEWAY");
25999
26001
  }
26002
+ function testMode() {
26003
+ return truthyEnv("GROK_BOT_TEST") || process.env.NODE_ENV === "test";
26004
+ }
26000
26005
  const warned = new Set();
26001
26006
  function warnOnce(key, message) {
26002
26007
  if (warned.has(key)) return;
@@ -26036,6 +26041,12 @@ function isCursorGatewayHostname(hostname) {
26036
26041
  if (parsed.username || parsed.password) {
26037
26042
  throw new Error("Rejected " + label + ": userinfo is not allowed.");
26038
26043
  }
26044
+ if (testMode()) {
26045
+ if (!isLocalHostname(parsed.hostname) || parsed.protocol !== "http:" && parsed.protocol !== "https:") {
26046
+ throw new Error("Rejected " + label + " host \"" + parsed.hostname + "\": test mode (GROK_BOT_TEST / NODE_ENV=test) only allows http(s) loopback gateways.");
26047
+ }
26048
+ return String(rawUrl).replace(/\/$/, "");
26049
+ }
26039
26050
  if (allowAnyGateway()) {
26040
26051
  warnOnce("ALLOW_ANY", "warning: GROK_BOT_ALLOW_ANY_GATEWAY is set; credential host checks are disabled.");
26041
26052
  return String(rawUrl).replace(/\/$/, "");
@@ -26173,7 +26184,7 @@ globalThis.__rspack_rsc_manifest__ ??= Object.freeze({
26173
26184
  });
26174
26185
  if (node_worker_threads__rspack_import_0.parentPort === null) throw new Error('Generated Flight worker requires a parent port.');
26175
26186
  process.stdout.write = process.stderr.write.bind(process.stderr);
26176
- const ARTIFACT_EPOCH = "gbot@0.4.1";
26187
+ const ARTIFACT_EPOCH = "gbot@0.4.5";
26177
26188
  const processLifetime = {
26178
26189
  hits: 0,
26179
26190
  instanceId: crypto.randomUUID(),
@@ -106202,7 +106202,7 @@ __webpack_require__.r(__webpack_exports__);
106202
106202
  const route0 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_3, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_3);
106203
106203
 
106204
106204
  const route1 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_4, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_4);
106205
- const ARTIFACT_EPOCH = "gbot@0.4.1";
106205
+ const ARTIFACT_EPOCH = "gbot@0.4.5";
106206
106206
  const pluginRoot = (0,_agent_bundle_runtime__rspack_import_5/* .resolvePluginRoot */.E7)({
106207
106207
  fallback: (0,node_url__rspack_import_0.fileURLToPath)(new URL('..', import.meta.url)),
106208
106208
  stateAnchor: 'user-data'
@@ -106291,7 +106291,7 @@ const routes = Object.freeze({
106291
106291
  lineage: lineage.registry,
106292
106292
  plugin: {
106293
106293
  "name": "gbot",
106294
- "version": "0.4.1"
106294
+ "version": "0.4.5"
106295
106295
  },
106296
106296
  pluginRoot: pluginRoot.identity,
106297
106297
  routes
@@ -107476,6 +107476,8 @@ __webpack_require__.d(__webpack_exports__, {
107476
107476
  * never *.cursorvm.com, so a CURSOR_ACCESS_TOKEN cannot be pointed at a box host.
107477
107477
  * Local/dev gateways: http(s)://127.0.0.1|localhost|::1 when GROK_BOT_ALLOW_LOCAL_GATEWAY=1.
107478
107478
  * Escape hatch: GROK_BOT_ALLOW_ANY_GATEWAY=1 (unsafe; disables host checks; warns once).
107479
+ * Test mode (GROK_BOT_TEST=1 or NODE_ENV=test): loopback only, for gateway and backend
107480
+ * alike, and the escape hatches are ignored — a test can never reach a live thread.
107479
107481
  */ function truthyEnv(name) {
107480
107482
  const v = (process.env[name] || "").trim().toLowerCase();
107481
107483
  return v === "1" || v === "true" || v === "yes";
@@ -107486,6 +107488,9 @@ function allowAnyGateway() {
107486
107488
  function allowLocalGateway() {
107487
107489
  return truthyEnv("GROK_BOT_ALLOW_LOCAL_GATEWAY");
107488
107490
  }
107491
+ function testMode() {
107492
+ return truthyEnv("GROK_BOT_TEST") || process.env.NODE_ENV === "test";
107493
+ }
107489
107494
  const warned = new Set();
107490
107495
  function warnOnce(key, message) {
107491
107496
  if (warned.has(key)) return;
@@ -107525,6 +107530,12 @@ function isCursorGatewayHostname(hostname) {
107525
107530
  if (parsed.username || parsed.password) {
107526
107531
  throw new Error("Rejected " + label + ": userinfo is not allowed.");
107527
107532
  }
107533
+ if (testMode()) {
107534
+ if (!isLocalHostname(parsed.hostname) || parsed.protocol !== "http:" && parsed.protocol !== "https:") {
107535
+ throw new Error("Rejected " + label + " host \"" + parsed.hostname + "\": test mode (GROK_BOT_TEST / NODE_ENV=test) only allows http(s) loopback gateways.");
107536
+ }
107537
+ return String(rawUrl).replace(/\/$/, "");
107538
+ }
107528
107539
  if (allowAnyGateway()) {
107529
107540
  warnOnce("ALLOW_ANY", "warning: GROK_BOT_ALLOW_ANY_GATEWAY is set; credential host checks are disabled.");
107530
107541
  return String(rawUrl).replace(/\/$/, "");
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grok-bot-cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.5",
4
4
  "description": "CLI and Agent Bundle plugin for Grok Bot agents and groups: create, update, message, inspect threads, and automate cleanup",
5
5
  "type": "module",
6
6
  "engines": {
package/dist/plugin.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","author":{"name":"Zack Jackson","url":"https://github.com/ScriptedAlchemy"},"description":"Message Grok Bot bots and groups and read their threads from Codex, Claude Code, and Cursor.","homepage":"https://github.com/ScriptedAlchemy/grok-bot-cli#readme","keywords":["grok","grok-bot","grokbot","gbot","cursor","ai-agents","automation","terminal","cli","agent-bundle"],"license":"MIT","name":"gbot","repository":"https://github.com/ScriptedAlchemy/grok-bot-cli","version":"0.4.1"}
1
+ {"$schema":"https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","author":{"name":"Zack Jackson","url":"https://github.com/ScriptedAlchemy"},"description":"Message Grok Bot bots and groups and read their threads from Codex, Claude Code, and Cursor.","homepage":"https://github.com/ScriptedAlchemy/grok-bot-cli#readme","keywords":["grok","grok-bot","grokbot","gbot","cursor","ai-agents","automation","terminal","cli","agent-bundle"],"license":"MIT","name":"gbot","repository":"https://github.com/ScriptedAlchemy/grok-bot-cli","version":"0.4.5"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grok-bot-cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.5",
4
4
  "description": "CLI and Agent Bundle plugin for Grok Bot agents and groups: create, update, message, inspect threads, and automate cleanup",
5
5
  "type": "module",
6
6
  "bin": {