@lmzhen/dsh-memory-files 0.32.5 → 0.32.6
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 +10 -16
- package/lib/index.js +2 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
# @lmzhen/dsh-memory-files
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Default layered memory provider backed by `MEMORY.md` and `USER.md`. It registers as `files` and publishes the effective memory-budget view used by diagnostics.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`root` defaults to `$DSH_HOME/memories`. The store enforces its character budget on the final result and refuses overflow rather than silently truncating an entry. Batch writes are serialized within the provider; cross-process safety still depends on the selected IO backend.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Budgets and defaults
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- `memoryChars`: fallback default 2,200 characters for `MEMORY.md`.
|
|
10
|
+
- `userChars`: fallback default 1,375 characters for `USER.md`.
|
|
11
|
+
- `addDatePrefix`: default `false`.
|
|
12
|
+
- `maxConsolidationFailures`: default 3 failures before the model is told to stop retrying.
|
|
13
|
+
- `providerName`: default `files`.
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
An explicit row/user value wins. Otherwise an already mounted evolution-policy budget takes precedence over the package fallback. The row budget controls what the store enforces; the policy budget controls what review plans against, so an explicit mismatch is warned about and surfaced by doctor.
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
随记忆功能自动工作。
|
|
16
|
-
|
|
17
|
-
## 边界
|
|
18
|
-
|
|
19
|
-
预算写满会拒绝,不会静默截断。
|
|
20
|
-
|
|
21
|
-
## 维护者参考:参数别名(G0/S0.3)
|
|
22
|
-
|
|
23
|
-
`memoryCharLimit` → `memoryChars`;`userCharLimit` → `userChars`。旧名仍可读,写入会拒绝。
|
|
17
|
+
`memoryCharLimit` and `userCharLimit` remain readable deprecated aliases of `memoryChars` and `userChars`; writes to the old names are refused (G0/S0.3). `threatExemptLabels` is deployment security configuration and defaults to empty.
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import z from "@deepseek-ai/schemastery";
|
|
4
|
-
import { DEFAULT_CONSOLIDATION_FAILURES, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_USER_CHAR_LIMIT, MemoryStore, clampOnce, evolutionIoAdapter, liveBool, makeSerialQueue, paramRowId, payloadText, unwrapLive, userSetKeys } from "@lmzhen/dsh-evolution-core";
|
|
4
|
+
import { DEFAULT_CONSOLIDATION_FAILURES, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_USER_CHAR_LIMIT, MemoryStore, clampOnce, evolutionIoAdapter, liveBool, makeSerialQueue, paramRowId, payloadText, registerOwnerSettings, unwrapLive, userSetKeys } from "@lmzhen/dsh-evolution-core";
|
|
5
5
|
//#region lib/types/index.js
|
|
6
6
|
/**
|
|
7
7
|
* Local layered memory provider for `ctx.memory`.
|
|
@@ -21,6 +21,7 @@ const Config = z.object({
|
|
|
21
21
|
threatExemptLabels: z.array(z.string()).default([])
|
|
22
22
|
});
|
|
23
23
|
function apply(ctx, rawConfig = {}) {
|
|
24
|
+
registerOwnerSettings(ctx, "memory-files", Config);
|
|
24
25
|
ctx.inject(["settings"], (injected) => {
|
|
25
26
|
const settings = injected.settings;
|
|
26
27
|
if (typeof settings?.configure !== "function") return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-memory-files",
|
|
3
3
|
"description": "Local layered memory provider (community build)",
|
|
4
|
-
"version": "0.32.
|
|
4
|
+
"version": "0.32.6",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.32.6"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
34
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
35
|
-
"@lmzhen/dsh-memory": "^0.32.
|
|
34
|
+
"@lmzhen/dsh-evolution-io": "^0.32.6",
|
|
35
|
+
"@lmzhen/dsh-memory": "^0.32.6"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
39
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
40
|
-
"@lmzhen/dsh-memory": "^0.32.
|
|
38
|
+
"@lmzhen/dsh-evolution-core": "^0.32.6",
|
|
39
|
+
"@lmzhen/dsh-evolution-io": "^0.32.6",
|
|
40
|
+
"@lmzhen/dsh-memory": "^0.32.6"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|