@askalf/dario 3.9.1 → 3.9.3

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.
@@ -35,7 +35,23 @@ export function scrubFrameworkIdentifiers(text) {
35
35
  let result = text;
36
36
  for (const pattern of FRAMEWORK_PATTERNS) {
37
37
  pattern.lastIndex = 0;
38
- result = result.replace(pattern, '');
38
+ result = result.replace(pattern, (match, ...args) => {
39
+ const offset = args[args.length - 2];
40
+ const src = args[args.length - 1];
41
+ const before = offset > 0 ? src[offset - 1] : '';
42
+ const after = offset + match.length < src.length ? src[offset + match.length] : '';
43
+ // Preserve matches embedded in filesystem paths or URLs. `\b` word
44
+ // boundaries fire between `.` / `/` and word chars, which made
45
+ // `/Users/foo/.openclaw/workspace/` collapse to `/Users/foo/./workspace/`
46
+ // (dario#35). A preceding `.`, `/`, `\`, `-`, or `_` or a following
47
+ // `/` or `\` is a strong signal the identifier is part of a path or
48
+ // slug, not prose — leave it alone.
49
+ if (before === '.' || before === '/' || before === '\\' || before === '-' || before === '_')
50
+ return match;
51
+ if (after === '/' || after === '\\')
52
+ return match;
53
+ return '';
54
+ });
39
55
  }
40
56
  return result;
41
57
  }
package/dist/cli.js CHANGED
@@ -373,18 +373,13 @@ async function help() {
373
373
  Full IDs: claude-opus-4-6, claude-sonnet-4-6
374
374
  Default: passthrough (client decides)
375
375
  --passthrough, --thin Thin proxy — OAuth swap only, no injection
376
- --preserve-tools Keep client tool schemas (for agents with custom tools)
377
- --hybrid-tools Remap to CC tools AND inject request-context fields
378
- (sessionId, requestId, channelId, userId, timestamp)
379
- declared on the client's tool schema but missing
380
- from CC's. Preserves CC fingerprint. See #33.
376
+ --preserve-tools Forward client tool schemas unchanged
377
+ Loses subscription routing; use for custom agents
378
+ --hybrid-tools Remap to CC tools, inject sessionId/requestId/etc.
379
+ Keeps subscription routing for custom agents
381
380
  --port=PORT Port to listen on (default: 3456)
382
381
  --host=ADDRESS Address to bind to (default: 127.0.0.1)
383
- Use 0.0.0.0 to accept connections from other machines.
384
- Alternatively set DARIO_HOST env var.
385
- When binding non-loopback, also set DARIO_API_KEY
386
- so unauthenticated LAN hosts can't proxy through
387
- your OAuth subscription.
382
+ Use 0.0.0.0 for LAN; see README for DARIO_API_KEY
388
383
  --verbose, -v Log all requests
389
384
 
390
385
  Quick start:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "3.9.1",
3
+ "version": "3.9.3",
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": {
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "build": "tsc && cp src/cc-template-data.json dist/",
24
- "test": "node test/issue-29-tool-translation.mjs && node test/hybrid-tools.mjs && node test/analytics-recording.mjs && node test/failover-429.mjs",
24
+ "test": "node test/issue-29-tool-translation.mjs && node test/hybrid-tools.mjs && node test/scrub-paths.mjs && node test/analytics-recording.mjs && node test/failover-429.mjs",
25
25
  "audit": "npm audit --production --audit-level=high",
26
26
  "prepublishOnly": "npm run build",
27
27
  "start": "node dist/cli.js",