dsh-memory-ledger 1.0.0 → 1.0.1
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/CHANGELOG.md +21 -0
- package/index.js +11 -5
- package/package.json +2 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **左侧栏面板在冷启动后显示「读取失败: HTTP 404」。** 三条面板路由原先在 `apply()` 里用
|
|
8
|
+
`ctx.get('webServer')` 探测一次;DSH 全新启动时 `webServer` 还没就绪,取到 `undefined`,
|
|
9
|
+
路由被静默跳过(所以只有热重载后才正常)。改用 `ctx.inject(['webServer'], cb)`:
|
|
10
|
+
服务就绪后注册,服务变化时自动重载。无 web server 的 headless profile 仍照常工作。
|
|
11
|
+
|
|
12
|
+
## 1.0.0
|
|
13
|
+
|
|
14
|
+
- 首次发布。
|
|
15
|
+
- 用户级 / 项目级两级台账,每轮注入提示词段落。
|
|
16
|
+
- 硬约束段(pinned 与 `constraintKeys` 的设定)优先级高于默认署名与风格。
|
|
17
|
+
- `memory_save` / `memory_search` / `memory_forget` 三个工具,混合 BM25 + TF-IDF 向量检索。
|
|
18
|
+
- 重复失败按签名聚类计数,超过阈值进入提示词。
|
|
19
|
+
- 左侧栏「记忆册」面板:检索、逐条编辑、归档前确认、可恢复。
|
|
20
|
+
- 每条记忆带 `reason`(记录原因)与 `origin`(首次来源项目)。
|
|
21
|
+
- 回合结束时的「设定未记录」提醒(规则判断,零额外 token 开销)。
|
package/index.js
CHANGED
|
@@ -674,8 +674,13 @@ export function apply(ctx, config) {
|
|
|
674
674
|
}
|
|
675
675
|
|
|
676
676
|
// ── 6. Browser panel routes ───────────────────────────────────────────────
|
|
677
|
-
|
|
678
|
-
|
|
677
|
+
// The webserver is NOT ready when this plugin applies on a cold start (and a
|
|
678
|
+
// headless profile has none at all), so wait for the service instead of
|
|
679
|
+
// probing once: `ctx.inject` runs the callback when it appears and re-runs it
|
|
680
|
+
// after any change.
|
|
681
|
+
if (config.ui !== false) {
|
|
682
|
+
ctx.inject(['webServer'], (child) => {
|
|
683
|
+
const webServer = child.webServer
|
|
679
684
|
const guard = (handler) => async (request, response) => {
|
|
680
685
|
if (!sameOrigin(request)) {
|
|
681
686
|
sendJson(response, 403, { error: 'untrusted origin' })
|
|
@@ -689,7 +694,7 @@ export function apply(ctx, config) {
|
|
|
689
694
|
}
|
|
690
695
|
}
|
|
691
696
|
|
|
692
|
-
|
|
697
|
+
child.effect(() => webServer.register({
|
|
693
698
|
kind: 'exact',
|
|
694
699
|
path: `${prefix}/ledger`,
|
|
695
700
|
handler: guard(async (request, response) => {
|
|
@@ -709,7 +714,7 @@ export function apply(ctx, config) {
|
|
|
709
714
|
}),
|
|
710
715
|
}))
|
|
711
716
|
|
|
712
|
-
|
|
717
|
+
child.effect(() => webServer.register({
|
|
713
718
|
kind: 'exact',
|
|
714
719
|
path: `${prefix}/update`,
|
|
715
720
|
handler: guard(async (request, response) => {
|
|
@@ -743,7 +748,7 @@ export function apply(ctx, config) {
|
|
|
743
748
|
}),
|
|
744
749
|
}))
|
|
745
750
|
|
|
746
|
-
|
|
751
|
+
child.effect(() => webServer.register({
|
|
747
752
|
kind: 'exact',
|
|
748
753
|
path: `${prefix}/forget`,
|
|
749
754
|
handler: guard(async (request, response) => {
|
|
@@ -766,5 +771,6 @@ export function apply(ctx, config) {
|
|
|
766
771
|
}
|
|
767
772
|
}),
|
|
768
773
|
}))
|
|
774
|
+
})
|
|
769
775
|
}
|
|
770
776
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-memory-ledger",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Persistent memory for DeepSeek Harness: standing settings and verified problem→solution lessons, separated per project, injected into every session, with a left-sidebar panel, hybrid BM25+vector search, provenance, and an unrecorded-setting reminder.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"icon.svg",
|
|
41
41
|
"README.md",
|
|
42
42
|
"README-zh.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
43
44
|
"LICENSE"
|
|
44
45
|
],
|
|
45
46
|
"engines": {
|