@ycodium-ai/agent-grok 0.2.6551 → 0.2.6596

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -5
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var __export = (target, all) => {
8
8
  import { definePlugin } from "@ycodium-ai/plugin-api";
9
9
 
10
10
  // ../../packages/plugin-api/src/version.ts
11
- var PLUGIN_API_VERSION = 219;
11
+ var PLUGIN_API_VERSION = 221;
12
12
 
13
13
  // src/index.ts
14
14
  import { registerEffectiveHomeCommand } from "@ycodium-ai/plugin-api/instance-config";
@@ -30209,6 +30209,7 @@ import {
30209
30209
  import {
30210
30210
  readLaunchInstanceRecipe
30211
30211
  } from "@ycodium-ai/plugin-api/instance-config";
30212
+ var GROK_PROGRAM_NOT_CONFIGURED = "Grok program path is not configured";
30212
30213
  var GROK_DEFAULT_LAUNCH_ARGS = "agent stdio";
30213
30214
  function parseGrokInstanceConfig(config2, platform) {
30214
30215
  return readLaunchInstanceRecipe(config2, GROK_DEFAULT_LAUNCH_ARGS, platform);
@@ -31853,7 +31854,14 @@ function createGrokModelCatalog(input2) {
31853
31854
  let skipUnforced = false;
31854
31855
  const nowMs = input2.nowMs ?? (() => Date.now());
31855
31856
  const readCliVersion = (signal) => {
31856
- if (input2.recipe.binaryPath.length === 0) return Promise.resolve(null);
31857
+ if (input2.recipe.binaryPath.trim().length === 0) {
31858
+ try {
31859
+ throwIfExecutorSpawnAborted(signal);
31860
+ } catch (error62) {
31861
+ return Promise.reject(error62);
31862
+ }
31863
+ return Promise.resolve(null);
31864
+ }
31857
31865
  return probeGrokVersion({
31858
31866
  recipe: input2.recipe,
31859
31867
  host: input2.host,
@@ -31863,6 +31871,10 @@ function createGrokModelCatalog(input2) {
31863
31871
  };
31864
31872
  const refreshModelCatalog = async (request) => {
31865
31873
  try {
31874
+ throwIfExecutorSpawnAborted(request.signal);
31875
+ if (input2.recipe.binaryPath.trim().length === 0) {
31876
+ throw new Error(GROK_PROGRAM_NOT_CONFIGURED);
31877
+ }
31866
31878
  const cliVersion = request.cliVersion !== void 0 ? request.cliVersion : await readCliVersion(request.signal);
31867
31879
  if (!request.force && skipUnforced) {
31868
31880
  skipUnforced = false;
@@ -32376,7 +32388,7 @@ var createGrokInstance = (config2, host, deps) => {
32376
32388
  version: null,
32377
32389
  readiness: "not-installed",
32378
32390
  auth: { status: "unknown" },
32379
- detail: "Grok program path is not configured"
32391
+ detail: GROK_PROGRAM_NOT_CONFIGURED
32380
32392
  };
32381
32393
  }
32382
32394
  prepareGrokFollowUpSteer(resolveAccountHomePath(recipe, recipe.homePath), host.log);
@@ -32463,7 +32475,7 @@ var createGrokInstance = (config2, host, deps) => {
32463
32475
  // 项目里的技能:探测在 home 下跑 inspect 只看得到整机的;这里在项目目录里再跑一次。
32464
32476
  workspaceInventory: ({ cwd }) => {
32465
32477
  if (recipe.binaryPath.length === 0) {
32466
- return Promise.reject(new Error("Grok program path is not configured"));
32478
+ return Promise.reject(new Error(GROK_PROGRAM_NOT_CONFIGURED));
32467
32479
  }
32468
32480
  return inspectGrokWorkspace({
32469
32481
  recipe,
@@ -32478,7 +32490,7 @@ var createGrokInstance = (config2, host, deps) => {
32478
32490
  if (disposed) throw new Error("instance disposed");
32479
32491
  throwIfStartAborted(signal);
32480
32492
  if (recipe.binaryPath.length === 0) {
32481
- throw new Error("Grok program path is not configured");
32493
+ throw new Error(GROK_PROGRAM_NOT_CONFIGURED);
32482
32494
  }
32483
32495
  const cwd = input2.cwd ?? host.workspacePath(input2.threadId);
32484
32496
  if (cwd.trim() === "") throw new Error("workspace path missing");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-grok",
3
- "version": "0.2.6551",
3
+ "version": "0.2.6596",
4
4
  "description": "Grok executor: grok CLI over Agent Client Protocol stdio.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -21,10 +21,10 @@
21
21
  "@types/node": "24.12.4",
22
22
  "esbuild": "0.28.1",
23
23
  "vite-plus": "0.2.2",
24
- "ycodium-acp-executor": "0.2.6551",
25
- "@ycodium-ai/plugin-api": "0.2.6551",
26
- "ycodium-executor-testing": "0.0.0",
27
- "ycodium-credential-account": "0.0.0"
24
+ "@ycodium-ai/plugin-api": "0.2.6596",
25
+ "ycodium-credential-account": "0.0.0",
26
+ "ycodium-acp-executor": "0.2.6596",
27
+ "ycodium-executor-testing": "0.0.0"
28
28
  },
29
29
  "ycodium": {
30
30
  "plugin": "./dist/index.js",