mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-01 02:04:21 +00:00
fix(dsh): support latest host prerelease (#548)
This commit is contained in:
parent
fe336da566
commit
d67f1490f5
7 changed files with 67 additions and 21 deletions
|
|
@ -26,7 +26,7 @@ The DSH adapter injects **usage guidance**, not every historical memory. Relevan
|
|||
## 2. Requirements
|
||||
|
||||
- ReMe is installed and its configuration exposes the `search`, `auto_memory`, and `auto_dream` jobs.
|
||||
- DeepSeek Harness `0.1.2-rc.1` or later; this integration is tested against `0.1.5-rc.2`.
|
||||
- DeepSeek Harness `0.1.5-rc.2`.
|
||||
- Node.js `^22.19.0` or `>=24.0.0`, matching the current DSH engine range.
|
||||
- The browser running DSH can reach the configured ReMe HTTP endpoint. Cross-machine deployments must also allow the DSH browser origin.
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ DSH 启动新会话时,插件向根 Agent 注入一段“如何使用长期记
|
|||
## 2. 环境要求
|
||||
|
||||
- ReMe Python 服务已安装,且配置中提供 `search`、`auto_memory` 和 `auto_dream` Job。
|
||||
- DeepSeek Harness `0.1.2-rc.1` 或更高版本;本次已针对 `0.1.5-rc.2` 验证。
|
||||
- DeepSeek Harness `0.1.5-rc.2`。
|
||||
- Node.js `^22.19.0` 或 `>=24.0.0`,与当前 DSH 的 engine 范围一致。
|
||||
- DSH 页面能够访问 ReMe HTTP 地址;跨机器部署时还要允许 DSH 页面所在的浏览器 Origin。
|
||||
|
||||
|
|
|
|||
14
integrations/dsh/package-lock.json
generated
14
integrations/dsh/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@agentscope-ai/reme-dsh-plugin",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@agentscope-ai/reme-dsh-plugin",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "4.0.2",
|
||||
|
|
@ -41,11 +41,11 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "^4.0.2",
|
||||
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-llm": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-settings": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-tools": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-typert-protocol": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-settings": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/schemastery": "^3.18.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@agentscope-ai/reme-dsh-plugin",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "ReMe memory and context integration for DeepSeek Harness",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
|
@ -51,11 +51,11 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "^4.0.2",
|
||||
"@deepseek-ai/dsh-llm": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-settings": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-typert-protocol": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-tools": "^0.1.2-rc.1",
|
||||
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-settings": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
|
||||
"@deepseek-ai/schemastery": "^3.18.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { execFile } from "node:child_process";
|
||||
import assert from "node:assert/strict";
|
||||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
|
|
@ -34,6 +34,46 @@ try {
|
|||
assert.ok(files.has(file), `missing ${file}`);
|
||||
}
|
||||
assert.ok(![...files].some((file) => file.includes("openclaw")));
|
||||
|
||||
const consumerDirectory = path.join(temporaryDirectory, "consumer");
|
||||
await mkdir(consumerDirectory);
|
||||
await writeFile(
|
||||
path.join(consumerDirectory, "package.json"),
|
||||
'{"name":"reme-dsh-package-consumer","private":true}\n',
|
||||
);
|
||||
const hostDependencies = [
|
||||
"@deepseek-ai/dsh-client-ui-primitives",
|
||||
"@deepseek-ai/dsh-llm",
|
||||
"@deepseek-ai/dsh-settings",
|
||||
"@deepseek-ai/dsh-tools",
|
||||
"@deepseek-ai/dsh-typert-protocol",
|
||||
].map((dependency) => `${dependency}@0.1.5-rc.2`);
|
||||
await execFileAsync(
|
||||
"npm",
|
||||
[
|
||||
"install",
|
||||
"--ignore-scripts",
|
||||
"--no-audit",
|
||||
"--no-fund",
|
||||
path.join(temporaryDirectory, result.filename),
|
||||
...hostDependencies,
|
||||
],
|
||||
{ cwd: consumerDirectory },
|
||||
);
|
||||
await execFileAsync(
|
||||
process.execPath,
|
||||
[
|
||||
"--input-type=module",
|
||||
"--eval",
|
||||
[
|
||||
'const plugin = await import("@agentscope-ai/reme-dsh-plugin");',
|
||||
'if (typeof plugin.apply !== "function") throw new Error("missing apply export");',
|
||||
'if (!Array.isArray(plugin.inject)) throw new Error("missing inject export");',
|
||||
'if (plugin.Config === undefined) throw new Error("missing Config export");',
|
||||
].join("\n"),
|
||||
],
|
||||
{ cwd: consumerDirectory },
|
||||
);
|
||||
} finally {
|
||||
await rm(temporaryDirectory, { force: true, recursive: true });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,16 @@ test("declares one installable DeepSeek Harness plugin", async () => {
|
|||
assert.equal(manifest.dsh.client.platform, "web");
|
||||
assert.equal(manifest.dsh.bundle.patch, "./cordis.patch.yml");
|
||||
assert.equal(manifest.dependencies, undefined);
|
||||
assert.equal(
|
||||
manifest.peerDependencies["@deepseek-ai/dsh-llm"],
|
||||
"^0.1.2-rc.1",
|
||||
);
|
||||
for (const dependency of [
|
||||
"@deepseek-ai/dsh-client-ui-primitives",
|
||||
"@deepseek-ai/dsh-llm",
|
||||
"@deepseek-ai/dsh-settings",
|
||||
"@deepseek-ai/dsh-tools",
|
||||
"@deepseek-ai/dsh-typert-protocol",
|
||||
]) {
|
||||
assert.equal(manifest.peerDependencies[dependency], "^0.1.5-rc.2");
|
||||
assert.equal(manifest.peerDependenciesMeta[dependency]?.optional, true);
|
||||
}
|
||||
assert.equal(manifest.peerDependencies.openclaw, undefined);
|
||||
assert.match(patch, /remeMemory: true/);
|
||||
assert.doesNotMatch(patch, /@agentscope-ai\/reme\/dsh/);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ def test_typescript_host_plugins_are_independent_packages() -> None:
|
|||
|
||||
assert manifests["dsh"]["name"] == "@agentscope-ai/reme-dsh-plugin"
|
||||
assert manifests["openclaw"]["name"] == "@agentscope-ai/reme-openclaw-plugin"
|
||||
assert manifests["dsh"]["version"] == "0.1.0"
|
||||
assert manifests["dsh"]["version"] == "0.1.1"
|
||||
assert manifests["openclaw"]["version"] == "0.1.0"
|
||||
assert manifests["dsh"].get("dependencies", {}) == {}
|
||||
assert manifests["openclaw"].get("dependencies", {}) == {"typebox": "1.3.19"}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue