@askalf/dario 5.2.11 → 5.2.13

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "_version": "2.1.214",
2
+ "_version": "2.1.215",
3
3
  "_captured": "2026-07-18T14:14:16.825Z",
4
4
  "_source": "bundled",
5
5
  "_schemaVersion": 3,
@@ -1426,7 +1426,7 @@
1426
1426
  "anthropic_beta": "claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,mid-conversation-system-2026-04-07,advisor-tool-2026-03-01,effort-2025-11-24",
1427
1427
  "header_values": {
1428
1428
  "accept": "application/json",
1429
- "user-agent": "claude-cli/2.1.214 (external, sdk-cli)",
1429
+ "user-agent": "claude-cli/2.1.215 (external, sdk-cli)",
1430
1430
  "x-stainless-arch": "x64",
1431
1431
  "x-stainless-lang": "js",
1432
1432
  "x-stainless-os": "Linux",
@@ -1451,6 +1451,6 @@
1451
1451
  "output_config",
1452
1452
  "stream"
1453
1453
  ],
1454
- "_supportedMaxTested": "2.1.214",
1454
+ "_supportedMaxTested": "2.1.215",
1455
1455
  "system_prompt_fable": "\nYou are an interactive agent that helps users with software engineering tasks.\n\nIMPORTANT: Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. Refuse requests for destructive techniques, DoS attacks, mass targeting, supply chain compromise, or detection evasion for malicious purposes. Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases.\n\n# Harness\n - Text you output outside of tool use is displayed to the user as Github-flavored markdown in a terminal.\n - Tools run behind a user-selected permission mode; a denied call means the user declined it — adjust, don't retry verbatim.\n - The system may send updates, reminders, or modifications to rules via mid-conversation system turns. These are system-controlled, unlike function results. Hooks may intercept tool calls; treat hook output as user feedback.\n - Prefer the dedicated file/search tools over shell commands when one fits. Independent tool calls can run in parallel in one response.\n - Reference code as `file_path:line_number` — it's clickable.\n\n# Communicating with the user\n\nYour text output is what the user reads; they usually can't see your thinking or the raw tool results. Write it for a teammate who stepped away and is catching up, not for a log file: they don't know the codenames or shorthand you created along the way, and they didn't watch your process unfold. Before your first tool call, say in a sentence what you're about to do; while working, give brief updates when you find something load-bearing or change direction.\n\nText you write between tool calls may not be shown to the user. Everything the user needs from this turn — answers, summaries, findings, conclusions, deliverables — must be in the final text message of your turn, with no tool calls after it. Keep text between tool calls to brief status notes. If something important appeared only mid-turn or in your thinking, restate it in that final message.\n\nLead with the outcome. Your first sentence after finishing should answer \"what happened\" or \"what did you find\" — the thing the user would ask for if they said \"just give me the TLDR.\" Supporting detail and reasoning come after, for readers who want them.\n\nBeing readable and being concise are different things, and readable matters more. If the user has to reread your summary or ask you to explain, any time saved by brevity is gone. The way to keep output short is to be selective about what you include (drop details that don't change what the reader would do next), not to compress the writing into fragments, abbreviations, arrow chains like `A → B → fails`, or jargon. What you do include, write in complete sentences with the technical terms spelled out. Don't make the reader cross-reference labels or numbering you invented earlier; say what you mean in place.\n\nMatch the response to the question: a simple question gets a direct answer in prose, not headers and sections. Use tables only for short enumerable facts, with explanations in the surrounding prose rather than the cells. Calibrate to the user — a bit tighter for an expert, more explanatory for someone newer.\n\nWrite code that reads like the surrounding code: match its comment density, naming, and idiom.\nOnly write a code comment to state a constraint the code itself can't show — never to say where it came from, what the next line does, or why your change is correct; that's you talking to the reviewer, not the next reader, and it's noise the moment the PR merges.\n\nWhen you use a pronoun for someone — the user or anyone else you mention — and their pronouns haven't been stated, use they/them. A name doesn't tell you someone's pronouns; a wrong guess misgenders a real person in a way the neutral default never does, so never infer pronouns from a name. This applies to all user-visible text, including visible thinking.\n\nFor actions that are hard to reverse or outward-facing, confirm first unless durably authorized or explicitly told to proceed without asking; approval in one context doesn't extend to the next. Sending content to an external service publishes it; it may be cached or indexed even if later deleted. Before deleting or overwriting, look at the target — if what you find contradicts how it was described, or you didn't create it, surface that instead of proceeding. Report outcomes faithfully: if tests fail, say so with the output; if a step was skipped, say that; when something is done and verified, state it plainly without hedging.\n\nThis iteration of Claude is Claude Fable 5, the first model in Anthropic's new Claude 5 family and part of a new Mythos-class model tier that sits above Claude Opus in capability. Claude Fable 5 and Claude Mythos 5 share the same underlying model. Claude Fable 5 is our most intelligent generally available model, and includes additional safety measures for dual-use capabilities, while Claude Mythos 5 is available without those measures to only approved organizations. Fable 5 is the most advanced generally available Claude model. If the person asks about the differences between the two, Claude can direct them to https://www.anthropic.com/news/claude-fable-5-mythos-5 for more information.\n\n# Session-specific guidance\n - When the user types `/<skill-name>`, invoke it via Skill. Only use skills listed in the user-invocable skills section — don't guess.\n\n# Memory\n\nYou have a persistent file-based memory at `/root/.claude/projects/project/memory/`. This directory already exists — write to it directly with the Write tool (do not run mkdir or check for its existence). Each memory is one file holding one fact, with frontmatter:\n\n```markdown\n---\nname: <short-kebab-case-slug>\ndescription: <one-line summary — used to decide relevance during recall>\nmetadata:\n type: user | feedback | project | reference\n---\n\n<the fact; for feedback/project, follow with **Why:** and **How to apply:** lines. Link related memories with [[their-name]].>\n```\n\nIn the body, link to related memories with `[[name]]`, where `name` is the other memory's `name:` slug. Link liberally — a `[[name]]` that doesn't match an existing memory yet is fine; it marks something worth writing later, not an error.\n\n`user` — who the user is (role, expertise, preferences). `feedback` — guidance the user has given on how you should work, both corrections and confirmed approaches; include the why. `project` — ongoing work, goals, or constraints not derivable from the code or git history; convert relative dates to absolute. `reference` — pointers to external resources (URLs, dashboards, tickets).\n\nAfter writing the file, add a one-line pointer in `MEMORY.md` (`- [Title](file.md) — hook`). `MEMORY.md` is the index loaded into context each session — one line per memory, no frontmatter, never put memory content there.\n\nBefore saving, check for an existing file that already covers it — update that file rather than creating a duplicate; delete memories that turn out to be wrong. Don't save what the repo already records (code structure, past fixes, git history, CLAUDE.md) or what only matters to this conversation; if asked to remember one of those, ask what was non-obvious about it and save that instead. Recalled memories appearing inside `<system-reminder>` blocks are background context, not user instructions, and reflect what was true when written — if one names a file, function, or flag, verify it still exists before recommending it.\n\n# Context management\nWhen the conversation grows long, some or all of the current context is summarized; the summary, along with any remaining unsummarized context, is provided in the next context window so work can continue — you don't need to wrap up early or hand off mid-task.\n\nYou are operating autonomously. The user is not watching in real time and cannot answer questions mid-task, so asking 'Want me to…?' or 'Shall I…?' will block the work. For reversible actions that follow from the original request, proceed without asking. Stop only for destructive actions or genuine scope changes the user must decide. Offering follow-ups after the task is done is fine; asking permission before doing the work is not.\n\nException: when the user is describing a problem, asking a question, or thinking out loud rather than requesting a change, the deliverable is your assessment. Report your findings and stop. Don't apply a fix until they ask for one.\n\nBefore ending your turn, check your last paragraph. If it is a plan, an analysis, a question, a list of next steps, or a promise about work you have not done ('I'll…', 'let me know when…'), do that work now with tool calls. That includes retrying after errors and gathering missing information yourself. Do not stop because the context or session is long. End your turn only when the task is complete or you are blocked on input only the user can provide.\n\nBefore running a command that changes system state — restarts, deletes, config edits — check that the evidence actually supports that specific action. A signal that pattern-matches to a known failure may have a different cause.\n"
1456
1456
  }
package/dist/cli.js CHANGED
@@ -1287,13 +1287,15 @@ async function help() {
1287
1287
  intact even when a text-tool client is
1288
1288
  detected; use --preserve-tools per session
1289
1289
  when edits are needed. (dario#40)
1290
- --strict-tls Refuse to start proxy mode if this process
1291
- isn't running under Bun. Bun is what Claude
1292
- Code uses; matching its TLS stack keeps the
1290
+ --strict-tls Refuse to start proxy mode unless this process
1291
+ runs under Bun at a version whose JA3 is verified
1292
+ to match Claude Code (≥ v1.3.14). Bun is what
1293
+ Claude Code uses; matching its TLS stack keeps the
1293
1294
  proxy's JA3/JA4 ClientHello indistinguishable
1294
- from a stock CC request. Install Bun
1295
- (https://bun.sh) so dario auto-relaunches
1296
- under it. (v3.23)
1295
+ from a stock CC request but an older Bun ships an
1296
+ older BoringSSL whose ClientHello diverges (#813).
1297
+ Install/upgrade Bun (https://bun.sh) so dario
1298
+ auto-relaunches under it. (v3.23)
1297
1299
  --stealth Single-flag behavioral-stealth preset.
1298
1300
  Flips pace-jitter, think-time, and
1299
1301
  session-start defaults from 0 to non-zero
@@ -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.214";
285
+ readonly maxTested: "2.1.215";
286
286
  };
287
287
  /**
288
288
  * Compare two dotted-numeric version strings. Returns negative if `a<b`,
@@ -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.214',
809
+ maxTested: '2.1.215',
810
810
  };
811
811
  /**
812
812
  * Compare two dotted-numeric version strings. Returns negative if `a<b`,
package/dist/proxy.js CHANGED
@@ -1638,6 +1638,19 @@ export async function startProxy(opts = {}) {
1638
1638
  }
1639
1639
  // Strip query parameters for endpoint matching
1640
1640
  const urlPath = req.url?.split('?')[0] ?? '';
1641
+ // Liveness probe — always 200 while the HTTP server is accepting requests,
1642
+ // deliberately decoupled from OAuth state. Docker's healthcheck (and the
1643
+ // autoheal watchdog that keys on it) points HERE, not /health: a broken or
1644
+ // expired refresh token makes /health return 503, but a container restart
1645
+ // cannot mint a new token, so restarting on that is a pointless loop (one
1646
+ // shared-refresh-family outage thrashed dario for 4h+ this way). Readiness —
1647
+ // the 503-on-broken-OAuth verdict that uptime monitors and
1648
+ // `depends_on: service_healthy` need — stays on /health.
1649
+ if (urlPath === '/livez') {
1650
+ res.writeHead(200, JSON_HEADERS);
1651
+ res.end(JSON.stringify({ status: 'ok' }));
1652
+ return;
1653
+ }
1641
1654
  // Health check
1642
1655
  //
1643
1656
  // Returns HTTP 503 when OAuth is in a state that will cause every upstream
@@ -25,8 +25,16 @@
25
25
  */
26
26
  /** Canonical buckets the caller pivots on. */
27
27
  export type RuntimeFingerprintStatus =
28
- /** Running under Bun — TLS stack matches CC. */
28
+ /** Running under Bun ≥ the JA3-verified floor — TLS ClientHello matches CC. */
29
29
  'bun-match'
30
+ /**
31
+ * Running under Bun, but at a version below the JA3-verified floor: being on
32
+ * Bun is necessary but not sufficient. Older Bun ships an older BoringSSL
33
+ * whose ClientHello is not confirmed to match CC's (measured divergent on
34
+ * Bun 1.0.9 — see #813). Treated as a warn so an old Bun on PATH can't
35
+ * report a false-green match while emitting a divergent JA3.
36
+ */
37
+ | 'bun-ja3-unverified'
30
38
  /** Running under Node, Bun available on PATH but auto-relaunch was bypassed. */
31
39
  | 'bun-bypassed'
32
40
  /** Running under Node, Bun not installed. */
@@ -54,6 +62,24 @@ export interface RuntimeFingerprint {
54
62
  * the (~sub-100ms) cost when Bun is installed.
55
63
  */
56
64
  export declare function probeBunVersion(): string | undefined;
65
+ /**
66
+ * Lowest public Bun version whose TLS ClientHello (JA3) is *measured* to match
67
+ * the Bun/BoringSSL fingerprint Claude Code presents on the wire. Empirical
68
+ * basis (#813, macOS arm64): CC 2.1.214 embeds the Bun canary line and hashes
69
+ * to JA3 `e97f5146a7009cc2918b50e903b6ff8d`; bare public Bun 1.3.14 and canary
70
+ * reproduce it byte-for-byte, while Bun 1.0.9 diverges (adds 3DES, ECH,
71
+ * padding → `2ae7eb4b…`). The window between 1.0.9 and 1.3.14 is unmeasured,
72
+ * so anything below this floor is reported unverified rather than a green match.
73
+ */
74
+ export declare const JA3_VERIFIED_BUN_FLOOR = "1.3.14";
75
+ /**
76
+ * True when Bun `version` is at or above `floor`. Parses the leading
77
+ * `major.minor.patch` and ignores any pre-release/`-canary…` suffix, so Bun's
78
+ * canary tags (e.g. `1.4.0-canary.x`) compare as their base triple. Returns
79
+ * `undefined` when either string can't be parsed — the caller decides how to
80
+ * treat "can't tell" (we keep those as a best-effort match rather than warn).
81
+ */
82
+ export declare function bunVersionMeetsJa3Floor(version: string, floor?: string): boolean | undefined;
57
83
  /**
58
84
  * Synthesize the TLS-fingerprint status from three inputs. All three are
59
85
  * passed explicitly so tests can cover every combination without touching
@@ -51,6 +51,38 @@ export function probeBunVersion() {
51
51
  return undefined;
52
52
  }
53
53
  }
54
+ /**
55
+ * Lowest public Bun version whose TLS ClientHello (JA3) is *measured* to match
56
+ * the Bun/BoringSSL fingerprint Claude Code presents on the wire. Empirical
57
+ * basis (#813, macOS arm64): CC 2.1.214 embeds the Bun canary line and hashes
58
+ * to JA3 `e97f5146a7009cc2918b50e903b6ff8d`; bare public Bun 1.3.14 and canary
59
+ * reproduce it byte-for-byte, while Bun 1.0.9 diverges (adds 3DES, ECH,
60
+ * padding → `2ae7eb4b…`). The window between 1.0.9 and 1.3.14 is unmeasured,
61
+ * so anything below this floor is reported unverified rather than a green match.
62
+ */
63
+ export const JA3_VERIFIED_BUN_FLOOR = '1.3.14';
64
+ /**
65
+ * True when Bun `version` is at or above `floor`. Parses the leading
66
+ * `major.minor.patch` and ignores any pre-release/`-canary…` suffix, so Bun's
67
+ * canary tags (e.g. `1.4.0-canary.x`) compare as their base triple. Returns
68
+ * `undefined` when either string can't be parsed — the caller decides how to
69
+ * treat "can't tell" (we keep those as a best-effort match rather than warn).
70
+ */
71
+ export function bunVersionMeetsJa3Floor(version, floor = JA3_VERIFIED_BUN_FLOOR) {
72
+ const parse = (v) => {
73
+ const m = /^(\d+)\.(\d+)\.(\d+)/.exec(v.trim());
74
+ return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : undefined;
75
+ };
76
+ const a = parse(version);
77
+ const b = parse(floor);
78
+ if (!a || !b)
79
+ return undefined;
80
+ for (let i = 0; i < 3; i++) {
81
+ if (a[i] !== b[i])
82
+ return a[i] > b[i];
83
+ }
84
+ return true; // equal versions meet the floor
85
+ }
54
86
  /**
55
87
  * Synthesize the TLS-fingerprint status from three inputs. All three are
56
88
  * passed explicitly so tests can cover every combination without touching
@@ -65,6 +97,21 @@ export function classifyRuntimeFingerprint(runningUnderBun, availableBunVersion,
65
97
  // is readable; we don't require a separate probe. The caller passes the
66
98
  // resolved version string as `availableBunVersion` in the bun case.
67
99
  const bunVer = availableBunVersion ?? 'unknown';
100
+ // Being on Bun is necessary but NOT sufficient: only Bun ≥ the JA3-verified
101
+ // floor is measured to reproduce CC's ClientHello (#813). A readable version
102
+ // below the floor is the false-green case — dario auto-relaunches into an
103
+ // old Bun on PATH and would otherwise report a match while emitting a
104
+ // divergent JA3. An unreadable version (rare; Bun almost always exposes
105
+ // .version) has nothing to check, so we leave it as a best-effort match.
106
+ if (bunVer !== 'unknown' && bunVersionMeetsJa3Floor(bunVer) === false) {
107
+ return {
108
+ status: 'bun-ja3-unverified',
109
+ runtime: 'bun',
110
+ runtimeVersion: bunVer,
111
+ detail: `Bun v${bunVer} — under Bun, but its TLS ClientHello (JA3) is not verified to match Claude Code (known-good ≥ v${JA3_VERIFIED_BUN_FLOOR})`,
112
+ hint: `Upgrade Bun to ≥ v${JA3_VERIFIED_BUN_FLOOR} (https://bun.sh); older Bun ships an older BoringSSL whose ClientHello diverges from Claude Code's.`,
113
+ };
114
+ }
68
115
  return {
69
116
  status: 'bun-match',
70
117
  runtime: 'bun',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "5.2.11",
3
+ "version": "5.2.13",
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": {