@askalf/dario
Advanced tools
@@ -493,2 +493,13 @@ /** | ||
| export declare function applyCcPromptCaching(ccRequest: Record<string, unknown>, cacheControl: CacheControl): void; | ||
| /** | ||
| * Drop later tools whose exact name already appeared. Upstream rejects the | ||
| * whole request with 400 "tools: Tool names must be unique" on any repeat, | ||
| * so this is the last-line guard on the assembled advertise array — a | ||
| * polluted live template (see the mcp__ exclusion at the availableCC build) | ||
| * or a client double-declare degrades to first-wins instead of a hard | ||
| * request failure. Exported for tests. | ||
| */ | ||
| export declare function dedupeToolsByName<T extends { | ||
| name?: unknown; | ||
| }>(tools: T[]): T[]; | ||
| export declare function buildCCRequest(clientBody: Record<string, unknown>, billingTag: string, cacheControl: CacheControl, identity: { | ||
@@ -495,0 +506,0 @@ deviceId: string; |
@@ -553,5 +553,14 @@ /** | ||
| return null; | ||
| // mcp__* tools are EXCLUDED from the template: the capture spawns the | ||
| // operator's own CC, and on a machine with MCP servers configured the | ||
| // captured request declares their mcp__<server>__<tool> schemas — session | ||
| // config, not CC wire shape. Baking them poisoned CC_TOOL_DEFINITIONS_UNION | ||
| // and duplicated any client-declared MCP tool on the advertise path | ||
| // (template def + verbatim client schema), which upstream rejects with | ||
| // 400 "tools: Tool names must be unique" (dario#678 follow-up). Local | ||
| // startsWith mirror of cc-template's isMcpToolName — importing it here | ||
| // would cycle (cc-template imports loadTemplate from this module). | ||
| const tools = Array.isArray(body.tools) | ||
| ? body.tools | ||
| .filter((t) => typeof t.name === 'string') | ||
| .filter((t) => typeof t.name === 'string' && !t.name.startsWith('mcp__')) | ||
| .map((t) => ({ | ||
@@ -558,0 +567,0 @@ name: t.name, |
+4
-2
@@ -67,4 +67,6 @@ import { type IncomingMessage } from 'node:http'; | ||
| * opus-4-8 = base (unchanged) | ||
| * sonnet-5 = base − {mid-conversation-system} (CC 2.1.201 dropped it | ||
| * from sonnet; 2.1.199 sonnet == opus and still kept it — #667) | ||
| * sonnet-5 = base (== opus — wire-drift | ||
| * live capture, CC 2.1.204: mid-conversation-system included) | ||
| * sonnet-4-x = base − {mid-conversation-system} (CC 2.1.201 dropped it | ||
| * from sonnet 4.6; 2.1.199 sonnet == opus and still kept it — #667) | ||
| * haiku-4-5 = base − {mid-conversation-system, effort, afk-mode}, and | ||
@@ -71,0 +73,0 @@ * claude-code-20250219 MOVED to position 5 (before advisor-tool) |
+1
-1
| { | ||
| "name": "@askalf/dario", | ||
| "version": "4.8.144", | ||
| "version": "4.8.145", | ||
| "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,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1383340
0.24%26861
0.21%