@askalf/dario
Advanced tools
@@ -504,2 +504,12 @@ /** | ||
| }>(tools: T[]): T[]; | ||
| /** | ||
| * A genuine Claude Code client is identified by TWO markers together: | ||
| * the `x-anthropic-billing-header:` system block at [0] (the discriminator | ||
| * extractSystemText and extractTemplate key on) AND CC's own identity block | ||
| * at [1] ("You are Claude Code…" / the Claude Agent SDK variant). Requiring | ||
| * both keeps a non-CC framework that replays a billing-tagged body (e.g. a | ||
| * Kilo client behind a second proxy hop) on the detector path instead of | ||
| * passthrough. Exported for tests. | ||
| */ | ||
| export declare function isGenuineCCClient(clientBody: Record<string, unknown>): boolean; | ||
| export declare function buildCCRequest(clientBody: Record<string, unknown>, billingTag: string, cacheControl: CacheControl, identity: { | ||
@@ -525,2 +535,3 @@ deviceId: string; | ||
| detectedClient?: string; | ||
| genuineCC?: boolean; | ||
| }; | ||
@@ -527,0 +538,0 @@ /** |
@@ -223,2 +223,13 @@ /** | ||
| } | ||
| // Pre-4.8.145 captures baked the operator's mcp__* tools into the template | ||
| // (dario#678 regression: duplicate tool names → upstream 400). The capture | ||
| // path filters them now, but a polluted cache written by an older dario | ||
| // sits on disk until something rewrites it — its junk union and inflated | ||
| // doctor Overhead numbers persist (the #678 reporter's cache showed 138 | ||
| // tool defs, ~111 of them MCP). Quarantine on load; the background refresh | ||
| // re-captures clean. | ||
| if (parsed.tools.some((t) => typeof t?.name === 'string' && t.name.startsWith('mcp__'))) { | ||
| quarantineCorruptCache('mcp__ tool pollution (pre-4.8.145 capture)'); | ||
| return null; | ||
| } | ||
| // Schema version mismatch is NOT corruption — it's an expected event on | ||
@@ -225,0 +236,0 @@ // dario upgrade or downgrade. Skip the cache silently; the background |
+1
-1
| { | ||
| "name": "@askalf/dario", | ||
| "version": "4.8.145", | ||
| "version": "4.8.146", | ||
| "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.
1388892
0.4%26964
0.38%