Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

fix(memory-plugins): match slash-form bypass patterns against Windows paths (#5737)

t0saki55c34934e7b6
diff --git a/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json b/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
index 111273ea2..4e6778787 100644
--- a/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.11",
+ "version": "0.5.12",
"clients": [
"cursor"
],
diff --git a/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json b/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
index eaa9a9435..01ba46a9e 100644
--- a/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
+++ b/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.5.11",
+ "version": "0.5.12",
"description": "Long-term semantic memory for Kimi Code CLI, powered by OpenViking.",
"author": {
"name": "OpenViking",
diff --git a/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json b/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
index 3f9ec02bf..01b7e0377 100644
--- a/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.11",
+ "version": "0.5.12",
"clients": [
"kimicode"
],
diff --git a/examples/agent-hook-plugin/hosts/trae/openviking.integration.json b/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
index dbfd01a61..546dcf0d7 100644
--- a/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.11",
+ "version": "0.5.12",
"clients": [
"trae",
"trae-cn"
diff --git a/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json b/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
index 3168c9c23..06ed4632f 100644
--- a/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.11",
+ "version": "0.5.12",
"clients": [
"zcode"
],
diff --git a/examples/agent-hook-plugin/plugin.json b/examples/agent-hook-plugin/plugin.json
index 7bbb8ff80..bf1951268 100644
--- a/examples/agent-hook-plugin/plugin.json
+++ b/examples/agent-hook-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "agent-hook-plugin",
- "version": "0.5.11",
+ "version": "0.5.12",
"description": "Long-term semantic memory for Cursor, TRAE, TRAE CN, ZCode and Kimi Code — powered by OpenViking. Auto-recall relevant memories and capture the conversation as it happens.",
"author": {
"name": "OpenViking",
diff --git a/examples/claude-code-memory-plugin/.claude-plugin/plugin.json b/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
index 3acb45fa6..5d2077ca9 100644
--- a/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
+++ b/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.7.3",
+ "version": "0.7.4",
"description": "Long-term semantic memory for Claude Code, powered by OpenViking. Auto-recall relevant memories at session start and capture important information during conversations.",
"author": {
"name": "OpenViking",
diff --git a/examples/claude-code-memory-plugin/package.json b/examples/claude-code-memory-plugin/package.json
index d99f8168a..68052abdd 100644
--- a/examples/claude-code-memory-plugin/package.json
+++ b/examples/claude-code-memory-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "claude-code-openviking-memory",
- "version": "0.7.3",
+ "version": "0.7.4",
"description": "OpenViking memory plugin for Claude Code — semantic long-term memory",
"type": "module",
"scripts": {
diff --git a/examples/claude-code-memory-plugin/scripts/shared/session-model.mjs b/examples/claude-code-memory-plugin/scripts/shared/session-model.mjs
index b6496a113..abd8e29e3 100644
--- a/examples/claude-code-memory-plugin/scripts/shared/session-model.mjs
+++ b/examples/claude-code-memory-plugin/scripts/shared/session-model.mjs
@@ -27,7 +27,10 @@ export function isBypassed(cfg, { sessionId, cwd } = {}) {
if (cfg.bypassSession) return true;
const patterns = cfg.bypassSessionPatterns || [];
if (patterns.length === 0) return false;
- const haystacks = [sessionId, cwd].filter(Boolean);
+ // Windows hands hooks `C:\work\scratch`, while directory patterns are written
+ // with forward slashes.
+ const slashCwd = typeof cwd === "string" && cwd.includes("\\") ? cwd.replace(/\\/g, "/") : "";
+ const haystacks = [sessionId, cwd, slashCwd].filter(Boolean);
for (const pat of patterns) {
const re = globToRe(pat);
if (haystacks.some((h) => re.test(h))) return true;
diff --git a/examples/codex-memory-plugin/.codex-plugin/plugin.json b/examples/codex-memory-plugin/.codex-plugin/plugin.json
index 7b1edb5de..51862a5ba 100644
--- a/examples/codex-memory-plugin/.codex-plugin/plugin.json
+++ b/examples/codex-memory-plugin/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.11.2",
+ "version": "0.11.3",
"description": "Long-term semantic memory for Codex, powered by OpenViking. Recall on UserPromptSubmit, incremental add_message on Stop (per turn), commit on SessionEnd (Codex >= 0.145) and on PreCompact, with an idle/ended sweep on SessionStart as the fallback for signals, crashes and older Codex builds. Includes a local stdio MCP proxy that reads OpenViking credentials from env/ovcli.conf.",
"author": {
"name": "OpenViking",
diff --git a/examples/codex-memory-plugin/scripts/config.test.mjs b/examples/codex-memory-plugin/scripts/config.test.mjs
index b9bbc0e18..e368304cc 100644
--- a/examples/codex-memory-plugin/scripts/config.test.mjs
+++ b/examples/codex-memory-plugin/scripts/config.test.mjs
@@ -215,3 +215,15 @@ for (const mode of ["off", "client", "server", "auto", "0", "1"]) {
});
});
}
+
+test("slash-form directory patterns match a Windows working directory", () => {
+ const cfg = { bypassSessionPatterns: ["**/scratch"] };
+ assert.equal(isBypassed(cfg, { cwd: String.raw`C:\work\scratch` }), true);
+ assert.equal(isBypassed(cfg, { cwd: String.raw`C:\work\keep` }), false);
+ assert.equal(isBypassed(cfg, { sessionId: String.raw`a\scratch` }), false, "session ids stay literal");
+ assert.equal(
+ isBypassed({ bypassSessionPatterns: [String.raw`C:\work\scratch`] }, { cwd: String.raw`C:\work\scratch` }),
+ true,
+ "a backslash pattern still matches the raw path",
+ );
+});
diff --git a/examples/codex-memory-plugin/scripts/shared/session-model.mjs b/examples/codex-memory-plugin/scripts/shared/session-model.mjs
index b6496a113..abd8e29e3 100644
--- a/examples/codex-memory-plugin/scripts/shared/session-model.mjs
+++ b/examples/codex-memory-plugin/scripts/shared/session-model.mjs
@@ -27,7 +27,10 @@ export function isBypassed(cfg, { sessionId, cwd } = {}) {
if (cfg.bypassSession) return true;
const patterns = cfg.bypassSessionPatterns || [];
if (patterns.length === 0) return false;
- const haystacks = [sessionId, cwd].filter(Boolean);
+ // Windows hands hooks `C:\work\scratch`, while directory patterns are written
+ // with forward slashes.
+ const slashCwd = typeof cwd === "string" && cwd.includes("\\") ? cwd.replace(/\\/g, "/") : "";
+ const haystacks = [sessionId, cwd, slashCwd].filter(Boolean);
for (const pat of patterns) {
const re = globToRe(pat);
if (haystacks.some((h) => re.test(h))) return true;
diff --git a/examples/dsh-memory-plugin/config.mjs b/examples/dsh-memory-plugin/config.mjs
index c0925a538..ec7d58430 100644
--- a/examples/dsh-memory-plugin/config.mjs
+++ b/examples/dsh-memory-plugin/config.mjs
@@ -1,7 +1,7 @@
import { buildPluginConfig } from "./shared/plugin-config.mjs";
import { loadCredentialFiles } from "./shared/credentials.mjs";
-export const PLUGIN_VERSION = "0.5.17";
+export const PLUGIN_VERSION = "0.5.18";
/**
* Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tool
diff --git a/examples/dsh-memory-plugin/package-lock.json b/examples/dsh-memory-plugin/package-lock.json
index 10d891dc2..42a7c9414 100644
--- a/examples/dsh-memory-plugin/package-lock.json
+++ b/examples/dsh-memory-plugin/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.17",
+ "version": "0.5.18",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.17",
+ "version": "0.5.18",
"license": "Apache-2.0",
"devDependencies": {
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
diff --git a/examples/dsh-memory-plugin/package.json b/examples/dsh-memory-plugin/package.json
index ac2a89656..7cf57cc0b 100644
--- a/examples/dsh-memory-plugin/package.json
+++ b/examples/dsh-memory-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.17",
+ "version": "0.5.18",
"description": "OpenViking memory and context bundle for DeepSeek Harness",
"icon": "./icon.svg",
"type": "module",
diff --git a/examples/memory-plugin-shared/lib/session-model.mjs b/examples/memory-plugin-shared/lib/session-model.mjs
index c55820455..71be52be0 100644
--- a/examples/memory-plugin-shared/lib/session-model.mjs
+++ b/examples/memory-plugin-shared/lib/session-model.mjs
@@ -26,7 +26,10 @@ export function isBypassed(cfg, { sessionId, cwd } = {}) {
if (cfg.bypassSession) return true;
const patterns = cfg.bypassSessionPatterns || [];
if (patterns.length === 0) return false;
- const haystacks = [sessionId, cwd].filter(Boolean);
+ // Windows hands hooks `C:\work\scratch`, while directory patterns are written
+ // with forward slashes.
+ const slashCwd = typeof cwd === "string" && cwd.includes("\\") ? cwd.replace(/\\/g, "/") : "";
+ const haystacks = [sessionId, cwd, slashCwd].filter(Boolean);
for (const pat of patterns) {
const re = globToRe(pat);
if (haystacks.some((h) => re.test(h))) return true;
diff --git a/examples/opencode-plugin/package.json b/examples/opencode-plugin/package.json
index fdac4885e..cb0bfae49 100644
--- a/examples/opencode-plugin/package.json
+++ b/examples/opencode-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@openviking/opencode-plugin",
- "version": "0.5.5",
+ "version": "0.5.6",
"author": "@openviking",
"description": "Unified OpenCode plugin for OpenViking repository retrieval and long-term memory",
"type": "module",
diff --git a/examples/pi-coding-agent-extension/package-lock.json b/examples/pi-coding-agent-extension/package-lock.json
index d0bfc51c9..cc275a72b 100644
--- a/examples/pi-coding-agent-extension/package-lock.json
+++ b/examples/pi-coding-agent-extension/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "openviking-pi-extension",
- "version": "0.4.10",
+ "version": "0.4.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openviking-pi-extension",
- "version": "0.4.10",
+ "version": "0.4.11",
"dependencies": {
"@modelcontextprotocol/client": "2.0.0"
},
diff --git a/examples/pi-coding-agent-extension/package.json b/examples/pi-coding-agent-extension/package.json
index a7a01300c..c20eeb9c1 100644
--- a/examples/pi-coding-agent-extension/package.json
+++ b/examples/pi-coding-agent-extension/package.json
@@ -1,6 +1,6 @@
{
"name": "openviking-pi-extension",
- "version": "0.4.10",
+ "version": "0.4.11",
"description": "OpenViking memory and context extension for the pi coding agent",
"private": true,
"type": "module",