@ycodium-ai/agent-claude 0.2.3250 → 0.2.3254

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/index.js CHANGED
@@ -20307,6 +20307,33 @@ var CLAUDE_SETTING_SOURCES = [
20307
20307
  "local"
20308
20308
  ];
20309
20309
 
20310
+ // src/toolSearchNotice.ts
20311
+ var RECOMMENDED_VERSION = "2.1.305";
20312
+ function isOlderVersion(version, recommended) {
20313
+ const current = version.split(".").map(Number);
20314
+ const target = recommended.split(".").map(Number);
20315
+ for (let index = 0; index < target.length; index++) {
20316
+ const difference = (current[index] ?? 0) - target[index];
20317
+ if (difference !== 0) return difference < 0;
20318
+ }
20319
+ return false;
20320
+ }
20321
+ function claudeToolSearchNotice(version, environment) {
20322
+ if (version === null || !isOlderVersion(version, RECOMMENDED_VERSION) || environment.ENABLE_TOOL_SEARCH !== void 0 || environment.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS !== void 0) {
20323
+ return void 0;
20324
+ }
20325
+ const baseUrl = environment.ANTHROPIC_BASE_URL?.trim();
20326
+ if (!baseUrl) return void 0;
20327
+ try {
20328
+ if (new URL(baseUrl).hostname === "api.anthropic.com") return void 0;
20329
+ } catch {
20330
+ }
20331
+ return {
20332
+ messageKey: "probe.toolSearchOff",
20333
+ params: { recommendedVersion: RECOMMENDED_VERSION }
20334
+ };
20335
+ }
20336
+
20310
20337
  // src/claudeProbe.ts
20311
20338
  var CLAUDE_PROGRAM_NOT_CONFIGURED = "Claude program path is not configured";
20312
20339
  function createClaudeProbe(input) {
@@ -20413,6 +20440,7 @@ ${stderr}`);
20413
20440
  ...CLAUDE_NATIVE_MODE_REPORT
20414
20441
  };
20415
20442
  }
20443
+ const notice = claudeToolSearchNotice(version, input.launchEnvironment());
20416
20444
  return {
20417
20445
  installed: true,
20418
20446
  version,
@@ -20420,6 +20448,7 @@ ${stderr}`);
20420
20448
  auth,
20421
20449
  models,
20422
20450
  skills,
20451
+ ...notice === void 0 ? {} : { notice },
20423
20452
  ...CLAUDE_NATIVE_MODE_REPORT
20424
20453
  };
20425
20454
  };
@@ -21569,7 +21598,7 @@ var claudeFailureCategory = (signals) => {
21569
21598
  if (signals.assistantError === "rate_limit" || status === 429) {
21570
21599
  return signals.quotaWindowRejected === true ? "quota" : "rate-limit";
21571
21600
  }
21572
- if (signals.establishedStreamExit === true) return "transport";
21601
+ if (status === 524 || signals.establishedStreamExit === true) return "transport";
21573
21602
  return void 0;
21574
21603
  };
21575
21604
  var failureCategoryField = (category) => category === void 0 ? {} : { failureCategory: category };
@@ -28081,6 +28110,8 @@ function createClaudeAdapter(recipe, host, options) {
28081
28110
  return {
28082
28111
  /** 型号目录:探测用它读并拿当前这份;会话内部自己走同一份。 */
28083
28112
  modelCatalog: { refresh: modelCatalog.refresh, current: currentModelCatalog },
28113
+ /** 会话起进程用的那份环境;探测判工具搜索提示也看它。 */
28114
+ buildLaunchEnvironment,
28084
28115
  startSession,
28085
28116
  sendTurn,
28086
28117
  interruptTurn,
@@ -28119,7 +28150,12 @@ function createClaudeInstance(config, host, attachments, overrides, usageCache)
28119
28150
  environment: claudeAdapterBaseEnvironment(recipe),
28120
28151
  log: host.log
28121
28152
  });
28122
- const probe = createClaudeProbe({ recipe, host, modelCatalog: adapter.modelCatalog });
28153
+ const probe = createClaudeProbe({
28154
+ recipe,
28155
+ host,
28156
+ modelCatalog: adapter.modelCatalog,
28157
+ launchEnvironment: adapter.buildLaunchEnvironment
28158
+ });
28123
28159
  const resolveTranscriptRoots = (directory) => {
28124
28160
  const configDir = resolveClaudeConfigDirPath(
28125
28161
  recipe.homePath,
@@ -28210,7 +28246,7 @@ var executors = [
28210
28246
  ];
28211
28247
  var index_default = definePlugin({
28212
28248
  id: "agent-claude",
28213
- apiVersion: 28,
28249
+ apiVersion: 30,
28214
28250
  executors,
28215
28251
  activate(ctx) {
28216
28252
  capturedAttachments = ctx.attachments;
package/locales/en.json CHANGED
@@ -26,6 +26,9 @@
26
26
  "placeholder": "e.g. --chrome"
27
27
  }
28
28
  },
29
+ "probe": {
30
+ "toolSearchOff": "With a custom API URL, this version of Claude Code sends all tool definitions in full on every call (about 40,000–50,000 tokens), slowing calls and making timeouts more likely. Upgrade to {{recommendedVersion}} or later, or add ENABLE_TOOL_SEARCH=true to this provider's environment variables, which works without upgrading."
31
+ },
29
32
  "usage": {
30
33
  "window": {
31
34
  "session": "Session",
@@ -26,6 +26,9 @@
26
26
  "placeholder": "例如 --chrome"
27
27
  }
28
28
  },
29
+ "probe": {
30
+ "toolSearchOff": "走自定义接口地址时,这个版本的 Claude Code 每次调用都整包发送全部工具定义(约 4–5 万 token),调用变慢、容易超时。升级到 {{recommendedVersion}} 或更新,或在此 provider 的环境变量里加 ENABLE_TOOL_SEARCH=true,不用等升级。"
31
+ },
29
32
  "usage": {
30
33
  "window": {
31
34
  "session": "本次会话",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-claude",
3
- "version": "0.2.3250",
3
+ "version": "0.2.3254",
4
4
  "description": "Claude executor: Claude Code CLI via @anthropic-ai/claude-agent-sdk.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -24,10 +24,10 @@
24
24
  "@types/node": "24.12.4",
25
25
  "esbuild": "0.28.1",
26
26
  "vite-plus": "0.2.2",
27
- "@ycodium-ai/plugin-api": "0.2.3250",
27
+ "@ycodium-ai/plugin-api": "0.2.3254",
28
28
  "ycodium-composer-tokens": "0.0.0",
29
- "ycodium-jsonl-stream": "0.0.0",
30
- "ycodium-executor-testing": "0.0.0"
29
+ "ycodium-executor-testing": "0.0.0",
30
+ "ycodium-jsonl-stream": "0.0.0"
31
31
  },
32
32
  "ycodium": {
33
33
  "plugin": "./dist/index.js",