@askalf/dario 4.8.71 → 4.8.73

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/README.md CHANGED
@@ -16,7 +16,9 @@
16
16
 
17
17
  ---
18
18
 
19
- > **NewClaude Fable 5 fully supported.** `claude-fable-5`, its `[1m]` long-context variant, and the `fable` / `fable1m` shortcuts route on your subscription like any other model. dario tracked CC's new flagship the day it shipped, including the wire quirks Anthropic never documented: the `fallback-credit` beta fable *requires* (without it subscription fable traffic is silently soft-refused), its refusal of high effort levels, and the **per-model beta tailoring** matched to CC v2.1.170. `npm install -g @askalf/dario@latest`
19
+ > 🗓️ **2026-06-15Anthropic splits Claude billing.** Agent-SDK and `claude -p` (headless) traffic stops counting against your subscription pool and moves to a small separate monthly credit ($20 / $100 / $200 by plan), then metered per-token API rates. Most proxies forward your requests in exactly the shape that gets reclassified into that bucket. dario rewrites every request into interactive Claude Code wire-shape before it leaves your machine, so your traffic stays in the subscription pool you already pay for — same install, no config change for the cliff. **[What changes, and how to verify it on your own machine →](#the-deadline-2026-06-15)**
20
+
21
+ > ⛔ **Claude Fable 5 / Mythos 5 — temporarily suspended for all Anthropic customers.** On 2026-06-12 a US-government legal directive disabled Fable 5 and Mythos 5 for **every** Anthropic plan and tier — `api.anthropic.com` now returns `not_found` for them, and no account or proxy can route around it ([details](https://www.anthropic.com/news/fable-mythos-access)). As of **v4.8.71**, dario filters both families out of `/v1/models` and rejects any spelling (`fable`, `fable1m`, `claude-fable-5`, `claude-fable-5[1m]`, `claude:fable`) up front with a clean `404` pointing at `claude-opus-4-8` / `claude-sonnet-4-6` — instead of forwarding into a confusing upstream error. Reversible without a code change once access is restored: set `DARIO_SUSPENDED_MODELS=` (empty) on the instance. `npm install -g @askalf/dario@latest`
20
22
  >
21
23
  > ⚠️ Still on a version **before 4.8.39**? Upgrade now — those could silently corrupt code/structured content routed through the proxy (the identifier scrub stripped tokens like the JS `continue` keyword). **[Details →](https://github.com/askalf/dario/issues/457)**
22
24
 
@@ -73,10 +75,9 @@ Type `dario` with no args (in another terminal) to open a full-screen control pa
73
75
  │ Tokens out: 38,200 Subscription %: 98% │
74
76
  │ │
75
77
  │ Per-model: │
76
- fable-5 ██████████░░░░░░░░░░░ 50% (124 req) │
77
- opus-4-8 ██████░░░░░░░░░░░░░░░ 30% ( 74 req) │
78
- sonnet-4-6 ███░░░░░░░░░░░░░░░░░░ 14% ( 34 req) │
79
- │ haiku-4-5 █░░░░░░░░░░░░░░░░░░░░ 6% ( 15 req) │
78
+ opus-4-8 ████████████░░░░░░░░ 60% (148 req) │
79
+ sonnet-4-6 █████░░░░░░░░░░░░░░░ 26% ( 64 req) │
80
+ haiku-4-5 ███░░░░░░░░░░░░░░░░░ 14% ( 35 req) │
80
81
  │ │
81
82
  │ Rate-limit: │
82
83
  │ 5h ████░░░░░░░░░░░░░░░░░░░░░░░░ 18% │
@@ -86,18 +87,6 @@ Type `dario` with no args (in another terminal) to open a full-screen control pa
86
87
 
87
88
  ---
88
89
 
89
- ## The money
90
-
91
- | Setup | Monthly cost — heavy user |
92
- |---|---|
93
- | Cursor + Anthropic API direct | **$80–$300** |
94
- | Multi-tool heavy use (Cursor + Aider + Cline + Continue), per-token | **$200–$600+** |
95
- | **Any of the above + dario** | **$20–$200 flat** — your existing Pro/Max plan, nothing extra |
96
-
97
- Switching providers is a model-name change, not a reconfigure. Add a backend once and the same `localhost:3456` speaks OpenAI, Groq, OpenRouter, or a local Ollama too.
98
-
99
- ---
100
-
101
90
  ## The deadline: 2026-06-15
102
91
 
103
92
  On **2026-06-15**, Anthropic splits Claude billing in two. Agentic traffic — Agent SDK, `claude -p` headless — stops counting against your subscription pool and gets a separate small monthly credit. [Announced 2026-05-13](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) via Claude's Help Center and a [@ClaudeDevs X post](https://x.com/ClaudeDevs/status/2054610152817619388) — no anthropic.com blog post, no email to most subscribers, no mention in CC release notes.
@@ -123,6 +112,18 @@ Same install, same `localhost:3456`, no config change for the cliff. Verify on y
123
112
 
124
113
  ---
125
114
 
115
+ ## The money
116
+
117
+ | Setup | Monthly cost — heavy user |
118
+ |---|---|
119
+ | Cursor + Anthropic API direct | **$80–$300** |
120
+ | Multi-tool heavy use (Cursor + Aider + Cline + Continue), per-token | **$200–$600+** |
121
+ | **Any of the above + dario** | **$20–$200 flat** — your existing Pro/Max plan, nothing extra |
122
+
123
+ Switching providers is a model-name change, not a reconfigure. Add a backend once and the same `localhost:3456` speaks OpenAI, Groq, OpenRouter, or a local Ollama too.
124
+
125
+ ---
126
+
126
127
  ## The principle dario operates on
127
128
 
128
129
  Two layers, separated:
@@ -166,6 +167,7 @@ dario doesn't *guess* Claude Code's request shape — it captures it live from y
166
167
  | `TodoWrite`/`TodoRead` replaced by the `Task*` family, no migration note | Clients hardcoding `todo_*` send unrecognized tools | [v3.38.6](https://github.com/askalf/dario/pull/274) — 13 min later |
167
168
  | **Claude Fable 5** ships as CC's flagship (v2.1.170) with undocumented wire quirks: a required `fallback-credit-2026-06-01` beta, soft-refusal of `max`/`xhigh` effort, and a `[1m]`-only `context-1m` beta | Subscription fable traffic 200-refused (empty body) without the flag; wrong effort silently returns nothing | [v4.8.46–52](https://github.com/askalf/dario/pulls?q=fable) — 2026-06-09 |
168
169
  | CC tailors the `anthropic-beta` set **per model** — opus 9, sonnet 8 (no `mid-conversation-system`), haiku 6 (also no `effort`) | Proxies sending one beta set diverge from CC for non-opus models | [v4.8.53](https://github.com/askalf/dario/pull/478) — 2026-06-09 |
170
+ | **Fable 5 / Mythos 5 globally suspended** by a US-government directive (2026-06-12, every customer + tier) — `api.anthropic.com` now `not_found`s them | dario kept advertising `claude-fable-5[1m]` in `/v1/models` and forwarded fable traffic into a confusing upstream 404 | [v4.8.71](https://github.com/askalf/dario/pull/518) — 2026-06-13 (filtered out + clean local 404; reversible via `DARIO_SUSPENDED_MODELS`) |
169
171
 
170
172
  And it gets subtler: v4.2.1 (2026-05-17) shipped receipts for **same CC binary, different wire output 24 hours apart** — Anthropic ships changes through CC's *remote configuration*, not just npm releases. So dario runs **three classes of drift detection**, all auto-detecting and auto-PR'ing:
171
173
 
@@ -184,7 +186,7 @@ You point every tool at one URL. dario reads each request, decides which backend
184
186
 
185
187
  | Client speaks | Model | Routes to | What happens |
186
188
  |---|---|---|---|
187
- | Anthropic Messages | `claude-*` / `fable` / `opus` / `sonnet` / `haiku` | Claude backend | OAuth swap + CC template replay → `api.anthropic.com` |
189
+ | Anthropic Messages | `claude-*` / `opus` / `sonnet` / `haiku` | Claude backend | OAuth swap + CC template replay → `api.anthropic.com` |
188
190
  | Anthropic Messages | `gpt-*`, `llama-*`, … | OpenAI-compat backend | Anthropic→OpenAI translation, forwarded |
189
191
  | OpenAI Chat | `gpt-*` / `o1-*` / `o3-*` | OpenAI-compat backend | Auth swap, body forwarded byte-for-byte |
190
192
  | OpenAI Chat | `claude-*` | Claude backend | OpenAI→Anthropic translation, then Claude path |
@@ -192,7 +194,7 @@ You point every tool at one URL. dario reads each request, decides which backend
192
194
 
193
195
  The tool doesn't know. The backend doesn't know. dario is the seam.
194
196
 
195
- **The full Claude lineup, autodetected.** Claude Fable 5 (CC's flagship), Opus 4.8, Sonnet 4.6, and Haiku 4.5 — plus `[1m]` long-context variants, generated by one rule for every family — by full id (`claude-fable-5`, `claude-opus-4-8`) or shortcut (`fable` / `opus` / `sonnet` / `haiku`, append `1m` for the long-context form). `GET /v1/models` asks Anthropic's live catalog (TTL-cached, baked fallback when offline), and the family shortcuts track it — a new model shows up and resolves the day it lands, no dario release needed; the model-specific wire shape (effort level, beta set, thinking config) is applied automatically.
197
+ **The full Claude lineup, autodetected.** Opus 4.8, Sonnet 4.6, and Haiku 4.5 — plus `[1m]` long-context variants, generated by one rule for every family — by full id (`claude-opus-4-8`) or shortcut (`opus` / `sonnet` / `haiku`, append `1m` for the long-context form). `GET /v1/models` asks Anthropic's live catalog (TTL-cached, baked fallback when offline), and the family shortcuts track it — a new model shows up and resolves the day it lands, no dario release needed; the model-specific wire shape (effort level, beta set, thinking config) is applied automatically. **Globally-suspended families are filtered out** of both the live catalog and the baked fallback, so `/v1/models` never advertises a model that 404s upstream and suspended ids are rejected locally with an actionable error — currently Claude Fable 5 and Mythos 5 (US-government directive, 2026-06-12); governed by `DARIO_SUSPENDED_MODELS` (default `fable`), set it empty to re-enable when access is restored.
196
198
 
197
199
  ---
198
200
 
@@ -299,6 +301,9 @@ No. `five_hour` and `seven_day` are both subscription billing — different acco
299
301
  **Will the 2026-06-15 split break my setup? / What if Anthropic ships another silent change?**
300
302
  No, and it's caught automatically — see [The deadline](#the-deadline-2026-06-15) and [How it stays working](#how-it-works-and-how-it-stays-working). dario rewrites every request to interactive-CC shape before it reaches `api.anthropic.com`, and the three-class drift watcher picks up new changes (npm-release hourly, remote-config every 30 min, classifier-rule daily). v3.38.5 + v3.38.6 — 13 minutes apart, same day as v2.1.142's silent drops — are the prior art.
301
303
 
304
+ **I'm getting `404 not_found` for `claude-fable-5` / `fable`. Did dario break?**
305
+ No — Claude Fable 5 and Mythos 5 were disabled for **all** Anthropic customers by a US-government legal directive on 2026-06-12 (every plan and tier; [details](https://www.anthropic.com/news/fable-mythos-access)). `api.anthropic.com` returns `not_found` for them, so no subscription or proxy can route them. Since v4.8.71 dario drops both families from `/v1/models` and rejects them locally with a clear 404 pointing at `claude-opus-4-8` / `claude-sonnet-4-6`, instead of forwarding into a confusing upstream error. When access is restored, set `DARIO_SUSPENDED_MODELS=` (empty) on the instance to re-enable — no upgrade needed.
306
+
302
307
  Full FAQ: [`docs/faq.md`](./docs/faq.md)
303
308
 
304
309
  ---
@@ -39,6 +39,13 @@ export declare const CC_TOOL_DEFINITIONS: {
39
39
  description: string;
40
40
  input_schema: Record<string, unknown>;
41
41
  }[];
42
+ /** CC's own tool names, EXACT case ("Read", "Bash", "Agent", …). A CC client's
43
+ * tools identity-map to themselves and OVERRIDE TOOL_MAP — whose lowercase
44
+ * cross-client aliases ('read' → {path}/{filePath}) would otherwise mistranslate
45
+ * a CC tool (Read's file_path → path). Exact case is the discriminator: CC sends
46
+ * PascalCase, the {path}-style clients send lowercase/snake, so a non-CC `read`
47
+ * still routes through TOOL_MAP. Tracks the live bundle (refreshed each bake). */
48
+ export declare const CC_NATIVE_NAMES: Set<string>;
42
49
  /** CC's static system prompt (~25KB). */
43
50
  export declare const CC_SYSTEM_PROMPT: string;
44
51
  /** CC's agent identity string. */
@@ -45,6 +45,13 @@ export function filterToolsForPlatform(tools, platform) {
45
45
  }
46
46
  /** CC's exact tool definitions for the current platform — filtered from the bundled union. */
47
47
  export const CC_TOOL_DEFINITIONS = filterToolsForPlatform(TEMPLATE.tools, process.platform);
48
+ /** CC's own tool names, EXACT case ("Read", "Bash", "Agent", …). A CC client's
49
+ * tools identity-map to themselves and OVERRIDE TOOL_MAP — whose lowercase
50
+ * cross-client aliases ('read' → {path}/{filePath}) would otherwise mistranslate
51
+ * a CC tool (Read's file_path → path). Exact case is the discriminator: CC sends
52
+ * PascalCase, the {path}-style clients send lowercase/snake, so a non-CC `read`
53
+ * still routes through TOOL_MAP. Tracks the live bundle (refreshed each bake). */
54
+ export const CC_NATIVE_NAMES = new Set(CC_TOOL_DEFINITIONS.map((t) => String(t.name)));
48
55
  /** CC's static system prompt (~25KB). */
49
56
  export const CC_SYSTEM_PROMPT = TEMPLATE.system_prompt;
50
57
  /** CC's agent identity string. */
@@ -1230,7 +1237,20 @@ export function buildCCRequest(clientBody, billingTag, cacheControl, identity, o
1230
1237
  const claimedCC = new Set();
1231
1238
  for (const tool of clientTools) {
1232
1239
  const name = (tool.name || '').toLowerCase();
1233
- const mapping = TOOL_MAP[name];
1240
+ // A CC client's OWN tools map to THEMSELVES (identity), and this OVERRIDES
1241
+ // TOOL_MAP. Two failure modes it fixes, both seen via the dock:
1242
+ // 1. TOOL_MAP's lowercase cross-client aliases mistranslate a CC tool —
1243
+ // `Read` → TOOL_MAP['read'] whose translateBack emits {path, filePath}
1244
+ // instead of {file_path}, so every Read failed validation client-side.
1245
+ // 2. CC's newer built-ins (Agent, AskUserQuestion, Cron*, Task*, Workflow,
1246
+ // NotebookEdit, Enter/ExitPlanMode, …) aren't in TOOL_MAP at all, so
1247
+ // they were round-robined onto Read/Bash/etc. and collided.
1248
+ // Exact case is the discriminator (CC sends PascalCase; {path}-style clients
1249
+ // send lowercase/snake) so a genuine non-CC `read` still routes via TOOL_MAP.
1250
+ // Tracks the live bundle, so future CC tools are covered after the next bake.
1251
+ const mapping = CC_NATIVE_NAMES.has(tool.name)
1252
+ ? { ccTool: tool.name, translateArgs: (a) => a, translateBack: (a) => a }
1253
+ : TOOL_MAP[name];
1234
1254
  if (mapping) {
1235
1255
  // In hybrid mode, clone the shared mapping and attach the
1236
1256
  // client-declared top-level field names from input_schema.
@@ -1266,8 +1286,8 @@ export function buildCCRequest(clientBody, billingTag, cacheControl, identity, o
1266
1286
  const CC_FALLBACK_TOOLS = ['Bash', 'Read', 'Grep', 'Glob', 'WebSearch', 'WebFetch'];
1267
1287
  for (const tool of clientTools) {
1268
1288
  const name = (tool.name || '').toLowerCase();
1269
- if (TOOL_MAP[name])
1270
- continue;
1289
+ if (CC_NATIVE_NAMES.has(tool.name) || TOOL_MAP[name])
1290
+ continue; // CC-native (identity in pass 1) or mapped
1271
1291
  unmappedTools.push(tool.name);
1272
1292
  if (opts.hybridTools)
1273
1293
  continue; // dropped — see comment above
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "4.8.71",
3
+ "version": "4.8.73",
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": {