dsh-layered-memory 0.10.0 → 0.11.0
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.en.md +22 -0
- package/README.md +20 -0
- package/dist/index.js +4 -0
- package/dist/settings.d.ts +2 -0
- package/dist/settings.js +17 -0
- package/dist/tui.d.ts +22 -0
- package/dist/tui.js +201 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -70,6 +70,26 @@ and the memory chip in the input bar (`Memory · Auto`) mean the client half is
|
|
|
70
70
|
**Uninstall**: `dsh plugin --profile web remove dsh-layered-memory` + restart. Data
|
|
71
71
|
stays in `~/.dsh/memory/`; delete the whole directory manually if you don't need it.
|
|
72
72
|
|
|
73
|
+
### Terminal Hosts (TUI / headless)
|
|
74
|
+
|
|
75
|
+
Beyond web, the same plugin installs into terminal-shaped hosts:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# dsh-tui (Claude Code style TUI front door — see github.com/ccch1mneyyy/dsh-TUI · site https://dshtui.com)
|
|
79
|
+
dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui # first time: create profile + install the TUI host
|
|
80
|
+
dsh plugin --profile dsh-tui add dsh-layered-memory
|
|
81
|
+
dsh --profile dsh-tui
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- **`/memory <auto|chat|work|off>`** switches the current session's memory mode; with no
|
|
85
|
+
argument a selection panel pops up;
|
|
86
|
+
- **Status line**: a persistent `记忆:智能`-style mode readout sits right above the prompt;
|
|
87
|
+
- **`/settings` section**: master switch, capture, distill, recall, distill model routing and
|
|
88
|
+
input budget are editable in place (same store as the web settings panel; complex routing
|
|
89
|
+
chains still go through web / YAML);
|
|
90
|
+
- **headless** (`dsh --profile headless "one-shot task"`): capture and distillation work as
|
|
91
|
+
usual with no UI elements. Web and terminal hosts share the same `~/.dsh/memory/` store.
|
|
92
|
+
|
|
73
93
|
### Development from Source
|
|
74
94
|
|
|
75
95
|
```bash
|
|
@@ -184,6 +204,8 @@ lives in the native host seat designed for it; the plugin no longer owns a strip
|
|
|
184
204
|
toggle in Automation. Ideal for debug/eval/sensitive sessions that should absorb
|
|
185
205
|
without interference. Orthogonal to Paused: paused is full stealth (capture off
|
|
186
206
|
too), while write-only keeps the "in" and gates the "out".
|
|
207
|
+
- **Terminal host (TUI)**: the same mode system surfaces in the dsh-tui host as the
|
|
208
|
+
`/memory` command, a status line and a `/settings` section (see Quick Start).
|
|
187
209
|
|
|
188
210
|
## UI Preview
|
|
189
211
|
|
package/README.md
CHANGED
|
@@ -61,6 +61,24 @@ Agent 应当返回安装结果,并明确告诉你配置中是否已经出现 `
|
|
|
61
61
|
**卸载**:`dsh plugin --profile web remove dsh-layered-memory` + 重启。数据保留在
|
|
62
62
|
`~/.dsh/memory/`,不需要时手动删除整个目录即可。
|
|
63
63
|
|
|
64
|
+
### 终端形态(TUI / headless)
|
|
65
|
+
|
|
66
|
+
除 web 外,同一插件可直接装进终端形态宿主:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# dsh-tui(Claude Code 风格 TUI 前门,详见 github.com/ccch1mneyyy/dsh-TUI · 官网 https://dshtui.com)
|
|
70
|
+
dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui # 首次:建 profile 并装 TUI 宿主
|
|
71
|
+
dsh plugin --profile dsh-tui add dsh-layered-memory
|
|
72
|
+
dsh --profile dsh-tui
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- **`/memory <auto|chat|work|off>`** 切换当前会话档位,无参数时弹出档位选择面板;
|
|
76
|
+
- **状态行**:提示框上方常驻 `记忆:智能` 等当前档位读数;
|
|
77
|
+
- **`/settings` 设置区块**:总开关、捕获、蒸馏、召回、蒸馏模型路由与输入预算可直接编辑
|
|
78
|
+
(与 web 设置面板同一存储;复杂路由链仍走 web / YAML);
|
|
79
|
+
- **headless**(`dsh --profile headless "一次性任务"`):捕获与蒸馏照常工作,无界面元素。
|
|
80
|
+
web 与终端形态共享 `~/.dsh/memory/` 同一份记忆。
|
|
81
|
+
|
|
64
82
|
### 从源码开发
|
|
65
83
|
|
|
66
84
|
```bash
|
|
@@ -143,6 +161,8 @@ L1/L2/L3 层级过滤)、层级 × 时间窗口表格(调用数 / 输出与
|
|
|
143
161
|
一并停止;`memory_search` 等读工具返回只写提示)。覆盖按会话持久化,切回
|
|
144
162
|
「跟随全局」即清除、跟随自动化区的召回开关;适合调试/评测/敏感会话「只吸收不干扰」。
|
|
145
163
|
与暂停正交:暂停是完全隐身(连捕获都关),只写保留「进」关「出」。
|
|
164
|
+
- **终端形态(TUI)**:同一档位体系在 dsh-tui 宿主下以 `/memory` 命令、状态行与
|
|
165
|
+
`/settings` 区块呈现(安装见快速开始)。
|
|
146
166
|
|
|
147
167
|
## 界面预览
|
|
148
168
|
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ import { SceneStore } from './store/scenes.js';
|
|
|
38
38
|
import { SessionModeStore } from './store/session-modes.js';
|
|
39
39
|
import { StateStore } from './store/state.js';
|
|
40
40
|
import { registerMemoryTools } from './tools/index.js';
|
|
41
|
+
import { registerTuiSurface } from './tui.js';
|
|
41
42
|
import { errDetail, withFileLog } from './util/filelog.js';
|
|
42
43
|
import { buildRouteChain, resolveModelRoute, invalidateEffortCache } from './llm.js';
|
|
43
44
|
import { effectiveCfg } from './pipeline/runner.js';
|
|
@@ -287,6 +288,9 @@ export async function apply(ctx, config) {
|
|
|
287
288
|
await runner.init();
|
|
288
289
|
// 档位切换同步(ADR-0003):切走按捕获档位落袋 / 切 off 挂起 / 切回清挂起
|
|
289
290
|
modes.setModeChangeHandler((sessionId, oldMode, newMode) => runner.onModeChange(sessionId, oldMode, newMode));
|
|
291
|
+
// ── TUI 形态原生接入(dsh-tui/官方 TUI 宿主;软探测,web/headless 下全部 no-op)。
|
|
292
|
+
// 放切换链接线之后:/memory 在启动窗口内派发也不会绕过 runner.onModeChange ──
|
|
293
|
+
registerTuiSurface(ctx, { logger, live, modes });
|
|
290
294
|
// 闲置兜底:静默达标会话的未蒸馏切片自动落袋(idleSeconds=0 关闭)
|
|
291
295
|
runner.startIdleTimer();
|
|
292
296
|
// 重建控制器(存储降级时不建——RPC 端点走 supported=false 分支)
|
package/dist/settings.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export interface LiveSettingsHandle {
|
|
|
37
37
|
get(): MemoryLiveSettings;
|
|
38
38
|
/** UI 写入入口;不支持时抛错由 RPC 层转成业务错误 */
|
|
39
39
|
update(patch: Partial<MemoryLiveSettings>): Promise<void>;
|
|
40
|
+
/** 订阅开关变更(TUI 状态行等即时刷新;可选——缺省方退化为下次交互时刷新)。返回退订。 */
|
|
41
|
+
onChange?(cb: () => void): () => void;
|
|
40
42
|
}
|
|
41
43
|
export declare function liveSettingsSchema(): Schema<MemoryLiveSettings>;
|
|
42
44
|
export declare function registerLiveSettings(ctx: Context, logger: MemoryLogger): LiveSettingsHandle;
|
package/dist/settings.js
CHANGED
|
@@ -134,6 +134,9 @@ export function registerLiveSettings(ctx, logger) {
|
|
|
134
134
|
get: () => ALWAYS_ON,
|
|
135
135
|
update: () => Promise.reject(new Error('settings 服务不可用')),
|
|
136
136
|
};
|
|
137
|
+
// 变更订阅者(handle.onChange):挂接在闭包层,inner 换新(服务迁移)后由新 scope 的
|
|
138
|
+
// watch 继续驱动——订阅方无感
|
|
139
|
+
const changeCbs = new Set();
|
|
137
140
|
/** 挂接一个(新注册或复用的)scope:重挂前先摘旧 watcher,防跨重启累积。 */
|
|
138
141
|
const wireScope = (scope) => {
|
|
139
142
|
cachedUnwatch?.();
|
|
@@ -141,6 +144,14 @@ export function registerLiveSettings(ctx, logger) {
|
|
|
141
144
|
cachedUnwatch = scope.watch((next) => {
|
|
142
145
|
const prev = current;
|
|
143
146
|
current = resolveSettings(next);
|
|
147
|
+
for (const cb of changeCbs) {
|
|
148
|
+
try {
|
|
149
|
+
cb();
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
// 订阅方异常不阻断开关链(与档位切换回调同纪律)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
144
155
|
const b = current.distillBudgets;
|
|
145
156
|
const budgetNote = (b.extract || b.dedup || b.l2 || b.l3)
|
|
146
157
|
? `,输出预算=抽取 ${b.extract || '默认'}/去重 ${b.dedup || '默认'}/L2 ${b.l2 || '默认'}/L3 ${b.l3 || '默认'}`
|
|
@@ -226,6 +237,12 @@ export function registerLiveSettings(ctx, logger) {
|
|
|
226
237
|
},
|
|
227
238
|
get: () => inner.get(),
|
|
228
239
|
update: (patch) => inner.update(patch),
|
|
240
|
+
onChange: (cb) => {
|
|
241
|
+
changeCbs.add(cb);
|
|
242
|
+
return () => {
|
|
243
|
+
changeCbs.delete(cb);
|
|
244
|
+
};
|
|
245
|
+
},
|
|
229
246
|
};
|
|
230
247
|
}
|
|
231
248
|
/** scope.get() 的防御性解析:异常值回退全开(宁可多记不可静默停摆)。 */
|
package/dist/tui.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI 形态原生接入(dsh-tui / 官方 TUI 宿主)——软探测、静默降级,绝不拖垮宿主。
|
|
3
|
+
*
|
|
4
|
+
* 接缝出处:dsh-ecosystem-spec《终端交互生态插件准入与开发指南》(dsh-TUI 生态)。
|
|
5
|
+
* web/headless profile 缺这些服务时全部 no-op;服务形状走内联结构类型,不引
|
|
6
|
+
* 第三方包依赖(与 sessions/connection 的鸭子探测同款纪律——tsc 抓不到运行时
|
|
7
|
+
* 漂移,升级 dsh-tui 后须真机复验)。
|
|
8
|
+
* - tuiSettingsSections:/settings 声明式设置区块(settings 命名空间 dsh-memory 的编辑面);
|
|
9
|
+
* - tuiStatus:提示框上方键控状态行(当前会话记忆档位;清理是调用者责任,挂 ctx.effect);
|
|
10
|
+
* - tuiDialogs:托管单选弹窗(/memory 无参数时的档位选择);
|
|
11
|
+
* - commands(dsh-base 服务,全形态存在):/memory 命令——TUI/web 均可派发,headless 无 UI 自然闲置。
|
|
12
|
+
*/
|
|
13
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
14
|
+
import type { LiveSettingsHandle } from './settings.js';
|
|
15
|
+
import type { SessionModeStore } from './store/session-modes.js';
|
|
16
|
+
import type { MemoryLogger } from './types.js';
|
|
17
|
+
export interface TuiSurfaceDeps {
|
|
18
|
+
logger: MemoryLogger;
|
|
19
|
+
live: LiveSettingsHandle;
|
|
20
|
+
modes: SessionModeStore;
|
|
21
|
+
}
|
|
22
|
+
export declare function registerTuiSurface(ctx: Context, deps: TuiSurfaceDeps): void;
|
package/dist/tui.js
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { EFFORT_CHOICES } from './config.js';
|
|
2
|
+
import { errDetail } from './util/filelog.js';
|
|
3
|
+
/** 状态行/命令回显的档位短名(与 web 芯片「记忆 · 智能」同口径)。 */
|
|
4
|
+
const MODE_LABEL = { auto: '智能', chat: '对话', work: '工作', off: '暂停' };
|
|
5
|
+
/**
|
|
6
|
+
* 单服务的「现在挂 + internal/service 补挂」:服务晚于本插件就绪(行序 ≠ 发布序)
|
|
7
|
+
* 或换实例时自动重挂;下线即摘。fiber 卸载统一清理(disposer 指向已死服务时吞错)。
|
|
8
|
+
*/
|
|
9
|
+
function watchService(ctx, name, attach, logger) {
|
|
10
|
+
let disposer;
|
|
11
|
+
let bound;
|
|
12
|
+
const up = () => {
|
|
13
|
+
const svc = ctx.get?.(name);
|
|
14
|
+
if (!svc || svc === bound)
|
|
15
|
+
return;
|
|
16
|
+
try {
|
|
17
|
+
const d = attach(svc);
|
|
18
|
+
if (!d)
|
|
19
|
+
return;
|
|
20
|
+
// 换实例摘旧:旧 disposer 可能指向已死服务,吞错不阻断新挂接
|
|
21
|
+
try {
|
|
22
|
+
disposer?.();
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
// 旧服务所在宿主行已先一步卸载
|
|
26
|
+
}
|
|
27
|
+
disposer = d;
|
|
28
|
+
bound = svc;
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
logger.warn(`[memory] TUI 接缝 ${name} 挂接失败(忽略): ${errDetail(err)}`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const down = () => {
|
|
35
|
+
try {
|
|
36
|
+
disposer?.();
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// 服务所在宿主行已先一步卸载,残留引用调用必抛——吞掉
|
|
40
|
+
}
|
|
41
|
+
disposer = undefined;
|
|
42
|
+
bound = undefined;
|
|
43
|
+
};
|
|
44
|
+
up();
|
|
45
|
+
ctx.on('internal/service', (n, impl) => {
|
|
46
|
+
if (n !== name)
|
|
47
|
+
return;
|
|
48
|
+
if (impl)
|
|
49
|
+
up();
|
|
50
|
+
else if (bound)
|
|
51
|
+
down();
|
|
52
|
+
});
|
|
53
|
+
ctx.effect(() => () => down());
|
|
54
|
+
}
|
|
55
|
+
export function registerTuiSurface(ctx, deps) {
|
|
56
|
+
const { logger, live, modes } = deps;
|
|
57
|
+
// ── 状态行:当前会话的记忆档位(TUI 单活动 agent;agent/session-start 覆盖
|
|
58
|
+
// /new、/resume、rewind 全部切换路径) ──
|
|
59
|
+
let lastSid = '';
|
|
60
|
+
let lastText = '';
|
|
61
|
+
let refreshStatus;
|
|
62
|
+
const statusText = () => {
|
|
63
|
+
if (!live.get().enabled)
|
|
64
|
+
return '记忆:停用';
|
|
65
|
+
return `记忆:${MODE_LABEL[modes.get(lastSid)]}`;
|
|
66
|
+
};
|
|
67
|
+
watchService(ctx, 'tuiStatus', (svc) => {
|
|
68
|
+
const status = svc;
|
|
69
|
+
refreshStatus = () => {
|
|
70
|
+
const text = statusText();
|
|
71
|
+
if (text === lastText)
|
|
72
|
+
return;
|
|
73
|
+
lastText = text;
|
|
74
|
+
// 第三参 identity(插件 ctx)只喂 dsh-tui 的效果台账归属(C-060),省略记 undeclared
|
|
75
|
+
status.set('memory', text, ctx);
|
|
76
|
+
};
|
|
77
|
+
refreshStatus();
|
|
78
|
+
logger.info('[memory] TUI 状态行已接入(当前会话记忆档位可见)');
|
|
79
|
+
return () => {
|
|
80
|
+
refreshStatus = undefined;
|
|
81
|
+
lastText = '';
|
|
82
|
+
try {
|
|
83
|
+
// 本插件独占该 key,显式清行与保留 set() 返回的 disposer 语义等价(后者只清
|
|
84
|
+
// 自己那次写——这里没有并发写者,选更直白的一种)
|
|
85
|
+
status.set('memory', undefined);
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
// 宿主行已卸载
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}, logger);
|
|
92
|
+
ctx.on('agent/session-start', (payload) => {
|
|
93
|
+
const sid = String(payload?.agent?.id ?? '');
|
|
94
|
+
if (!sid || sid === lastSid)
|
|
95
|
+
return;
|
|
96
|
+
lastSid = sid;
|
|
97
|
+
refreshStatus?.();
|
|
98
|
+
});
|
|
99
|
+
// 全局开关在 /settings 里被改动 → 状态行即时跟随(否则「记忆:停用」读数要等下次交互才刷新)
|
|
100
|
+
const unsubscribeLive = live.onChange?.(() => refreshStatus?.());
|
|
101
|
+
if (unsubscribeLive)
|
|
102
|
+
ctx.effect(() => () => unsubscribeLive());
|
|
103
|
+
// ── /memory 命令:切当前会话档位;无参数时 TUI 环境弹托管单选 ──
|
|
104
|
+
const MODE_OPTIONS = [
|
|
105
|
+
{ id: 'auto', label: '智能', description: '按会话类型自动选 chat/work 族' },
|
|
106
|
+
{ id: 'chat', label: '对话', description: '用户画像与偏好(chat 族)' },
|
|
107
|
+
{ id: 'work', label: '工作', description: '团队操作准则(work 族)' },
|
|
108
|
+
{ id: 'off', label: '暂停', description: '本会话停用记忆,可随时切回' },
|
|
109
|
+
];
|
|
110
|
+
const MODE_USAGE = '用法:/memory <auto|chat|work|off>';
|
|
111
|
+
watchService(ctx, 'commands', (svc) => {
|
|
112
|
+
const commands = svc;
|
|
113
|
+
const dispose = commands.register({
|
|
114
|
+
name: 'memory',
|
|
115
|
+
description: '切换本会话记忆档位(auto/chat/work/off,无参数弹出选择)',
|
|
116
|
+
handler: async (inv) => {
|
|
117
|
+
// 宿主侧 Agent 身份契约是 id(见 CommandsLike 注释);sessionId 仅作兜底
|
|
118
|
+
const agentId = inv.agent ?? {};
|
|
119
|
+
const sid = String(agentId.id ?? agentId.sessionId ?? '');
|
|
120
|
+
if (!sid)
|
|
121
|
+
return { kind: 'error', text: '无法确定当前会话' };
|
|
122
|
+
const arg = inv.rawInput.trim().toLowerCase();
|
|
123
|
+
let mode = ['auto', 'chat', 'work', 'off'].includes(arg)
|
|
124
|
+
? arg
|
|
125
|
+
: undefined;
|
|
126
|
+
if (!mode) {
|
|
127
|
+
const dialogs = ctx.get?.('tuiDialogs');
|
|
128
|
+
if (!dialogs)
|
|
129
|
+
return { kind: 'error', text: MODE_USAGE };
|
|
130
|
+
const picked = await dialogs.select(ctx, {
|
|
131
|
+
title: '记忆档位',
|
|
132
|
+
options: MODE_OPTIONS,
|
|
133
|
+
timeoutMs: 60_000,
|
|
134
|
+
signal: inv.signal,
|
|
135
|
+
});
|
|
136
|
+
if (!picked)
|
|
137
|
+
return { kind: 'success', text: '已取消(档位未变)' };
|
|
138
|
+
mode = picked;
|
|
139
|
+
}
|
|
140
|
+
const old = modes.get(sid);
|
|
141
|
+
// ADR-0003 切换链(切走落袋/off 挂起/切回恢复)随 onModeChange 回调自动走
|
|
142
|
+
modes.set(sid, mode);
|
|
143
|
+
lastSid = sid;
|
|
144
|
+
refreshStatus?.();
|
|
145
|
+
logger.info(`[memory] /memory 切档 session=${sid} ${old}→${mode}`);
|
|
146
|
+
return { kind: 'success', text: `记忆档位:${MODE_LABEL[old]} → ${MODE_LABEL[mode]}(本会话)` };
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
logger.info('[memory] /memory 命令已注册(会话档位切换)');
|
|
150
|
+
return dispose;
|
|
151
|
+
}, logger);
|
|
152
|
+
// ── /settings 设置区块:dsh-memory 命名空间的声明式编辑面(渲染/草稿/保存
|
|
153
|
+
// 全由 TUI 宿主负责;复杂嵌套键如路由链仍走 YAML/web 面板) ──
|
|
154
|
+
watchService(ctx, 'tuiSettingsSections', (svc) => {
|
|
155
|
+
const sections = svc;
|
|
156
|
+
const dispose = sections.register({
|
|
157
|
+
ns: 'dsh-memory',
|
|
158
|
+
title: 'Layered Memory',
|
|
159
|
+
descriptions: { zh: '分层蒸馏记忆' },
|
|
160
|
+
fields: [
|
|
161
|
+
{ path: ['enabled'], label: 'Master switch', descriptions: { zh: '总开关(关闭即全停)' }, kind: 'boolean' },
|
|
162
|
+
{ path: ['capture'], label: 'Capture', descriptions: { zh: '捕获(L0 对话留档)' }, kind: 'boolean' },
|
|
163
|
+
{ path: ['distill'], label: 'Distill', descriptions: { zh: '蒸馏(L1~L3 记忆整理)' }, kind: 'boolean' },
|
|
164
|
+
{ path: ['recall'], label: 'Recall injection', descriptions: { zh: '召回注入' }, kind: 'boolean' },
|
|
165
|
+
{
|
|
166
|
+
path: ['reasoningEffort'],
|
|
167
|
+
label: 'Distill reasoning effort',
|
|
168
|
+
descriptions: { zh: '蒸馏思考档位' },
|
|
169
|
+
kind: 'select',
|
|
170
|
+
options: EFFORT_CHOICES.map((e) => ({ value: e, label: e === '' ? 'follow config' : e })),
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
path: ['distillProvider'],
|
|
174
|
+
label: 'Distill provider',
|
|
175
|
+
descriptions: { zh: '蒸馏模型供应商' },
|
|
176
|
+
kind: 'text',
|
|
177
|
+
hint: 'Empty = follow default model',
|
|
178
|
+
hintDescriptions: { zh: '留空跟随默认模型' },
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
path: ['distillModel'],
|
|
182
|
+
label: 'Distill model',
|
|
183
|
+
descriptions: { zh: '蒸馏模型' },
|
|
184
|
+
kind: 'text',
|
|
185
|
+
hint: 'Empty = follow default model',
|
|
186
|
+
hintDescriptions: { zh: '留空跟随默认模型' },
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
path: ['distillMaxInputChars'],
|
|
190
|
+
label: 'Distill input budget',
|
|
191
|
+
descriptions: { zh: '蒸馏输入预算(字符)' },
|
|
192
|
+
kind: 'number',
|
|
193
|
+
hint: '0 = default',
|
|
194
|
+
hintDescriptions: { zh: '0 = 默认' },
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
});
|
|
198
|
+
logger.info('[memory] TUI 设置区块已注册(/settings · 分层蒸馏记忆)');
|
|
199
|
+
return dispose;
|
|
200
|
+
}, logger);
|
|
201
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-layered-memory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "L0~L3 分层蒸馏记忆插件 for DeepSeek Harness:自动捕获对话(L0)、抽取原子记忆(L1)、整合场景块(L2)、蒸馏核心画像/团队方法论(L3),并在模型步骤前自动召回注入。移植自 MemoryCore (TencentDB Agent Memory) 的管线设计。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|