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.
@@ -1 +1 @@
1
- {"assets":[{"externals":[{"externalType":"node-commonjs","issuers":["node_modules/yaml/dist/schema/yaml-1.1/binary.js"],"kind":"builtin","request":"buffer","userRequest":"buffer"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js","node_modules/agent-bundle/dist/install.js","node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:child_process","userRequest":"node:child_process"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeCrypto.js","node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/agent-bundle/dist/667~1.js","node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:crypto","userRequest":"node:crypto"},{"externalType":"node-commonjs","issuers":["node_modules/lru-cache/dist/commonjs/node/index.min.js"],"kind":"builtin","request":"node:diagnostics_channel","userRequest":"node:diagnostics_channel"},{"externalType":"module","issuers":["node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:events","userRequest":"node:events"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/agent-bundle/dist/install.js","node_modules/agent-bundle/dist/launch-env.js","node_modules/agent-bundle/dist/terminal-capability.js","node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:fs","userRequest":"node:fs"},{"externalType":"module","issuers":["node_modules/agent-bundle/dist/667~1.js","node_modules/agent-bundle/dist/738~1.js","node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:fs/promises","userRequest":"node:fs/promises"},{"externalType":"module","issuers":["node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:net","userRequest":"node:net"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/agent-bundle/dist/738~1.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:os","userRequest":"node:os"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:os","userRequest":"node:os"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/@effect/platform-node-shared/dist/NodePath.js","node_modules/agent-bundle/dist/738~1.js","node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js","node_modules/agent-bundle/dist/launch-env.js","node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:path","userRequest":"node:path"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:path","userRequest":"node:path"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:path/win32","userRequest":"node:path/win32"},{"externalType":"module","issuers":["node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:process","userRequest":"node:process"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeTerminal.js"],"kind":"builtin","request":"node:readline","userRequest":"node:readline"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js","node_modules/@effect/platform-node-shared/dist/NodeStream.js"],"kind":"builtin","request":"node:stream","userRequest":"node:stream"},{"externalType":"module","issuers":["node_modules/agent-bundle/dist/event-ipc.js"],"kind":"builtin","request":"node:string_decoder","userRequest":"node:string_decoder"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodePath.js","node_modules/agent-bundle/dist/install.js","src/gbot-install.ts"],"kind":"builtin","request":"node:url","userRequest":"node:url"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:url","userRequest":"node:url"},{"externalType":"module","issuers":["node_modules/commander/lib/command.js","node_modules/commander/lib/help.js"],"kind":"builtin","request":"node:util","userRequest":"node:util"},{"externalType":"node-commonjs","issuers":["node_modules/yaml/dist/compose/composer.js","node_modules/yaml/dist/log.js","node_modules/yaml/dist/parse/parser.js"],"kind":"builtin","request":"process","userRequest":"process"}],"packages":["@effect/platform-node-shared","agent-bundle","ajv","ajv-formats","commander","effect","fast-deep-equal","fast-uri","hosted-git-info","json-schema-traverse","lru-cache","npm-package-arg","proc-log","semver","validate-npm-package-name","yaml"],"path":"bin/gbot-install.js","sha256":"9e220df3fbe33c6f13c2e96aa983ac96908b1d81c052932265ae88077b2e4fe0"}],"coverage":{"rewritable":false,"unobserved":["import(<expression>)","require(<expression>)","require.resolve(…)","createRequire(…)(…)","import.meta.resolve(…)"]},"policy":{"name":"closed-world-externals","revision":1},"producer":{"name":"agent-bundle","rspack":"2.2.4","version":"0.2.1"}}
1
+ {"assets":[{"externals":[{"externalType":"node-commonjs","issuers":["node_modules/yaml/dist/schema/yaml-1.1/binary.js"],"kind":"builtin","request":"buffer","userRequest":"buffer"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js","node_modules/agent-bundle/dist/install.js","node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:child_process","userRequest":"node:child_process"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeCrypto.js","node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/agent-bundle/dist/667~1.js","node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:crypto","userRequest":"node:crypto"},{"externalType":"node-commonjs","issuers":["node_modules/lru-cache/dist/commonjs/node/index.min.js"],"kind":"builtin","request":"node:diagnostics_channel","userRequest":"node:diagnostics_channel"},{"externalType":"module","issuers":["node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:events","userRequest":"node:events"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/agent-bundle/dist/install.js","node_modules/agent-bundle/dist/launch-env.js","node_modules/agent-bundle/dist/terminal-capability.js","node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:fs","userRequest":"node:fs"},{"externalType":"module","issuers":["node_modules/agent-bundle/dist/667~1.js","node_modules/agent-bundle/dist/738~1.js","node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:fs/promises","userRequest":"node:fs/promises"},{"externalType":"module","issuers":["node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:net","userRequest":"node:net"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/agent-bundle/dist/738~1.js","node_modules/agent-bundle/dist/install.js"],"kind":"builtin","request":"node:os","userRequest":"node:os"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:os","userRequest":"node:os"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js","node_modules/@effect/platform-node-shared/dist/NodePath.js","node_modules/agent-bundle/dist/738~1.js","node_modules/agent-bundle/dist/event-ipc.js","node_modules/agent-bundle/dist/install.js","node_modules/agent-bundle/dist/launch-env.js","node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:path","userRequest":"node:path"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:path","userRequest":"node:path"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:path/win32","userRequest":"node:path/win32"},{"externalType":"module","issuers":["node_modules/commander/lib/command.js"],"kind":"builtin","request":"node:process","userRequest":"node:process"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeTerminal.js"],"kind":"builtin","request":"node:readline","userRequest":"node:readline"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js","node_modules/@effect/platform-node-shared/dist/NodeStream.js"],"kind":"builtin","request":"node:stream","userRequest":"node:stream"},{"externalType":"module","issuers":["node_modules/agent-bundle/dist/event-ipc.js"],"kind":"builtin","request":"node:string_decoder","userRequest":"node:string_decoder"},{"externalType":"module","issuers":["node_modules/@effect/platform-node-shared/dist/NodePath.js","node_modules/agent-bundle/dist/install.js","src/gbot-install.ts"],"kind":"builtin","request":"node:url","userRequest":"node:url"},{"externalType":"node-commonjs","issuers":["node_modules/npm-package-arg/lib/npa.js"],"kind":"builtin","request":"node:url","userRequest":"node:url"},{"externalType":"module","issuers":["node_modules/commander/lib/command.js","node_modules/commander/lib/help.js"],"kind":"builtin","request":"node:util","userRequest":"node:util"},{"externalType":"node-commonjs","issuers":["node_modules/yaml/dist/compose/composer.js","node_modules/yaml/dist/log.js","node_modules/yaml/dist/parse/parser.js"],"kind":"builtin","request":"process","userRequest":"process"}],"packages":["@effect/platform-node-shared","agent-bundle","ajv","ajv-formats","commander","effect","fast-deep-equal","fast-uri","hosted-git-info","json-schema-traverse","lru-cache","npm-package-arg","proc-log","semver","validate-npm-package-name","yaml"],"path":"bin/gbot-install.js","sha256":"df7d77ee0379c5c89aa9cb481a7de60f701d964bf259809d5f879e7270f41c12"}],"coverage":{"rewritable":false,"unobserved":["import(<expression>)","require(<expression>)","require.resolve(…)","createRequire(…)(…)","import.meta.resolve(…)"]},"policy":{"name":"closed-world-externals","revision":1},"producer":{"name":"agent-bundle","rspack":"2.2.4","version":"0.2.1"}}
@@ -13474,6 +13474,14 @@ const agentSummarySchema = zod__rspack_import_3/* .object */.Ikc({
13474
13474
  notifyOnAgentUpdates: zod__rspack_import_3/* .boolean */.zMY().optional(),
13475
13475
  title: zod__rspack_import_3/* .string */.YjP().optional()
13476
13476
  }).strict();
13477
+ const skillSchema = zod__rspack_import_3/* .object */.Ikc({
13478
+ description: zod__rspack_import_3/* .string */.YjP(),
13479
+ id: zod__rspack_import_3/* .string */.YjP(),
13480
+ name: zod__rspack_import_3/* .string */.YjP(),
13481
+ pluginId: zod__rspack_import_3/* .string */.YjP().optional(),
13482
+ source: zod__rspack_import_3/* .string */.YjP(),
13483
+ sourceRef: zod__rspack_import_3/* .string */.YjP().optional()
13484
+ }).strict();
13477
13485
  const createFieldsSchema = zod__rspack_import_3/* .object */.Ikc({
13478
13486
  avatarColor: avatarColorSchema.optional(),
13479
13487
  avatarShape: avatarShapeSchema.optional(),
@@ -13516,6 +13524,7 @@ __webpack_require__.d(__webpack_exports__, {
13516
13524
  }, {
13517
13525
  FS: openBackendFromInput,
13518
13526
  R9: failureDocumentSchema,
13527
+ b7: skillSchema,
13519
13528
  bY: createFieldsSchema,
13520
13529
  cp: toCreateInput,
13521
13530
  lK: backendFlagsSchema,
@@ -16102,6 +16111,202 @@ __webpack_require__.d(__webpack_exports__, {
16102
16111
  });
16103
16112
 
16104
16113
 
16114
+ },
16115
+ "./src/cli/skills/add.tsx"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
16116
+ __webpack_require__.r(__webpack_exports__);
16117
+ /* import */ var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.react-server.js");
16118
+ /* import */ var node_fs_promises__rspack_import_1 = __webpack_require__("node:fs/promises");
16119
+ /* import */ var node_path__rspack_import_2 = __webpack_require__("node:path");
16120
+ /* import */ var _agent_bundle_runtime__rspack_import_5 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
16121
+ /* import */ var zod__rspack_import_4 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
16122
+ /* import */ var _shared_js__rspack_import_3 = __webpack_require__("./src/cli/_shared.ts");
16123
+
16124
+
16125
+
16126
+
16127
+
16128
+
16129
+ const config = {
16130
+ description: 'Add a SKILL.md to the shared skill library. Every bot sees it.',
16131
+ inputJsonSchema: {
16132
+ additionalProperties: false,
16133
+ properties: {
16134
+ dir: {
16135
+ description: 'Agents directory for --files mode',
16136
+ type: 'string'
16137
+ },
16138
+ files: {
16139
+ description: 'Force the on-disk agents store',
16140
+ type: 'boolean'
16141
+ },
16142
+ gateway: {
16143
+ description: 'Force the live gateway',
16144
+ type: 'boolean'
16145
+ },
16146
+ path: {
16147
+ description: 'SKILL.md file, or a directory holding one',
16148
+ type: 'string'
16149
+ }
16150
+ },
16151
+ required: [
16152
+ 'path'
16153
+ ],
16154
+ type: 'object'
16155
+ },
16156
+ positionals: [
16157
+ 'path'
16158
+ ]
16159
+ };
16160
+ const inputSchema = _shared_js__rspack_import_3/* .backendFlagsSchema.extend */.lK.extend({
16161
+ path: zod__rspack_import_4/* .string */.YjP().min(1)
16162
+ }).strict();
16163
+ const resultSchema = _shared_js__rspack_import_3/* .skillSchema */.b7;
16164
+ const skillFile = async (path)=>{
16165
+ const target = (0,node_path__rspack_import_2.resolve)(path);
16166
+ return (await (0,node_fs_promises__rspack_import_1.stat)(target)).isDirectory() ? (0,node_path__rspack_import_2.join)(target, 'SKILL.md') : target;
16167
+ };
16168
+ async function skillsAdd({ input }) {
16169
+ const markdown = await (0,node_fs_promises__rspack_import_1.readFile)(await skillFile(input.path), 'utf8');
16170
+ const backend = await (0,_shared_js__rspack_import_3/* .openBackendFromInput */.FS)(input);
16171
+ const skill = resultSchema.parse(await backend.addSkill(markdown));
16172
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Result */.g6.Result, {
16173
+ value: skill,
16174
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_5/* .Agent.Text */.g6.Text, {
16175
+ children: `Added skill ${skill.name} (${skill.id}) to the shared library`
16176
+ })
16177
+ });
16178
+ }
16179
+
16180
+ __webpack_require__.d(__webpack_exports__, {
16181
+ "default": () => (skillsAdd)
16182
+ }, {
16183
+ config: config,
16184
+ inputSchema: inputSchema,
16185
+ resultSchema: resultSchema
16186
+ });
16187
+
16188
+
16189
+ },
16190
+ "./src/cli/skills/list.tsx"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
16191
+ __webpack_require__.r(__webpack_exports__);
16192
+ /* import */ var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.react-server.js");
16193
+ /* import */ var _agent_bundle_runtime__rspack_import_3 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
16194
+ /* import */ var zod__rspack_import_2 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
16195
+ /* import */ var _shared_js__rspack_import_1 = __webpack_require__("./src/cli/_shared.ts");
16196
+
16197
+
16198
+
16199
+
16200
+ const config = {
16201
+ description: 'List the skill library every bot in this Grok Bot shares.',
16202
+ inputJsonSchema: {
16203
+ additionalProperties: false,
16204
+ properties: {
16205
+ dir: {
16206
+ description: 'Agents directory for --files mode',
16207
+ type: 'string'
16208
+ },
16209
+ files: {
16210
+ description: 'Force the on-disk agents store',
16211
+ type: 'boolean'
16212
+ },
16213
+ gateway: {
16214
+ description: 'Force the live gateway',
16215
+ type: 'boolean'
16216
+ }
16217
+ },
16218
+ type: 'object'
16219
+ }
16220
+ };
16221
+ const inputSchema = _shared_js__rspack_import_1/* .backendFlagsSchema */.lK;
16222
+ const resultSchema = zod__rspack_import_2/* .array */.YOg(_shared_js__rspack_import_1/* .skillSchema */.b7);
16223
+ async function skillsList({ input }) {
16224
+ const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
16225
+ const skills = resultSchema.parse(await backend.skills());
16226
+ const lines = skills.map((s)=>`${s.id} ${s.name} [${s.source}]${s.description ? ` ${s.description}` : ''}`);
16227
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
16228
+ value: skills,
16229
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
16230
+ children: lines.length > 0 ? lines.join('\n') : 'No skills.'
16231
+ })
16232
+ });
16233
+ }
16234
+
16235
+ __webpack_require__.d(__webpack_exports__, {
16236
+ "default": () => (skillsList)
16237
+ }, {
16238
+ config: config,
16239
+ inputSchema: inputSchema,
16240
+ resultSchema: resultSchema
16241
+ });
16242
+
16243
+
16244
+ },
16245
+ "./src/cli/skills/remove.tsx"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
16246
+ __webpack_require__.r(__webpack_exports__);
16247
+ /* import */ var react_jsx_runtime__rspack_import_0 = __webpack_require__("./node_modules/react/jsx-runtime.react-server.js");
16248
+ /* import */ var _agent_bundle_runtime__rspack_import_3 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/506.js");
16249
+ /* import */ var zod__rspack_import_2 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
16250
+ /* import */ var _shared_js__rspack_import_1 = __webpack_require__("./src/cli/_shared.ts");
16251
+
16252
+
16253
+
16254
+
16255
+ const config = {
16256
+ description: 'Remove a library skill by id or name. Every bot loses it.',
16257
+ inputJsonSchema: {
16258
+ additionalProperties: false,
16259
+ properties: {
16260
+ dir: {
16261
+ description: 'Agents directory for --files mode',
16262
+ type: 'string'
16263
+ },
16264
+ files: {
16265
+ description: 'Force the on-disk agents store',
16266
+ type: 'boolean'
16267
+ },
16268
+ gateway: {
16269
+ description: 'Force the live gateway',
16270
+ type: 'boolean'
16271
+ },
16272
+ skill: {
16273
+ description: 'Skill id or name',
16274
+ type: 'string'
16275
+ }
16276
+ },
16277
+ required: [
16278
+ 'skill'
16279
+ ],
16280
+ type: 'object'
16281
+ },
16282
+ positionals: [
16283
+ 'skill'
16284
+ ]
16285
+ };
16286
+ const inputSchema = _shared_js__rspack_import_1/* .backendFlagsSchema.extend */.lK.extend({
16287
+ skill: zod__rspack_import_2/* .string */.YjP().min(1)
16288
+ }).strict();
16289
+ const resultSchema = _shared_js__rspack_import_1/* .skillSchema */.b7;
16290
+ async function skillsRemove({ input }) {
16291
+ const backend = await (0,_shared_js__rspack_import_1/* .openBackendFromInput */.FS)(input);
16292
+ const skill = resultSchema.parse(await backend.removeSkill(input.skill));
16293
+ return /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Result */.g6.Result, {
16294
+ value: skill,
16295
+ children: /*#__PURE__*/ (0,react_jsx_runtime__rspack_import_0.jsx)(_agent_bundle_runtime__rspack_import_3/* .Agent.Text */.g6.Text, {
16296
+ children: `Removed skill ${skill.name} (${skill.id}) from the shared library`
16297
+ })
16298
+ });
16299
+ }
16300
+
16301
+ __webpack_require__.d(__webpack_exports__, {
16302
+ "default": () => (skillsRemove)
16303
+ }, {
16304
+ config: config,
16305
+ inputSchema: inputSchema,
16306
+ resultSchema: resultSchema
16307
+ });
16308
+
16309
+
16105
16310
  },
16106
16311
  "./src/cli/thread.tsx"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
16107
16312
  __webpack_require__.r(__webpack_exports__);
@@ -29778,7 +29983,10 @@ async function openBackend(opts) {
29778
29983
  removeGroupMember: (group, bot)=>_gateway_js__rspack_import_1/* .removeGroupMember */.A0(session, group, bot),
29779
29984
  send: (ref, prompt, extra)=>_gateway_js__rspack_import_1/* .sendPrompt */.LV(session, ref, prompt, extra),
29780
29985
  transcript: (ref, limit)=>_gateway_js__rspack_import_1/* .getTranscriptTail */.bA(session, ref, limit),
29781
- thread: (ref, rootId)=>_gateway_js__rspack_import_1/* .getThread */.fG(session, ref, rootId)
29986
+ thread: (ref, rootId)=>_gateway_js__rspack_import_1/* .getThread */.fG(session, ref, rootId),
29987
+ skills: ()=>_gateway_js__rspack_import_1/* .listSkills */.bG(session),
29988
+ addSkill: (markdown)=>_gateway_js__rspack_import_1/* .addSkill */.L5(session, markdown),
29989
+ removeSkill: (skillRef)=>_gateway_js__rspack_import_1/* .removeSkill */.uX(session, skillRef)
29782
29990
  };
29783
29991
  }
29784
29992
  const root = _store_js__rspack_import_0/* .resolveAgentsRoot */.v1(opts.root);
@@ -29802,6 +30010,15 @@ async function openBackend(opts) {
29802
30010
  },
29803
30011
  thread: async ()=>{
29804
30012
  throw new _store_js__rspack_import_0/* .StoreError */.AD("thread requires the live gateway");
30013
+ },
30014
+ skills: async ()=>{
30015
+ throw new _store_js__rspack_import_0/* .StoreError */.AD("skills requires the live gateway");
30016
+ },
30017
+ addSkill: async ()=>{
30018
+ throw new _store_js__rspack_import_0/* .StoreError */.AD("skills requires the live gateway");
30019
+ },
30020
+ removeSkill: async ()=>{
30021
+ throw new _store_js__rspack_import_0/* .StoreError */.AD("skills requires the live gateway");
29805
30022
  }
29806
30023
  };
29807
30024
  }
@@ -30812,6 +31029,88 @@ async function deleteAgent(session, ref) {
30812
31029
  });
30813
31030
  return rec;
30814
31031
  }
31032
+ // Grok Bot keeps one skill library per box. Every bot reads the same list, and the
31033
+ // workflow RPCs take any bot id only to say whose automations ride along.
31034
+ const SKILL_MAX_BODY_LENGTH = 100000;
31035
+ const SKILL_SOURCES = {
31036
+ workflow: "your library",
31037
+ managed: "team-managed",
31038
+ plugin: "a plugin",
31039
+ automation: "a scheduled automation"
31040
+ };
31041
+ function asSkill(skill) {
31042
+ return {
31043
+ id: String(skill.id),
31044
+ name: skill.name || "",
31045
+ description: skill.description || "",
31046
+ source: String(skill.source || "workflow"),
31047
+ ...skill.sourceRef ? {
31048
+ sourceRef: String(skill.sourceRef)
31049
+ } : {},
31050
+ ...skill.pluginId ? {
31051
+ pluginId: String(skill.pluginId)
31052
+ } : {}
31053
+ };
31054
+ }
31055
+ function asSkills(data) {
31056
+ const list = Array.isArray(data) ? data : Array.isArray(data?.workflows) ? data.workflows : [];
31057
+ return list.filter((s)=>s && s.id).map(asSkill);
31058
+ }
31059
+ async function anyBotId(session) {
31060
+ const bot = (await listAgents(session)).find((r)=>!r.isGroup);
31061
+ if (!bot) throw new GatewayError("Skills need at least one bot. Run gbot bots create first.");
31062
+ return bot.id;
31063
+ }
31064
+ async function listSkills(session) {
31065
+ return asSkills(await gatewayCall(session, "getAgentWorkflows", {
31066
+ id: await anyBotId(session)
31067
+ }));
31068
+ }
31069
+ async function addSkill(session, markdown) {
31070
+ const text = String(markdown);
31071
+ if (!text.trim()) throw new GatewayError("Skill markdown is empty.");
31072
+ if (text.length > SKILL_MAX_BODY_LENGTH) {
31073
+ throw new GatewayError(`Skill markdown is ${text.length} characters. Grok Bot truncates bodies over ${SKILL_MAX_BODY_LENGTH}; shorten it.`);
31074
+ }
31075
+ const id = await anyBotId(session);
31076
+ let data;
31077
+ try {
31078
+ data = await gatewayCall(session, "importAgentWorkflowText", {
31079
+ id,
31080
+ markdown: text
31081
+ });
31082
+ } catch (error) {
31083
+ if (error instanceof GatewayError && /response too large/.test(error.message)) {
31084
+ throw new GatewayError("Grok Bot echoed a skill list too large to read; the import may still have landed. Run gbot skills list.");
31085
+ }
31086
+ throw error;
31087
+ }
31088
+ const imported = data.result?.imported?.[0];
31089
+ if (!imported) {
31090
+ const reason = data.result?.skipped?.[0]?.reason || "rejected";
31091
+ throw new GatewayError(`Grok Bot did not import the skill (${reason}). It needs a name, a non-empty body, and library room.`);
31092
+ }
31093
+ return asSkills(data).find((s)=>s.id === String(imported.id)) ?? asSkill(imported);
31094
+ }
31095
+ async function removeSkill(session, skillRef) {
31096
+ const id = await anyBotId(session);
31097
+ const skills = asSkills(await gatewayCall(session, "getAgentWorkflows", {
31098
+ id
31099
+ }));
31100
+ const needle = String(skillRef).trim().toLowerCase();
31101
+ const matches = skills.filter((s)=>s.id.toLowerCase() === needle || s.name.toLowerCase() === needle);
31102
+ if (matches.length === 0) throw new GatewayError(`No skill "${skillRef}".`);
31103
+ if (matches.length > 1) throw new GatewayError(`Ambiguous skill name "${skillRef}". Use the id.`);
31104
+ if (matches[0].source !== "workflow") {
31105
+ const kind = SKILL_SOURCES[matches[0].source] || matches[0].source;
31106
+ throw new GatewayError(`"${matches[0].name}" is ${kind}, not a library skill. Manage it where it came from.`);
31107
+ }
31108
+ await gatewayCall(session, "deleteAgentWorkflow", {
31109
+ id,
31110
+ workflowId: matches[0].id
31111
+ });
31112
+ return matches[0];
31113
+ }
30815
31114
  function normalizeMemberIds(records, memberRefs) {
30816
31115
  const memberIds = new Set();
30817
31116
  for (const ref of memberRefs){
@@ -30986,6 +31285,7 @@ async function respondGrokApproval(session, ref, input) {
30986
31285
 
30987
31286
  __webpack_require__.d(__webpack_exports__, {
30988
31287
  A0: () => (removeGroupMember),
31288
+ L5: () => (addSkill),
30989
31289
  LV: () => (sendPrompt),
30990
31290
  MI: () => (listGrokApprovals),
30991
31291
  OR: () => (respondGrokApproval),
@@ -30994,9 +31294,11 @@ __webpack_require__.d(__webpack_exports__, {
30994
31294
  Td: () => (setGroupMembers),
30995
31295
  Vq: () => (connectGateway),
30996
31296
  bA: () => (getTranscriptTail),
31297
+ bG: () => (listSkills),
30997
31298
  fG: () => (getThread),
30998
31299
  nF: () => (hasGatewayAuth),
30999
31300
  qE: () => (resolveRef),
31301
+ uX: () => (removeSkill),
31000
31302
  vc: () => (listAgents),
31001
31303
  wj: () => (createGroup),
31002
31304
  x4: () => (updateAgent),
@@ -32083,7 +32385,7 @@ __webpack_require__.d(__webpack_exports__, {
32083
32385
 
32084
32386
  },
32085
32387
  "./package.json"(module) {
32086
- module.exports = {"rE":"0.8.0"}
32388
+ module.exports = {"rE":"0.9.0"}
32087
32389
 
32088
32390
  },
32089
32391
 
@@ -32149,9 +32451,9 @@ __webpack_require__.r = (exports) => {
32149
32451
  var __webpack_exports__ = {};
32150
32452
  /* import */ var node_worker_threads__rspack_import_0 = __webpack_require__("node:worker_threads");
32151
32453
  /* import */ var react__rspack_import_1 = __webpack_require__("./node_modules/react/react.react-server.js");
32152
- /* import */ var _agent_bundle_runtime_flight_server__rspack_import_37 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/flight/server.js");
32153
- /* import */ var _agent_bundle_runtime__rspack_import_35 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
32154
- /* import */ var _agent_bundle_runtime__rspack_import_36 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/736.js");
32454
+ /* import */ var _agent_bundle_runtime_flight_server__rspack_import_40 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/flight/server.js");
32455
+ /* import */ var _agent_bundle_runtime__rspack_import_38 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/49.js");
32456
+ /* import */ var _agent_bundle_runtime__rspack_import_39 = __webpack_require__("./node_modules/@agent-bundle/runtime/dist/736.js");
32155
32457
  /* import */ var node_url__rspack_import_2 = __webpack_require__("node:url");
32156
32458
  /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_list_tsx__rspack_import_3 = __webpack_require__("./src/cli/approvals/list.tsx");
32157
32459
  /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_approvals_respond_tsx__rspack_import_4 = __webpack_require__("./src/cli/approvals/respond.tsx");
@@ -32184,7 +32486,10 @@ var __webpack_exports__ = {};
32184
32486
  /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_groups_update_tsx__rspack_import_31 = __webpack_require__("./src/cli/groups/update.tsx");
32185
32487
  /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_history_tsx__rspack_import_32 = __webpack_require__("./src/cli/history.tsx");
32186
32488
  /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_33 = __webpack_require__("./src/cli/send.tsx");
32187
- /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_34 = __webpack_require__("./src/cli/thread.tsx");
32489
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_add_tsx__rspack_import_34 = __webpack_require__("./src/cli/skills/add.tsx");
32490
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_list_tsx__rspack_import_35 = __webpack_require__("./src/cli/skills/list.tsx");
32491
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_remove_tsx__rspack_import_36 = __webpack_require__("./src/cli/skills/remove.tsx");
32492
+ /* import */ var _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_37 = __webpack_require__("./src/cli/thread.tsx");
32188
32493
 
32189
32494
 
32190
32495
 
@@ -32253,8 +32558,14 @@ const route29 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_gro
32253
32558
 
32254
32559
  const route30 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_33, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_send_tsx__rspack_import_33);
32255
32560
 
32256
- const route31 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_34, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_34);
32257
- const pluginRoot = (0,_agent_bundle_runtime__rspack_import_35/* .resolvePluginRoot */.E7)({
32561
+ const route31 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_add_tsx__rspack_import_34, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_add_tsx__rspack_import_34);
32562
+
32563
+ const route32 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_list_tsx__rspack_import_35, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_list_tsx__rspack_import_35);
32564
+
32565
+ const route33 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_remove_tsx__rspack_import_36, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_skills_remove_tsx__rspack_import_36);
32566
+
32567
+ const route34 = Object.assign({}, Reflect.get(_home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_37, 'default'), _home_runner_work_grok_bot_cli_grok_bot_cli_src_cli_thread_tsx__rspack_import_37);
32568
+ const pluginRoot = (0,_agent_bundle_runtime__rspack_import_38/* .resolvePluginRoot */.E7)({
32258
32569
  fallback: (0,node_url__rspack_import_2.fileURLToPath)(new URL('..', import.meta.url)),
32259
32570
  stateAnchor: 'user-data'
32260
32571
  });
@@ -32458,11 +32769,29 @@ const routes = Object.freeze({
32458
32769
  name: "send",
32459
32770
  module: route30
32460
32771
  }),
32772
+ "cli:skills/add": Object.freeze({
32773
+ id: "cli:skills/add",
32774
+ kind: "cli",
32775
+ name: "skills add",
32776
+ module: route31
32777
+ }),
32778
+ "cli:skills/list": Object.freeze({
32779
+ id: "cli:skills/list",
32780
+ kind: "cli",
32781
+ name: "skills list",
32782
+ module: route32
32783
+ }),
32784
+ "cli:skills/remove": Object.freeze({
32785
+ id: "cli:skills/remove",
32786
+ kind: "cli",
32787
+ name: "skills remove",
32788
+ module: route33
32789
+ }),
32461
32790
  "cli:thread": Object.freeze({
32462
32791
  id: "cli:thread",
32463
32792
  kind: "cli",
32464
32793
  name: "thread",
32465
- module: route31
32794
+ module: route34
32466
32795
  })
32467
32796
  });
32468
32797
  const requests = new Map();
@@ -32497,18 +32826,18 @@ const render = async (message)=>{
32497
32826
  };
32498
32827
  try {
32499
32828
  const cwd = process.cwd();
32500
- await (0,_agent_bundle_runtime__rspack_import_36/* .runAgentRequest */.iC)({
32829
+ await (0,_agent_bundle_runtime__rspack_import_39/* .runAgentRequest */.iC)({
32501
32830
  capabilities: {
32502
- command: (0,_agent_bundle_runtime__rspack_import_36/* .unavailable */.hU)(),
32503
- filesystem: (0,_agent_bundle_runtime__rspack_import_36/* .unavailable */.hU)(),
32504
- network: (0,_agent_bundle_runtime__rspack_import_36/* .unavailable */.hU)(),
32505
- projectRoot: (0,_agent_bundle_runtime__rspack_import_36/* .available */.qC)({
32831
+ command: (0,_agent_bundle_runtime__rspack_import_39/* .unavailable */.hU)(),
32832
+ filesystem: (0,_agent_bundle_runtime__rspack_import_39/* .unavailable */.hU)(),
32833
+ network: (0,_agent_bundle_runtime__rspack_import_39/* .unavailable */.hU)(),
32834
+ projectRoot: (0,_agent_bundle_runtime__rspack_import_39/* .available */.qC)({
32506
32835
  root: cwd
32507
32836
  }, 'derived')
32508
32837
  },
32509
- host: (0,_agent_bundle_runtime__rspack_import_36/* .unavailable */.hU)('unsupported-surface'),
32838
+ host: (0,_agent_bundle_runtime__rspack_import_39/* .unavailable */.hU)('unsupported-surface'),
32510
32839
  invocation: message.request,
32511
- lineage: (0,_agent_bundle_runtime__rspack_import_36/* .unavailable */.hU)('unsupported-surface'),
32840
+ lineage: (0,_agent_bundle_runtime__rspack_import_39/* .unavailable */.hU)('unsupported-surface'),
32512
32841
  plugin: pluginRoot.identity,
32513
32842
  progress: {
32514
32843
  report: async (update)=>{
@@ -32521,8 +32850,8 @@ const render = async (message)=>{
32521
32850
  },
32522
32851
  process: processHit,
32523
32852
  signal: controller.signal,
32524
- terminal: message.terminal === undefined ? (0,_agent_bundle_runtime__rspack_import_36/* .unavailable */.hU)('not-provided') : (0,_agent_bundle_runtime__rspack_import_36/* .available */.qC)(message.terminal, 'native'),
32525
- workspace: (0,_agent_bundle_runtime__rspack_import_36/* .available */.qC)({
32853
+ terminal: message.terminal === undefined ? (0,_agent_bundle_runtime__rspack_import_39/* .unavailable */.hU)('not-provided') : (0,_agent_bundle_runtime__rspack_import_39/* .available */.qC)(message.terminal, 'native'),
32854
+ workspace: (0,_agent_bundle_runtime__rspack_import_39/* .available */.qC)({
32526
32855
  root: cwd
32527
32856
  }, 'derived')
32528
32857
  }, async ()=>{
@@ -32531,7 +32860,7 @@ const render = async (message)=>{
32531
32860
  type: 'observed-render-start'
32532
32861
  });
32533
32862
  const renderStartedAt = performance.now();
32534
- const flight = (0,_agent_bundle_runtime_flight_server__rspack_import_37/* .renderAgentFlight */.y)(composeLayouts(observedRoute, {
32863
+ const flight = (0,_agent_bundle_runtime_flight_server__rspack_import_40/* .renderAgentFlight */.y)(composeLayouts(observedRoute, {
32535
32864
  ...message.props,
32536
32865
  signal: controller.signal
32537
32866
  }, controller.signal), {
@@ -39391,8 +39391,13 @@ const installPublicCli = async (options, identity, host, scope)=>{
39391
39391
  previousContentHash = installed?.hash ?? previousReceipt?.contentHash;
39392
39392
  }
39393
39393
  }
39394
+ if (replaced && 'codex' === host && entry?.enabled !== true) {
39395
+ const reason = entry?.enabled === false ? 'plugin list reports enabled: false' : 'plugin list omits enabled';
39396
+ throw identity_failure('AB7004', `Cannot replace the Codex install of ${id}: ${reason}. The native plugin CLI has no qualified settings-preserving update API, and native \`plugin add\` resets plugin-level enabled to true. Enable the plugin in Codex before replacing, or leave this install unchanged.`, host);
39397
+ }
39394
39398
  const recorded = await receiptIdentity();
39395
- if (replaced) await runHostCommand(runner, identity, host, publicHostUninstallArguments(host, id, scope), 'removal');
39399
+ const replaceRemovesPlugin = replaced && 'codex' !== host;
39400
+ if (replaceRemovesPlugin) await runHostCommand(runner, identity, host, publicHostUninstallArguments(host, id, scope), 'removal');
39396
39401
  await runHostCommand(runner, identity, host, [
39397
39402
  'plugin',
39398
39403
  'marketplace',
@@ -39438,7 +39443,7 @@ const installPublicCli = async (options, identity, host, scope)=>{
39438
39443
  } catch (error) {
39439
39444
  if (void 0 !== stateRollback) await stateRollback();
39440
39445
  const rollbacks = [
39441
- ...pluginInstalled ? [
39446
+ ...pluginInstalled && !('codex' === host && replaced) ? [
39442
39447
  publicHostUninstallArguments(host, id, scope)
39443
39448
  ] : [],
39444
39449
  ...createdMarketplace ? [
@@ -41647,7 +41652,7 @@ const doctor_readPublicHostInventory = (host, identity, listing, environment, ho
41647
41652
  marketplace: identity.marketplace ?? '',
41648
41653
  plugin: identity.plugin
41649
41654
  });
41650
- const publicHostReplaceRecipe = (host, scopeArguments = '')=>'claude' === host ? `Rerun \`agent-bundle install claude --from <bundle-dir>${scopeArguments}\`; same-version content drift is replaced through \`claude plugin uninstall --keep-data\` + \`claude plugin install\` because Claude\'s \`plugin update\` is version-gated.` : "Rerun `agent-bundle install codex --from <bundle-dir>`; same-version content drift is replaced through `codex plugin remove` + `codex plugin add`.";
41655
+ const publicHostReplaceRecipe = (host, scopeArguments = '')=>'claude' === host ? `Rerun \`agent-bundle install claude --from <bundle-dir>${scopeArguments}\`; same-version content drift is replaced through \`claude plugin uninstall --keep-data\` + \`claude plugin install\` because Claude\'s \`plugin update\` is version-gated.` : "Rerun `agent-bundle install codex --from <bundle-dir>`; same-version content drift is replaced through `codex plugin add` so plugin settings and nested MCP overrides in config.toml survive. Replacement is refused (`AB7004`) when plugin list reports `enabled: false` or omits `enabled`, because the native plugin CLI has no qualified settings-preserving update API.";
41651
41656
  const hostLoadFailureDiagnostic = (host, copy, errors, replaceHint = '')=>doctor_diagnostic('AB7325', `${host} refused to load ${copy}: ${errors.join(' | ')}`, `Fix the artifact so \`${host} plugin list --json\` reports no \`errors\` for it, rebuild, and rerun \`agent-bundle install ${host} --from <bundle-dir>${replaceHint} --replace\`.`, 'error', host);
41652
41657
  const disabledInstallDiagnostic = (identity, version, installPath, scope)=>doctor_diagnostic('AB7327', `claude lists ${identity.plugin}@${version} at ${installPath}${void 0 === scope ? '' : ` (scope ${scope})`} as disabled (\`enabled: false\`): the copy is installed but none of it loads in a session.`, `Run \`claude plugin enable ${identity.plugin}${void 0 === identity.marketplace ? '' : `@${identity.marketplace}`}${void 0 === scope ? '' : ` --scope ${scope}`}\` (or \`/plugin\` in a session), then rerun Doctor; reinstalling does not enable a disabled plugin.`, 'warning', 'claude');
41653
41658
  const publicHostInstallComparison = async (host, identity, artifact, inventory)=>{