@rayss-dev/openclaude 0.33.2-by-rayss → 0.33.3-by-rayss

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/sdk.mjs CHANGED
@@ -10131,7 +10131,7 @@ var init_version = __esm(() => {
10131
10131
  import_semver = __toESM(require_semver2(), 1);
10132
10132
  fallbackBuildVersion = (() => {
10133
10133
  try {
10134
- return "0.33.2-by-rayss";
10134
+ return "0.33.3-by-rayss";
10135
10135
  } catch {
10136
10136
  return "0.0.0";
10137
10137
  }
@@ -66838,6 +66838,7 @@ var init_types2 = __esm(() => {
66838
66838
  maxOutputTokens: exports_external.number().int().positive().optional().describe("Maximum output tokens per response.")
66839
66839
  })).optional().describe("Per-model overrides for context window and max output tokens. " + "Used for OpenAI-compatible models whose limits are not in the built-in catalog. " + "Keys are matched against the model name (exact match preferred, then prefix). " + "CLAUDE_CODE_OPENAI_CONTEXT_WINDOWS / CLAUDE_CODE_OPENAI_MAX_OUTPUT_TOKENS env vars take precedence. " + 'Example: { "qwen3.6-plus": { "contextWindow": 1048576, "maxOutputTokens": 32768 } }'),
66840
66840
  modelPricing: ModelPricingSchema.optional().catch(undefined).describe("Exact-model pricing overrides. Token fields are USD per 1,000,000 tokens; " + "webSearchRequests is USD per request and defaults to $0.01 when omitted. " + "All four token fields are required. Keys are exact, case-sensitive resolved model ids. " + "Shared project settings are ignored for personal USD accounting."),
66841
+ toolUseSummariesEnabled: exports_external.boolean().optional().describe("When true, generate a short summary after completed tool batches. Defaults to false."),
66841
66842
  apiRetry: exports_external.object({
66842
66843
  maxRetries: exports_external.union([exports_external.number().int().nonnegative(), exports_external.literal("unlimited")]).optional().describe("How many times a retryable request is retried (rate limits like 429, " + "capacity 529, 5xx, transient network errors). Set 0 to never retry, " + 'any positive integer, or "unlimited" to keep retrying (with the fixed ' + "delayMs below) until the request succeeds or you cancel. " + "When unset, the OPENCLAUDE_MAX_RETRIES env var is used (default 10)."),
66843
66844
  delayMs: exports_external.number().int().nonnegative().optional().describe("Fixed delay in milliseconds between retry attempts when this is set. " + "Set 5000 for 5 seconds, or 0 to retry immediately. A server-provided " + "Retry-After that is even longer is still honored. When unset, the " + "default exponential backoff (and OPENCLAUDE_RETRY_DELAY_MS env var) apply.")
@@ -70365,7 +70366,7 @@ function getAttributionHeader(fingerprint, policy) {
70365
70366
  if (!policy.generate) {
70366
70367
  return "";
70367
70368
  }
70368
- const version2 = `${"0.33.2-by-rayss"}.${fingerprint}`;
70369
+ const version2 = `${"0.33.3-by-rayss"}.${fingerprint}`;
70369
70370
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
70370
70371
  const cch = "";
70371
70372
  const workload = getWorkload();
@@ -104001,7 +104002,7 @@ var init_metadata = __esm(() => {
104001
104002
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
104002
104003
  WHITESPACE_REGEX = /\s+/;
104003
104004
  getVersionBase = memoize_default(() => {
104004
- const match = "0.33.2-by-rayss".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
104005
+ const match = "0.33.3-by-rayss".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
104005
104006
  return match ? match[0] : undefined;
104006
104007
  });
104007
104008
  buildEnvContext = memoize_default(async () => {
@@ -104041,9 +104042,9 @@ var init_metadata = __esm(() => {
104041
104042
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
104042
104043
  isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
104043
104044
  isClaudeAiAuth: isClaudeAISubscriber(),
104044
- version: "0.33.2-by-rayss",
104045
+ version: "0.33.3-by-rayss",
104045
104046
  versionBase: getVersionBase(),
104046
- buildTime: "2026-10-23T01:50:01.313Z",
104047
+ buildTime: "2026-10-28T03:21:37.516Z",
104047
104048
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
104048
104049
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
104049
104050
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -112200,11 +112201,11 @@ var init_effort = __esm(() => {
112200
112201
 
112201
112202
  // src/utils/userAgent.ts
112202
112203
  function getClaudeCodeUserAgent() {
112203
- return `claude-code/${"0.33.2-by-rayss"}`;
112204
+ return `claude-code/${"0.33.3-by-rayss"}`;
112204
112205
  }
112205
112206
  function getOpenClaudeUserAgent() {
112206
112207
  try {
112207
- return `openclaude/${"0.33.2-by-rayss"}`;
112208
+ return `openclaude/${"0.33.3-by-rayss"}`;
112208
112209
  } catch {
112209
112210
  return "openclaude/0.0.0";
112210
112211
  }
@@ -112216,7 +112217,7 @@ function getUserAgent() {
112216
112217
  const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
112217
112218
  const workload = getWorkload();
112218
112219
  const workloadSuffix = workload ? `, workload/${workload}` : "";
112219
- return `claude-cli/${"0.33.2-by-rayss"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
112220
+ return `claude-cli/${"0.33.3-by-rayss"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
112220
112221
  }
112221
112222
  function getMCPUserAgent() {
112222
112223
  const parts = [];
@@ -112230,7 +112231,7 @@ function getMCPUserAgent() {
112230
112231
  parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
112231
112232
  }
112232
112233
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
112233
- return `claude-code/${"0.33.2-by-rayss"}${suffix}`;
112234
+ return `claude-code/${"0.33.3-by-rayss"}${suffix}`;
112234
112235
  }
112235
112236
  function getWebFetchUserAgent() {
112236
112237
  const supportUrl = isFirstPartyAnthropicProvider() ? "https://support.anthropic.com/" : "https://github.com/rayss868/openclaude";
@@ -152804,6 +152805,57 @@ var init_ReadMcpResourceTool = __esm(() => {
152804
152805
  });
152805
152806
  });
152806
152807
 
152808
+ // src/services/mcp/argCoercion.ts
152809
+ function coerceValue(value, schema) {
152810
+ if (value === null || value === undefined || !schema) {
152811
+ return value;
152812
+ }
152813
+ const type = schema.type;
152814
+ if (type === "integer" || type === "number") {
152815
+ if (typeof value === "string" && value.trim() !== "") {
152816
+ const parsed = Number(value);
152817
+ if (Number.isFinite(parsed)) {
152818
+ return parsed;
152819
+ }
152820
+ }
152821
+ return value;
152822
+ }
152823
+ if (type === "boolean") {
152824
+ if (value === "true")
152825
+ return true;
152826
+ if (value === "false")
152827
+ return false;
152828
+ return value;
152829
+ }
152830
+ if (type === "object" && typeof value === "object" && value !== null && !Array.isArray(value)) {
152831
+ const props = schema.properties;
152832
+ if (!props)
152833
+ return value;
152834
+ const out = {};
152835
+ for (const [key, v] of Object.entries(value)) {
152836
+ out[key] = coerceValue(v, props[key]);
152837
+ }
152838
+ return out;
152839
+ }
152840
+ if (type === "array" && Array.isArray(value)) {
152841
+ if (!schema.items)
152842
+ return value;
152843
+ return value.map((item) => coerceValue(item, schema.items));
152844
+ }
152845
+ return value;
152846
+ }
152847
+ function coerceArgsToInputSchema(args, inputSchema8) {
152848
+ if (!inputSchema8 || typeof inputSchema8 !== "object" || !inputSchema8.properties) {
152849
+ return args;
152850
+ }
152851
+ const props = inputSchema8.properties;
152852
+ const out = {};
152853
+ for (const [key, value] of Object.entries(args)) {
152854
+ out[key] = coerceValue(value, props[key]);
152855
+ }
152856
+ return out;
152857
+ }
152858
+
152807
152859
  // src/utils/codeIndexing.ts
152808
152860
  function detectCodeIndexingFromCommand(command) {
152809
152861
  const trimmed = command.trim();
@@ -156990,7 +157042,7 @@ function computeFingerprint(messageText2, version2) {
156990
157042
  }
156991
157043
  function computeFingerprintFromMessages(messages) {
156992
157044
  const firstMessageText = extractFirstMessageText(messages);
156993
- return computeFingerprint(firstMessageText, "0.33.2-by-rayss");
157045
+ return computeFingerprint(firstMessageText, "0.33.3-by-rayss");
156994
157046
  }
156995
157047
  var FINGERPRINT_SALT = "59cf53e54c78";
156996
157048
  var init_fingerprint = () => {};
@@ -158473,7 +158525,7 @@ var init_client2 = __esm(() => {
158473
158525
  const client = new Client({
158474
158526
  name: "claude-code",
158475
158527
  title: "OpenClaude",
158476
- version: "0.33.2-by-rayss",
158528
+ version: "0.33.3-by-rayss",
158477
158529
  description: "OpenClaude — coding-agent CLI for any LLM provider",
158478
158530
  websiteUrl: PRODUCT_URL
158479
158531
  }, {
@@ -158971,6 +159023,7 @@ var init_client2 = __esm(() => {
158971
159023
  async call(args, context2, _canUseTool, parentMessage, onProgress) {
158972
159024
  const toolUseId = extractToolUseId(parentMessage);
158973
159025
  const meta = toolUseId ? { "claudecode/toolUseId": toolUseId } : {};
159026
+ const normalizedArgs = coerceArgsToInputSchema(args, tool2.inputSchema);
158974
159027
  if (onProgress && toolUseId) {
158975
159028
  try {
158976
159029
  onProgress({
@@ -159019,7 +159072,7 @@ var init_client2 = __esm(() => {
159019
159072
  client: connectedClient,
159020
159073
  clientConnection: client,
159021
159074
  tool: tool2.name,
159022
- args,
159075
+ args: normalizedArgs,
159023
159076
  meta,
159024
159077
  signal: context2.abortController.signal,
159025
159078
  setAppState: context2.setAppState,
@@ -232230,6 +232283,50 @@ var init_doomLoop = __esm(() => {
232230
232283
  stateByAgent = new Map;
232231
232284
  });
232232
232285
 
232286
+ // src/utils/toolErrorRepeats.ts
232287
+ function getState2(agentKey) {
232288
+ let state2 = stateByAgent2.get(agentKey);
232289
+ if (!state2) {
232290
+ state2 = { lastTool: null, lastError: null, count: 0 };
232291
+ stateByAgent2.set(agentKey, state2);
232292
+ }
232293
+ return state2;
232294
+ }
232295
+ function normalizeText(text) {
232296
+ return text.replace(/\s+/g, " ").replace(/\d+/g, "#").trim();
232297
+ }
232298
+ function buildNudge(count4) {
232299
+ return `
232300
+ <system-reminder>This is the ${count4}th consecutive failure of this tool with the same error. Do not simply retry — pause, re-read the original request and the error above, then adjust your approach.</system-reminder>`;
232301
+ }
232302
+ function recordRepeatedToolError(agentKey, toolName, errorText) {
232303
+ const state2 = getState2(agentKey);
232304
+ const normalized = normalizeText(errorText);
232305
+ if (state2.lastTool === toolName && state2.lastError === normalized) {
232306
+ state2.count++;
232307
+ } else {
232308
+ state2.lastTool = toolName;
232309
+ state2.lastError = normalized;
232310
+ state2.count = 1;
232311
+ }
232312
+ if (state2.count >= DEFAULT_THRESHOLD2) {
232313
+ return { count: state2.count, nudge: buildNudge(state2.count) };
232314
+ }
232315
+ return { count: state2.count };
232316
+ }
232317
+ function resetToolErrorRepeats(agentKey, toolName) {
232318
+ const state2 = stateByAgent2.get(agentKey);
232319
+ if (state2 && state2.lastTool === toolName) {
232320
+ state2.lastTool = null;
232321
+ state2.lastError = null;
232322
+ state2.count = 0;
232323
+ }
232324
+ }
232325
+ var DEFAULT_THRESHOLD2 = 3, stateByAgent2;
232326
+ var init_toolErrorRepeats = __esm(() => {
232327
+ stateByAgent2 = new Map;
232328
+ });
232329
+
232233
232330
  // src/utils/sessionPersistencePolicy.ts
232234
232331
  function shouldSkipSessionPersistence() {
232235
232332
  const allowTestPersistence = isEnvTruthy(process.env.TEST_ENABLE_SESSION_PERSISTENCE);
@@ -234063,13 +234160,14 @@ async function checkPermissionsAndCallTool(tool2, toolUseID, input, toolUseConte
234063
234160
  },
234064
234161
  ...mcpToolDetailsForAnalytics(tool2.name, mcpServerType, mcpServerBaseUrl)
234065
234162
  });
234163
+ const repeatedError = recordRepeatedToolError(toolUseContext.agentId ?? "main", tool2.name, errorContent);
234066
234164
  return [
234067
234165
  {
234068
234166
  message: createUserMessage({
234069
234167
  content: [
234070
234168
  {
234071
234169
  type: "tool_result",
234072
- content: `<tool_use_error>InputValidationError: ${errorContent}</tool_use_error>`,
234170
+ content: `<tool_use_error>InputValidationError: ${errorContent}</tool_use_error>${repeatedError.nudge ?? ""}`,
234073
234171
  is_error: true,
234074
234172
  tool_use_id: toolUseID
234075
234173
  }
@@ -234497,6 +234595,7 @@ async function checkPermissionsAndCallTool(tool2, toolUseID, input, toolUseConte
234497
234595
  const toolContextModifier = result.contextModifier;
234498
234596
  const mcpMeta = result.mcpMeta;
234499
234597
  async function addToolResult(toolUseResult, preMappedBlock) {
234598
+ resetToolErrorRepeats(toolUseContext.agentId ?? "main", tool2.name);
234500
234599
  const toolResultBlock = preMappedBlock ? await processPreMappedToolResultBlock(preMappedBlock, tool2.name, tool2.maxResultSizeChars) : await processToolResultBlock(tool2, toolUseResult, toolUseID);
234501
234600
  const contentBlocks = [toolResultBlock];
234502
234601
  if ("acceptFeedback" in permissionDecision && permissionDecision.acceptFeedback) {
@@ -234682,13 +234781,14 @@ async function checkPermissionsAndCallTool(tool2, toolUseID, input, toolUseConte
234682
234781
  delete hookChainsContext.hookChainsCanUseTool;
234683
234782
  }
234684
234783
  }
234784
+ const repeatedError = recordRepeatedToolError(toolUseContext.agentId ?? "main", tool2.name, content);
234685
234785
  return [
234686
234786
  {
234687
234787
  message: createUserMessage({
234688
234788
  content: [
234689
234789
  {
234690
234790
  type: "tool_result",
234691
- content,
234791
+ content: `${content}${repeatedError.nudge ?? ""}`,
234692
234792
  is_error: true,
234693
234793
  tool_use_id: toolUseID
234694
234794
  }
@@ -234731,6 +234831,7 @@ var init_toolExecution = __esm(() => {
234731
234831
  init_abortReasons();
234732
234832
  init_debug();
234733
234833
  init_doomLoop();
234834
+ init_toolErrorRepeats();
234734
234835
  init_errors();
234735
234836
  init_hooks4();
234736
234837
  init_log();
@@ -236439,7 +236540,7 @@ function buildQueryConfig() {
236439
236540
  sessionId: getSessionId(),
236440
236541
  gates: {
236441
236542
  streamingToolExecution: checkStatsigFeatureGate_CACHED_MAY_BE_STALE("tengu_streaming_tool_execution2"),
236442
- emitToolUseSummaries: isEnvTruthy(process.env.CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES),
236543
+ emitToolUseSummaries: getSettingsForSource("userSettings")?.toolUseSummariesEnabled ?? isEnvTruthy(process.env.CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES),
236443
236544
  isAnt: false,
236444
236545
  fastModeEnabled: !isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)
236445
236546
  }
@@ -236449,6 +236550,7 @@ var init_config7 = __esm(() => {
236449
236550
  init_state();
236450
236551
  init_growthbook();
236451
236552
  init_envUtils();
236553
+ init_settings2();
236452
236554
  });
236453
236555
 
236454
236556
  // src/query/deps.ts
@@ -238462,7 +238564,7 @@ function getAnthropicEnvMetadata() {
238462
238564
  function getBuildAgeMinutes() {
238463
238565
  if (false)
238464
238566
  ;
238465
- const buildTime = new Date("2026-10-23T01:50:01.313Z").getTime();
238567
+ const buildTime = new Date("2026-10-28T03:21:37.516Z").getTime();
238466
238568
  if (isNaN(buildTime))
238467
238569
  return;
238468
238570
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -267461,7 +267563,7 @@ var init_sessionStorage = __esm(() => {
267461
267563
  init_slowOperations();
267462
267564
  init_transcriptFileLock();
267463
267565
  init_uuid();
267464
- VERSION3 = typeof MACRO !== "undefined" ? "0.33.2-by-rayss" : "unknown";
267566
+ VERSION3 = typeof MACRO !== "undefined" ? "0.33.3-by-rayss" : "unknown";
267465
267567
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
267466
267568
  TRANSCRIPT_COPY_CHUNK_BYTES = 64 * 1024;
267467
267569
  transcriptRewriteHooksForTesting = {};
@@ -268938,7 +269040,7 @@ var init_filesystem = __esm(() => {
268938
269040
  });
268939
269041
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
268940
269042
  const nonce = randomBytes10(16).toString("hex");
268941
- return join94(getClaudeTempDir(), "bundled-skills", "0.33.2-by-rayss", nonce);
269043
+ return join94(getClaudeTempDir(), "bundled-skills", "0.33.3-by-rayss", nonce);
268942
269044
  });
268943
269045
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
268944
269046
  });
@@ -283477,7 +283579,7 @@ function buildSystemInitMessage(inputs) {
283477
283579
  slash_commands: inputs.commands.filter((c7) => c7.userInvocable !== false).map((c7) => c7.name),
283478
283580
  apiKeySource: getAnthropicApiKeyWithSource().source,
283479
283581
  betas: getSdkBetas(),
283480
- claude_code_version: "0.33.2-by-rayss",
283582
+ claude_code_version: "0.33.3-by-rayss",
283481
283583
  output_style: outputStyle,
283482
283584
  agents: inputs.agents.map((agent) => agent.agentType),
283483
283585
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -288101,4 +288203,4 @@ export {
288101
288203
  AbortError
288102
288204
  };
288103
288205
 
288104
- //# debugId=FF699A9CFF4EF9BA64756E2164756E21
288206
+ //# debugId=5E852F5B613C44DF64756E2164756E21
@@ -80,6 +80,18 @@ Per-model overrides for `contextWindow` and `maxOutputTokens`. Used for OpenAI-c
80
80
  }
81
81
  ```
82
82
 
83
+ ### `toolUseSummariesEnabled` (boolean)
84
+
85
+ When `true`, generate a short label after completed tool batches using an auxiliary model request. Defaults to `false` when unset. This can also be changed in `/config` under **Tool-use summaries**.
86
+
87
+ ```json
88
+ {
89
+ "toolUseSummariesEnabled": true
90
+ }
91
+ ```
92
+
93
+ An explicit setting takes precedence over `CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES`; the environment variable is used only when this field is unset.
94
+
83
95
  ### `apiRetry` (object)
84
96
 
85
97
  Network retry policy for transient errors (rate limits `429`, capacity `529`, `5xx`, and brief network failure). Use it to control both how many times a `429` is retried and how long to wait between attempts. Both sub-fields can also be edited interactively from `/config`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayss-dev/openclaude",
3
- "version": "0.33.2-by-rayss",
3
+ "version": "0.33.3-by-rayss",
4
4
  "description": "OpenClaude opens coding-agent workflows to any LLM — OpenAI, Gemini, DeepSeek, Ollama, and 200+ models",
5
5
  "type": "module",
6
6
  "bin": {