dsh-mnemon 0.5.39 → 0.5.41
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/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/lib/bundle.js +1 -1
- package/lib/client.js +99 -2
- package/lib/core.js +1 -1
- package/lib/index.js +434 -61
- package/lib/{runtime-0u6dOiF9.js → runtime-DmL0It3P.js} +43 -11
- package/lib/{starter-resolution-C3yJawlA.js → starter-resolution-xVjONc6g.js} +3 -3
- package/lib/starter.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/types/src/client/locales.d.ts +9 -0
- package/lib/types/src/core/contracts/view.d.ts +12 -1
- package/lib/types/src/host/protocol.d.ts +12 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ npx @deepseek-ai/dsh web
|
|
|
111
111
|
4. For Memory Spaces, install the Mnemon CLI for Mnemon Native with `npm install --global @mnemon-dev/mnemon`, or enable another Provider on the Memory Spaces page.
|
|
112
112
|
5. Choose the main strategy and enhancements under **Plugins → dsh-mnemon**.
|
|
113
113
|
|
|
114
|
-
dsh-mnemon supports DSH `0.2.
|
|
114
|
+
dsh-mnemon supports published DSH `0.2.2-rc.1` and retains support for the `0.2.1` RC line and `0.2.0-rc.2`. RC1 requires Node.js >=24.9.0; older Hosts follow their own Node.js requirements. The same package serves the desktop app's Plugins page, `dsh plugin --profile web add dsh-mnemon` on the command line, and Headless with `dsh plugin --profile headless add dsh-mnemon`; older hosts keep the release [compatibility and upgrades](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/reference/compatibility.md) names for them. [Getting started](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/guides/getting-started.md) continues from here, and [compatibility and upgrades](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/reference/compatibility.md) covers existing installations.
|
|
115
115
|
|
|
116
116
|
## How it works
|
|
117
117
|
|
package/README.zh-CN.md
CHANGED
|
@@ -112,7 +112,7 @@ npx @deepseek-ai/dsh web
|
|
|
112
112
|
4. 使用记忆空间时,可用 `npm install --global @mnemon-dev/mnemon` 安装 Mnemon Native 所需的 CLI,或在记忆空间页面启用其他 Provider。
|
|
113
113
|
5. 在**插件 → 可组合记忆**中选择主策略与增强。
|
|
114
114
|
|
|
115
|
-
dsh-mnemon
|
|
115
|
+
dsh-mnemon 支持已发布的 DSH `0.2.2-rc.1`,同时保留对 `0.2.1` RC 系列和 `0.2.0-rc.2` 的支持。RC1 要求 Node.js >=24.9.0;旧版宿主遵循其各自的 Node.js 要求。同一个包也用于桌面版的插件页、命令行 `dsh plugin --profile web add dsh-mnemon`,以及 Headless:`dsh plugin --profile headless add dsh-mnemon`;更早的宿主请继续使用[兼容性与升级](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/reference/compatibility.md)为其列出的版本。接下来可以看[入门指南](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/guides/getting-started.md),已有安装的升级见[兼容性与升级](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/reference/compatibility.md)。
|
|
116
116
|
|
|
117
117
|
## 工作原理
|
|
118
118
|
|
package/lib/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as prepareStarterResolution } from "./starter-resolution-
|
|
1
|
+
import { t as prepareStarterResolution } from "./starter-resolution-xVjONc6g.js";
|
|
2
2
|
//#region src/bundle.ts
|
|
3
3
|
const groupKey = Symbol.for("cordis.group");
|
|
4
4
|
const init = Symbol.for("cordis.init");
|
package/lib/client.js
CHANGED
|
@@ -318,6 +318,8 @@ window.__ModuleLoader__.load({
|
|
|
318
318
|
allowUpdate: true,
|
|
319
319
|
targetScope: "user",
|
|
320
320
|
autoBacktest: true,
|
|
321
|
+
draftMaxTokens: 32768,
|
|
322
|
+
draftRetryMaxTokens: 65536,
|
|
321
323
|
hints: true,
|
|
322
324
|
sidebar: false,
|
|
323
325
|
reviewThreshold: 5,
|
|
@@ -2481,6 +2483,10 @@ window.__ModuleLoader__.load({
|
|
|
2481
2483
|
"status.title": "系统状态",
|
|
2482
2484
|
"status.description": "dsh-mnemon、记忆 Provider 与各层存储的运行状态。",
|
|
2483
2485
|
"status.nominal": "系统正常",
|
|
2486
|
+
"status.workflowUnavailable": "后台维护未运行",
|
|
2487
|
+
"status.workflowIdleReview": "空闲审查",
|
|
2488
|
+
"status.workflowRuntimeCapacity": "运行时容量维护",
|
|
2489
|
+
"status.workflowUnsupported": "当前策略不驱动:{workflows}。仅开启审查设置不会启动这些维护任务。可在记忆系统中选择支持相应能力的策略(如分层策略)。手动操作仍可使用。",
|
|
2484
2490
|
"status.reviewFailed": "空闲审查失败",
|
|
2485
2491
|
"status.reviewFailedDetail": "本轮记忆检查未完成,不会自动重放。后续审查受冷却时间和会话次数限制。",
|
|
2486
2492
|
"status.reviewPartial": "已有写入提交;请按下列回执核对,未回滚。",
|
|
@@ -2773,7 +2779,8 @@ window.__ModuleLoader__.load({
|
|
|
2773
2779
|
"details.currentMain": "当前主策略",
|
|
2774
2780
|
"details.useMain": "设为主策略",
|
|
2775
2781
|
"details.back": "返回“{component}”",
|
|
2776
|
-
"
|
|
2782
|
+
"config.strategyWorkflowNote": "空闲审查与运行时容量维护仅在当前策略支持相应能力时运行。General 策略不驱动这两项维护;设置会保留,可在记忆系统切换回分层策略后使用。",
|
|
2783
|
+
"threeTier.offNote": "当前插件未启用。后台任务还需主策略支持相应能力。",
|
|
2777
2784
|
"board.otherEnhancements": "适用于其他主策略的增强({count})",
|
|
2778
2785
|
"board.more": "更多组件可在插件列表中添加",
|
|
2779
2786
|
"board.relationNeeds": "需要“{component}”",
|
|
@@ -3140,6 +3147,10 @@ window.__ModuleLoader__.load({
|
|
|
3140
3147
|
"skills.autoBacktest": "草案自动回测",
|
|
3141
3148
|
"skills.autoBacktestHint": "草案写好后,用测试用例与当前版本对比",
|
|
3142
3149
|
"skills.parameters": "复盘参数",
|
|
3150
|
+
"skills.draftGeneration": "草案生成",
|
|
3151
|
+
"skills.draftMaxTokens": "草案输出 token 上限",
|
|
3152
|
+
"skills.draftRetryMaxTokens": "重试输出 token 上限",
|
|
3153
|
+
"skills.draftBudgetHint": "预算包含推理与完整 SKILL.md。截断时仅在重试上限更大时重新生成一次;设为相同或更小值可关闭扩容重试。两项均需符合模型提供方的输出限制,保存后用于下一次草案。",
|
|
3143
3154
|
"skills.reviewThreshold": "复盘阈值",
|
|
3144
3155
|
"skills.idleSeconds": "空闲等待(秒)",
|
|
3145
3156
|
"skills.cooldownSeconds": "复盘间隔(秒)",
|
|
@@ -3296,6 +3307,10 @@ window.__ModuleLoader__.load({
|
|
|
3296
3307
|
"status.title": "System Status",
|
|
3297
3308
|
"status.description": "How dsh-mnemon, memory Providers and each storage layer are running.",
|
|
3298
3309
|
"status.nominal": "System nominal",
|
|
3310
|
+
"status.workflowUnavailable": "Background maintenance unavailable",
|
|
3311
|
+
"status.workflowIdleReview": "Idle review",
|
|
3312
|
+
"status.workflowRuntimeCapacity": "Runtime capacity maintenance",
|
|
3313
|
+
"status.workflowUnsupported": "The current Strategy does not drive: {workflows}. Enabling review settings alone does not start these tasks. Select a Strategy that supports them, such as the Layered Strategy, in Memory System. Manual actions remain available.",
|
|
3299
3314
|
"status.reviewFailed": "Idle review failed",
|
|
3300
3315
|
"status.reviewFailedDetail": "This checkpoint did not complete and will not be replayed automatically. Later reviews respect the cooldown and session limit.",
|
|
3301
3316
|
"status.reviewPartial": "Some writes committed. Reconcile the receipts below; they were not rolled back.",
|
|
@@ -3588,7 +3603,8 @@ window.__ModuleLoader__.load({
|
|
|
3588
3603
|
"details.currentMain": "Current main strategy",
|
|
3589
3604
|
"details.useMain": "Use as main strategy",
|
|
3590
3605
|
"details.back": "Back to “{component}”",
|
|
3591
|
-
"
|
|
3606
|
+
"config.strategyWorkflowNote": "Idle review and runtime capacity maintenance run only when the current Strategy supports them. The General Strategy drives neither. Settings are retained for use after switching back to the Layered Strategy in Memory System.",
|
|
3607
|
+
"threeTier.offNote": "This plugin is disabled. Background tasks also require a supporting main Strategy.",
|
|
3592
3608
|
"board.otherEnhancements": "Enhancements for other main strategies ({count})",
|
|
3593
3609
|
"board.more": "Add more components from the Plugins list",
|
|
3594
3610
|
"board.relationNeeds": "Needs “{component}”",
|
|
@@ -3955,6 +3971,10 @@ window.__ModuleLoader__.load({
|
|
|
3955
3971
|
"skills.autoBacktest": "Backtest drafts",
|
|
3956
3972
|
"skills.autoBacktestHint": "Compare a new draft with the current version on its test cases",
|
|
3957
3973
|
"skills.parameters": "Review parameters",
|
|
3974
|
+
"skills.draftGeneration": "Draft generation",
|
|
3975
|
+
"skills.draftMaxTokens": "Draft output token limit",
|
|
3976
|
+
"skills.draftRetryMaxTokens": "Retry output token limit",
|
|
3977
|
+
"skills.draftBudgetHint": "Budgets include reasoning and the complete SKILL.md. Truncation triggers one fresh attempt only when the retry limit is higher; an equal or lower value disables it. Keep both within the model provider’s output limit. Saved changes apply to the next draft.",
|
|
3958
3978
|
"skills.reviewThreshold": "Review threshold",
|
|
3959
3979
|
"skills.idleSeconds": "Idle wait (s)",
|
|
3960
3980
|
"skills.cooldownSeconds": "Review interval (s)",
|
|
@@ -12022,6 +12042,17 @@ window.__ModuleLoader__.load({
|
|
|
12022
12042
|
integer: true
|
|
12023
12043
|
}
|
|
12024
12044
|
];
|
|
12045
|
+
const DRAFT_PARAMETERS = [{
|
|
12046
|
+
key: "draftMaxTokens",
|
|
12047
|
+
min: 128,
|
|
12048
|
+
max: 131072,
|
|
12049
|
+
integer: true
|
|
12050
|
+
}, {
|
|
12051
|
+
key: "draftRetryMaxTokens",
|
|
12052
|
+
min: 128,
|
|
12053
|
+
max: 131072,
|
|
12054
|
+
integer: true
|
|
12055
|
+
}];
|
|
12025
12056
|
/** The value a parameter stores, or undefined when the Host would refuse it. */
|
|
12026
12057
|
function parameterValue(field, text) {
|
|
12027
12058
|
if (text.trim() === "") return void 0;
|
|
@@ -12062,8 +12093,16 @@ window.__ModuleLoader__.load({
|
|
|
12062
12093
|
const changed = PARAMETERS.filter((field) => parameterValue(field, draft[field.key]) !== saved[field.key]);
|
|
12063
12094
|
if (changed.length > 0) await scope.mutate(changed.map((field) => set(field.key, parameterValue(field, draft[field.key]))));
|
|
12064
12095
|
});
|
|
12096
|
+
const draftBudgets = useStaged({
|
|
12097
|
+
draftMaxTokens: String(saved.draftMaxTokens),
|
|
12098
|
+
draftRetryMaxTokens: String(saved.draftRetryMaxTokens)
|
|
12099
|
+
}, async (draft) => {
|
|
12100
|
+
const changed = DRAFT_PARAMETERS.filter((field) => parameterValue(field, draft[field.key]) !== saved[field.key]);
|
|
12101
|
+
if (changed.length > 0) await scope.mutate(changed.map((field) => set(field.key, parameterValue(field, draft[field.key]))));
|
|
12102
|
+
});
|
|
12065
12103
|
const disabled = !page.writable || snapshot.status === "loading" || !snapshot.writable;
|
|
12066
12104
|
const invalid = PARAMETERS.find((field) => parameterValue(field, parameters.draft[field.key]) === void 0);
|
|
12105
|
+
const invalidDraft = DRAFT_PARAMETERS.find((field) => parameterValue(field, draftBudgets.draft[field.key]) === void 0);
|
|
12067
12106
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
12068
12107
|
className: MnemonSettingsCard_module_css_default.panelSection,
|
|
12069
12108
|
"aria-label": t("skills.label"),
|
|
@@ -12123,6 +12162,47 @@ window.__ModuleLoader__.load({
|
|
|
12123
12162
|
destination.apply();
|
|
12124
12163
|
}
|
|
12125
12164
|
}),
|
|
12165
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
12166
|
+
className: MnemonSettingsCard_module_css_default.advanced,
|
|
12167
|
+
children: [
|
|
12168
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("summary", { children: [t("skills.draftGeneration"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 })] }),
|
|
12169
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12170
|
+
className: MnemonSettingsCard_module_css_default.panelNote,
|
|
12171
|
+
children: t("skills.draftBudgetHint")
|
|
12172
|
+
}),
|
|
12173
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12174
|
+
className: MnemonSettingsCard_module_css_default.fieldGrid,
|
|
12175
|
+
children: DRAFT_PARAMETERS.map((field) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t(`skills.${field.key}`), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
12176
|
+
type: "number",
|
|
12177
|
+
step: 1,
|
|
12178
|
+
min: field.min,
|
|
12179
|
+
max: field.max,
|
|
12180
|
+
inputMode: "numeric",
|
|
12181
|
+
value: draftBudgets.draft[field.key],
|
|
12182
|
+
disabled: disabled || draftBudgets.saving,
|
|
12183
|
+
"aria-invalid": parameterValue(field, draftBudgets.draft[field.key]) === void 0,
|
|
12184
|
+
onChange: (event) => draftBudgets.edit({ [field.key]: event.target.value })
|
|
12185
|
+
})] }, field.key))
|
|
12186
|
+
}),
|
|
12187
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, {
|
|
12188
|
+
dirty: draftBudgets.dirty,
|
|
12189
|
+
saving: draftBudgets.saving,
|
|
12190
|
+
applied: draftBudgets.applied,
|
|
12191
|
+
failed: draftBudgets.failed,
|
|
12192
|
+
disabled,
|
|
12193
|
+
t,
|
|
12194
|
+
invalid: invalidDraft === void 0 ? null : t("skills.invalid", {
|
|
12195
|
+
field: t(`skills.${invalidDraft.key}`),
|
|
12196
|
+
min: invalidDraft.min,
|
|
12197
|
+
max: invalidDraft.max
|
|
12198
|
+
}),
|
|
12199
|
+
onDiscard: draftBudgets.discard,
|
|
12200
|
+
onApply: () => {
|
|
12201
|
+
draftBudgets.apply();
|
|
12202
|
+
}
|
|
12203
|
+
})
|
|
12204
|
+
]
|
|
12205
|
+
}),
|
|
12126
12206
|
evolution.value && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, {
|
|
12127
12207
|
id: "mnemon-skills-backtest",
|
|
12128
12208
|
label: t("skills.autoBacktest"),
|
|
@@ -12777,6 +12857,10 @@ window.__ModuleLoader__.load({
|
|
|
12777
12857
|
})
|
|
12778
12858
|
]
|
|
12779
12859
|
}),
|
|
12860
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12861
|
+
className: MnemonSettingsCard_module_css_default.panelNote,
|
|
12862
|
+
children: t("config.strategyWorkflowNote")
|
|
12863
|
+
}),
|
|
12780
12864
|
!page.component.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12781
12865
|
className: MnemonSettingsCard_module_css_default.panelNote,
|
|
12782
12866
|
children: t("threeTier.offNote")
|
|
@@ -15118,6 +15202,18 @@ window.__ModuleLoader__.load({
|
|
|
15118
15202
|
})]
|
|
15119
15203
|
});
|
|
15120
15204
|
}
|
|
15205
|
+
function BackgroundWorkflowNotice(props) {
|
|
15206
|
+
const t = useT();
|
|
15207
|
+
if (props.workflows === void 0) return null;
|
|
15208
|
+
const missing = [!props.workflows.idleReview ? t("status.workflowIdleReview") : void 0, !props.workflows.runtimeCapacity ? t("status.workflowRuntimeCapacity") : void 0].filter((label) => label !== void 0);
|
|
15209
|
+
if (missing.length === 0) return null;
|
|
15210
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15211
|
+
className: MnemonView_module_css_default.alert,
|
|
15212
|
+
role: "status",
|
|
15213
|
+
"aria-label": t("status.workflowUnavailable"),
|
|
15214
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("status.workflowUnavailable") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.workflowUnsupported", { workflows: missing.join(" / ") }) })]
|
|
15215
|
+
});
|
|
15216
|
+
}
|
|
15121
15217
|
function SourceDisabledPage(props) {
|
|
15122
15218
|
const t = useT();
|
|
15123
15219
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -15756,6 +15852,7 @@ window.__ModuleLoader__.load({
|
|
|
15756
15852
|
remoteReadOnly,
|
|
15757
15853
|
reviewPaused: focused ? void 0 : status?.lifecycle?.current?.idleReviewBlocked
|
|
15758
15854
|
}),
|
|
15855
|
+
!focused && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BackgroundWorkflowNotice, { workflows: status?.memorySystem?.workflows }),
|
|
15759
15856
|
!focused && status?.lifecycle?.current?.idleReviewWatermark !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15760
15857
|
className: MnemonView_module_css_default.alert,
|
|
15761
15858
|
role: status.lifecycle.current.idleReviewWatermark.state === "error" ? "alert" : "status",
|
package/lib/core.js
CHANGED