@askalf/dario 3.20.0 → 3.20.1

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.
@@ -150,6 +150,7 @@ export declare function buildCCRequest(clientBody: Record<string, unknown>, bill
150
150
  }, opts?: {
151
151
  preserveTools?: boolean;
152
152
  hybridTools?: boolean;
153
+ noAutoDetect?: boolean;
153
154
  }): {
154
155
  body: Record<string, unknown>;
155
156
  toolMap: Map<string, ToolMapping>;
@@ -653,8 +653,15 @@ export function buildCCRequest(clientBody, billingTag, cache1h, identity, opts =
653
653
  // brand name is still present, decide whether to auto-switch into
654
654
  // preserve-tools behavior below. Explicit --hybrid-tools outranks the
655
655
  // heuristic (operator opt-in wins). dario#40.
656
+ //
657
+ // `noAutoDetect` skips the detector entirely — operators who want the
658
+ // full CC fingerprint restored (tools array included) even when their
659
+ // client is Cline/Kilo/Roo can opt out. They keep explicit control via
660
+ // --preserve-tools per session. dario#40 (ringge's fingerprint concern).
656
661
  const rawSystemForDetection = extractSystemText(clientBody);
657
- const detectedClient = detectTextToolClient(rawSystemForDetection) ?? undefined;
662
+ const detectedClient = opts.noAutoDetect
663
+ ? undefined
664
+ : (detectTextToolClient(rawSystemForDetection) ?? undefined);
658
665
  const autoPreserve = Boolean(detectedClient) && !opts.hybridTools;
659
666
  const effectivePreserveTools = Boolean(opts.preserveTools) || autoPreserve;
660
667
  // ── Strip thinking from history ──
package/dist/cli.js CHANGED
@@ -195,9 +195,14 @@ async function proxy() {
195
195
  console.error('[dario] --preserve-tools and --hybrid-tools are mutually exclusive. Pick one.');
196
196
  process.exit(1);
197
197
  }
198
+ // Opt-out for v3.19.3's text-tool-client auto-detection. Operators who
199
+ // want the full CC fingerprint restored (tools array included) even
200
+ // when Cline/Kilo/Roo is detected can pass --no-auto-detect; they keep
201
+ // explicit control with --preserve-tools per session. dario#40 (ringge).
202
+ const noAutoDetect = args.includes('--no-auto-detect') || args.includes('--no-auto-preserve');
198
203
  const modelArg = args.find(a => a.startsWith('--model='));
199
204
  const model = modelArg ? modelArg.split('=')[1] : undefined;
200
- await startProxy({ port, host, verbose, verboseBodies, model, passthrough, preserveTools, hybridTools });
205
+ await startProxy({ port, host, verbose, verboseBodies, model, passthrough, preserveTools, hybridTools, noAutoDetect });
201
206
  }
202
207
  async function accounts() {
203
208
  const sub = args[1];
@@ -436,6 +441,11 @@ async function help() {
436
441
  Loses subscription routing; use for custom agents
437
442
  --hybrid-tools Remap to CC tools, inject sessionId/requestId/etc.
438
443
  Keeps subscription routing for custom agents
444
+ --no-auto-detect Disable Cline/Kilo/Roo auto-preserve-tools
445
+ (v3.19.3 behavior). Keeps CC fingerprint
446
+ intact even when a text-tool client is
447
+ detected; use --preserve-tools per session
448
+ when edits are needed. (dario#40)
439
449
  --port=PORT Port to listen on (default: 3456)
440
450
  --host=ADDRESS Address to bind to (default: 127.0.0.1)
441
451
  Use 0.0.0.0 for LAN; see README for DARIO_API_KEY
package/dist/proxy.d.ts CHANGED
@@ -11,6 +11,7 @@ interface ProxyOptions {
11
11
  passthrough?: boolean;
12
12
  preserveTools?: boolean;
13
13
  hybridTools?: boolean;
14
+ noAutoDetect?: boolean;
14
15
  }
15
16
  export declare function sanitizeError(err: unknown): string;
16
17
  export declare function startProxy(opts?: ProxyOptions): Promise<void>;
package/dist/proxy.js CHANGED
@@ -982,6 +982,7 @@ export async function startProxy(opts = {}) {
982
982
  const { body: ccBody, toolMap, detectedClient } = buildCCRequest(r, billingTag, CACHE_1H, bodyIdentity, {
983
983
  preserveTools: opts.preserveTools ?? false,
984
984
  hybridTools: opts.hybridTools ?? false,
985
+ noAutoDetect: opts.noAutoDetect ?? false,
985
986
  });
986
987
  // Log the auto-preserve-tools switch once per text-tool
987
988
  // client family. Skip when the operator already opted into
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "3.20.0",
3
+ "version": "3.20.1",
4
4
  "description": "A local LLM router. One endpoint, every provider — Claude subscriptions, OpenAI, OpenRouter, Groq, local LiteLLM, any OpenAI-compat endpoint — your tools don't need to change.",
5
5
  "type": "module",
6
6
  "bin": {