@askalf/dario 4.8.149 β 4.8.151
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 +59 -20
- package/dist/cc-template.js +17 -5
- package/dist/live-fingerprint.d.ts +1 -1
- package/dist/live-fingerprint.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
> ποΈ **
|
|
19
|
+
> ποΈ **The billing split β announced, then paused.** Anthropic announced (2026-05-13) that Agent-SDK and `claude -p` (headless) traffic would leave your subscription pool for a small separate monthly credit ($20 / $100 / $200 by plan), then metered per-token API rates β scheduled for 2026-06-15. It was **paused before that date**: those surfaces still bill subscription today, and Anthropic says it will give advance notice before any revised version. dario already rewrites every request into interactive Claude Code wire-shape, so your traffic sits in the subscription pool whether the split is paused or live β and its daily billing-classifier canary is the tripwire for the day it returns. **[The full timeline, and how to verify on your own machine β](#the-billing-split)**
|
|
20
20
|
|
|
21
21
|
> β οΈ 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
22
|
|
|
@@ -85,28 +85,28 @@ Type `dario` with no args (in another terminal) to open a full-screen control pa
|
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
88
|
-
## The
|
|
88
|
+
## The billing split
|
|
89
89
|
|
|
90
|
-
On **2026-
|
|
90
|
+
On **2026-05-13**, Anthropic [announced](https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan) β via the Claude Help Center and a [@ClaudeDevs X post](https://x.com/ClaudeDevs/status/2054610152817619388), with no anthropic.com blog post, no email to most subscribers, no mention in CC release notes β that on **2026-06-15**, Agentic traffic (Agent SDK, `claude -p` headless) would stop counting against your subscription pool and move to a separate small monthly credit, then metered per-token API rates. The announced terms:
|
|
91
91
|
|
|
92
|
-
| Plan |
|
|
92
|
+
| Plan | Announced Agent-SDK / `claude -p` credit | When it would run out |
|
|
93
93
|
|---|---|---|
|
|
94
94
|
| Pro | $20/mo | extra-usage at API rates **only if enabled**; otherwise suspended until renewal |
|
|
95
95
|
| Max 5x | $100/mo | same |
|
|
96
96
|
| Max 20x | $200/mo | same |
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
**Then Anthropic paused it before 2026-06-15.** The Help Center now states Agent-SDK and `claude -p` usage continue drawing from your existing subscription pool unchanged; Anthropic said it's reworking the proposal and will give advance notice before any revised version. No credits were issued; no split took effect.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
So the cliff isn't live β but it was announced once, on short public notice, and can return. dario is built around that fact, split or no split. Every outbound request is rebuilt into **interactive Claude Code wire-shape** before it leaves your machine β headers, body key order, TLS stack, session-id lifecycle, and (`--stealth`) the temporal axis: response-correlated think-time and session-start latency. Anthropic's billing classifier sees an interactive Claude Code session, so your traffic sits in the subscription pool whether the classifier is checking today or after a revival.
|
|
101
101
|
|
|
102
|
-
| Your setup |
|
|
103
|
-
|
|
104
|
-
| Any tool β Anthropic API direct | per-token API |
|
|
105
|
-
| Any tool β proxy that forwards requests as-is | **$20β200/mo credit, then per-token (or suspended)** |
|
|
106
|
-
| **Any tool β dario** | **subscription pool β
|
|
107
|
-
| Claude Code, interactive | subscription pool
|
|
102
|
+
| Your setup | Today (split paused) | If the split returns |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| Any tool β Anthropic API direct | per-token API | per-token API |
|
|
105
|
+
| Any tool β proxy that forwards requests as-is | subscription pool | **$20β200/mo credit, then per-token (or suspended)** |
|
|
106
|
+
| **Any tool β dario** | **subscription pool** | **subscription pool β rewritten to interactive-CC shape** |
|
|
107
|
+
| Claude Code, interactive | subscription pool | subscription pool |
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
(A sustained Cline or Aider session can burn $100 of API-rate tokens in an evening β the "if it returns" column is what that credit cap would meter.) The [daily billing-classifier canary](#how-it-works-and-how-it-stays-working) is the tripwire: it fires one live request a day and asserts the bucket is still subscription, so a revived split surfaces within a day, not on a surprise invoice. Verify on your own machine right now: `dario doctor --usage` fires one request and surfaces the rate-limit headers β `representative-claim` should read `five_hour` or `seven_day` (subscription buckets). Full timeline: [`docs/why-now-2026-06.md`](./docs/why-now-2026-06.md).
|
|
110
110
|
|
|
111
111
|
---
|
|
112
112
|
|
|
@@ -156,7 +156,7 @@ dario doesn't *guess* Claude Code's request shape β it captures it live from y
|
|
|
156
156
|
|
|
157
157
|
[Discussion #178](https://github.com/askalf/dario/discussions/178) reproduces a ninth fingerprint operating on commit metadata: the classifier fires on the literal namespaced string `openclaw.inbound_meta.v1` in recent git commits. dario's template replay protects you because that git context never reaches `api.anthropic.com` β only dario's captured CC template does.
|
|
158
158
|
|
|
159
|
-
**Why this needs constant maintenance.** The
|
|
159
|
+
**Why this needs constant maintenance.** The billing split got a public announcement (then a pause); the wire-shape changes that arrive between releases never do. CC v2.1.142 ([changelog](https://code.claude.com/docs/en/changelog), 2026-05-14) itemized a Fast-mode tweak and some fixes β and said **nothing** about three wire-shape changes in the same release. That's the rule, not the exception; a running ledger of silent changes dario caught and shipped:
|
|
160
160
|
|
|
161
161
|
| Silent wire-shape change (no subscriber changelog) | Effect on subscribers | dario shipped |
|
|
162
162
|
|---|---|---|
|
|
@@ -196,11 +196,45 @@ The tool doesn't know. The backend doesn't know. dario is the seam.
|
|
|
196
196
|
|
|
197
197
|
---
|
|
198
198
|
|
|
199
|
+
## Multi-account pool
|
|
200
|
+
|
|
201
|
+
One Claude subscription has a ceiling. Hold more than one seat β a personal Max and a work Max, a couple of Pro plans, team seats β and pool mode puts them all behind the same `localhost:3456`, routing every request to whichever seat has the most headroom left, live, per request. Drop accounts in and it auto-activates; a single `dario accounts add` bootstraps a servable proxy with no `dario login` step:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
dario accounts add work
|
|
205
|
+
dario accounts add personal
|
|
206
|
+
dario proxy
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Three things it does that a round-robin doesn't:
|
|
210
|
+
|
|
211
|
+
- **Per-model headroom routing.** Anthropic meters each model family separately β a `5h` bucket, a `7d` bucket, and a per-model `7d_<family>` bucket. dario reads all of them off every response and routes each request by the bucket that actually governs it: an Opus call goes to the seat with Opus room, a Sonnet call to the seat with Sonnet room, independently. Plan tiers mix freely in one pool β dario cares about headroom, not tier.
|
|
212
|
+
- **Session stickiness.** Claude's prompt cache is scoped to `{account Γ cache key}`, so rotating a long conversation across seats on headroom alone re-pays cache-create every turn β a **5β10Γ token-cost multiplier** on the cached portion. dario pins each conversation to one account (hashed from its first message, deterministic) for the life of the session, and only rebinds when that account is exhausted.
|
|
213
|
+
- **In-flight 429 failover.** A seat hits its wall mid-request and dario retries the *same request* against the next-best account before your client ever sees an error. The conversation's sticky binding follows to the new seat, so the next turn doesn't re-select the cold one.
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
ββ dario βββββββββββββββββββββββββββββ[ q quit Β· Tab next Β· ? help ]βββ
|
|
217
|
+
β Status Config Analytics Hits βAccountsβ Backends β
|
|
218
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
219
|
+
β ACCOUNTS β 3 pooled Β· routing by headroom β
|
|
220
|
+
β β
|
|
221
|
+
β work Max 20x 5h βββββββ 12% 7d βββββββ 41% β next opus β
|
|
222
|
+
β personal Max 5x 5h βββββββ 78% 7d βββββββ 88% β
|
|
223
|
+
β side Pro 5h βββββββ 3% 7d βββββββ 9% β next sonnetβ
|
|
224
|
+
β β
|
|
225
|
+
β sticky bindings: 4 active Β· 429 failovers (1h): 2 β
|
|
226
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
`dario accounts {add,list,remove}` from any shell, or provision entirely over HTTP with the headless [admin API](#capabilities) β zero-console Docker / k8s / Pi installs included. Routing internals, back-fill semantics, and the live `/accounts` + `/analytics` inspection endpoints: [`docs/multi-account-pool.md`](./docs/multi-account-pool.md). The routing paths β per-model selection, sticky rebind, cascading 429 failover β are covered end-to-end by [`test/pool-e2e.mjs`](./test/pool-e2e.mjs).
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
199
233
|
## Overage guard
|
|
200
234
|
|
|
201
235
|
A subscriber should never see a single response billed outside their subscription pool during normal operation. One means something is wrong β wire-shape drift, a classifier change, an account misconfig β and continuing to forward requests in the same shape bleeds real money (accounts with extra-usage enabled) or returns a wall of rejections (accounts without it). The first hit is the signal; the second through hundredth are damage.
|
|
202
236
|
|
|
203
|
-
So the moment any upstream response bills to something other than your subscription pool β `representative-claim: overage`, `api`, or a new credit/SDK bucket like the one
|
|
237
|
+
So the moment any upstream response bills to something other than your subscription pool β `representative-claim: overage`, `api`, or a new credit/SDK bucket like the one a revived Agent-SDK split would introduce β dario **halts the proxy**. The check is an allow-list, not a match on `overage`: anything that isn't a known subscription claim (`five_hour`/`seven_day` and their fallbacks) and isn't the `unknown` no-header sentinel trips it, so a credit-bucket claim dario has never seen still halts. Every subsequent request returns `503` with an Anthropic-shaped error body the client surfaces verbatim, until you run `dario resume`, press `R` on the TUI, or the cooldown clears (default 30 min). The halt is visible across the TUI's Status, Hits, and Analytics tabs, fires a best-effort native OS notification, and emits named SSE events. (In upstream-API-key passthrough mode β set `ANTHROPIC_UPSTREAM_API_KEY` β the guard is off; `api` billing is the point there, not a failure.)
|
|
204
238
|
|
|
205
239
|
```
|
|
206
240
|
ββ dario βββββββββββββββββββββββββββββ[ q quit Β· Tab next Β· ? help ]βββ
|
|
@@ -221,10 +255,12 @@ Tune via `~/.dario/config.json` β `overageGuard`, or CLI flags: `--overage-beh
|
|
|
221
255
|
|
|
222
256
|
## Capabilities
|
|
223
257
|
|
|
224
|
-
- **Multi-account pool.**
|
|
258
|
+
- **Multi-account pool.** Pool several Claude seats behind one endpoint; requests route to the seat with the most headroom, per model family, with sticky-session cache locality and in-flight 429 failover. Full section: [Multi-account pool](#multi-account-pool) β [`docs/multi-account-pool.md`](./docs/multi-account-pool.md)
|
|
259
|
+
- **Byte-faithful passthrough for genuine Claude Code.** A real CC request already *is* the CC wire shape, so dario forwards it verbatim β system prompt, tools, thinking, and key order untouched β instead of rebuilding it from the template. It keeps only its billing tag, identity, and cache breakpoints. That removes the per-request template overhead for CC itself, and the detection covers CC's whole request family: the main loop, its Task/Agent sub-agents (general-purpose, Explore, Plan), and the auto-mode permission classifier. Non-CC clients still get the full template rebuild that keeps them routing. Background: [#678](https://github.com/askalf/dario/issues/678).
|
|
225
260
|
- **Headless admin API (`DARIO_ADMIN=1`).** Provision and manage pool accounts entirely over HTTP β start with zero accounts, `POST /admin/login/start`, paste the code back, and the account is routable the moment the `200` lands (live pool hot-reload, no restart). Token-gated even on loopback, audit-logged, rate-limited; `GET /admin/accounts` reports live per-account headroom. Built for Docker / k8s / Raspberry-Pi deployments where a console is the awkward part. β [`docs/admin-api.md`](./docs/admin-api.md)
|
|
226
261
|
- **Behavioral stealth (`--stealth`).** Static wire fidelity covers *what* the request looks like; `--stealth` adds *when* it arrives β response-length-correlated think time and 1.2β4.2s session-start latency, the inter-arrival pattern real interactive sessions have and agent loops don't. β [`docs/wire-fidelity.md`](./docs/wire-fidelity.md)
|
|
227
|
-
- **Runs any non-Claude-Code agent.** A 64-entry schema-verified `TOOL_MAP` pre-maps Cline, Roo, Kilo, Cursor, Windsurf, Continue, Copilot, OpenHands, OpenClaw, Hermes, [hands](https://github.com/askalf/hands) tool names to CC's native set. No flag, no validator errors. MCP tools (`mcp__server__tool`) forward verbatim β the shape real CC uses for session-attached servers (v4.8.135).
|
|
262
|
+
- **Runs any non-Claude-Code agent.** A 64-entry schema-verified `TOOL_MAP` pre-maps Cline, Roo, Kilo, Cursor, Windsurf, Continue, Copilot, OpenHands, OpenClaw, Hermes, [hands](https://github.com/askalf/hands) tool names to CC's native set. No flag, no validator errors. MCP tools (`mcp__server__tool`) forward verbatim β the shape real CC uses for session-attached servers (v4.8.135). One-page status per tool: [compatibility matrix](./docs/integrations/compat-matrix.md); setup + full walkthroughs: [`agent-compat.md`](./docs/integrations/agent-compat.md), [OpenHands](./docs/integrations/openhands-walkthrough.md) Β· [OpenClaw](./docs/integrations/openclaw-walkthrough.md) Β· [hands](./docs/integrations/hands-walkthrough.md).
|
|
263
|
+
- **VPN / egress routing.** Route dario's upstream traffic β `api.anthropic.com`, OAuth flows, backend forwarding β through a VPN without putting the whole host on one, from a zero-config system tunnel to per-process egress. β [`docs/vpn-routing.md`](./docs/vpn-routing.md)
|
|
228
264
|
- **Recover output capability.** `dario proxy --system-prompt=partial` strips CC's tone/verbosity/no-comments constraints for 1.2β2.8Γ more output on open-ended work β empirically without flipping billing (the classifier doesn't read that slot). [Discussion #183](https://github.com/askalf/dario/discussions/183) has the per-prompt receipts. β [`docs/system-prompt.md`](./docs/system-prompt.md)
|
|
229
265
|
- **Honor client thinking (`--honor-client-thinking`).** By default dario rebuilds the outbound request with CC's interactive thinking shape regardless of what the client sent. Pass this flag (or `DARIO_HONOR_CLIENT_THINKING=1`) to pass a non-CC client's own `thinking` block through unchanged. Off by default; the rebuild-to-CC path is what keeps the subscription pool routing.
|
|
230
266
|
- **Preserve structured output (`--preserve-output-format`).** By default dario rebuilds `output_config` from CC's template (effort only), dropping a client's `output_config.format` JSON schema, so structured-output clients get unconstrained prose their strict parser rejects. Pass this flag (or `DARIO_PRESERVE_OUTPUT_FORMAT=1`) to carry the client's schema through unchanged β SDK clients like the Vercel AI SDK's `generateObject` then get schema-constrained output. Off by default; empirically without flipping billing (verified `five_hour` on `claude-sonnet-4-6`).
|
|
@@ -257,7 +293,7 @@ cd $(npm root -g)/@askalf/dario && npm ls --production
|
|
|
257
293
|
|
|
258
294
|
## Project status β stable surface, automated defense
|
|
259
295
|
|
|
260
|
-
dario's surface is feature-complete and stable: the proxy, the TUI, the multi-account pool, the overage guard, the
|
|
296
|
+
dario's surface is feature-complete and stable: the proxy, the TUI, the multi-account pool, the overage guard, the billing-split tripwire. What *isn't* stable is the thing it defends against. Anthropic ships wire-shape and classifier changes with no subscriber changelog, on no schedule β so the part of dario that runs unattended is the part that keeps your subscription routing the day they do, and it runs every day.
|
|
261
297
|
|
|
262
298
|
That defense is live: [three drift watchers](#how-it-works-and-how-it-stays-working) (npm-release hourly, remote-config every 30 min, classifier-rule daily β cron schedules; GitHub coalesces scheduled runs, so effective intervals run longer), a PR-time compat gate that runs the full suite against a live proxy before any wire-shape change merges, a liveness alarm if a watcher goes quiet, a daily NPM_TOKEN health check, and an auto-release pipeline that ships a fix within hours of a CC release. When Anthropic moves, the watchers catch it within a release cycle, the bot opens the PR, the maintainer reviews and merges β the receipt log above is that machinery doing its job. Residual manual cases β OAuth rotation, runner re-registration, ghcr backfill β live in the [recovery runbook](./docs/recovery.md).
|
|
263
299
|
|
|
@@ -298,8 +334,11 @@ Yes. Skip `dario login`, run `dario backend add openai --key=β¦`, and you have
|
|
|
298
334
|
**`representative-claim: seven_day` in my headers β am I downgraded?**
|
|
299
335
|
No. `five_hour` and `seven_day` are both subscription billing β different accounting buckets, same mode. `overage` is the one that flips you to per-token. [Discussion #1](https://github.com/askalf/dario/discussions/1).
|
|
300
336
|
|
|
301
|
-
**Will the
|
|
302
|
-
|
|
337
|
+
**Will the billing split break my setup? / What if Anthropic ships another silent change?**
|
|
338
|
+
The split was announced, then paused before it took effect β today nothing changed, and your traffic still bills subscription. If it returns (Anthropic promised advance notice) or if Anthropic ships another silent wire change, it's caught automatically β see [The billing split](#the-billing-split) 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.
|
|
339
|
+
|
|
340
|
+
**Used dario before and bounced off a drift / capacity / tool-compat wall?**
|
|
341
|
+
The 5-minute path back β what changed, what's automated now, and the one command to re-verify β is in [`docs/returning.md`](./docs/returning.md).
|
|
303
342
|
|
|
304
343
|
Full FAQ: [`docs/faq.md`](./docs/faq.md)
|
|
305
344
|
|
package/dist/cc-template.js
CHANGED
|
@@ -1353,14 +1353,26 @@ export function dedupeToolsByName(tools) {
|
|
|
1353
1353
|
* same anti-replay posture as the main-loop marker: none of them appear at
|
|
1354
1354
|
* system[1] in any known non-CC framework's wire shape.
|
|
1355
1355
|
*
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1358
|
-
*
|
|
1359
|
-
*
|
|
1356
|
+
* The built-in named agents (Explore, Plan) carry their own specialist
|
|
1357
|
+
* prompts β neither opens with the main-loop or general-purpose markers, so
|
|
1358
|
+
* they missed the v4.8.148 detector and stayed on the template path. That
|
|
1359
|
+
* was the #678 reporter's residual: on v4.8.148, forced parallel sub-agents
|
|
1360
|
+
* (a "read every file" prompt CC routes to Explore-type agents) still burned
|
|
1361
|
+
* ~3x the direct per-spawn cost. Openers are the exact bytes from the CC
|
|
1362
|
+
* v2.1.205 bundle; the drift-watch pipeline is the guard when they move.
|
|
1363
|
+
*
|
|
1364
|
+
* Known gap: CUSTOM agents (~/.claude/agents) put operator-authored
|
|
1365
|
+
* definition text at system[1] with no stable CC marker β those still ride
|
|
1366
|
+
* the template path. There is no universal appended sentinel to key on (the
|
|
1367
|
+
* report-instruction sentence is baked into the general-purpose prompt only),
|
|
1368
|
+
* so a durable structural discriminator (e.g. billing block + claude-cli
|
|
1369
|
+
* user-agent) is a design decision for a follow-up.
|
|
1360
1370
|
*/
|
|
1361
1371
|
const CC_ORIGIN_SYSTEM_OPENERS = [
|
|
1362
1372
|
'You are Claude Code', // main loop, cli entrypoint
|
|
1363
|
-
'You are an agent for Claude Code', // sub-
|
|
1373
|
+
'You are an agent for Claude Code', // general-purpose sub-agent (Task/Agent tool)
|
|
1374
|
+
'You are a file search specialist for Claude Code', // built-in Explore agent (exact bytes, CC v2.1.205 bundle)
|
|
1375
|
+
'You are a software architect and planning specialist for Claude Code', // built-in Plan agent (exact bytes, CC v2.1.205 bundle)
|
|
1364
1376
|
'You are a security monitor for autonomous AI coding agents', // auto-mode permission classifier
|
|
1365
1377
|
];
|
|
1366
1378
|
export function isGenuineCCClient(clientBody) {
|
|
@@ -282,7 +282,7 @@ export declare function _resetInstalledVersionProbeForTest(): void;
|
|
|
282
282
|
*/
|
|
283
283
|
export declare const SUPPORTED_CC_RANGE: {
|
|
284
284
|
readonly min: "1.0.0";
|
|
285
|
-
readonly maxTested: "2.1.
|
|
285
|
+
readonly maxTested: "2.1.206";
|
|
286
286
|
};
|
|
287
287
|
/**
|
|
288
288
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/dist/live-fingerprint.js
CHANGED
|
@@ -806,7 +806,7 @@ export function _resetInstalledVersionProbeForTest() {
|
|
|
806
806
|
*/
|
|
807
807
|
export const SUPPORTED_CC_RANGE = {
|
|
808
808
|
min: '1.0.0',
|
|
809
|
-
maxTested: '2.1.
|
|
809
|
+
maxTested: '2.1.206',
|
|
810
810
|
};
|
|
811
811
|
/**
|
|
812
812
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.151",
|
|
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": {
|