Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(dsh): avoid watching bundled skills during plugin upgrades (#5074)
Evoc809fec2be2a
diff --git a/examples/dsh-memory-plugin/config.mjs b/examples/dsh-memory-plugin/config.mjsindex a4d7123a8..528fd2d5d 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.4.0";+export const PLUGIN_VERSION = "0.4.1";/*** Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tooldiff --git a/examples/dsh-memory-plugin/package-lock.json b/examples/dsh-memory-plugin/package-lock.jsonindex 92207b835..f49682e2b 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.4.0",+ "version": "0.4.1","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@openviking/dsh-memory-plugin",- "version": "0.4.0",+ "version": "0.4.1","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.jsonindex 6c5353c45..196aba006 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.4.0",+ "version": "0.4.1","description": "OpenViking memory and context bundle for DeepSeek Harness","type": "module","main": "index.mjs",diff --git a/examples/dsh-memory-plugin/skills.mjs b/examples/dsh-memory-plugin/skills.mjsindex 897ddddb0..e2047d3ab 100644--- a/examples/dsh-memory-plugin/skills.mjs+++ b/examples/dsh-memory-plugin/skills.mjs@@ -12,6 +12,8 @@ export function buildSkillsConfig() {providerName: SKILL_PROVIDER_NAME,includeDefaultRoots: false,bundledSkillDir: SKILLS_DIR,+ // Packaged skills change only on upgrade; watchers can block replacement on Windows.+ watch: false,};}diff --git a/examples/dsh-memory-plugin/skills.test.mjs b/examples/dsh-memory-plugin/skills.test.mjsindex 41b6c499a..87be89a72 100644--- a/examples/dsh-memory-plugin/skills.test.mjs+++ b/examples/dsh-memory-plugin/skills.test.mjs@@ -2,6 +2,7 @@ import assert from "node:assert/strict";import { readFileSync } from "node:fs";import { join } from "node:path";import test from "node:test";+import chokidar from "chokidar";import { Config, FileSystemSkillProvider } from "@deepseek-ai/dsh-skill-filesystem";import { apply } from "./index.mjs";import { buildSkillsConfig, mountOpenVikingSkills, SKILLS_DIR } from "./skills.mjs";@@ -17,7 +18,8 @@ test("the provider config validates against the pinned provider's own schema", (assert.equal(parsed.bundledSkillDir, SKILLS_DIR);});-test("the bundled skill stays readable outside a restricted workspace filesystem", async () => {+test("the bundled skill stays readable without watching the installed package", async (t) => {+ const watch = t.mock.method(chokidar, "watch");const filesystem = {async resolve() {throw new Error("Path is outside the workspace filesystem");@@ -29,7 +31,7 @@ test("the bundled skill stays readable outside a restricted workspace filesystem}, {signal: new AbortController().signal,invalidate() {},- }, { ...buildSkillsConfig(), watch: false });+ }, buildSkillsConfig());try {const candidates = await provider.list({ cwd: "/workspace" });assert.equal(candidates.length, 1);@@ -38,6 +40,7 @@ test("the bundled skill stays readable outside a restricted workspace filesystemassert.equal(candidates[0].provider, "openviking");const skill = await provider.get(candidates[0], {});assert.match(skill.content, /mcp__openviking__/);+ assert.equal(watch.mock.callCount(), 0, "bundled skills must not hold directory watchers");} finally {await provider.dispose();}diff --git a/examples/memory-plugin-shared/plugin-config.test.mjs b/examples/memory-plugin-shared/plugin-config.test.mjsindex 9c4905270..956c43b2f 100644--- a/examples/memory-plugin-shared/plugin-config.test.mjs+++ b/examples/memory-plugin-shared/plugin-config.test.mjs@@ -41,7 +41,7 @@ const LOADERS = {dsh: {harness: "dsh",load: (cwd) => loadDsh({}, process.env, cwd),- options: { version: "0.4.0", deriveEffectivePeer: true },+ options: { manifestUrl: new URL("../dsh-memory-plugin/package.json", import.meta.url), deriveEffectivePeer: true },owns: ["peerId"],},pi: {