@askalf/dario 4.8.91 → 4.8.93

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
@@ -374,7 +374,6 @@ dario is the routing layer of **[Own Your Stack](https://github.com/askalf)**
374
374
 
375
375
  - **[dario](https://github.com/askalf/dario)** — own your routing _(you are here)_
376
376
  - **[hybrid](https://github.com/askalf/hybrid)** — own your inference
377
- - **[deja](https://github.com/askalf/deja)** — own your LLM cache
378
377
  - **[deepdive](https://github.com/askalf/deepdive)** — own your research
379
378
  - **[hands](https://github.com/askalf/hands)** — own your computer-use
380
379
  - **[agent](https://github.com/askalf/agent)** — own your fleet
@@ -1,6 +1,6 @@
1
1
  {
2
- "_version": "2.1.186",
3
- "_captured": "2026-06-23T05:37:45.965Z",
2
+ "_version": "2.1.187",
3
+ "_captured": "2026-06-24T06:27:30.671Z",
4
4
  "_source": "bundled",
5
5
  "_schemaVersion": 3,
6
6
  "agent_identity": "You are a Claude agent, built on Anthropic's Claude Agent SDK.",
@@ -1269,16 +1269,13 @@
1269
1269
  ],
1270
1270
  "tool_names": [
1271
1271
  "Agent",
1272
- "AskUserQuestion",
1273
1272
  "Bash",
1274
1273
  "CronCreate",
1275
1274
  "CronDelete",
1276
1275
  "CronList",
1277
1276
  "DesignSync",
1278
1277
  "Edit",
1279
- "EnterPlanMode",
1280
1278
  "EnterWorktree",
1281
- "ExitPlanMode",
1282
1279
  "ExitWorktree",
1283
1280
  "Monitor",
1284
1281
  "NotebookEdit",
@@ -1324,7 +1321,7 @@
1324
1321
  "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",
1325
1322
  "header_values": {
1326
1323
  "accept": "application/json",
1327
- "user-agent": "claude-cli/2.1.186 (external, sdk-cli)",
1324
+ "user-agent": "claude-cli/2.1.187 (external, sdk-cli)",
1328
1325
  "x-stainless-arch": "x64",
1329
1326
  "x-stainless-lang": "js",
1330
1327
  "x-stainless-os": "Linux",
@@ -1349,5 +1346,5 @@
1349
1346
  "output_config",
1350
1347
  "stream"
1351
1348
  ],
1352
- "_supportedMaxTested": "2.1.186"
1349
+ "_supportedMaxTested": "2.1.187"
1353
1350
  }
@@ -33,6 +33,23 @@ export declare const PLATFORM_ONLY_TOOLS: Record<string, Set<string>>;
33
33
  export declare function filterToolsForPlatform<T extends {
34
34
  name: string;
35
35
  }>(tools: T[], platform: string): T[];
36
+ /**
37
+ * Tools CC only advertises in an INTERACTIVE session. The bake captures CC
38
+ * headlessly (`claude --print -p hi`, see live-fingerprint.ts), and CC v2.1.187
39
+ * dropped these plan-mode / clarification tools in `--print` mode — so a fresh
40
+ * headless capture no longer carries them even though every real interactive CC
41
+ * client still advertises them. Like PLATFORM_ONLY_TOOLS, the bundled template
42
+ * must stay a SUPERSET: register them here so a headless auto-rebake preserves
43
+ * them from the previous bundle instead of dropping them. Dropping them broke
44
+ * buildCCRequest's advertise-respects-client contract (the v4.8.93 regression):
45
+ * dario advertises only the intersection of the client's declared tools and this
46
+ * template, so a missing AskUserQuestion meant dario could not advertise it even
47
+ * when a full CC client declared it. Unlike PLATFORM_ONLY_TOOLS these are NOT
48
+ * platform-filtered — they stay in CC_TOOL_DEFINITIONS on every host so a client
49
+ * that declares them is always honored. Add new interactive-only tools here as
50
+ * CC adds them.
51
+ */
52
+ export declare const INTERACTIVE_ONLY_TOOLS: Set<string>;
36
53
  /** CC's exact tool definitions for the current platform — filtered from the bundled union. */
37
54
  export declare const CC_TOOL_DEFINITIONS: {
38
55
  name: string;
@@ -199,8 +216,9 @@ export declare function detectTextToolClient(systemText: string): string | null;
199
216
  /**
200
217
  * Structural fallback for non-CC clients that the identity-string
201
218
  * detector doesn't recognize. When the operator hands us 3+ tools and
202
- * ≥80% of them don't appear in TOOL_MAP, we're looking at a custom
203
- * client whose tool surface has effectively no overlap with CC's.
219
+ * ≥80% of them appear in neither TOOL_MAP nor CC_NATIVE_NAMES, we're
220
+ * looking at a custom client whose tool surface has effectively no
221
+ * overlap with CC's.
204
222
  * Default-mode round-robin onto CC fallback slots silently corrupts
205
223
  * those calls (the client gets back a Glob/Read/Bash response shape
206
224
  * its own tool can't parse).
@@ -213,10 +231,11 @@ export declare function detectTextToolClient(systemText: string): string | null;
213
231
  * per-client maintenance.
214
232
  *
215
233
  * Threshold reasoning:
216
- * - 100% unmapped (ANY size, including 1-2 tools): unambiguously non-CC. A real
217
- * CC client always carries Bash + Read — both TOOL_MAP keys once lowercased
218
- * so it can never present a fully-unmapped surface; only a foreign tool set
219
- * can. This is what catches the small in-house clients the 3-tool rule below
234
+ * - 100% foreign (ANY size, including 1-2 tools): unambiguously non-CC. A real
235
+ * CC client always carries Bash + Read (TOOL_MAP keys once lowercased) or its
236
+ * own native tools (CC_NATIVE_NAMES), so it can never present a fully-foreign
237
+ * surface; only a genuinely non-CC tool set can. This catches the small
238
+ * in-house clients the 3-tool rule below
220
239
  * misses, e.g. forge inspection agents dispatched with just their capability
221
240
  * floor ([memory_store, db_query]). Before this, those 2-tool surfaces fell
222
241
  * under a len<3 guard and got round-robined onto CC fallback slots, which
@@ -43,6 +43,27 @@ export function filterToolsForPlatform(tools, platform) {
43
43
  return true;
44
44
  });
45
45
  }
46
+ /**
47
+ * Tools CC only advertises in an INTERACTIVE session. The bake captures CC
48
+ * headlessly (`claude --print -p hi`, see live-fingerprint.ts), and CC v2.1.187
49
+ * dropped these plan-mode / clarification tools in `--print` mode — so a fresh
50
+ * headless capture no longer carries them even though every real interactive CC
51
+ * client still advertises them. Like PLATFORM_ONLY_TOOLS, the bundled template
52
+ * must stay a SUPERSET: register them here so a headless auto-rebake preserves
53
+ * them from the previous bundle instead of dropping them. Dropping them broke
54
+ * buildCCRequest's advertise-respects-client contract (the v4.8.93 regression):
55
+ * dario advertises only the intersection of the client's declared tools and this
56
+ * template, so a missing AskUserQuestion meant dario could not advertise it even
57
+ * when a full CC client declared it. Unlike PLATFORM_ONLY_TOOLS these are NOT
58
+ * platform-filtered — they stay in CC_TOOL_DEFINITIONS on every host so a client
59
+ * that declares them is always honored. Add new interactive-only tools here as
60
+ * CC adds them.
61
+ */
62
+ export const INTERACTIVE_ONLY_TOOLS = new Set([
63
+ 'AskUserQuestion',
64
+ 'EnterPlanMode',
65
+ 'ExitPlanMode',
66
+ ]);
46
67
  /** CC's exact tool definitions for the current platform — filtered from the bundled union. */
47
68
  export const CC_TOOL_DEFINITIONS = filterToolsForPlatform(TEMPLATE.tools, process.platform);
48
69
  /** CC's own tool names, EXACT case ("Read", "Bash", "Agent", …). A CC client's
@@ -425,8 +446,9 @@ export function detectTextToolClient(systemText) {
425
446
  /**
426
447
  * Structural fallback for non-CC clients that the identity-string
427
448
  * detector doesn't recognize. When the operator hands us 3+ tools and
428
- * ≥80% of them don't appear in TOOL_MAP, we're looking at a custom
429
- * client whose tool surface has effectively no overlap with CC's.
449
+ * ≥80% of them appear in neither TOOL_MAP nor CC_NATIVE_NAMES, we're
450
+ * looking at a custom client whose tool surface has effectively no
451
+ * overlap with CC's.
430
452
  * Default-mode round-robin onto CC fallback slots silently corrupts
431
453
  * those calls (the client gets back a Glob/Read/Bash response shape
432
454
  * its own tool can't parse).
@@ -439,10 +461,11 @@ export function detectTextToolClient(systemText) {
439
461
  * per-client maintenance.
440
462
  *
441
463
  * Threshold reasoning:
442
- * - 100% unmapped (ANY size, including 1-2 tools): unambiguously non-CC. A real
443
- * CC client always carries Bash + Read — both TOOL_MAP keys once lowercased
444
- * so it can never present a fully-unmapped surface; only a foreign tool set
445
- * can. This is what catches the small in-house clients the 3-tool rule below
464
+ * - 100% foreign (ANY size, including 1-2 tools): unambiguously non-CC. A real
465
+ * CC client always carries Bash + Read (TOOL_MAP keys once lowercased) or its
466
+ * own native tools (CC_NATIVE_NAMES), so it can never present a fully-foreign
467
+ * surface; only a genuinely non-CC tool set can. This catches the small
468
+ * in-house clients the 3-tool rule below
446
469
  * misses, e.g. forge inspection agents dispatched with just their capability
447
470
  * floor ([memory_store, db_query]). Before this, those 2-tool surfaces fell
448
471
  * under a len<3 guard and got round-robined onto CC fallback slots, which
@@ -457,13 +480,23 @@ export function detectNonCCByTools(clientTools) {
457
480
  return null;
458
481
  let unmapped = 0;
459
482
  for (const tool of clientTools) {
460
- const name = (tool.name || '').toLowerCase();
461
- if (!TOOL_MAP[name])
483
+ const rawName = tool.name || '';
484
+ // A tool is "foreign" only if dario can neither map it (TOOL_MAP, by
485
+ // lowercased cross-client alias) nor recognize it as CC's own (CC_NATIVE_NAMES,
486
+ // by exact PascalCase). CC-native tools identity-map to themselves in the remap
487
+ // path (see buildCCRequest), so counting them here inflates the ratio and
488
+ // mis-flags a modern, agentic-heavy CC client (Agent, Skill, Workflow, Task*,
489
+ // … — in the live bundle but absent from TOOL_MAP's alias table) as
490
+ // 'unknown-non-cc', flipping it to preserve and discarding the CC tool
491
+ // fingerprint dario exists to present. Mirror the routing's membership test so
492
+ // detection and routing agree.
493
+ if (!TOOL_MAP[rawName.toLowerCase()] && !CC_NATIVE_NAMES.has(rawName))
462
494
  unmapped++;
463
495
  }
464
496
  const ratio = unmapped / clientTools.length;
465
- // Fully-unmapped surface → non-CC at any size. Real CC always has Bash+Read
466
- // mapped, so ratio === 1 is unreachable for it; only a foreign client hits it.
497
+ // Fully-foreign surface → non-CC at any size. Real CC always has Bash+Read
498
+ // mapped or its own native tools, so ratio === 1 is unreachable for it; only a
499
+ // genuinely foreign client hits it.
467
500
  if (ratio === 1)
468
501
  return 'unknown-non-cc';
469
502
  // Mixed surface: only flag once there are enough tools to be confident.
@@ -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.186";
285
+ readonly maxTested: "2.1.187";
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.186',
789
+ maxTested: '2.1.187',
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.91",
3
+ "version": "4.8.93",
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": {