@askalf/dario 3.9.2 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "3.9.2",
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",