dsh-mnemon 0.5.36 → 0.5.37
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/lib/bundle.js +1 -1
- package/lib/client.js +137 -17
- package/lib/index.js +59 -19
- package/lib/{starter-resolution-BVUz3pw4.js → starter-resolution-DYeYvfwr.js} +2 -2
- package/lib/starter.js +1 -1
- package/lib/types/src/client/extension-sdk.d.ts +1 -0
- package/lib/types/src/client/locales.d.ts +6 -0
- package/lib/types/src/client/page-controls.d.ts +5 -0
- package/lib/types/src/client/source-contracts.d.ts +6 -1
- package/lib/types/src/core/contracts/index.d.ts +1 -0
- package/lib/types/src/core/contracts/task-agent-model.d.ts +49 -0
- package/lib/types/src/host/protocol.d.ts +1 -49
- package/package.json +3 -3
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-DYeYvfwr.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
|
@@ -1807,10 +1807,10 @@ window.__ModuleLoader__.load({
|
|
|
1807
1807
|
"config.embeddingSaveBeforeTest": "请先保存嵌入配置,再测试实际运行值。",
|
|
1808
1808
|
"config.embeddingTestUnavailable": "当前 DSH Host 不提供嵌入状态检查。",
|
|
1809
1809
|
"config.embeddingCliMissing": "测试需要 Mnemon CLI;向量设置只作用于 Mnemon Native。",
|
|
1810
|
-
"config.embeddingStatusAvailable": "
|
|
1811
|
-
"config.embeddingStatusAvailableWithProtocol": "
|
|
1812
|
-
"config.embeddingStatusUnavailable": "
|
|
1813
|
-
"config.embeddingStatusUnavailableWithProtocol": "
|
|
1810
|
+
"config.embeddingStatusAvailable": "嵌入模型可用 · {model} · 已嵌入 {embedded}/{total}({coverage})",
|
|
1811
|
+
"config.embeddingStatusAvailableWithProtocol": "嵌入模型可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})",
|
|
1812
|
+
"config.embeddingStatusUnavailable": "嵌入模型不可用 · {model} · 已嵌入 {embedded}/{total}({coverage})",
|
|
1813
|
+
"config.embeddingStatusUnavailableWithProtocol": "嵌入模型不可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})",
|
|
1814
1814
|
"config.embeddingStatusFailed": "嵌入状态检查失败:{error}",
|
|
1815
1815
|
"config.embeddingSpaces": "各 Mnemon Native 空间",
|
|
1816
1816
|
"config.embeddingSpaceCounts": "已嵌入 {embedded}/{total}({coverage})",
|
|
@@ -2297,10 +2297,10 @@ window.__ModuleLoader__.load({
|
|
|
2297
2297
|
"config.embeddingSaveBeforeTest": "Save the embedding settings before testing their effective runtime values.",
|
|
2298
2298
|
"config.embeddingTestUnavailable": "This DSH Host does not provide embedding status checks.",
|
|
2299
2299
|
"config.embeddingCliMissing": "Testing needs the Mnemon CLI; these embedding settings only apply to Mnemon Native.",
|
|
2300
|
-
"config.embeddingStatusAvailable": "Embedding
|
|
2301
|
-
"config.embeddingStatusAvailableWithProtocol": "Embedding
|
|
2302
|
-
"config.embeddingStatusUnavailable": "Embedding
|
|
2303
|
-
"config.embeddingStatusUnavailableWithProtocol": "Embedding
|
|
2300
|
+
"config.embeddingStatusAvailable": "Embedding model available · {model} · {embedded}/{total} embedded ({coverage})",
|
|
2301
|
+
"config.embeddingStatusAvailableWithProtocol": "Embedding model available · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})",
|
|
2302
|
+
"config.embeddingStatusUnavailable": "Embedding model unavailable · {model} · {embedded}/{total} embedded ({coverage})",
|
|
2303
|
+
"config.embeddingStatusUnavailableWithProtocol": "Embedding model unavailable · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})",
|
|
2304
2304
|
"config.embeddingStatusFailed": "Embedding status check failed: {error}",
|
|
2305
2305
|
"config.embeddingSpaces": "Each Mnemon Native space",
|
|
2306
2306
|
"config.embeddingSpaceCounts": "{embedded}/{total} embedded ({coverage})",
|
|
@@ -2694,6 +2694,12 @@ window.__ModuleLoader__.load({
|
|
|
2694
2694
|
"config.runtimeUserScopeStorageHint": "与 MEMORY.md 在同一目录",
|
|
2695
2695
|
"config.runtimeUserScopeGlobal": "全局共享",
|
|
2696
2696
|
"config.runtimeUserScopeGlobalHint": "所有工作区共用;MEMORY.md 仍按存储范围",
|
|
2697
|
+
"config.runtimeLimitsTitle": "容量上限",
|
|
2698
|
+
"config.runtimeLimitsHint": "默认用户画像 {user} KiB、工作记忆 {memory} KiB。1 KiB = 1024 字节。",
|
|
2699
|
+
"config.runtime.userLimitBytes": "用户画像上限(字节)",
|
|
2700
|
+
"config.runtime.memoryLimitBytes": "工作记忆上限(字节)",
|
|
2701
|
+
"config.runtimeLimitsApply": "应用后实时生效;调低上限不会删除已有条目",
|
|
2702
|
+
"config.runtimeLimitInvalid": "请将“{field}”设为 1–{max} 之间的整数。",
|
|
2697
2703
|
"config.enhancementsRefreshFailed": "设置已更新,但状态刷新失败;请重新打开此页面。",
|
|
2698
2704
|
"config.strategyTitle": "主策略",
|
|
2699
2705
|
"config.strategyFailed": "无法切换主策略,已保留原设置,请重试。",
|
|
@@ -3488,6 +3494,12 @@ window.__ModuleLoader__.load({
|
|
|
3488
3494
|
"config.runtimeUserScopeStorageHint": "Kept with MEMORY.md",
|
|
3489
3495
|
"config.runtimeUserScopeGlobal": "Shared globally",
|
|
3490
3496
|
"config.runtimeUserScopeGlobalHint": "Shared by every workspace; MEMORY.md still follows the storage scope",
|
|
3497
|
+
"config.runtimeLimitsTitle": "Capacity limits",
|
|
3498
|
+
"config.runtimeLimitsHint": "Defaults: {user} KiB for the user profile and {memory} KiB for working memory. 1 KiB = 1024 bytes.",
|
|
3499
|
+
"config.runtime.userLimitBytes": "User profile limit (bytes)",
|
|
3500
|
+
"config.runtime.memoryLimitBytes": "Working memory limit (bytes)",
|
|
3501
|
+
"config.runtimeLimitsApply": "Applies live; lowering a limit does not delete existing entries",
|
|
3502
|
+
"config.runtimeLimitInvalid": "Set {field} to a whole number from 1 to {max}.",
|
|
3491
3503
|
"config.enhancementsRefreshFailed": "The setting was updated, but its status could not be refreshed. Reopen this page.",
|
|
3492
3504
|
"config.strategyTitle": "Main strategy",
|
|
3493
3505
|
"config.strategyFailed": "Could not switch the main strategy. The previous choice is kept; try again.",
|
|
@@ -10185,6 +10197,19 @@ window.__ModuleLoader__.load({
|
|
|
10185
10197
|
};
|
|
10186
10198
|
}
|
|
10187
10199
|
//#endregion
|
|
10200
|
+
//#region plugins/dsh-mnemon-source-runtime/src/defaults.ts
|
|
10201
|
+
const DEFAULT_RUNTIME_MEMORY_LIMIT_BYTES = 10240;
|
|
10202
|
+
const DEFAULT_RUNTIME_USER_LIMIT_BYTES = 4096;
|
|
10203
|
+
const MAX_RUNTIME_MEMORY_LIMIT_BYTES = 1048576;
|
|
10204
|
+
//#endregion
|
|
10205
|
+
//#region plugins/dsh-mnemon-source-runtime/src/contracts.ts
|
|
10206
|
+
const RUNTIME_MEMORY_LIMITS = {
|
|
10207
|
+
memory: DEFAULT_RUNTIME_MEMORY_LIMIT_BYTES,
|
|
10208
|
+
user: DEFAULT_RUNTIME_USER_LIMIT_BYTES
|
|
10209
|
+
};
|
|
10210
|
+
/** The largest limit, in UTF-8 bytes, either target's file may be given. */
|
|
10211
|
+
const RUNTIME_MEMORY_LIMIT_MAX_BYTES = MAX_RUNTIME_MEMORY_LIMIT_BYTES;
|
|
10212
|
+
//#endregion
|
|
10188
10213
|
//#region src/client/source-pages.tsx
|
|
10189
10214
|
const MNEMON_SOURCE_PAGE_SLOT = "mnemon.source.page";
|
|
10190
10215
|
/** Conventional operations used by Mnemon's descriptor-driven Source page. */
|
|
@@ -10293,7 +10318,7 @@ window.__ModuleLoader__.load({
|
|
|
10293
10318
|
}
|
|
10294
10319
|
//#endregion
|
|
10295
10320
|
//#region \0dsh-mnemon-css:/home/runner/work/dsh-mnemon/dsh-mnemon/src/client/PageControls.module.css.mjs
|
|
10296
|
-
const css$5 = ".Zl-6yW_search{min-width:0}.Zl-6yW_field{gap:6px;min-width:0;display:inline-grid}.Zl-6yW_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.Zl-6yW_hiddenLabel{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.Zl-6yW_selector{appearance:none;border-radius:var(--dsw-radius-md);min-width:0;max-width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);font:inherit;white-space:nowrap;cursor:pointer;border:0;justify-content:space-between;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.Zl-6yW_selector>span{text-overflow:ellipsis;min-width:0;overflow:hidden}.Zl-6yW_selector>svg{color:var(--dsw-alias-label-tertiary);flex:none}.Zl-6yW_selector:hover:not(:disabled),.Zl-6yW_selector[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.Zl-6yW_selector:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.Zl-6yW_selector:disabled{cursor:default;opacity:.4}.Zl-6yW_menuRoot{min-width:0;display:block}.Zl-6yW_field:not([data-inline]) .Zl-6yW_selector{width:100%}.Zl-6yW_field[data-inline]{align-items:center;gap:8px;display:inline-flex}.Zl-6yW_field[data-inline] .Zl-6yW_menuRoot{display:inline-block}.Zl-6yW_field[data-inline]>.Zl-6yW_fieldLabel{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-weight:400}.Zl-6yW_field[data-size=sm] .Zl-6yW_selector{border-radius:var(--dsw-radius-sm);gap:8px;height:28px;padding:0 10px;font-size:12px;line-height:18px}.Zl-6yW_menu{min-width:200px}.Zl-6yW_option{white-space:normal;gap:1px;min-width:0;display:grid}.Zl-6yW_option>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.Zl-6yW_receipt{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);flex-wrap:wrap;align-items:flex-start;gap:8px 10px;min-width:0;margin-top:12px;padding:10px 12px;display:flex}.Zl-6yW_receipt>p{min-width:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;flex:240px;margin:0;font-size:13px;line-height:20px}.Zl-6yW_receipt>:first-child{flex:none;margin-top:1px}.Zl-6yW_receiptAction{flex:none;margin-left:auto}.Zl-6yW_receipt>.Zl-6yW_receiptNote{color:var(--dsw-alias-label-tertiary);flex-basis:100%;font-size:12px;line-height:18px}.Zl-6yW_receipt>.Zl-6yW_receiptNote[data-tone=caution]{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-secondary))}";
|
|
10321
|
+
const css$5 = ".Zl-6yW_search{min-width:0}.Zl-6yW_field{gap:6px;min-width:0;display:inline-grid}.Zl-6yW_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.Zl-6yW_hiddenLabel{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.Zl-6yW_selector{appearance:none;border-radius:var(--dsw-radius-md);min-width:0;max-width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);font:inherit;white-space:nowrap;cursor:pointer;border:0;justify-content:space-between;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.Zl-6yW_selector>span{text-overflow:ellipsis;min-width:0;overflow:hidden}.Zl-6yW_selector>svg{color:var(--dsw-alias-label-tertiary);flex:none}.Zl-6yW_selector:hover:not(:disabled),.Zl-6yW_selector[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.Zl-6yW_selector:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.Zl-6yW_selector:disabled{cursor:default;opacity:.4}.Zl-6yW_menuRoot{min-width:0;display:block}.Zl-6yW_field:not([data-inline]) .Zl-6yW_selector{width:100%}.Zl-6yW_field[data-inline]{align-items:center;gap:8px;display:inline-flex}.Zl-6yW_field[data-inline] .Zl-6yW_menuRoot{display:inline-block}.Zl-6yW_field[data-inline]>.Zl-6yW_fieldLabel{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-weight:400}.Zl-6yW_field[data-size=sm] .Zl-6yW_selector{border-radius:var(--dsw-radius-sm);gap:8px;height:28px;padding:0 10px;font-size:12px;line-height:18px}.Zl-6yW_menu{min-width:200px;max-height:var(--dsh-select-menu-max,calc(100vh - 220px))!important}.Zl-6yW_option{white-space:normal;gap:1px;min-width:0;display:grid}.Zl-6yW_option>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]{white-space:normal;height:auto;min-height:28px;padding:3px 10px}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]>span{text-align:left;white-space:normal;gap:1px;min-width:0;display:grid}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]>span>span{text-overflow:ellipsis;overflow:hidden}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]>span>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.Zl-6yW_receipt{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);flex-wrap:wrap;align-items:flex-start;gap:8px 10px;min-width:0;margin-top:12px;padding:10px 12px;display:flex}.Zl-6yW_receipt>p{min-width:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;flex:240px;margin:0;font-size:13px;line-height:20px}.Zl-6yW_receipt>:first-child{flex:none;margin-top:1px}.Zl-6yW_receiptAction{flex:none;margin-left:auto}.Zl-6yW_receipt>.Zl-6yW_receiptNote{color:var(--dsw-alias-label-tertiary);flex-basis:100%;font-size:12px;line-height:18px}.Zl-6yW_receipt>.Zl-6yW_receiptNote[data-tone=caution]{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-secondary))}";
|
|
10297
10322
|
const tagId$4 = "dsh-mnemon/src/client/PageControls.module.css";
|
|
10298
10323
|
if (typeof document !== "undefined") {
|
|
10299
10324
|
let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]");
|
|
@@ -10336,10 +10361,17 @@ window.__ModuleLoader__.load({
|
|
|
10336
10361
|
/** A labelled choice: the DSH selector, opening a menu of the options. */
|
|
10337
10362
|
function SelectField(props) {
|
|
10338
10363
|
const [open, setOpen] = (0, react.useState)(false);
|
|
10364
|
+
/**
|
|
10365
|
+
* Which way the menu opens. A menu taller than the room below its anchor is
|
|
10366
|
+
* pushed up by the portal until it covers the button, so the selector decides
|
|
10367
|
+
* the side itself once it knows how much room is left and how much is above.
|
|
10368
|
+
*/
|
|
10369
|
+
const [side, setSide] = (0, react.useState)("bottom");
|
|
10339
10370
|
const labelId = (0, react.useId)();
|
|
10340
10371
|
const nameId = (0, react.useId)();
|
|
10341
10372
|
const valueId = (0, react.useId)();
|
|
10342
10373
|
const current = props.options.find((option) => option.value === props.value);
|
|
10374
|
+
const detail = props.triggerDetail === true && current?.detail !== void 0;
|
|
10343
10375
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
10344
10376
|
className: [PageControls_module_css_default.field, props.className].filter(Boolean).join(" "),
|
|
10345
10377
|
"data-inline": props.inline === true ? "" : void 0,
|
|
@@ -10361,6 +10393,7 @@ window.__ModuleLoader__.load({
|
|
|
10361
10393
|
open,
|
|
10362
10394
|
onClose: () => setOpen(false),
|
|
10363
10395
|
align: "start",
|
|
10396
|
+
side,
|
|
10364
10397
|
portal: true,
|
|
10365
10398
|
selectedId: props.value,
|
|
10366
10399
|
className: PageControls_module_css_default.menuRoot,
|
|
@@ -10380,12 +10413,25 @@ window.__ModuleLoader__.load({
|
|
|
10380
10413
|
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
10381
10414
|
type: "button",
|
|
10382
10415
|
className: PageControls_module_css_default.selector,
|
|
10416
|
+
"data-trigger-detail": detail ? "" : void 0,
|
|
10383
10417
|
"aria-haspopup": "menu",
|
|
10384
10418
|
"aria-expanded": open,
|
|
10385
10419
|
"aria-labelledby": `${props.ariaLabel === void 0 ? labelId : nameId} ${valueId}`,
|
|
10386
10420
|
disabled: props.disabled === true,
|
|
10387
|
-
onClick: () =>
|
|
10388
|
-
|
|
10421
|
+
onClick: (event) => {
|
|
10422
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
10423
|
+
const below = Math.floor(window.innerHeight - rect.bottom - 4 - 12);
|
|
10424
|
+
const above = Math.floor(rect.top - 4 - 12);
|
|
10425
|
+
const flip = below < 220 && above > below;
|
|
10426
|
+
document.documentElement.style.setProperty("--dsh-select-menu-max", `${Math.max(160, flip ? above : below)}px`);
|
|
10427
|
+
setSide(flip ? "top" : "bottom");
|
|
10428
|
+
setOpen((value) => !value);
|
|
10429
|
+
},
|
|
10430
|
+
children: [detail ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
10431
|
+
id: valueId,
|
|
10432
|
+
className: PageControls_module_css_default.option,
|
|
10433
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: current.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: current.detail })]
|
|
10434
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10389
10435
|
id: valueId,
|
|
10390
10436
|
children: current?.label ?? props.value
|
|
10391
10437
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 })]
|
|
@@ -11672,7 +11718,7 @@ window.__ModuleLoader__.load({
|
|
|
11672
11718
|
})]
|
|
11673
11719
|
});
|
|
11674
11720
|
}
|
|
11675
|
-
/**
|
|
11721
|
+
/** Selected-model usability and stored-vector coverage; the protocol appears only when the Host reports one. */
|
|
11676
11722
|
function embeddingStatusText(t, status) {
|
|
11677
11723
|
const coverage = {
|
|
11678
11724
|
embedded: status.embedded,
|
|
@@ -12399,7 +12445,7 @@ window.__ModuleLoader__.load({
|
|
|
12399
12445
|
/**
|
|
12400
12446
|
* Register the settings dsh-mnemon keeps for its shipped components, the way
|
|
12401
12447
|
* an installed component registers its own: Runtime Memory carries where its
|
|
12402
|
-
* user profile lives, the Layered strategy the background tasks it drives.
|
|
12448
|
+
* user profile lives and its capacities, the Layered strategy the background tasks it drives.
|
|
12403
12449
|
* Memory Spaces brings its Providers and embedding itself. Its settings show
|
|
12404
12450
|
* here, as a fallback, whenever its own client registers none: while it is
|
|
12405
12451
|
* off, while its client loads, if that client fails, and beside a Memory
|
|
@@ -12442,7 +12488,13 @@ window.__ModuleLoader__.load({
|
|
|
12442
12488
|
for (const dispose of disposers.reverse()) dispose();
|
|
12443
12489
|
};
|
|
12444
12490
|
}
|
|
12445
|
-
|
|
12491
|
+
const RUNTIME_LIMITS = ["userLimitBytes", "memoryLimitBytes"];
|
|
12492
|
+
function runtimeLimitValue(text) {
|
|
12493
|
+
if (text.trim() === "") return void 0;
|
|
12494
|
+
const value = Number(text);
|
|
12495
|
+
return Number.isInteger(value) && value >= 1 && value <= RUNTIME_MEMORY_LIMIT_MAX_BYTES ? value : void 0;
|
|
12496
|
+
}
|
|
12497
|
+
/** Runtime Memory's scope applies immediately; its byte limits wait for Apply. */
|
|
12446
12498
|
function RuntimeSettings(props) {
|
|
12447
12499
|
const { scope, page, t } = props;
|
|
12448
12500
|
const snapshot = useScope(scope);
|
|
@@ -12454,7 +12506,24 @@ window.__ModuleLoader__.load({
|
|
|
12454
12506
|
}]);
|
|
12455
12507
|
});
|
|
12456
12508
|
const disabled = !page.writable || snapshot.status === "loading" || !snapshot.writable;
|
|
12457
|
-
|
|
12509
|
+
const configured = snapshot.value?.runtimeMemory;
|
|
12510
|
+
const savedLimits = {
|
|
12511
|
+
userLimitBytes: String(configured?.userLimitBytes ?? RUNTIME_MEMORY_LIMITS.user),
|
|
12512
|
+
memoryLimitBytes: String(configured?.memoryLimitBytes ?? RUNTIME_MEMORY_LIMITS.memory)
|
|
12513
|
+
};
|
|
12514
|
+
const limits = useStaged(savedLimits, async (draft) => {
|
|
12515
|
+
const changed = RUNTIME_LIMITS.filter((key) => runtimeLimitValue(draft[key]) !== runtimeLimitValue(savedLimits[key]));
|
|
12516
|
+
if (changed.length > 0) await scope.mutate([{
|
|
12517
|
+
op: "set",
|
|
12518
|
+
path: ["runtimeMemory"],
|
|
12519
|
+
value: {
|
|
12520
|
+
...configured,
|
|
12521
|
+
...Object.fromEntries(changed.map((key) => [key, runtimeLimitValue(draft[key])]))
|
|
12522
|
+
}
|
|
12523
|
+
}]);
|
|
12524
|
+
});
|
|
12525
|
+
const invalid = RUNTIME_LIMITS.find((key) => runtimeLimitValue(limits.draft[key]) === void 0);
|
|
12526
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
12458
12527
|
className: MnemonSettingsCard_module_css_default.panelSection,
|
|
12459
12528
|
"aria-label": t("config.runtimeUserScopeTitle"),
|
|
12460
12529
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -12479,7 +12548,57 @@ window.__ModuleLoader__.load({
|
|
|
12479
12548
|
error: profile.failed,
|
|
12480
12549
|
t
|
|
12481
12550
|
})]
|
|
12482
|
-
})
|
|
12551
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
12552
|
+
className: MnemonSettingsCard_module_css_default.panelSection,
|
|
12553
|
+
"aria-labelledby": "mnemon-runtime-limits",
|
|
12554
|
+
children: [
|
|
12555
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12556
|
+
className: MnemonSettingsCard_module_css_default.panelHeading,
|
|
12557
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
12558
|
+
id: "mnemon-runtime-limits",
|
|
12559
|
+
children: t("config.runtimeLimitsTitle")
|
|
12560
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12561
|
+
id: "mnemon-runtime-limits-hint",
|
|
12562
|
+
children: t("config.runtimeLimitsHint", {
|
|
12563
|
+
user: RUNTIME_MEMORY_LIMITS.user / 1024,
|
|
12564
|
+
memory: RUNTIME_MEMORY_LIMITS.memory / 1024
|
|
12565
|
+
})
|
|
12566
|
+
})]
|
|
12567
|
+
}),
|
|
12568
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12569
|
+
className: MnemonSettingsCard_module_css_default.fieldGrid,
|
|
12570
|
+
children: RUNTIME_LIMITS.map((key) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t(`config.runtime.${key}`), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
12571
|
+
type: "number",
|
|
12572
|
+
min: "1",
|
|
12573
|
+
max: RUNTIME_MEMORY_LIMIT_MAX_BYTES,
|
|
12574
|
+
step: "1",
|
|
12575
|
+
inputMode: "numeric",
|
|
12576
|
+
value: limits.draft[key],
|
|
12577
|
+
disabled: disabled || limits.saving,
|
|
12578
|
+
"aria-describedby": "mnemon-runtime-limits-hint",
|
|
12579
|
+
"aria-invalid": runtimeLimitValue(limits.draft[key]) === void 0,
|
|
12580
|
+
onChange: (event) => limits.edit({ [key]: event.target.value })
|
|
12581
|
+
})] }, key))
|
|
12582
|
+
}),
|
|
12583
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, {
|
|
12584
|
+
dirty: limits.dirty,
|
|
12585
|
+
saving: limits.saving,
|
|
12586
|
+
applied: limits.applied,
|
|
12587
|
+
failed: limits.failed,
|
|
12588
|
+
disabled,
|
|
12589
|
+
t,
|
|
12590
|
+
note: t("config.runtimeLimitsApply"),
|
|
12591
|
+
invalid: invalid === void 0 ? null : t("config.runtimeLimitInvalid", {
|
|
12592
|
+
field: t(`config.runtime.${invalid}`),
|
|
12593
|
+
max: RUNTIME_MEMORY_LIMIT_MAX_BYTES
|
|
12594
|
+
}),
|
|
12595
|
+
onDiscard: limits.discard,
|
|
12596
|
+
onApply: () => {
|
|
12597
|
+
limits.apply();
|
|
12598
|
+
}
|
|
12599
|
+
})
|
|
12600
|
+
]
|
|
12601
|
+
})] });
|
|
12483
12602
|
}
|
|
12484
12603
|
/** Each limit as the page shows it: the interval in seconds, the others as stored. */
|
|
12485
12604
|
const LIMITS = [
|
|
@@ -14310,7 +14429,8 @@ window.__ModuleLoader__.load({
|
|
|
14310
14429
|
}
|
|
14311
14430
|
} },
|
|
14312
14431
|
read: (operation, input = null) => client.readSourceManagement(instance.sourceInstanceKey, operation, input),
|
|
14313
|
-
mutate: (operation, input, options) => client.mutateSourceManagement(instance.sourceInstanceKey, operation, input, options.expectedRevision ?? instance.revision, options.confirmed)
|
|
14432
|
+
mutate: (operation, input, options) => client.mutateSourceManagement(instance.sourceInstanceKey, operation, input, options.expectedRevision ?? instance.revision, options.confirmed),
|
|
14433
|
+
models: () => taskClient.taskAgentModels(true)
|
|
14314
14434
|
};
|
|
14315
14435
|
}
|
|
14316
14436
|
/**
|
package/lib/index.js
CHANGED
|
@@ -10841,8 +10841,8 @@ var MnemonSubagentCoordinator = class {
|
|
|
10841
10841
|
* One tool-less structured run for skill evolution: a review, a draft, a
|
|
10842
10842
|
* backtest step or a case derivation. The child sees only the prompt.
|
|
10843
10843
|
*/
|
|
10844
|
-
async skillTask(parent, label, prompt, schema, persona, signal) {
|
|
10845
|
-
const { provider, runId, result } = await this.delegate(parent, "skill", label, prompt, [], schema, signal, "spawn", persona);
|
|
10844
|
+
async skillTask(parent, label, prompt, schema, persona, signal, route) {
|
|
10845
|
+
const { provider, runId, result } = await this.delegate(parent, "skill", label, prompt, [], schema, signal, "spawn", persona, void 0, void 0, route);
|
|
10846
10846
|
return {
|
|
10847
10847
|
provider,
|
|
10848
10848
|
runId,
|
|
@@ -10959,7 +10959,7 @@ ${naturalRequest(request, target === void 0 ? REQUEST_LABELS : TARGETED_WRITE_LA
|
|
|
10959
10959
|
documentIds: strings(value.documentIds)
|
|
10960
10960
|
};
|
|
10961
10961
|
}
|
|
10962
|
-
async delegate(parent, operation, label, prompt, tools, outputSchema, signal, preferredProvider = "spawn", persona = WRITE_PERSONA, recovery, guard) {
|
|
10962
|
+
async delegate(parent, operation, label, prompt, tools, outputSchema, signal, preferredProvider = "spawn", persona = WRITE_PERSONA, recovery, guard, route) {
|
|
10963
10963
|
if (this.disposed) throw new Error("dsh-mnemon subagent coordinator is disposed");
|
|
10964
10964
|
const provider = this.provider(preferredProvider);
|
|
10965
10965
|
assertDshOutputSchema(outputSchema);
|
|
@@ -11068,7 +11068,7 @@ Completion protocol: call \`${resultToolName}\` exactly once with requestId \`${
|
|
|
11068
11068
|
${JSON.stringify(outputSchema)}
|
|
11069
11069
|
This is the only completion channel for this run. Do not finish with a plain-text answer. The requestId expires when this run finishes or is cancelled.`;
|
|
11070
11070
|
const perOpMaxTokens = operation === "migration" || operation === "compaction" || operation === "reconcile" ? this.runtimeMaintenanceMaxTokensResolver?.() ?? 8192 : operation === "document-archive" ? 8192 : operation === "metadata-maintenance" ? 4096 : operation === "review" ? this.runtimeSource.config.idleReview.maxTokens : operation === "skill" ? 16384 : void 0;
|
|
11071
|
-
const fixed = this.taskAgentModelResolver?.();
|
|
11071
|
+
const fixed = route ?? this.taskAgentModelResolver?.();
|
|
11072
11072
|
const baseAgentOptions = perOpMaxTokens === void 0 ? void 0 : { maxTokens: perOpMaxTokens };
|
|
11073
11073
|
const resolvedAgentOptions = fixed === void 0 ? baseAgentOptions : {
|
|
11074
11074
|
...baseAgentOptions ?? {},
|
|
@@ -12199,6 +12199,16 @@ var MnemonAgentLifecycle = class {
|
|
|
12199
12199
|
function isDirectory(path) {
|
|
12200
12200
|
return stat(path).then((info) => info.isDirectory(), () => false);
|
|
12201
12201
|
}
|
|
12202
|
+
/** Explicit model route carried by the task Agent a skill run created. */
|
|
12203
|
+
const TASK_ROUTE = Symbol.for("dsh-mnemon.taskRoute");
|
|
12204
|
+
/**
|
|
12205
|
+
* The route a task Agent was created with, when its caller picked one. Skill
|
|
12206
|
+
* work started under that Agent hands the same pick to its own children, so a
|
|
12207
|
+
* run never falls back to the profile default halfway through.
|
|
12208
|
+
*/
|
|
12209
|
+
function taskRoute(agent) {
|
|
12210
|
+
return agent[TASK_ROUTE];
|
|
12211
|
+
}
|
|
12202
12212
|
/** DSH-native owner for per-agent Mnemon lifecycle hooks and UI-triggered LLM work. */
|
|
12203
12213
|
var MnemonLifecycle = class {
|
|
12204
12214
|
ctx;
|
|
@@ -12234,8 +12244,8 @@ var MnemonLifecycle = class {
|
|
|
12234
12244
|
return this.skillEvolution;
|
|
12235
12245
|
}
|
|
12236
12246
|
/** Model work for skill evolution under a fresh task Agent, outside any conversation. */
|
|
12237
|
-
runSkillTask(workspaceRoot, signal, operation) {
|
|
12238
|
-
return this.runTaskAgent("", workspaceRoot, signal, operation);
|
|
12247
|
+
runSkillTask(workspaceRoot, signal, operation, route) {
|
|
12248
|
+
return this.runTaskAgent("", workspaceRoot, signal, operation, route);
|
|
12239
12249
|
}
|
|
12240
12250
|
/**
|
|
12241
12251
|
* What one conversation did with skills, for the bars under its turns. A
|
|
@@ -12582,18 +12592,21 @@ var MnemonLifecycle = class {
|
|
|
12582
12592
|
* is the explicit Web workbench scope, so LiveMnemonRuntime resolves the same
|
|
12583
12593
|
* workspace graph without borrowing conversation history or ownership.
|
|
12584
12594
|
*/
|
|
12585
|
-
async runTaskAgent(fallbackSessionId, workspaceRoot, signal, operation) {
|
|
12595
|
+
async runTaskAgent(fallbackSessionId, workspaceRoot, signal, operation, route) {
|
|
12586
12596
|
const sessionId = randomUUID();
|
|
12587
12597
|
this.taskAgentIds.add(sessionId);
|
|
12588
12598
|
let handle;
|
|
12589
12599
|
let failure;
|
|
12590
12600
|
try {
|
|
12591
|
-
const creation = await this.taskAgentCreation(fallbackSessionId, workspaceRoot, signal);
|
|
12601
|
+
const creation = await this.taskAgentCreation(fallbackSessionId, workspaceRoot, signal, route);
|
|
12592
12602
|
handle = await this.ctx.agents.create({
|
|
12593
12603
|
sessionId,
|
|
12594
12604
|
...creation,
|
|
12595
12605
|
signal
|
|
12596
12606
|
});
|
|
12607
|
+
if (route !== void 0) try {
|
|
12608
|
+
handle.agent[TASK_ROUTE] = route;
|
|
12609
|
+
} catch {}
|
|
12597
12610
|
return await operation(handle.agent);
|
|
12598
12611
|
} catch (error) {
|
|
12599
12612
|
failure = error;
|
|
@@ -12618,8 +12631,15 @@ var MnemonLifecycle = class {
|
|
|
12618
12631
|
* or `delegationDepth`: the task belongs to no conversation, and its children stay
|
|
12619
12632
|
* one level deep.
|
|
12620
12633
|
*/
|
|
12621
|
-
async taskAgentCreation(fallbackSessionId, workspaceRoot, signal) {
|
|
12622
|
-
const
|
|
12634
|
+
async taskAgentCreation(fallbackSessionId, workspaceRoot, signal, route) {
|
|
12635
|
+
const baseOptions = this.taskAgentModelOptions(fallbackSessionId, workspaceRoot);
|
|
12636
|
+
const { reasoningEffort: _inheritedEffort, ...baseRest } = baseOptions ?? {};
|
|
12637
|
+
const agentOptions = route === void 0 ? baseOptions : {
|
|
12638
|
+
...baseRest,
|
|
12639
|
+
provider: route.provider,
|
|
12640
|
+
model: route.model,
|
|
12641
|
+
...route.reasoningEffort === void 0 ? {} : { reasoningEffort: route.reasoningEffort }
|
|
12642
|
+
};
|
|
12623
12643
|
if (agentOptions === void 0) throw new Error("no default provider/model is available for a clean task Agent");
|
|
12624
12644
|
const { cwd, workFrom } = await this.taskAgentDirectories(workspaceRoot);
|
|
12625
12645
|
const presets = presetService(this.ctx.get("agentPresets"));
|
|
@@ -14008,7 +14028,7 @@ var SkillEvolution = class {
|
|
|
14008
14028
|
let prompt = skillDraftPrompt(pack, guidance, targetRoot);
|
|
14009
14029
|
let draft;
|
|
14010
14030
|
for (let attempt = 0; draft === void 0; attempt++) {
|
|
14011
|
-
const parsed = parseSkillDraft((await this.host.runTask(workspace, signal, (task) => this.host.skillTask(task, "Mnemon skill draft", prompt, SKILL_DRAFT_SCHEMA, SKILL_DRAFT_PERSONA, signal))).structured);
|
|
14031
|
+
const parsed = parseSkillDraft((await this.host.runTask(workspace, signal, (task) => this.host.skillTask(task, "Mnemon skill draft", prompt, SKILL_DRAFT_SCHEMA, SKILL_DRAFT_PERSONA, signal, input.route), input.route)).structured);
|
|
14012
14032
|
try {
|
|
14013
14033
|
draft = await source.mutate("draft-record", {
|
|
14014
14034
|
...input.suggestionId === void 0 ? {} : { suggestionId: input.suggestionId },
|
|
@@ -14030,16 +14050,18 @@ var SkillEvolution = class {
|
|
|
14030
14050
|
target: {
|
|
14031
14051
|
kind: "draft",
|
|
14032
14052
|
draftId: draft.id
|
|
14033
|
-
}
|
|
14053
|
+
},
|
|
14054
|
+
...input.route === void 0 ? {} : { route: input.route }
|
|
14034
14055
|
});
|
|
14035
|
-
if (pack.action === "update" && pack.lastRun !== void 0 && pack.lastRun.target.hash === pack.skill?.hash) await source.mutate("run-link", {
|
|
14056
|
+
if (input.route === void 0 && pack.action === "update" && pack.lastRun !== void 0 && pack.lastRun.target.hash === pack.skill?.hash) await source.mutate("run-link", {
|
|
14036
14057
|
draftId: draft.id,
|
|
14037
14058
|
runId: pack.lastRun.id
|
|
14038
14059
|
});
|
|
14039
14060
|
else {
|
|
14040
14061
|
const baseline = await this.backtest(source, workspace, {
|
|
14041
14062
|
skillName: pack.skillName,
|
|
14042
|
-
target: { kind: pack.action === "update" ? "current" : "none" }
|
|
14063
|
+
target: { kind: pack.action === "update" ? "current" : "none" },
|
|
14064
|
+
...input.route === void 0 ? {} : { route: input.route }
|
|
14043
14065
|
});
|
|
14044
14066
|
await source.mutate("run-link", {
|
|
14045
14067
|
draftId: draft.id,
|
|
@@ -14096,7 +14118,7 @@ var SkillEvolution = class {
|
|
|
14096
14118
|
}
|
|
14097
14119
|
};
|
|
14098
14120
|
await Promise.all(Array.from({ length: Math.min(BACKTEST_CONCURRENCY, queue.length) }, worker));
|
|
14099
|
-
});
|
|
14121
|
+
}, input.route);
|
|
14100
14122
|
await source.mutate("run-finish", {
|
|
14101
14123
|
id: run.id,
|
|
14102
14124
|
status: "completed"
|
|
@@ -14538,6 +14560,20 @@ function optionalString(value, label) {
|
|
|
14538
14560
|
if (typeof value !== "string") throw new Error(label + " must be a string");
|
|
14539
14561
|
return value.trim() === "" ? void 0 : value.trim();
|
|
14540
14562
|
}
|
|
14563
|
+
/**
|
|
14564
|
+
* The `provider` + `model` pair a page may send with model work. Both or
|
|
14565
|
+
* neither: a half route cannot run, and an absent one keeps the profile's own.
|
|
14566
|
+
*/
|
|
14567
|
+
function modelRoute(input, missing = "a draft model needs both provider and model") {
|
|
14568
|
+
const provider = optionalString(input.provider, "provider");
|
|
14569
|
+
const model = optionalString(input.model, "model");
|
|
14570
|
+
if (provider === void 0 && model === void 0) return void 0;
|
|
14571
|
+
if (provider === void 0 || model === void 0) throw new Error(missing);
|
|
14572
|
+
return {
|
|
14573
|
+
provider,
|
|
14574
|
+
model
|
|
14575
|
+
};
|
|
14576
|
+
}
|
|
14541
14577
|
/** Skill evolution's model work: drafts and backtests run in the background, cases and reviews answer here. */
|
|
14542
14578
|
async function skillAssistance(runtime, lifecycle, operation, input, signal) {
|
|
14543
14579
|
const skills = lifecycle.skills;
|
|
@@ -14558,11 +14594,13 @@ async function skillAssistance(runtime, lifecycle, operation, input, signal) {
|
|
|
14558
14594
|
if (suggestionId === void 0 && skill === void 0) throw new Error("a draft needs a suggestion or a skill");
|
|
14559
14595
|
const guidance = optionalString(input.guidance, "guidance");
|
|
14560
14596
|
if (guidance !== void 0 && guidance.length > 4e3) throw new Error("guidance is too long (max 4000 characters)");
|
|
14597
|
+
const draftRoute = modelRoute(input);
|
|
14561
14598
|
return skills.draft(source, workspaceRoot, {
|
|
14562
14599
|
...suggestionId === void 0 ? {} : { suggestionId },
|
|
14563
14600
|
...skill === void 0 ? {} : { skill },
|
|
14564
14601
|
...guidance === void 0 ? {} : { guidance },
|
|
14565
|
-
...root === void 0 ? {} : { targetRoot: root }
|
|
14602
|
+
...root === void 0 ? {} : { targetRoot: root },
|
|
14603
|
+
...draftRoute === void 0 ? {} : { route: draftRoute }
|
|
14566
14604
|
});
|
|
14567
14605
|
}
|
|
14568
14606
|
case "skill-backtest": {
|
|
@@ -14577,10 +14615,12 @@ async function skillAssistance(runtime, lifecycle, operation, input, signal) {
|
|
|
14577
14615
|
].includes(String(target.kind))) throw new Error("target kind must be current, draft, version or none");
|
|
14578
14616
|
const caseIds = input.caseIds === void 0 ? void 0 : input.caseIds;
|
|
14579
14617
|
if (caseIds !== void 0 && (!Array.isArray(caseIds) || caseIds.some((id) => typeof id !== "string"))) throw new Error("caseIds must be a string array");
|
|
14618
|
+
const runRoute = modelRoute(input, "a backtest model needs both provider and model");
|
|
14580
14619
|
return skills.backtest(source, workspaceRoot, {
|
|
14581
14620
|
skillName,
|
|
14582
14621
|
target,
|
|
14583
|
-
...caseIds === void 0 ? {} : { caseIds }
|
|
14622
|
+
...caseIds === void 0 ? {} : { caseIds },
|
|
14623
|
+
...runRoute === void 0 ? {} : { route: runRoute }
|
|
14584
14624
|
});
|
|
14585
14625
|
}
|
|
14586
14626
|
case "skill-derive-cases": {
|
|
@@ -18215,8 +18255,8 @@ function apply(rawContext, rawConfig = {}) {
|
|
|
18215
18255
|
const skills = new SkillEvolution({
|
|
18216
18256
|
settings: () => skillSettings.get(),
|
|
18217
18257
|
source: (agent) => skillsSourceFor(runtime, agent),
|
|
18218
|
-
runTask: (workspaceRoot, signal, operation) => lifecycle.runSkillTask(workspaceRoot, signal, operation),
|
|
18219
|
-
skillTask: (parent, label, prompt, schema, persona, signal) => coordinator.skillTask(parent, label, prompt, schema, persona, signal)
|
|
18258
|
+
runTask: (workspaceRoot, signal, operation, route) => lifecycle.runSkillTask(workspaceRoot, signal, operation, route),
|
|
18259
|
+
skillTask: (parent, label, prompt, schema, persona, signal) => coordinator.skillTask(parent, label, prompt, schema, persona, signal, taskRoute(parent))
|
|
18220
18260
|
});
|
|
18221
18261
|
lifecycle.useSkillEvolution(skills);
|
|
18222
18262
|
ctx.effect(() => {
|
|
@@ -15,9 +15,9 @@ var dependencies = {
|
|
|
15
15
|
"dsh-mnemon-provider-retaindb": "0.5.6",
|
|
16
16
|
"dsh-mnemon-provider-supermemory": "0.5.5",
|
|
17
17
|
"dsh-mnemon-source-documents": "0.5.11",
|
|
18
|
-
"dsh-mnemon-source-memory-spaces": "0.5.
|
|
18
|
+
"dsh-mnemon-source-memory-spaces": "0.5.24",
|
|
19
19
|
"dsh-mnemon-source-runtime": "0.5.16",
|
|
20
|
-
"dsh-mnemon-source-skills": "0.5.
|
|
20
|
+
"dsh-mnemon-source-skills": "0.5.4",
|
|
21
21
|
"dsh-mnemon-strategy-auto-capture": "0.5.5",
|
|
22
22
|
"dsh-mnemon-strategy-default-three-tier": "0.5.11",
|
|
23
23
|
"dsh-mnemon-strategy-general": "0.5.1",
|
package/lib/starter.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { installMemorySourceUI, memorySourcePageEntryId, MNEMON_SOURCE_PAGE_SLOT, MNEMON_SOURCE_CONFIGURATION_MUTATE, MNEMON_SOURCE_CONFIGURATION_READ, type MemorySourcePageComponent, type MemorySourcePageDefinition, type MemorySourcePageProps, type MemorySourceUIContribution, type MemorySourceUIContext, type MemorySourcePageNavigation, } from './source-pages.tsx';
|
|
2
2
|
export type { MnemonSourceManagementClient, MemorySourcePageInstance } from './source-contracts.ts';
|
|
3
|
+
export type { TaskAgentModelCatalog, TaskAgentModelCatalogGroup, TaskAgentModelCatalogModel } from "../core/contracts/index.js";
|
|
3
4
|
export { installMemoryComponentUI, MNEMON_COMPONENT_FALLBACK_PRIORITY, MNEMON_COMPONENT_SETTINGS_SLOT, MNEMON_COMPONENT_STATUS_SLOT, type MemoryComponentConfigurationSnapshot, type MemoryComponentHost, type MemoryComponentSettingsComponent, type MemoryComponentSettingsProps, type MemoryComponentStatusComponent, type MemoryComponentStatusProps, type MemoryComponentUIContext, type MemoryComponentUIContribution, } from './component-ui.tsx';
|
|
4
5
|
export { memorySettingsStyles, ToggleRow } from './settings-controls.tsx';
|
|
5
6
|
export { PanelActions, useLive, useStaged, WriteFailure } from './settings-panel.tsx';
|
|
@@ -344,6 +344,12 @@ export declare const zh: {
|
|
|
344
344
|
'config.runtimeUserScopeStorageHint': string;
|
|
345
345
|
'config.runtimeUserScopeGlobal': string;
|
|
346
346
|
'config.runtimeUserScopeGlobalHint': string;
|
|
347
|
+
'config.runtimeLimitsTitle': string;
|
|
348
|
+
'config.runtimeLimitsHint': string;
|
|
349
|
+
'config.runtime.userLimitBytes': string;
|
|
350
|
+
'config.runtime.memoryLimitBytes': string;
|
|
351
|
+
'config.runtimeLimitsApply': string;
|
|
352
|
+
'config.runtimeLimitInvalid': string;
|
|
347
353
|
'config.enhancementsRefreshFailed': string;
|
|
348
354
|
'config.strategyTitle': string;
|
|
349
355
|
'config.strategyFailed': string;
|
|
@@ -32,6 +32,11 @@ export declare function SelectField<T extends string>(props: {
|
|
|
32
32
|
/** A fuller name for assistive technology than the visible label. */
|
|
33
33
|
ariaLabel?: string | undefined;
|
|
34
34
|
className?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Repeat the chosen option's detail under its name in the selector itself, as
|
|
37
|
+
* the menu shows it. Off by default: most fields have no room for a second line.
|
|
38
|
+
*/
|
|
39
|
+
triggerDetail?: boolean | undefined;
|
|
35
40
|
onChange: (value: T) => void;
|
|
36
41
|
}): JSX.Element;
|
|
37
42
|
/** How a task Agent's write ended, as the receipt names it. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MemoryJsonValue, MemorySourceManagementInstance, MemorySourceManagementResult } from "../core/contracts/index.js";
|
|
1
|
+
import type { MemoryJsonValue, MemorySourceManagementInstance, MemorySourceManagementResult, TaskAgentModelCatalog } from "../core/contracts/index.js";
|
|
2
2
|
/** Instance- and scope-bound capability; never the Host's raw transport. */
|
|
3
3
|
export interface MnemonSourceManagementClient {
|
|
4
4
|
readonly sourceInstanceKey: string;
|
|
@@ -16,6 +16,11 @@ export interface MnemonSourceManagementClient {
|
|
|
16
16
|
expectedRevision?: string;
|
|
17
17
|
confirmed: true;
|
|
18
18
|
}): Promise<MemorySourceManagementResult>;
|
|
19
|
+
/**
|
|
20
|
+
* The routes and model directory a page may offer as a per-run choice. Absent
|
|
21
|
+
* on a Host that offers none, and the page then hides its pickers.
|
|
22
|
+
*/
|
|
23
|
+
readonly models?: () => Promise<TaskAgentModelCatalog>;
|
|
19
24
|
}
|
|
20
25
|
/** Browser metadata is display-only; the Host validates capability identifiers. */
|
|
21
26
|
export type MemorySourcePageInstance = Omit<MemorySourceManagementInstance, 'capabilities'> & {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface TaskAgentModelCatalogModel {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
/** DSH's merge-extensible model modality ids; absent means capability is unknown. */
|
|
6
|
+
inputModalities?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface TaskAgentModelCatalogGroup {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
models: TaskAgentModelCatalogModel[];
|
|
12
|
+
}
|
|
13
|
+
export interface TaskAgentModelCatalogFailure {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
18
|
+
export interface TaskAgentModelCatalog {
|
|
19
|
+
effective?: {
|
|
20
|
+
provider: string;
|
|
21
|
+
model: string;
|
|
22
|
+
source: 'fixed' | 'session' | 'dsh-default' | 'active-agent';
|
|
23
|
+
};
|
|
24
|
+
defaultSelection?: {
|
|
25
|
+
provider: string;
|
|
26
|
+
model: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The route the asking conversation's own delegated work takes while it is
|
|
30
|
+
* open: the model of its last request, or the one it was created with before
|
|
31
|
+
* its first. An inherited setting that follows its conversation takes it too;
|
|
32
|
+
* it is reported whether or not that switch is on.
|
|
33
|
+
*/
|
|
34
|
+
session?: {
|
|
35
|
+
provider: string;
|
|
36
|
+
model: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The route an inherited setting takes without following a conversation: the
|
|
40
|
+
* DSH new-session default, else an open Agent's creation route.
|
|
41
|
+
*/
|
|
42
|
+
inherited?: {
|
|
43
|
+
provider: string;
|
|
44
|
+
model: string;
|
|
45
|
+
source: 'dsh-default' | 'active-agent';
|
|
46
|
+
};
|
|
47
|
+
groups: TaskAgentModelCatalogGroup[];
|
|
48
|
+
failures: TaskAgentModelCatalogFailure[];
|
|
49
|
+
}
|
|
@@ -325,55 +325,7 @@ export interface ResolvedTaskAgentModelConfig {
|
|
|
325
325
|
/** Present, and true, only on an inherited route that follows its conversation. */
|
|
326
326
|
followConversation?: true;
|
|
327
327
|
}
|
|
328
|
-
export
|
|
329
|
-
id: string;
|
|
330
|
-
name: string;
|
|
331
|
-
description?: string;
|
|
332
|
-
/** DSH's merge-extensible model modality ids; absent means capability is unknown. */
|
|
333
|
-
inputModalities?: string[];
|
|
334
|
-
}
|
|
335
|
-
export interface TaskAgentModelCatalogGroup {
|
|
336
|
-
id: string;
|
|
337
|
-
name: string;
|
|
338
|
-
models: TaskAgentModelCatalogModel[];
|
|
339
|
-
}
|
|
340
|
-
export interface TaskAgentModelCatalogFailure {
|
|
341
|
-
id: string;
|
|
342
|
-
name: string;
|
|
343
|
-
message: string;
|
|
344
|
-
}
|
|
345
|
-
export interface TaskAgentModelCatalog {
|
|
346
|
-
effective?: {
|
|
347
|
-
provider: string;
|
|
348
|
-
model: string;
|
|
349
|
-
source: 'fixed' | 'session' | 'dsh-default' | 'active-agent';
|
|
350
|
-
};
|
|
351
|
-
defaultSelection?: {
|
|
352
|
-
provider: string;
|
|
353
|
-
model: string;
|
|
354
|
-
};
|
|
355
|
-
/**
|
|
356
|
-
* The route the asking conversation's own delegated work takes while it is
|
|
357
|
-
* open: the model of its last request, or the one it was created with before
|
|
358
|
-
* its first. An inherited setting that follows its conversation takes it too;
|
|
359
|
-
* it is reported whether or not that switch is on.
|
|
360
|
-
*/
|
|
361
|
-
session?: {
|
|
362
|
-
provider: string;
|
|
363
|
-
model: string;
|
|
364
|
-
};
|
|
365
|
-
/**
|
|
366
|
-
* The route an inherited setting takes without following a conversation: the
|
|
367
|
-
* DSH new-session default, else an open Agent's creation route.
|
|
368
|
-
*/
|
|
369
|
-
inherited?: {
|
|
370
|
-
provider: string;
|
|
371
|
-
model: string;
|
|
372
|
-
source: 'dsh-default' | 'active-agent';
|
|
373
|
-
};
|
|
374
|
-
groups: TaskAgentModelCatalogGroup[];
|
|
375
|
-
failures: TaskAgentModelCatalogFailure[];
|
|
376
|
-
}
|
|
328
|
+
export type { TaskAgentModelCatalog, TaskAgentModelCatalogFailure, TaskAgentModelCatalogGroup, TaskAgentModelCatalogModel, } from '../core/contracts/task-agent-model.ts';
|
|
377
329
|
export interface InteractionConfig {
|
|
378
330
|
turnBar?: boolean;
|
|
379
331
|
saveAction?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.37",
|
|
4
4
|
"description": "Composable, view-based context for DeepSeek Harness. Pluggable sources and strategies, with layered memory and self-evolving skills out of the box.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -165,9 +165,9 @@
|
|
|
165
165
|
"dsh-mnemon-provider-retaindb": "0.5.6",
|
|
166
166
|
"dsh-mnemon-provider-supermemory": "0.5.5",
|
|
167
167
|
"dsh-mnemon-source-documents": "0.5.11",
|
|
168
|
-
"dsh-mnemon-source-memory-spaces": "0.5.
|
|
168
|
+
"dsh-mnemon-source-memory-spaces": "0.5.24",
|
|
169
169
|
"dsh-mnemon-source-runtime": "0.5.16",
|
|
170
|
-
"dsh-mnemon-source-skills": "0.5.
|
|
170
|
+
"dsh-mnemon-source-skills": "0.5.4",
|
|
171
171
|
"dsh-mnemon-strategy-auto-capture": "0.5.5",
|
|
172
172
|
"dsh-mnemon-strategy-default-three-tier": "0.5.11",
|
|
173
173
|
"dsh-mnemon-strategy-general": "0.5.1",
|