@askalf/dario 4.8.19 → 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
@@ -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
 
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "4.8.19",
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": {