From b71d9b45128fec2ca50ef66ba9c33368f497cb42 Mon Sep 17 00:00:00 2001 From: jwc19890114 <4464168+jwc19890114@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:10:56 +0800 Subject: [PATCH] feat(dsh): admit and test 0.2.2-rc.1 memory adapter --- apps/memos-local-plugin/CHANGELOG.md | 6 ++++++ .../adapters/deepseek-harness/README.md | 16 +++++++++++++--- apps/memos-local-plugin/package-lock.json | 12 ++++++------ apps/memos-local-plugin/package.json | 12 ++++++------ .../scripts/check-dsh-compatibility.mjs | 8 ++++++-- .../adapters/deepseek-harness-package.test.ts | 4 ++-- 6 files changed, 39 insertions(+), 19 deletions(-) diff --git a/apps/memos-local-plugin/CHANGELOG.md b/apps/memos-local-plugin/CHANGELOG.md index 996768a3e..9ab969e17 100644 --- a/apps/memos-local-plugin/CHANGELOG.md +++ b/apps/memos-local-plugin/CHANGELOG.md @@ -5,6 +5,12 @@ for the full per-commit history use `git log` or the GitHub releases page. ## Index +- Local DSH compatibility branch: admit exactly `0.2.2-rc.1` after the + published host API matrix compiles, builds, and passes adapter tests. + Use the new host's Cordis peer and matching session codec for `0.2.2-rc.1`. + Earlier compatibility fixtures retain their pinned Cordis version. This + branch has not been published to npm. + - Unreleased — Admit DSH `0.1.7-rc.2`, `0.2.0-rc.2`, and `0.2.1-rc.2/rc.3` through explicit, bounded optional peer ranges; retain the `2.0.21` V4 producer-owned message sources. Stop importing the moved `JsonValue` type diff --git a/apps/memos-local-plugin/adapters/deepseek-harness/README.md b/apps/memos-local-plugin/adapters/deepseek-harness/README.md index 0c44a47bb..6bead57a2 100644 --- a/apps/memos-local-plugin/adapters/deepseek-harness/README.md +++ b/apps/memos-local-plugin/adapters/deepseek-harness/README.md @@ -10,7 +10,7 @@ modifying the DSH repository. > DeepSeek Harness is currently a developer preview. The development API stack > is pinned to `0.2.1-rc.3`. The compatibility matrix compiles, builds, and tests > this adapter against the published `0.1.0-rc.6`, `0.1.7-rc.2`, `0.2.0-rc.2`, -> `0.2.1-rc.2`, and `0.2.1-rc.3` packages. These are API/contract checks, not a +> `0.2.1-rc.2`, `0.2.1-rc.3`, and `0.2.2-rc.1` packages. These are API/contract checks, not a > substitute for validating each packaged Desktop/Web/CLI release. ## How it works @@ -622,6 +622,7 @@ For the compatibility matrix, run: npm run test:dsh-compat # Or select a specific published API stack: npm run test:dsh-compat -- 0.2.1-rc.3 +npm run test:dsh-compat -- 0.2.2-rc.1 ``` The script needs npm registry access. It installs each real host peer graph in @@ -638,12 +639,15 @@ The six optional DSH service peers intentionally declare separate prerelease lines: ```text ->=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 +>=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1 ``` npm semver only admits a prerelease when a comparator explicitly names its `major.minor.patch` tuple. Simply changing `<0.2.0` to `<0.3.0` would still -exclude `0.2.1-rc.3`. Unvalidated `0.2.2` and `0.3.x` remain excluded. +exclude `0.2.1-rc.3`. The tested `0.2.2-rc.1` is admitted exactly; +unvalidated `0.2.2` releases and `0.3.x` remain excluded. Its compatibility +fixture uses Cordis `~4.1.0` and the matching V3-to-V4 codec; earlier fixtures +retain their original host dependencies. The former `0.1.0-rc.5` API baseline is no longer advertised: its core packages are unavailable from npm, so it cannot be revalidated by this matrix. @@ -663,6 +667,12 @@ can overwrite those patches. A successful `allow-version` exemption alone does not verify runtime compatibility. Until this change is released, installing npm `2.0.21` still leaves the startup version restriction in place. +When the host reaches Hugging Face through `HTTPS_PROXY`, launch Node with +`NODE_USE_ENV_PROXY=1` so its `fetch` uses that proxy. On a slow first model +download, set `embedding.local.loadTimeoutMs` in the MemOS `config.yaml` to a +larger value; this setting affects model loading, not the bounded foreground +recall timeout. + ## Known limitations 1. **Developer-preview compatibility.** The supported prerelease lines and diff --git a/apps/memos-local-plugin/package-lock.json b/apps/memos-local-plugin/package-lock.json index 7cc00eeac..7ad5ae342 100644 --- a/apps/memos-local-plugin/package-lock.json +++ b/apps/memos-local-plugin/package-lock.json @@ -45,12 +45,12 @@ }, "peerDependencies": { "@deepseek-ai/cordis": "^4.0.1", - "@deepseek-ai/dsh-agent": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-llm": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-session": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-timeout": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-tools": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", + "@deepseek-ai/dsh-agent": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-llm": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-session": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-timeout": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-tools": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", "@deepseek-ai/schemastery": "^3.18.1" }, "peerDependenciesMeta": { diff --git a/apps/memos-local-plugin/package.json b/apps/memos-local-plugin/package.json index b0d879531..417144c94 100644 --- a/apps/memos-local-plugin/package.json +++ b/apps/memos-local-plugin/package.json @@ -108,12 +108,12 @@ }, "peerDependencies": { "@deepseek-ai/cordis": "^4.0.1", - "@deepseek-ai/dsh-agent": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-llm": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-session": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-timeout": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", - "@deepseek-ai/dsh-tools": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2", + "@deepseek-ai/dsh-agent": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-llm": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-session": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-timeout": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", + "@deepseek-ai/dsh-tools": ">=0.1.0-rc.6 <0.2.0 || >=0.1.7-rc.2 <0.1.8 || >=0.2.0-rc.2 <0.2.1 || >=0.2.1-rc.2 <0.2.2 || 0.2.2-rc.1", "@deepseek-ai/schemastery": "^3.18.1" }, "peerDependenciesMeta": { diff --git a/apps/memos-local-plugin/scripts/check-dsh-compatibility.mjs b/apps/memos-local-plugin/scripts/check-dsh-compatibility.mjs index 34bfd00d1..013e8a01a 100644 --- a/apps/memos-local-plugin/scripts/check-dsh-compatibility.mjs +++ b/apps/memos-local-plugin/scripts/check-dsh-compatibility.mjs @@ -11,7 +11,7 @@ const manifest = JSON.parse(await readFile(join(root, "package.json"), "utf8")); const versions = process.argv.slice(2); if (!versions.length) versions.push( "0.1.0-rc.6", "0.1.7-rc.2", - "0.2.0-rc.2", "0.2.1-rc.2", "0.2.1-rc.3", + "0.2.0-rc.2", "0.2.1-rc.2", "0.2.1-rc.3", "0.2.2-rc.1", ); if (versions.some((version) => !/^\d+\.\d+\.\d+(?:-rc\.\d+)?$/.test(version))) { throw new Error("Expected explicit DSH versions, e.g. 0.2.1-rc.3"); @@ -32,7 +32,8 @@ for (const version of versions) { Object.entries(manifest.devDependencies) .filter(([name]) => name.startsWith("@deepseek-ai/")) .map(([name, value]) => [name, - name.startsWith("@deepseek-ai/dsh-") && name !== "@deepseek-ai/dsh-session-format-v3-to-v4" + name.startsWith("@deepseek-ai/dsh-") && + (name !== "@deepseek-ai/dsh-session-format-v3-to-v4" || version === "0.2.2-rc.1") ? version : value]), ); // Early DSH previews used caret peers. Letting npm choose their latest @@ -49,6 +50,9 @@ for (const version of versions) { })); const next = new Set(); for (const pkg of metadata) { + if (pkg.name === "@deepseek-ai/dsh-agent" && version === "0.2.2-rc.1") { + devDependencies["@deepseek-ai/cordis"] = pkg.peerDependencies["@deepseek-ai/cordis"]; + } for (const name of Object.keys({ ...pkg.dependencies, ...pkg.peerDependencies })) { if (!name.startsWith("@deepseek-ai/dsh-") || name === "@deepseek-ai/dsh-session-format-v3-to-v4") continue; devDependencies[name] = version; diff --git a/apps/memos-local-plugin/tests/unit/adapters/deepseek-harness-package.test.ts b/apps/memos-local-plugin/tests/unit/adapters/deepseek-harness-package.test.ts index dd1f08dd6..27057d011 100644 --- a/apps/memos-local-plugin/tests/unit/adapters/deepseek-harness-package.test.ts +++ b/apps/memos-local-plugin/tests/unit/adapters/deepseek-harness-package.test.ts @@ -12,7 +12,7 @@ const { satisfies } = createRequire(import.meta.url)("semver") as { const hostServices = ["agent", "llm", "session", "system-prompt", "timeout", "tools"]; describe("DeepSeek Harness bundle package", () => { - it.each(["0.1.0-rc.6", "0.1.7-rc.2", "0.2.0-rc.2", "0.2.1-rc.2", "0.2.1-rc.3"])( + it.each(["0.1.0-rc.6", "0.1.7-rc.2", "0.2.0-rc.2", "0.2.1-rc.2", "0.2.1-rc.3", "0.2.2-rc.1"])( "admits the supported host %s without a version exemption", async (version) => { const pkg = JSON.parse(await readFile(resolve(root, "package.json"), "utf8")); @@ -24,7 +24,7 @@ describe("DeepSeek Harness bundle package", () => { }, ); - it.each(["0.1.0-rc.5", "0.2.2-rc.1", "0.2.2", "0.3.0-rc.1", "0.3.0"])( + it.each(["0.1.0-rc.5", "0.2.2", "0.3.0-rc.1", "0.3.0"])( "does not admit the unvalidated host %s", async (version) => { const pkg = JSON.parse(await readFile(resolve(root, "package.json"), "utf8"));