grok-bot-cli 0.8.0 → 0.9.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.
@@ -29275,6 +29275,88 @@ async function deleteAgent(session, ref) {
29275
29275
  });
29276
29276
  return rec;
29277
29277
  }
29278
+ // Grok Bot keeps one skill library per box. Every bot reads the same list, and the
29279
+ // workflow RPCs take any bot id only to say whose automations ride along.
29280
+ const SKILL_MAX_BODY_LENGTH = 100000;
29281
+ const SKILL_SOURCES = (/* unused pure expression or super */ null && ({
29282
+ workflow: "your library",
29283
+ managed: "team-managed",
29284
+ plugin: "a plugin",
29285
+ automation: "a scheduled automation"
29286
+ }));
29287
+ function asSkill(skill) {
29288
+ return {
29289
+ id: String(skill.id),
29290
+ name: skill.name || "",
29291
+ description: skill.description || "",
29292
+ source: String(skill.source || "workflow"),
29293
+ ...skill.sourceRef ? {
29294
+ sourceRef: String(skill.sourceRef)
29295
+ } : {},
29296
+ ...skill.pluginId ? {
29297
+ pluginId: String(skill.pluginId)
29298
+ } : {}
29299
+ };
29300
+ }
29301
+ function asSkills(data) {
29302
+ const list = Array.isArray(data) ? data : Array.isArray(data?.workflows) ? data.workflows : [];
29303
+ return list.filter((s)=>s && s.id).map(asSkill);
29304
+ }
29305
+ async function anyBotId(session) {
29306
+ const bot = (await listAgents(session)).find((r)=>!r.isGroup);
29307
+ if (!bot) throw new GatewayError("Skills need at least one bot. Run gbot bots create first.");
29308
+ return bot.id;
29309
+ }
29310
+ async function listSkills(session) {
29311
+ return asSkills(await gatewayCall(session, "getAgentWorkflows", {
29312
+ id: await anyBotId(session)
29313
+ }));
29314
+ }
29315
+ async function addSkill(session, markdown) {
29316
+ const text = String(markdown);
29317
+ if (!text.trim()) throw new GatewayError("Skill markdown is empty.");
29318
+ if (text.length > SKILL_MAX_BODY_LENGTH) {
29319
+ throw new GatewayError(`Skill markdown is ${text.length} characters. Grok Bot truncates bodies over ${SKILL_MAX_BODY_LENGTH}; shorten it.`);
29320
+ }
29321
+ const id = await anyBotId(session);
29322
+ let data;
29323
+ try {
29324
+ data = await gatewayCall(session, "importAgentWorkflowText", {
29325
+ id,
29326
+ markdown: text
29327
+ });
29328
+ } catch (error) {
29329
+ if (error instanceof GatewayError && /response too large/.test(error.message)) {
29330
+ throw new GatewayError("Grok Bot echoed a skill list too large to read; the import may still have landed. Run gbot skills list.");
29331
+ }
29332
+ throw error;
29333
+ }
29334
+ const imported = data.result?.imported?.[0];
29335
+ if (!imported) {
29336
+ const reason = data.result?.skipped?.[0]?.reason || "rejected";
29337
+ throw new GatewayError(`Grok Bot did not import the skill (${reason}). It needs a name, a non-empty body, and library room.`);
29338
+ }
29339
+ return asSkills(data).find((s)=>s.id === String(imported.id)) ?? asSkill(imported);
29340
+ }
29341
+ async function removeSkill(session, skillRef) {
29342
+ const id = await anyBotId(session);
29343
+ const skills = asSkills(await gatewayCall(session, "getAgentWorkflows", {
29344
+ id
29345
+ }));
29346
+ const needle = String(skillRef).trim().toLowerCase();
29347
+ const matches = skills.filter((s)=>s.id.toLowerCase() === needle || s.name.toLowerCase() === needle);
29348
+ if (matches.length === 0) throw new GatewayError(`No skill "${skillRef}".`);
29349
+ if (matches.length > 1) throw new GatewayError(`Ambiguous skill name "${skillRef}". Use the id.`);
29350
+ if (matches[0].source !== "workflow") {
29351
+ const kind = SKILL_SOURCES[matches[0].source] || matches[0].source;
29352
+ throw new GatewayError(`"${matches[0].name}" is ${kind}, not a library skill. Manage it where it came from.`);
29353
+ }
29354
+ await gatewayCall(session, "deleteAgentWorkflow", {
29355
+ id,
29356
+ workflowId: matches[0].id
29357
+ });
29358
+ return matches[0];
29359
+ }
29278
29360
  function normalizeMemberIds(records, memberRefs) {
29279
29361
  const memberIds = new Set();
29280
29362
  for (const ref of memberRefs){
@@ -30395,7 +30477,7 @@ __webpack_require__.d(__webpack_exports__, {
30395
30477
 
30396
30478
  },
30397
30479
  "./package.json"(module) {
30398
- module.exports = {"rE":"0.8.0"}
30480
+ module.exports = {"rE":"0.9.0"}
30399
30481
 
30400
30482
  },
30401
30483
 
@@ -30513,7 +30595,7 @@ globalThis.__rspack_rsc_manifest__ ??= Object.freeze({
30513
30595
  });
30514
30596
  if (node_worker_threads__rspack_import_0.parentPort === null) throw new Error('Generated Flight worker requires a parent port.');
30515
30597
  process.stdout.write = process.stderr.write.bind(process.stderr);
30516
- const ARTIFACT_EPOCH = "gbot@0.8.0";
30598
+ const ARTIFACT_EPOCH = "gbot@0.9.0";
30517
30599
  const processLifetime = {
30518
30600
  hits: 0,
30519
30601
  instanceId: crypto.randomUUID(),
@@ -107435,7 +107435,7 @@ const route9 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok
107435
107435
  const route10 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_13, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_send_tsx__rspack_import_13);
107436
107436
 
107437
107437
  const route11 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_14, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_mcp_grok_bot_tools_gbot_thread_tsx__rspack_import_14);
107438
- const ARTIFACT_EPOCH = "gbot@0.8.0";
107438
+ const ARTIFACT_EPOCH = "gbot@0.9.0";
107439
107439
  const pluginRoot = (0,_agent_bundle_runtime__rspack_import_15/* .resolvePluginRoot */.E7)({
107440
107440
  fallback: (0,node_url__rspack_import_0.fileURLToPath)(new URL('..', import.meta.url)),
107441
107441
  stateAnchor: 'user-data'
@@ -107993,7 +107993,7 @@ const routes = Object.freeze({
107993
107993
  lineage: lineage.registry,
107994
107994
  plugin: {
107995
107995
  "name": "gbot",
107996
- "version": "0.8.0"
107996
+ "version": "0.9.0"
107997
107997
  },
107998
107998
  pluginRoot: pluginRoot.identity,
107999
107999
  routes
@@ -111079,6 +111079,88 @@ async function deleteAgent(session, ref) {
111079
111079
  });
111080
111080
  return rec;
111081
111081
  }
111082
+ // Grok Bot keeps one skill library per box. Every bot reads the same list, and the
111083
+ // workflow RPCs take any bot id only to say whose automations ride along.
111084
+ const SKILL_MAX_BODY_LENGTH = 100000;
111085
+ const SKILL_SOURCES = (/* unused pure expression or super */ null && ({
111086
+ workflow: "your library",
111087
+ managed: "team-managed",
111088
+ plugin: "a plugin",
111089
+ automation: "a scheduled automation"
111090
+ }));
111091
+ function asSkill(skill) {
111092
+ return {
111093
+ id: String(skill.id),
111094
+ name: skill.name || "",
111095
+ description: skill.description || "",
111096
+ source: String(skill.source || "workflow"),
111097
+ ...skill.sourceRef ? {
111098
+ sourceRef: String(skill.sourceRef)
111099
+ } : {},
111100
+ ...skill.pluginId ? {
111101
+ pluginId: String(skill.pluginId)
111102
+ } : {}
111103
+ };
111104
+ }
111105
+ function asSkills(data) {
111106
+ const list = Array.isArray(data) ? data : Array.isArray(data?.workflows) ? data.workflows : [];
111107
+ return list.filter((s)=>s && s.id).map(asSkill);
111108
+ }
111109
+ async function anyBotId(session) {
111110
+ const bot = (await listAgents(session)).find((r)=>!r.isGroup);
111111
+ if (!bot) throw new GatewayError("Skills need at least one bot. Run gbot bots create first.");
111112
+ return bot.id;
111113
+ }
111114
+ async function listSkills(session) {
111115
+ return asSkills(await gatewayCall(session, "getAgentWorkflows", {
111116
+ id: await anyBotId(session)
111117
+ }));
111118
+ }
111119
+ async function addSkill(session, markdown) {
111120
+ const text = String(markdown);
111121
+ if (!text.trim()) throw new GatewayError("Skill markdown is empty.");
111122
+ if (text.length > SKILL_MAX_BODY_LENGTH) {
111123
+ throw new GatewayError(`Skill markdown is ${text.length} characters. Grok Bot truncates bodies over ${SKILL_MAX_BODY_LENGTH}; shorten it.`);
111124
+ }
111125
+ const id = await anyBotId(session);
111126
+ let data;
111127
+ try {
111128
+ data = await gatewayCall(session, "importAgentWorkflowText", {
111129
+ id,
111130
+ markdown: text
111131
+ });
111132
+ } catch (error) {
111133
+ if (error instanceof GatewayError && /response too large/.test(error.message)) {
111134
+ throw new GatewayError("Grok Bot echoed a skill list too large to read; the import may still have landed. Run gbot skills list.");
111135
+ }
111136
+ throw error;
111137
+ }
111138
+ const imported = data.result?.imported?.[0];
111139
+ if (!imported) {
111140
+ const reason = data.result?.skipped?.[0]?.reason || "rejected";
111141
+ throw new GatewayError(`Grok Bot did not import the skill (${reason}). It needs a name, a non-empty body, and library room.`);
111142
+ }
111143
+ return asSkills(data).find((s)=>s.id === String(imported.id)) ?? asSkill(imported);
111144
+ }
111145
+ async function removeSkill(session, skillRef) {
111146
+ const id = await anyBotId(session);
111147
+ const skills = asSkills(await gatewayCall(session, "getAgentWorkflows", {
111148
+ id
111149
+ }));
111150
+ const needle = String(skillRef).trim().toLowerCase();
111151
+ const matches = skills.filter((s)=>s.id.toLowerCase() === needle || s.name.toLowerCase() === needle);
111152
+ if (matches.length === 0) throw new GatewayError(`No skill "${skillRef}".`);
111153
+ if (matches.length > 1) throw new GatewayError(`Ambiguous skill name "${skillRef}". Use the id.`);
111154
+ if (matches[0].source !== "workflow") {
111155
+ const kind = SKILL_SOURCES[matches[0].source] || matches[0].source;
111156
+ throw new GatewayError(`"${matches[0].name}" is ${kind}, not a library skill. Manage it where it came from.`);
111157
+ }
111158
+ await gatewayCall(session, "deleteAgentWorkflow", {
111159
+ id,
111160
+ workflowId: matches[0].id
111161
+ });
111162
+ return matches[0];
111163
+ }
111082
111164
  function normalizeMemberIds(records, memberRefs) {
111083
111165
  const memberIds = new Set();
111084
111166
  for (const ref of memberRefs){
@@ -112199,7 +112281,7 @@ __webpack_require__.d(__webpack_exports__, {
112199
112281
 
112200
112282
  },
112201
112283
  "./package.json"(module) {
112202
- module.exports = {"rE":"0.8.0"}
112284
+ module.exports = {"rE":"0.9.0"}
112203
112285
 
112204
112286
  },
112205
112287
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grok-bot-cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
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": {
@@ -42,12 +42,12 @@
42
42
  "agent-bundle"
43
43
  ],
44
44
  "devDependencies": {
45
- "@agent-bundle/runtime": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@57a9196caf2590ece001799eaeed92613352bc21",
45
+ "@agent-bundle/runtime": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@ab5ae66e1d9c2829a092640c586e2b3eacc4be88",
46
46
  "@changesets/cli": "3.0.3",
47
47
  "@rstest/core": "0.11.12",
48
48
  "@types/node": "^24.0.0",
49
49
  "@types/react": "^19.2.18",
50
- "agent-bundle": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/agent-bundle@57a9196caf2590ece001799eaeed92613352bc21",
50
+ "agent-bundle": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/agent-bundle@ab5ae66e1d9c2829a092640c586e2b3eacc4be88",
51
51
  "react": "19.3.0",
52
52
  "react-dom": "19.3.0",
53
53
  "typescript": "7.0.2",
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 from Codex, Claude Code, and Cursor, with managed automatic replies and explicit Codex conversation links.","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.8.0"}
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 from Codex, Claude Code, and Cursor, with managed automatic replies and explicit Codex conversation links.","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.9.0"}
@@ -58231,6 +58231,88 @@ async function deleteAgent(session, ref) {
58231
58231
  });
58232
58232
  return rec;
58233
58233
  }
58234
+ // Grok Bot keeps one skill library per box. Every bot reads the same list, and the
58235
+ // workflow RPCs take any bot id only to say whose automations ride along.
58236
+ const SKILL_MAX_BODY_LENGTH = 100000;
58237
+ const SKILL_SOURCES = (/* unused pure expression or super */ null && ({
58238
+ workflow: "your library",
58239
+ managed: "team-managed",
58240
+ plugin: "a plugin",
58241
+ automation: "a scheduled automation"
58242
+ }));
58243
+ function asSkill(skill) {
58244
+ return {
58245
+ id: String(skill.id),
58246
+ name: skill.name || "",
58247
+ description: skill.description || "",
58248
+ source: String(skill.source || "workflow"),
58249
+ ...skill.sourceRef ? {
58250
+ sourceRef: String(skill.sourceRef)
58251
+ } : {},
58252
+ ...skill.pluginId ? {
58253
+ pluginId: String(skill.pluginId)
58254
+ } : {}
58255
+ };
58256
+ }
58257
+ function asSkills(data) {
58258
+ const list = Array.isArray(data) ? data : Array.isArray(data?.workflows) ? data.workflows : [];
58259
+ return list.filter((s)=>s && s.id).map(asSkill);
58260
+ }
58261
+ async function anyBotId(session) {
58262
+ const bot = (await listAgents(session)).find((r)=>!r.isGroup);
58263
+ if (!bot) throw new GatewayError("Skills need at least one bot. Run gbot bots create first.");
58264
+ return bot.id;
58265
+ }
58266
+ async function listSkills(session) {
58267
+ return asSkills(await gatewayCall(session, "getAgentWorkflows", {
58268
+ id: await anyBotId(session)
58269
+ }));
58270
+ }
58271
+ async function addSkill(session, markdown) {
58272
+ const text = String(markdown);
58273
+ if (!text.trim()) throw new GatewayError("Skill markdown is empty.");
58274
+ if (text.length > SKILL_MAX_BODY_LENGTH) {
58275
+ throw new GatewayError(`Skill markdown is ${text.length} characters. Grok Bot truncates bodies over ${SKILL_MAX_BODY_LENGTH}; shorten it.`);
58276
+ }
58277
+ const id = await anyBotId(session);
58278
+ let data;
58279
+ try {
58280
+ data = await gatewayCall(session, "importAgentWorkflowText", {
58281
+ id,
58282
+ markdown: text
58283
+ });
58284
+ } catch (error) {
58285
+ if (error instanceof GatewayError && /response too large/.test(error.message)) {
58286
+ throw new GatewayError("Grok Bot echoed a skill list too large to read; the import may still have landed. Run gbot skills list.");
58287
+ }
58288
+ throw error;
58289
+ }
58290
+ const imported = data.result?.imported?.[0];
58291
+ if (!imported) {
58292
+ const reason = data.result?.skipped?.[0]?.reason || "rejected";
58293
+ throw new GatewayError(`Grok Bot did not import the skill (${reason}). It needs a name, a non-empty body, and library room.`);
58294
+ }
58295
+ return asSkills(data).find((s)=>s.id === String(imported.id)) ?? asSkill(imported);
58296
+ }
58297
+ async function removeSkill(session, skillRef) {
58298
+ const id = await anyBotId(session);
58299
+ const skills = asSkills(await gatewayCall(session, "getAgentWorkflows", {
58300
+ id
58301
+ }));
58302
+ const needle = String(skillRef).trim().toLowerCase();
58303
+ const matches = skills.filter((s)=>s.id.toLowerCase() === needle || s.name.toLowerCase() === needle);
58304
+ if (matches.length === 0) throw new GatewayError(`No skill "${skillRef}".`);
58305
+ if (matches.length > 1) throw new GatewayError(`Ambiguous skill name "${skillRef}". Use the id.`);
58306
+ if (matches[0].source !== "workflow") {
58307
+ const kind = SKILL_SOURCES[matches[0].source] || matches[0].source;
58308
+ throw new GatewayError(`"${matches[0].name}" is ${kind}, not a library skill. Manage it where it came from.`);
58309
+ }
58310
+ await gatewayCall(session, "deleteAgentWorkflow", {
58311
+ id,
58312
+ workflowId: matches[0].id
58313
+ });
58314
+ return matches[0];
58315
+ }
58234
58316
  function normalizeMemberIds(records, memberRefs) {
58235
58317
  const memberIds = new Set();
58236
58318
  for (const ref of memberRefs){
@@ -60950,7 +61032,7 @@ __webpack_require__.d(__webpack_exports__, {
60950
61032
 
60951
61033
  },
60952
61034
  "./package.json"(module) {
60953
- module.exports = {"rE":"0.8.0"}
61035
+ module.exports = {"rE":"0.9.0"}
60954
61036
 
60955
61037
  },
60956
61038
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grok-bot-cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
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": {
@@ -54,12 +54,12 @@
54
54
  "LICENSE"
55
55
  ],
56
56
  "devDependencies": {
57
- "@agent-bundle/runtime": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@57a9196caf2590ece001799eaeed92613352bc21",
57
+ "@agent-bundle/runtime": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@ab5ae66e1d9c2829a092640c586e2b3eacc4be88",
58
58
  "@changesets/cli": "3.0.3",
59
59
  "@rstest/core": "0.11.12",
60
60
  "@types/node": "^24.0.0",
61
61
  "@types/react": "^19.2.18",
62
- "agent-bundle": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/agent-bundle@57a9196caf2590ece001799eaeed92613352bc21",
62
+ "agent-bundle": "https://pkg.pr.new/ScriptedAlchemy/agent-bundle/agent-bundle@ab5ae66e1d9c2829a092640c586e2b3eacc4be88",
63
63
  "react": "19.3.0",
64
64
  "react-dom": "19.3.0",
65
65
  "typescript": "7.0.2",