Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/memos-local-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ for the full per-commit history use `git log` or the GitHub releases page.

## Index

- Unreleased — Pin the packaged tsx runtime to the validated 4.21.0 so
fresh DSH profile installs retain the reviewed esbuild 0.27.7 build policy.
Verified a source-tarball installation and a real local-model memory
write/recall/tool-search round trip on DSH 0.2.2-rc.5.

- Unreleased — Admit the five validated DSH `0.2.2-rc.1` through
`0.2.2-rc.5` versions explicitly. Pin their fixtures to Cordis `4.1.0`
with matching session codecs and validate plugin/host Cordis peers.
Other unvalidated previews remain excluded from npm peer support. These
changes have not been published to npm. Related PRs: #2614 and #2632.

- 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
Expand Down
134 changes: 134 additions & 0 deletions apps/memos-local-plugin/adapters/deepseek-harness/COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,140 @@ Validated on 2026-10-29, macOS arm64, Node.js 25.1.0, npm 11.6.2,
pnpm 10.21.0. Scope: the local plugin; the Cloud plugin is separate.
Related: MemOS issue #2520 and PR #2541.

## DSH 0.2.2-rc.1 through rc.5 validation — 2026-11-19

This update incorporates PR #2614 in PR #2632 and was tested on macOS arm64,
Node.js 25.1.0, and npm 11.6.2. All five published 0.2.2 release candidates
are now explicitly admitted by the six optional host-service peers.

The intermediate-version regressions first failed in six places. npm's
default peer checks rejected rc.2, rc.3 and rc.4, and their fixtures selected
Cordis ~4.0.5 and the 0.2.1-rc.3 session codec. Each of these hosts requires
Cordis ~4.1.0. The overrides table now pins all five 0.2.2 fixtures to Cordis
4.1.0 with each host's matching codec. The fixture also checks plugin and
host Cordis peer requirements. Runtime adapter changes were unnecessary
after these dependency-selection fixes.

The peer declarations list rc.1, rc.2, rc.3, rc.4 and rc.5 individually.
The package regression continues to reject rc.6, stable 0.2.2 and 0.3.x
under npm's default semver evaluation.

Verification output:

```text
make format: All checks passed! / 642 files left unchanged
npm test: Test Files 192 passed (192)
Tests 1669 passed | 3 skipped (1672)
pytest apps/memos-local-plugin/tests/python -q: 143 passed in 5.64s
npm run lint: passed
npm run build:package: passed
npm run lock:check: SQLite 13.0.3 lock metadata verified
npm run test:dsh-compat -- 0.2.2-rc.2 0.2.2-rc.3 0.2.2-rc.4:
PASS all 3 DSH versions
npm run test:dsh-compat: PASS all 10 DSH versions
```

All ten real host stacks passed type checking, a production TypeScript
build, and 71 adapter tests each. The matrix covers 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, and every release from 0.2.2-rc.1
through 0.2.2-rc.5. The matching host packages were fetched from npm.
Existing non-host build tools and unchanged native bindings were reused.

The first matrix attempts were interrupted by npm/Node registry connection
timeouts. The successful runs used an explicit temporary Undici proxy
dispatcher for the machine's system HTTPS proxy, with loopback traffic
bypassing it. No proxy dependency was added to the plugin.

The official rc.5 loader uses semver includePrerelease enabled. A real
dump-config comparison showed that the older >=0.2.1-rc.2 <0.2.2 comparator
already admits rc.5 at startup. The explicit prerelease declarations address
npm's default peer-evaluation mismatch.

### Real Web startup checks

Official DSH CLI packages were installed separately with lifecycle scripts
disabled. An npm-packed local plugin runtime was loaded into fresh Web
profiles with synthetic local settings, telemetry disabled, and
failOnStartupError enabled.

| DSH version | API/build/71 adapter tests | Actual macOS Web startup |
| --- | --- | --- |
| 0.2.2-rc.1 | Passed | Unverified |
| 0.2.2-rc.2 | Passed | Passed |
| 0.2.2-rc.3 | Passed | Passed |
| 0.2.2-rc.4 | Passed | Passed |
| 0.2.2-rc.5 | Passed | Passed in the initial rc.5 validation |

For rc.2, rc.3 and rc.4, the composed profile contained the MemOS row with no
version exemption. Actual startup created SQLite storage and returned HTTP
200 from the Viewer health endpoint with agent deepseek-harness. SIGINT
stopped each Web process with exit code 130. The prior rc.5 smoke produced
the same results.

### Fresh installation and real local-model round trip

A fresh official DSH 0.2.2-rc.5 CLI was installed using npm with normal
dependency lifecycle scripts. The branch source was built and packed with
npm pack, including its prepack build. The local tarball retained the
branch's package version 2.0.16-beta.1 and was identified by its branch
contents rather than an npm release tag.

The first actual installer run failed with ERR_PNPM_IGNORED_BUILDS for
esbuild@0.28.2. The tarball's tsx range ^4.21.0 resolved to 4.23.15 under
pnpm, which ignores the tarball's npm lock. A failing regression reproduced
the manifest/validated-version mismatch. Pinning tsx to the already locked
4.21.0, with both lock importers synchronized, resolved the installation
failure while retaining the existing reviewed script policy.

The rebuilt source tarball was installed into a second fresh DSH home using
the official Unix installer and an isolated pnpm 11.7.0. Actual installed
versions were tsx 4.21.0, esbuild 0.27.7, better-sqlite3 13.0.3 and
onnxruntime-node 1.24.3. The installer's SQLite write/read probe and bundled
ONNX CPU backend probe both passed.

A real Ollama-backed headless test used existing local qwen2.5:0.5b and
nomic-embed-text models. The MemOS auxiliary LLM calls used DSH's host-model
bridge, and the embedding endpoint produced 768-dimensional embeddings.
For the small local model, the test profile retained the MemOS tools and
disabled unrelated tool providers. The initial full-tool profile exceeded
Ollama's 4096-token context and produced off-topic answers, so that run was
not used as evidence of answer correctness.

The successful test created a fresh memory directory and separate DSH
sessions/processes for each prompt:

1. Store the synthetic fact that Project Orchid-Z91 uses port 47381.
The model replied SAVED and the first trace was persisted.
2. Restart DSH into a new session and ask for the project's port without
supplying the number. The model answered Project Orchid-Z91 port 47381.
3. Ask the model to call memos_search. The real tool call completed, returned
the two earlier memories, and the final answer included port 47381.

The compressed V4 session logs confirmed a producer-owned MemOS recall
message containing memos_context and the correct port in the second and
third sessions. SQLite had three persisted traces with embedding vectors,
and PRAGMA integrity_check returned ok. Each successful headless turn
exited 0 and its lightweight capture reported warnings=0. Ollama's server
log also recorded HTTP 500 responses during auxiliary activity, while
these turns and captures completed successfully.

The headless --json stdout also includes MemOS core log lines. This test
parsed the JSON event lines separately and preserved the complete output.
Strict NDJSON-only stdout is an outstanding integration limitation.

These tests used package-manager-installed dependency trees and synthetic
local inputs. The temporary Ollama server was stopped after validation.

### Remaining verification and release scope

Cloud-provider authenticated conversations, packaged Desktop applications
on macOS, Windows and Linux, live model downloads, and production-profile
upgrades remain unverified. Fresh installation was exercised on macOS with
DSH rc.5, Node.js 25.1.0 and pnpm 11.7.0. Other platform/runtime installation
combinations and full-tool agent answer quality remain unverified.
The Cloud plugin and other DSH previews are outside this validation.
These source changes have not been published to npm.

## Diagnosis

The local plugin's six optional host-service peers excluded DSH 0.2.x.
Expand Down
27 changes: 23 additions & 4 deletions apps/memos-local-plugin/adapters/deepseek-harness/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ 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
> substitute for validating each packaged Desktop/Web/CLI release.
> `0.2.1-rc.2`, `0.2.1-rc.3`, and the five `0.2.2-rc.1` through
> `0.2.2-rc.5` releases.
> Validate the packaged Desktop/Web/CLI release as well as these API checks.

## How it works

Expand Down Expand Up @@ -622,6 +623,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.5
```

The script needs npm registry access. It installs each real host peer graph in
Expand All @@ -638,15 +640,26 @@ 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 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5
```

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 five tested `0.2.2-rc.1` through `0.2.2-rc.5`
versions are admitted explicitly. Other unvalidated `0.2.2` releases and
`0.3.x` remain excluded by npm's default evaluation. All five new fixtures
pin Cordis `4.1.0` and their matching V3-to-V4 codec. The matrix
checks that Cordis satisfies the plugin and each host service peer range.
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.

DSH `0.2.2-rc.5` evaluates startup compatibility with
`includePrerelease: true`. Its loader also accepts `0.2.2-rc.5` under the
older `>=0.2.1-rc.2 <0.2.2` comparator. npm's default peer evaluation still
excludes that prerelease, so the explicit declaration above is needed for
package-manager compatibility. Check both installation and runtime startup.

There are two independent checks to distinguish:

- **Startup: bundle skipped as incompatible.** Plugin `2.0.20` and `2.0.21`
Expand All @@ -663,6 +676,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
Expand Down
14 changes: 7 additions & 7 deletions apps/memos-local-plugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions apps/memos-local-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,18 @@
"@sinclair/typebox": "^0.34.48",
"better-sqlite3": "13.0.3",
"preact": "^10.29.1",
"tsx": "^4.21.0",
"tsx": "4.21.0",
"uuid": "^10.0.0",
"yaml": "^2.6.0"
},
"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 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
"@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 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
"@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 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
"@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 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
"@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 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
"@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 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
"@deepseek-ai/schemastery": "^3.18.1"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion apps/memos-local-plugin/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 27 additions & 1 deletion apps/memos-local-plugin/scripts/check-dsh-compatibility.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@ import { tmpdir } from "node:os";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { spawnSync } from "node:child_process";
import { satisfies } from "semver";

// Install each real host API in isolation; never rewrite the checkout's dependencies
// or use a customer's DSH profile, credentials, or session data.
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const manifest = JSON.parse(await readFile(join(root, "package.json"), "utf8"));
// Keep newer host fixtures on their matching codec and an exact Cordis build.
const hostOverrides = {
"0.2.2-rc.1": { cordis: "4.1.0" },
"0.2.2-rc.2": { cordis: "4.1.0" },
"0.2.2-rc.3": { cordis: "4.1.0" },
"0.2.2-rc.4": { cordis: "4.1.0" },
"0.2.2-rc.5": { cordis: "4.1.0" },
};
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.2-rc.1", "0.2.2-rc.2", "0.2.2-rc.3", "0.2.2-rc.4", "0.2.2-rc.5",
);
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");
Expand All @@ -26,15 +36,25 @@ function run(command, args, cwd) {
}

for (const version of versions) {
const override = hostOverrides[version];
const fixture = join(matrix, version);
await mkdir(fixture);
const devDependencies = Object.fromEntries(
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" || override)
? version : value]),
);
if (override) {
devDependencies["@deepseek-ai/cordis"] = override.cordis;
}
const cordisVersion = devDependencies["@deepseek-ai/cordis"];
const pluginCordis = manifest.peerDependencies["@deepseek-ai/cordis"];
if (override && !satisfies(cordisVersion, pluginCordis)) {
throw new Error(`Cordis ${cordisVersion} does not satisfy plugin peer ${pluginCordis}`);
}
// Early DSH previews used caret peers. Letting npm choose their latest
// prerelease mixes rc.6 and rc.8, so pin the entire host peer closure.
const inspected = new Set();
Expand All @@ -49,6 +69,12 @@ for (const version of versions) {
}));
const next = new Set();
for (const pkg of metadata) {
const hostCordis = pkg.peerDependencies?.["@deepseek-ai/cordis"];
if (override && hostCordis && !satisfies(cordisVersion, hostCordis)) {
throw new Error(
`Cordis ${cordisVersion} does not satisfy ${pkg.name}@${version} peer ${hostCordis}`,
);
}
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;
Expand Down
Loading
Loading