@lmzhen/dsh-evolution-activity 0.3.27 → 0.3.29
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/lib/index.js +8 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Independent of request-prefix construction. This package does not alter the asse
|
|
|
24
24
|
|
|
25
25
|
## Configuration
|
|
26
26
|
|
|
27
|
-
- `maxItems`: bound on the retained activity sidecar (default `DEFAULT_MAX_ITEMS = 200`). A non-finite value falls back to the default (0.3.19, S6.4 guard).
|
|
27
|
+
- `maxItems`: bound on the retained activity sidecar (default `DEFAULT_MAX_ITEMS = 200`). A non-finite value (NaN/±Infinity) falls back to the default (0.3.19, S6.4 guard), while a non-positive value (0 or negative) fails loud at the schema — `z.number().min(1)` — because `slice(-0)` would keep everything and disable the retention window (G3.1, 0.3.23).
|
|
28
28
|
|
|
29
29
|
## Known Limitations and Deferred Work
|
|
30
30
|
|
package/lib/index.js
CHANGED
|
@@ -73,8 +73,14 @@ const name = "evolution-activity";
|
|
|
73
73
|
const Config = z.object({ maxItems: z.number().min(1).default(200) });
|
|
74
74
|
function apply(ctx, rawConfig = {}) {
|
|
75
75
|
const configuredMaxItems = rawConfig.maxItems ?? 200;
|
|
76
|
-
|
|
77
|
-
if (!Number.isFinite(configuredMaxItems))
|
|
76
|
+
let maxItems;
|
|
77
|
+
if (!Number.isFinite(configuredMaxItems)) {
|
|
78
|
+
maxItems = 200;
|
|
79
|
+
ctx.logger.warn(`evolution-activity: maxItems is not a finite number; falling back to the default 200`);
|
|
80
|
+
} else if (configuredMaxItems < 1) {
|
|
81
|
+
maxItems = 1;
|
|
82
|
+
ctx.logger.warn(`evolution-activity: maxItems=${String(configuredMaxItems)} is invalid; falling back to 1`);
|
|
83
|
+
} else maxItems = configuredMaxItems;
|
|
78
84
|
ctx.inject(["evolutionIo"], (ioCtx) => {
|
|
79
85
|
const ioRegistry = ioCtx.evolutionIo;
|
|
80
86
|
const io = evolutionIoAdapter(() => ioRegistry.provider());
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-activity",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.3.
|
|
3
|
+
"description": "Durable activity store for self-evolution plan outcomes (community build)",
|
|
4
|
+
"version": "0.3.29",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.3.29"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
42
42
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
43
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
44
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
45
|
-
"@lmzhen/dsh-evolution-io-node": "^0.3.
|
|
43
|
+
"@lmzhen/dsh-evolution-core": "^0.3.29",
|
|
44
|
+
"@lmzhen/dsh-evolution-io": "^0.3.29",
|
|
45
|
+
"@lmzhen/dsh-evolution-io-node": "^0.3.29"
|
|
46
46
|
}
|
|
47
47
|
}
|