@openviking/dsh-memory-plugin 0.5.4 → 0.5.5

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/config.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { buildPluginConfig } from "./shared/plugin-config.mjs";
2
2
  import { loadCredentialFiles } from "./shared/credentials.mjs";
3
3
 
4
- export const PLUGIN_VERSION = "0.5.4";
4
+ export const PLUGIN_VERSION = "0.5.5";
5
5
 
6
6
  /**
7
7
  * Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tool
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openviking/dsh-memory-plugin",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "OpenViking memory and context bundle for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "main": "index.mjs",
@@ -642,16 +642,18 @@ export function shouldCaptureText(text, role, cfg = {}, { filters = true } = {})
642
642
  const sanitized = sanitizeCapturedText(text);
643
643
  if (!sanitized) return { shouldCapture: false, reason: "empty", text: "" };
644
644
 
645
- let capped = truncateCaptureText(sanitized, maxLength);
645
+ // Rules judge the full sanitized turn; the wire cap applies afterward.
646
+ let filtered = sanitized;
646
647
  if (filters) {
647
648
  const compiled = compileInputFilters(cfg?.captureFilters);
648
649
  if (compiled.rules.length) {
649
- const verdict = applyInputFilters(capped, compiled.rules, { role });
650
+ const verdict = applyInputFilters(filtered, compiled.rules, { role });
650
651
  if (verdict.dropped) return { shouldCapture: false, reason: "filtered", text: "" };
651
- capped = verdict.text;
652
- if (!capped) return { shouldCapture: false, reason: "empty", text: "" };
652
+ filtered = verdict.text;
653
+ if (!filtered) return { shouldCapture: false, reason: "empty", text: "" };
653
654
  }
654
655
  }
656
+ const capped = truncateCaptureText(filtered, maxLength);
655
657
  const compact = oneLine(capped);
656
658
  const isToolSummary = /^\[tool-(?:call|result)\b/i.test(compact);
657
659