@askalf/dario 4.8.74 → 4.8.75

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.
@@ -1456,7 +1456,21 @@ export function buildCCRequest(clientBody, billingTag, cacheControl, identity, o
1456
1456
  ccRequest.tools = [...CC_TOOL_DEFINITIONS, ...appended];
1457
1457
  }
1458
1458
  else {
1459
- ccRequest.tools = CC_TOOL_DEFINITIONS;
1459
+ // Advertise only the CC-native tools the client actually declared.
1460
+ // Substituting the FULL CC template here makes the model emit a tool_use
1461
+ // for a tool the client never sent — e.g. AskUserQuestion when a headless
1462
+ // or SDK session has it disabled — and the client harness then rejects it
1463
+ // with "<Tool> exists but is not enabled in this context" (reported via a
1464
+ // dario-routed CC session). A real CC client with a reduced tool set sends
1465
+ // exactly this reduced array (every --disallowedTools / MCP delta does
1466
+ // this), so filtering tracks CC's wire shape rather than diverging from it.
1467
+ // If the client declared no CC-native tool at all it isn't really CC; keep
1468
+ // the full template as the safer fingerprint default in that case.
1469
+ const clientToolNames = new Set(clientTools
1470
+ .map((t) => t.name?.toLowerCase())
1471
+ .filter((n) => Boolean(n)));
1472
+ const availableCC = CC_TOOL_DEFINITIONS.filter((t) => clientToolNames.has(t.name.toLowerCase()));
1473
+ ccRequest.tools = availableCC.length > 0 ? availableCC : CC_TOOL_DEFINITIONS;
1460
1474
  }
1461
1475
  }
1462
1476
  else if (effectiveMergeTools) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "4.8.74",
3
+ "version": "4.8.75",
4
4
  "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
5
5
  "type": "module",
6
6
  "bin": {