dsh-mnemon 0.5.19 → 0.5.20
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 +3 -7
- package/lib/bundle.js +30 -0
- package/lib/client.js +2 -2
- package/lib/starter-resolution-Dgz1uPrs.js +58 -0
- package/lib/starter.js +5 -58
- package/lib/types/src/bundle.d.ts +18 -0
- package/lib/types/src/starter.d.ts +4 -1
- package/package.json +5 -1
package/cordis.patch.yml
CHANGED
|
@@ -2,18 +2,14 @@
|
|
|
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
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
|
|
9
5
|
# Keep the v0.4 `mnemon` Entry as the public configuration target while
|
|
10
6
|
# making every v0.5 component inherit its enabled state. The expression
|
|
11
7
|
# reads the core row's own flag (rather than its effective state) to avoid
|
|
12
|
-
# recursing through this ancestor gate.
|
|
8
|
+
# recursing through this ancestor gate. The group itself prepares the
|
|
9
|
+
# Starter's dependency resolution before it imports its children.
|
|
13
10
|
- id: mnemon-bundle
|
|
14
|
-
name:
|
|
11
|
+
name: dsh-mnemon/bundle
|
|
15
12
|
group: true
|
|
16
|
-
inject: [mnemonStarterReady]
|
|
17
13
|
disabled: !!js >-
|
|
18
14
|
((entry) => entry.options.disabled?.__jsExpr
|
|
19
15
|
? Boolean(entry.evaluate(entry.options.disabled.__jsExpr))
|
package/lib/bundle.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { t as prepareStarterResolution } from "./starter-resolution-Dgz1uPrs.js";
|
|
2
|
+
//#region src/bundle.ts
|
|
3
|
+
const groupKey = Symbol.for("cordis.group");
|
|
4
|
+
const init = Symbol.for("cordis.init");
|
|
5
|
+
/**
|
|
6
|
+
* The Starter's component group (`mnemon-bundle`). It makes the Starter's
|
|
7
|
+
* dependency closure visible, then mounts the children with the Loader's own
|
|
8
|
+
* `cordis:group`, so a component enabled without a restart resolves and no
|
|
9
|
+
* separate readiness Entry can be turned off while the group waits for it.
|
|
10
|
+
*/
|
|
11
|
+
var MnemonBundle = class {
|
|
12
|
+
ctx;
|
|
13
|
+
config;
|
|
14
|
+
static inject = ["loader"];
|
|
15
|
+
static [groupKey] = true;
|
|
16
|
+
constructor(ctx, config) {
|
|
17
|
+
this.ctx = ctx;
|
|
18
|
+
this.config = config;
|
|
19
|
+
}
|
|
20
|
+
async *[init]() {
|
|
21
|
+
await prepareStarterResolution(this.ctx);
|
|
22
|
+
const Group = this.ctx.loader?.builtins?.group;
|
|
23
|
+
if (typeof Group !== "function") throw new Error("dsh-mnemon/bundle needs the Loader's cordis:group builtin");
|
|
24
|
+
const group = new Group(this.ctx, this.config);
|
|
25
|
+
yield () => group.stop();
|
|
26
|
+
await group.update(this.config);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { MnemonBundle as default };
|
package/lib/client.js
CHANGED
|
@@ -2086,7 +2086,7 @@ window.__ModuleLoader__.load({
|
|
|
2086
2086
|
"feedback.retry": "重试",
|
|
2087
2087
|
"feedback.failed": "未能应用修改,已保留原来的设置。",
|
|
2088
2088
|
"feedback.layerResumed": "“{layer}”已恢复运行",
|
|
2089
|
-
"config.componentListNote": "下方组件列表中的
|
|
2089
|
+
"config.componentListNote": "下方组件列表中的 dsh-mnemon/bundle 是 Starter 的分组条目,显示“已关闭”不影响运行。",
|
|
2090
2090
|
"layers.disabledBadge": "已关闭",
|
|
2091
2091
|
"layers.disabledTitle": "{layer} 已关闭",
|
|
2092
2092
|
"layers.disabledDescription": "此记忆层当前不参与记忆处理。",
|
|
@@ -2675,7 +2675,7 @@ window.__ModuleLoader__.load({
|
|
|
2675
2675
|
"feedback.retry": "Retry",
|
|
2676
2676
|
"feedback.failed": "Could not apply the change; the previous settings are kept.",
|
|
2677
2677
|
"feedback.layerResumed": "“{layer}” is running again",
|
|
2678
|
-
"config.componentListNote": "In the component list below,
|
|
2678
|
+
"config.componentListNote": "In the component list below, dsh-mnemon/bundle is the Starter's grouping entry; it shows as off without affecting anything.",
|
|
2679
2679
|
"layers.disabledBadge": "Off",
|
|
2680
2680
|
"layers.disabledTitle": "{layer} is off",
|
|
2681
2681
|
"layers.disabledDescription": "This memory layer is not participating in memory processing.",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
//#region package.json
|
|
4
|
+
var name = "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.7",
|
|
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.8",
|
|
18
|
+
"dsh-mnemon-source-memory-spaces": "0.5.13",
|
|
19
|
+
"dsh-mnemon-source-runtime": "0.5.11",
|
|
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)) 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
|
+
export { prepareStarterResolution as t };
|
package/lib/starter.js
CHANGED
|
@@ -1,64 +1,11 @@
|
|
|
1
|
-
import {
|
|
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.7",
|
|
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.8",
|
|
18
|
-
"dsh-mnemon-source-memory-spaces": "0.5.13",
|
|
19
|
-
"dsh-mnemon-source-runtime": "0.5.11",
|
|
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
|
|
1
|
+
import { t as prepareStarterResolution } from "./starter-resolution-Dgz1uPrs.js";
|
|
58
2
|
//#region src/starter.ts
|
|
59
3
|
const name = "dsh-mnemon-starter";
|
|
60
4
|
const provide = ["mnemonStarterReady"];
|
|
61
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The separate readiness Entry of 0.5.18 and 0.5.19, kept for compositions that
|
|
7
|
+
* still insert it; the Starter's own group (`dsh-mnemon/bundle`) now prepares itself.
|
|
8
|
+
*/
|
|
62
9
|
async function apply(ctx) {
|
|
63
10
|
await prepareStarterResolution(ctx);
|
|
64
11
|
ctx.provide("mnemonStarterReady", true);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
declare const groupKey: unique symbol;
|
|
3
|
+
declare const init: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* The Starter's component group (`mnemon-bundle`). It makes the Starter's
|
|
6
|
+
* dependency closure visible, then mounts the children with the Loader's own
|
|
7
|
+
* `cordis:group`, so a component enabled without a restart resolves and no
|
|
8
|
+
* separate readiness Entry can be turned off while the group waits for it.
|
|
9
|
+
*/
|
|
10
|
+
export default class MnemonBundle {
|
|
11
|
+
private readonly ctx;
|
|
12
|
+
private readonly config;
|
|
13
|
+
static inject: string[];
|
|
14
|
+
static [groupKey]: boolean;
|
|
15
|
+
constructor(ctx: Context, config: unknown);
|
|
16
|
+
[init](): AsyncGenerator<() => void, void, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
export declare const name = "dsh-mnemon-starter";
|
|
3
3
|
export declare const provide: string[];
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The separate readiness Entry of 0.5.18 and 0.5.19, kept for compositions that
|
|
6
|
+
* still insert it; the Starter's own group (`dsh-mnemon/bundle`) now prepares itself.
|
|
7
|
+
*/
|
|
5
8
|
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.20",
|
|
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",
|
|
@@ -93,6 +93,10 @@
|
|
|
93
93
|
"./starter": {
|
|
94
94
|
"types": "./lib/types/src/starter.d.ts",
|
|
95
95
|
"default": "./lib/starter.js"
|
|
96
|
+
},
|
|
97
|
+
"./bundle": {
|
|
98
|
+
"types": "./lib/types/src/bundle.d.ts",
|
|
99
|
+
"default": "./lib/bundle.js"
|
|
96
100
|
}
|
|
97
101
|
},
|
|
98
102
|
"files": [
|