@askalf/dario 4.8.18 → 4.8.20

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
@@ -12,7 +12,7 @@
12
12
  <a href="https://x.com/ask_alf"><img src="https://img.shields.io/badge/follow-@ask_alf-1da1f2?style=flat-square" alt="Follow on X"></a>
13
13
  </p>
14
14
 
15
- <p align="center"><em>Zero runtime dependencies · <a href="https://www.npmjs.com/package/@askalf/dario">SLSA-attested</a> every release · nothing phones home · ~18.5k lines you can read in a weekend · independent, unofficial, third-party (<a href="DISCLAIMER.md">DISCLAIMER.md</a>)</em></p>
15
+ <p align="center"><em>Zero runtime dependencies · <a href="https://www.npmjs.com/package/@askalf/dario">SLSA-attested</a> every release · nothing phones home · ~18.8k lines you can read in a weekend · independent, unofficial, third-party (<a href="DISCLAIMER.md">DISCLAIMER.md</a>)</em></p>
16
16
 
17
17
  ---
18
18
 
@@ -67,7 +67,7 @@ Type `dario` with no args (in another terminal) to open a full-screen control pa
67
67
  │ Tokens out: 38,200 Subscription %: 98% │
68
68
  │ │
69
69
  │ Per-model: │
70
- │ opus-4-7 ████████████████████░ 72% (178 req) │
70
+ │ opus-4-8 ████████████████████░ 72% (178 req) │
71
71
  │ sonnet-4-6 █████░░░░░░░░░░░░░░░░ 22% ( 54 req) │
72
72
  │ haiku-4-5 █░░░░░░░░░░░░░░░░░░░░ 6% ( 15 req) │
73
73
  │ │
@@ -123,9 +123,11 @@ Two layers, separated:
123
123
  1. **Tiered pricing is fine.** Anthropic can charge differently for first-party use vs. third-party use. Every SaaS does this.
124
124
  2. **Hiding the tier from the customer is not.** When the public docs say "1M context available on Sonnet/Opus" but the auth layer rejects every attempt to access it on the OAuth path most subscribers use — when the billing classifier silently flips your request to overage without saying which signal triggered it — that's information asymmetry weaponized into product design.
125
125
 
126
- OpenAI does this cleanly: ChatGPT Plus is a chat product, the API is a separate metered product, you choose. Anthropic uses one URL and a hidden classifier. **dario's job is to make the classifier visible.**
126
+ Both vendors sell the same two products: a flat-rate subscription and a metered API. OpenAI keeps them physically separate — ChatGPT Plus is chat-only with no API surface; the API is a different product with its own key; you pick one. Anthropic separates them too, but its **subscription** is reached through the *same API-shaped interface* Claude Code uses, and which bucket a request bills to — subscription vs. metered overage is decided by an **undocumented classifier** reading signals in the request, not by you choosing a product.
127
127
 
128
- We don't bypass auth. We don't fake who you are. We replay the exact wire shape Claude Code emits captured live from your installed binary so the classifier sees what it expects. That's a transparency tool, not a circumvention tool. Your subscription is doing what your subscription does; you're authenticating as you.
128
+ dario makes that classifier's inputs explicit. Your identity and auth are real and untouched: it uses your own subscription credentials, impersonates no user, breaks no login. What it changes is the **client** fingerprint — it rebuilds each request into the exact wire shape Claude Code emits (captured live from your installed binary) so the classifier routes it to the subscription pool no matter which tool actually sent it.
129
+
130
+ Be clear-eyed about what that is. It's a transparency tool in one real sense — it documents and exposes a classifier Anthropic keeps hidden. It's also, plainly, routing through your subscription traffic that Anthropic's gate is built to meter. Both are true. dario is unofficial and unaffiliated ([DISCLAIMER.md](./DISCLAIMER.md)) — decide with both in view.
129
131
 
130
132
  ---
131
133
 
@@ -195,7 +197,7 @@ So the moment any upstream response carries `representative-claim: overage`, dar
195
197
  ├─────────────────────────────────────────────────────────────────────┤
196
198
  │ Overage-guard │
197
199
  │ ⚠ HALTED overage detected 12s ago │
198
- │ Request: claude-opus-4-7 account=work │
200
+ │ Request: claude-opus-4-8 account=work │
199
201
  │ Cause: representative-claim = overage │
200
202
  │ Auto-resume in 29m 48s │
201
203
  │ Manual resume press R here, or `dario resume` from any shell │
@@ -222,7 +224,7 @@ Tune via `~/.dario/config.json` → `overageGuard`, or CLI flags: `--overage-beh
222
224
 
223
225
  | Signal | Status |
224
226
  |---|---|
225
- | Source | **~18.5k** lines of TypeScript across **44** files — auditable in a weekend |
227
+ | Source | **~18.8k** lines of TypeScript across **44** files — auditable in a weekend |
226
228
  | Dependencies | **0 runtime.** Verify: `npm ls --production` |
227
229
  | Provenance | Every release [SLSA-attested](https://www.npmjs.com/package/@askalf/dario) via GitHub Actions + Sigstore |
228
230
  | Scanning | [CodeQL](https://github.com/askalf/dario/actions/workflows/codeql.yml) on every push and weekly |
@@ -240,11 +242,13 @@ cd $(npm root -g)/@askalf/dario && npm ls --production
240
242
 
241
243
  ---
242
244
 
243
- ## Project status — maintenance mode
245
+ ## Project status — stable surface, automated defense
246
+
247
+ dario's surface is feature-complete and stable: the proxy, the TUI, the multi-account pool, the overage guard, the 2026-06-15 cliff protection. 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.
244
248
 
245
- As of **2026-05-19**, dario is in maintenance mode. New feature work has stopped; what runs unattended is the part that keeps your subscription routing intact — the [three drift watchers](#how-it-works-and-how-it-stays-working), the PR-time compat gate, the auto-release pipeline (with an idempotency gate that backfills any registry that lagged), the daily NPM_TOKEN health monitor, and the billing-classifier canary. Residual manual cases — OAuth credential rotation, runner re-registration, ghcr backfill — are in the [recovery runbook](./docs/recovery.md).
249
+ 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), 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 median-ships a fix under an hour after 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).
246
250
 
247
- The proxy, TUI, multi-account pool, overage guard, and 2026-06-15 cliff protection are all stable surface. If Anthropic ships something new, the watchers + compat suite catch it within a release cycle and the maintainer reviews the bot-PR. Feature velocity moved to the [askalf platform](https://askalf.org) — a self-hosted AI workforce that uses dario as its LLM substrate.
251
+ New *product* work happens on the [askalf platform](https://askalf.org), a self-hosted AI workforce built on dario. dario itself doesn't need new features it has one job, and keeping the truth about a moving target current is a job that never stops.
248
252
 
249
253
  ---
250
254
 
@@ -272,11 +272,16 @@ export declare const VALID_EFFORT_VALUES: ReadonlyArray<EffortValue>;
272
272
  * - mid-May 2026: effort = 'high' (dario#87 pinned to match)
273
273
  * - May 17 2026, CC 2.1.143: effort = 'xhigh' (verified by capture-full-body.mjs)
274
274
  *
275
- * undefined → 'xhigh' (current CC wire default)
275
+ * undefined → 'max' (highest *universally*-supported level. CC's own wire
276
+ * default is 'xhigh', but that's Opus-only — Sonnet/Haiku-class
277
+ * 400 on 'xhigh' ("supported: high|low|max|medium"). 'max' is
278
+ * accepted by all and still routes to the subscription pool
279
+ * (verified: representative-claim=five_hour on Opus + Sonnet).
280
+ * Set --effort=xhigh / DARIO_EFFORT=xhigh for Opus's extra tier.)
276
281
  * 'low' / 'medium' / 'high' / 'xhigh' / 'max' → pin to that value
277
282
  * 'ultracode' → 'xhigh' (CC's ultracode mode; xhigh on the wire)
278
283
  * 'client' → extract from `clientBody.output_config.effort` (normalized
279
- * for the wire); fall back to 'xhigh' if absent/non-string
284
+ * for the wire); fall back to 'max' if absent/non-string
280
285
  *
281
286
  * Exported for tests.
282
287
  */
@@ -910,23 +910,28 @@ function normalizeEffortForWire(effort) {
910
910
  * - mid-May 2026: effort = 'high' (dario#87 pinned to match)
911
911
  * - May 17 2026, CC 2.1.143: effort = 'xhigh' (verified by capture-full-body.mjs)
912
912
  *
913
- * undefined → 'xhigh' (current CC wire default)
913
+ * undefined → 'max' (highest *universally*-supported level. CC's own wire
914
+ * default is 'xhigh', but that's Opus-only — Sonnet/Haiku-class
915
+ * 400 on 'xhigh' ("supported: high|low|max|medium"). 'max' is
916
+ * accepted by all and still routes to the subscription pool
917
+ * (verified: representative-claim=five_hour on Opus + Sonnet).
918
+ * Set --effort=xhigh / DARIO_EFFORT=xhigh for Opus's extra tier.)
914
919
  * 'low' / 'medium' / 'high' / 'xhigh' / 'max' → pin to that value
915
920
  * 'ultracode' → 'xhigh' (CC's ultracode mode; xhigh on the wire)
916
921
  * 'client' → extract from `clientBody.output_config.effort` (normalized
917
- * for the wire); fall back to 'xhigh' if absent/non-string
922
+ * for the wire); fall back to 'max' if absent/non-string
918
923
  *
919
924
  * Exported for tests.
920
925
  */
921
926
  export function resolveEffort(flag, clientBody) {
922
927
  if (flag === undefined)
923
- return 'xhigh';
928
+ return 'max';
924
929
  if (flag === 'client') {
925
930
  const clientOC = clientBody.output_config;
926
931
  const clientEffort = clientOC?.effort;
927
932
  if (typeof clientEffort === 'string' && clientEffort.length > 0)
928
933
  return normalizeEffortForWire(clientEffort);
929
- return 'xhigh';
934
+ return 'max';
930
935
  }
931
936
  return normalizeEffortForWire(flag);
932
937
  }
@@ -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.157";
285
+ readonly maxTested: "2.1.158";
286
286
  };
287
287
  /**
288
288
  * Compare two dotted-numeric version strings. Returns negative if `a<b`,
@@ -786,7 +786,7 @@ export function _resetInstalledVersionProbeForTest() {
786
786
  */
787
787
  export const SUPPORTED_CC_RANGE = {
788
788
  min: '1.0.0',
789
- maxTested: '2.1.157',
789
+ maxTested: '2.1.158',
790
790
  };
791
791
  /**
792
792
  * 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.18",
3
+ "version": "4.8.20",
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": {