dsh-mnemon 0.5.17 → 0.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cordis.patch.yml +5 -5
- package/lib/index.js +9 -7
- package/lib/starter.js +67 -0
- package/lib/types/src/starter.d.ts +5 -0
- package/package.json +14 -3
package/cordis.patch.yml
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# Mount the Mnemon bridge into a DSH profile. A profile's final patch may
|
|
2
2
|
# replace this config row as a whole; use user settings or environment
|
|
3
3
|
# variables for one-field overrides such as cliPath.
|
|
4
|
-
# Connection's generic RPC registry uses its owning Context to mount routes.
|
|
5
|
-
# DSH's Web profile (0.1.7-rc.2 included) injects only webRuntime there.
|
|
6
|
-
- id: connection
|
|
7
|
-
inject: [webRuntime, webServer]
|
|
8
|
-
|
|
9
4
|
- insert:
|
|
5
|
+
# Readiness belongs to the Starter, not the core toggle: the native group
|
|
6
|
+
# must remain mounted while its legacy gate disables individual children.
|
|
7
|
+
- id: mnemon-starter
|
|
8
|
+
name: dsh-mnemon/starter
|
|
10
9
|
# Keep the v0.4 `mnemon` Entry as the public configuration target while
|
|
11
10
|
# making every v0.5 component inherit its enabled state. The expression
|
|
12
11
|
# reads the core row's own flag (rather than its effective state) to avoid
|
|
@@ -14,6 +13,7 @@
|
|
|
14
13
|
- id: mnemon-bundle
|
|
15
14
|
name: cordis:group
|
|
16
15
|
group: true
|
|
16
|
+
inject: [mnemonStarterReady]
|
|
17
17
|
disabled: !!js >-
|
|
18
18
|
((entry) => entry.options.disabled?.__jsExpr
|
|
19
19
|
? Boolean(entry.evaluate(entry.options.disabled.__jsExpr))
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { RUNTIME_ENTRY_DELIMITER, RUNTIME_MEMORY_LIMITS, RUNTIME_MEMORY_VERSION
|
|
|
15
15
|
import { threeTierActionWorkflow } from "dsh-mnemon-strategy-default-three-tier/extension-sdk";
|
|
16
16
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
18
|
-
import { findMnemonCommand, mnemonNpmLauncher, nodeLauncherEnvironment } from "dsh-mnemon-source-memory-spaces/native-cli";
|
|
18
|
+
import { findMnemonCommand, mnemonNpmLauncher, nodeLauncherEnvironment, resolveMnemonInvocation } from "dsh-mnemon-source-memory-spaces/native-cli";
|
|
19
19
|
import { spawn } from "node:child_process";
|
|
20
20
|
import { StringDecoder } from "node:string_decoder";
|
|
21
21
|
import { z as z$1 } from "zod";
|
|
@@ -6475,7 +6475,8 @@ var VersionUpdateManager = class {
|
|
|
6475
6475
|
const launcher = mnemonNpmLauncher(command);
|
|
6476
6476
|
let current;
|
|
6477
6477
|
try {
|
|
6478
|
-
|
|
6478
|
+
const invocation = resolveMnemonInvocation(command, ["--version"]);
|
|
6479
|
+
current = versionFrom((await resultOrThrow(this.processRunner, invocation.command, invocation.args, CHECK_TIMEOUT_MS, { env: invocation.env })).stdout);
|
|
6479
6480
|
} catch {
|
|
6480
6481
|
return { install: {
|
|
6481
6482
|
mode: launcher === void 0 ? "manual" : "npm",
|
|
@@ -10231,11 +10232,12 @@ function apply(rawContext, rawConfig = {}) {
|
|
|
10231
10232
|
registerTools(ctx, runtime, coordinator);
|
|
10232
10233
|
registerCommands(ctx.commands, runtime, coordinator);
|
|
10233
10234
|
registerGuidance(ctx, resolved);
|
|
10234
|
-
ctx.inject(["connection"], (webContext) => {
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
const
|
|
10238
|
-
const
|
|
10235
|
+
ctx.inject(["connection", "webServer"], (webContext) => {
|
|
10236
|
+
const connection = Context.is(webContext) ? webContext.extend({ webServer: webContext.get("webServer") }).connection : webContext.connection;
|
|
10237
|
+
if (connection === void 0) return;
|
|
10238
|
+
const rpc = registerRpc(connection, runtime, lifecycle);
|
|
10239
|
+
const settings = registerSettingsRpc(connection, hostSettings);
|
|
10240
|
+
const view = registerViewRpc(connection, runtime, extensions, memoryPlugins, lifecycle, pluginInstallation);
|
|
10239
10241
|
if (Context.is(webContext)) new MnemonRemoteService(webContext, {
|
|
10240
10242
|
...rpc,
|
|
10241
10243
|
settings,
|
package/lib/starter.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
//#region package.json
|
|
4
|
+
var name$1 = "dsh-mnemon";
|
|
5
|
+
var dependencies = {
|
|
6
|
+
"@deepseek-ai/cosmokit": "^1.8.5",
|
|
7
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
8
|
+
"dsh-mnemon-provider-byterover": "0.5.5",
|
|
9
|
+
"dsh-mnemon-provider-hindsight": "0.5.5",
|
|
10
|
+
"dsh-mnemon-provider-holographic": "0.5.5",
|
|
11
|
+
"dsh-mnemon-provider-honcho": "0.5.5",
|
|
12
|
+
"dsh-mnemon-provider-mem0": "0.5.5",
|
|
13
|
+
"dsh-mnemon-provider-mnemon-native": "0.5.6",
|
|
14
|
+
"dsh-mnemon-provider-openviking": "0.5.7",
|
|
15
|
+
"dsh-mnemon-provider-retaindb": "0.5.5",
|
|
16
|
+
"dsh-mnemon-provider-supermemory": "0.5.5",
|
|
17
|
+
"dsh-mnemon-source-documents": "0.5.7",
|
|
18
|
+
"dsh-mnemon-source-memory-spaces": "0.5.12",
|
|
19
|
+
"dsh-mnemon-source-runtime": "0.5.10",
|
|
20
|
+
"dsh-mnemon-strategy-auto-capture": "0.5.5",
|
|
21
|
+
"dsh-mnemon-strategy-default-three-tier": "0.5.7",
|
|
22
|
+
"dsh-mnemon-strategy-general": "0.5.1",
|
|
23
|
+
"dsh-mnemon-strategy-light-context": "0.5.5",
|
|
24
|
+
"dsh-mnemon-strategy-scoped": "0.5.5",
|
|
25
|
+
"fflate": "^0.8.3",
|
|
26
|
+
"yaml": "^2.9.0",
|
|
27
|
+
"zod": "^4.4.3"
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/starter-resolution.ts
|
|
31
|
+
/** Make the selected Starter's dependency closure visible before its child Entries import. */
|
|
32
|
+
function prepareStarterResolution(ctx) {
|
|
33
|
+
const packages = ctx.get("pluginPackages");
|
|
34
|
+
const profile = ctx.get("profileContext");
|
|
35
|
+
if (profile === void 0 || typeof packages?.replace !== "function") return;
|
|
36
|
+
const parent = pathToFileURL(join(profile.dir, "package.json")).href;
|
|
37
|
+
if (Object.keys(dependencies).filter((name) => name.startsWith("dsh-mnemon-")).every((name) => packages.packageOf(name, parent) !== void 0)) return;
|
|
38
|
+
return import("@deepseek-ai/dsh-app-boot").then(async ({ createRuntimeResolution, loadProfileDirectory, resolveBundleDir }) => {
|
|
39
|
+
const selected = loadProfileDirectory("dsh-mnemon", profile.dir, profile.installAnchor);
|
|
40
|
+
if (!selected.layers.some((layer) => layer.packageName === name$1)) return;
|
|
41
|
+
const layers = [...profile.startedBundles.map((packageName) => ({
|
|
42
|
+
packageName,
|
|
43
|
+
packageDir: resolveBundleDir("dsh-mnemon", packageName, profile.installAnchor, profile.dir),
|
|
44
|
+
patchPaths: [],
|
|
45
|
+
patches: []
|
|
46
|
+
})), ...selected.layers.filter((layer) => !profile.startedBundles.includes(layer.packageName))];
|
|
47
|
+
packages.replace(await createRuntimeResolution({
|
|
48
|
+
installAnchor: profile.installAnchor,
|
|
49
|
+
profile: {
|
|
50
|
+
...selected,
|
|
51
|
+
layers
|
|
52
|
+
},
|
|
53
|
+
home: profile.home
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/starter.ts
|
|
59
|
+
const name = "dsh-mnemon-starter";
|
|
60
|
+
const provide = ["mnemonStarterReady"];
|
|
61
|
+
/** Prepare the Starter before its native group imports independent components. */
|
|
62
|
+
async function apply(ctx) {
|
|
63
|
+
await prepareStarterResolution(ctx);
|
|
64
|
+
ctx.provide("mnemonStarterReady", true);
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { apply, name, provide };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
export declare const name = "dsh-mnemon-starter";
|
|
3
|
+
export declare const provide: string[];
|
|
4
|
+
/** Prepare the Starter before its native group imports independent components. */
|
|
5
|
+
export declare function apply(ctx: Context): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.18",
|
|
4
4
|
"description": "Composable, view-based memory for DeepSeek Harness. Pluggable sources and strategies, with layered memory out of the box.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -89,7 +89,11 @@
|
|
|
89
89
|
"default": "./lib/testing.js"
|
|
90
90
|
},
|
|
91
91
|
"./package.json": "./package.json",
|
|
92
|
-
"./locale/*.json": "./locale/*.json"
|
|
92
|
+
"./locale/*.json": "./locale/*.json",
|
|
93
|
+
"./starter": {
|
|
94
|
+
"types": "./lib/types/src/starter.d.ts",
|
|
95
|
+
"default": "./lib/starter.js"
|
|
96
|
+
}
|
|
93
97
|
},
|
|
94
98
|
"files": [
|
|
95
99
|
"locale",
|
|
@@ -153,7 +157,7 @@
|
|
|
153
157
|
"dsh-mnemon-provider-retaindb": "0.5.5",
|
|
154
158
|
"dsh-mnemon-provider-supermemory": "0.5.5",
|
|
155
159
|
"dsh-mnemon-source-documents": "0.5.7",
|
|
156
|
-
"dsh-mnemon-source-memory-spaces": "0.5.
|
|
160
|
+
"dsh-mnemon-source-memory-spaces": "0.5.12",
|
|
157
161
|
"dsh-mnemon-source-runtime": "0.5.10",
|
|
158
162
|
"dsh-mnemon-strategy-auto-capture": "0.5.5",
|
|
159
163
|
"dsh-mnemon-strategy-default-three-tier": "0.5.7",
|
|
@@ -166,6 +170,7 @@
|
|
|
166
170
|
},
|
|
167
171
|
"peerDependencies": {
|
|
168
172
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
173
|
+
"@deepseek-ai/dsh-app-boot": "^0.1.7-rc.2",
|
|
169
174
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.2",
|
|
170
175
|
"@deepseek-ai/dsh-typert-protocol": "^0.1.7-rc.2",
|
|
171
176
|
"react": "^18.2.0",
|
|
@@ -179,6 +184,7 @@
|
|
|
179
184
|
"@deepseek-ai/dsh-agent": "0.1.7-rc.2",
|
|
180
185
|
"@deepseek-ai/dsh-agent-loop": "0.1.7-rc.2",
|
|
181
186
|
"@deepseek-ai/dsh-api-gateway": "0.1.7-rc.2",
|
|
187
|
+
"@deepseek-ai/dsh-app-boot": "0.1.7-rc.2",
|
|
182
188
|
"@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
|
|
183
189
|
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
|
|
184
190
|
"@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
|
|
@@ -244,5 +250,10 @@
|
|
|
244
250
|
},
|
|
245
251
|
"bin": {
|
|
246
252
|
"dsh-mnemon-repair-session": "bin/repair-legacy-session.mjs"
|
|
253
|
+
},
|
|
254
|
+
"peerDependenciesMeta": {
|
|
255
|
+
"@deepseek-ai/dsh-app-boot": {
|
|
256
|
+
"optional": true
|
|
257
|
+
}
|
|
247
258
|
}
|
|
248
259
|
}
|