@lmzhen/dsh-evolution-activity 0.3.61 → 0.3.62
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/index.js +2 -1
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -57,9 +57,10 @@ function serializeActivity(items) {
|
|
|
57
57
|
}
|
|
58
58
|
function parseActivityContent(raw) {
|
|
59
59
|
if (raw === null) return [];
|
|
60
|
+
const isCount = (value) => typeof value === "number" && Number.isFinite(value);
|
|
60
61
|
try {
|
|
61
62
|
const parsed = JSON.parse(raw);
|
|
62
|
-
return (typeof parsed === "object" && parsed !== null && Array.isArray(parsed.items) ? parsed.items : []).filter((item) => typeof item === "object" && item !== null && typeof item.planId === "string" && typeof item.sessionId === "string");
|
|
63
|
+
return (typeof parsed === "object" && parsed !== null && Array.isArray(parsed.items) ? parsed.items : []).filter((item) => typeof item === "object" && item !== null && typeof item.planId === "string" && typeof item.sessionId === "string" && isCount(item.memoryApplied) && isCount(item.skillApplied) && isCount(item.rejectedOps));
|
|
63
64
|
} catch {
|
|
64
65
|
return [];
|
|
65
66
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-activity",
|
|
3
3
|
"description": "Durable activity store for self-evolution plan outcomes (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.62",
|
|
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.62"
|
|
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.62",
|
|
44
|
+
"@lmzhen/dsh-evolution-io": "^0.3.62",
|
|
45
|
+
"@lmzhen/dsh-evolution-io-node": "^0.3.62"
|
|
46
46
|
}
|
|
47
47
|
}
|