@askalf/dario 4.8.87 → 4.8.89
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/dist/cc-template-data.json +3 -3
- package/dist/cc-template.d.ts +12 -5
- package/dist/cc-template.js +20 -8
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_version": "2.1.
|
|
2
|
+
"_version": "2.1.185",
|
|
3
3
|
"_captured": "2026-06-11T20:43:54.573Z",
|
|
4
4
|
"_source": "bundled",
|
|
5
5
|
"_schemaVersion": 3,
|
|
@@ -1294,7 +1294,7 @@
|
|
|
1294
1294
|
"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",
|
|
1295
1295
|
"header_values": {
|
|
1296
1296
|
"accept": "application/json",
|
|
1297
|
-
"user-agent": "claude-cli/2.1.
|
|
1297
|
+
"user-agent": "claude-cli/2.1.185 (external, sdk-cli)",
|
|
1298
1298
|
"x-stainless-arch": "x64",
|
|
1299
1299
|
"x-stainless-lang": "js",
|
|
1300
1300
|
"x-stainless-os": "Linux",
|
|
@@ -1319,5 +1319,5 @@
|
|
|
1319
1319
|
"output_config",
|
|
1320
1320
|
"stream"
|
|
1321
1321
|
],
|
|
1322
|
-
"_supportedMaxTested": "2.1.
|
|
1322
|
+
"_supportedMaxTested": "2.1.185"
|
|
1323
1323
|
}
|
package/dist/cc-template.d.ts
CHANGED
|
@@ -213,11 +213,18 @@ export declare function detectTextToolClient(systemText: string): string | null;
|
|
|
213
213
|
* per-client maintenance.
|
|
214
214
|
*
|
|
215
215
|
* Threshold reasoning:
|
|
216
|
-
* -
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
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
|
|
220
|
+
* misses, e.g. forge inspection agents dispatched with just their capability
|
|
221
|
+
* floor ([memory_store, db_query]). Before this, those 2-tool surfaces fell
|
|
222
|
+
* under a len<3 guard and got round-robined onto CC fallback slots, which
|
|
223
|
+
* silently corrupts every call (the model upstream never sees the real tool).
|
|
224
|
+
* - Mixed surface (some tools map): require 3+ tools AND ≥80% unmapped. The 80%
|
|
225
|
+
* leaves room for a non-CC client that legitimately reuses 1-2 of TOOL_MAP's
|
|
226
|
+
* bash/grep/read aliases; the 3-tool floor avoids mis-flagging a partial CC
|
|
227
|
+
* load (1-2 tools, some mapped) mid-handshake — those stay null and remap.
|
|
221
228
|
*/
|
|
222
229
|
export declare function detectNonCCByTools(clientTools: Array<Record<string, unknown>> | undefined): string | null;
|
|
223
230
|
/**
|
package/dist/cc-template.js
CHANGED
|
@@ -439,14 +439,21 @@ export function detectTextToolClient(systemText) {
|
|
|
439
439
|
* per-client maintenance.
|
|
440
440
|
*
|
|
441
441
|
* Threshold reasoning:
|
|
442
|
-
* -
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
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
|
|
446
|
+
* misses, e.g. forge inspection agents dispatched with just their capability
|
|
447
|
+
* floor ([memory_store, db_query]). Before this, those 2-tool surfaces fell
|
|
448
|
+
* under a len<3 guard and got round-robined onto CC fallback slots, which
|
|
449
|
+
* silently corrupts every call (the model upstream never sees the real tool).
|
|
450
|
+
* - Mixed surface (some tools map): require 3+ tools AND ≥80% unmapped. The 80%
|
|
451
|
+
* leaves room for a non-CC client that legitimately reuses 1-2 of TOOL_MAP's
|
|
452
|
+
* bash/grep/read aliases; the 3-tool floor avoids mis-flagging a partial CC
|
|
453
|
+
* load (1-2 tools, some mapped) mid-handshake — those stay null and remap.
|
|
447
454
|
*/
|
|
448
455
|
export function detectNonCCByTools(clientTools) {
|
|
449
|
-
if (!clientTools || clientTools.length
|
|
456
|
+
if (!clientTools || clientTools.length === 0)
|
|
450
457
|
return null;
|
|
451
458
|
let unmapped = 0;
|
|
452
459
|
for (const tool of clientTools) {
|
|
@@ -454,9 +461,14 @@ export function detectNonCCByTools(clientTools) {
|
|
|
454
461
|
if (!TOOL_MAP[name])
|
|
455
462
|
unmapped++;
|
|
456
463
|
}
|
|
457
|
-
|
|
464
|
+
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.
|
|
467
|
+
if (ratio === 1)
|
|
468
|
+
return 'unknown-non-cc';
|
|
469
|
+
// Mixed surface: only flag once there are enough tools to be confident.
|
|
470
|
+
if (clientTools.length >= 3 && ratio >= 0.8)
|
|
458
471
|
return 'unknown-non-cc';
|
|
459
|
-
}
|
|
460
472
|
return null;
|
|
461
473
|
}
|
|
462
474
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.89",
|
|
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": {
|