@lmzhen/dsh-evolution-curator 0.3.69 → 0.3.71
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 +6 -10
- package/package.json +13 -11
package/lib/index.js
CHANGED
|
@@ -512,7 +512,7 @@ var EvolutionCurator = class extends Service {
|
|
|
512
512
|
}
|
|
513
513
|
const protectedNames = await this.protectedNameMap();
|
|
514
514
|
const dedupMembers = [...new Set(computeDedupGroups({ contents }).filter((group) => group.length >= 2).flat())].filter((name) => !protectedNames.has(name));
|
|
515
|
-
await this.scoreTree(usage, treeNames);
|
|
515
|
+
await this.scoreTree(usage, treeNames, contents);
|
|
516
516
|
const result = computeLifecycleTransitions(usage, {
|
|
517
517
|
staleAfterDays: lifecycle.staleAfterDays,
|
|
518
518
|
archiveAfterDays: lifecycle.archiveAfterDays,
|
|
@@ -670,13 +670,13 @@ var EvolutionCurator = class extends Service {
|
|
|
670
670
|
* flags, so overwriting feedback here is what used to make negative
|
|
671
671
|
* feedback decision-irrelevant; field ownership on `UsageRecord`).
|
|
672
672
|
*/
|
|
673
|
-
async scoreTree(usage, treeNames) {
|
|
673
|
+
async scoreTree(usage, treeNames, contents) {
|
|
674
674
|
const supportDirs = /* @__PURE__ */ new Map();
|
|
675
675
|
for (const name of treeNames) supportDirs.set(name, await this.skills.countSupportDirs(name));
|
|
676
676
|
const quality = computeQualityScores({
|
|
677
677
|
usage,
|
|
678
678
|
supportDirs,
|
|
679
|
-
referenceCounts:
|
|
679
|
+
referenceCounts: this.referenceCounts(contents)
|
|
680
680
|
});
|
|
681
681
|
for (const [name, score] of quality) {
|
|
682
682
|
const record = usage.get(name);
|
|
@@ -692,13 +692,9 @@ var EvolutionCurator = class extends Service {
|
|
|
692
692
|
* other skill names counts as one reference to each of them, so hub skills
|
|
693
693
|
* that are explicitly named by peers get a non-zero references factor.
|
|
694
694
|
*/
|
|
695
|
-
|
|
695
|
+
referenceCounts(contents) {
|
|
696
696
|
const counts = /* @__PURE__ */ new Map();
|
|
697
|
-
for (const name of
|
|
698
|
-
const content = await this.skills.read(name);
|
|
699
|
-
if (!content) continue;
|
|
700
|
-
for (const target of relatedSkillNames(content, name)) counts.set(target, (counts.get(target) ?? 0) + 1);
|
|
701
|
-
}
|
|
697
|
+
for (const [name, content] of contents) for (const target of relatedSkillNames(content, name)) counts.set(target, (counts.get(target) ?? 0) + 1);
|
|
702
698
|
return counts;
|
|
703
699
|
}
|
|
704
700
|
/**
|
|
@@ -865,7 +861,7 @@ var EvolutionCurator = class extends Service {
|
|
|
865
861
|
if (!agents) return !this.minIdleFailOpen;
|
|
866
862
|
let latest = 0;
|
|
867
863
|
for (const agent of agents.list()) {
|
|
868
|
-
const events = agent.session.
|
|
864
|
+
const events = agent.session.snapshotEvents();
|
|
869
865
|
const last = events.length === 0 ? 0 : events[events.length - 1]?.time ?? 0;
|
|
870
866
|
latest = Math.max(latest, last);
|
|
871
867
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-curator",
|
|
3
3
|
"description": "Deterministic skill lifecycle and recovery (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.71",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,20 +31,22 @@
|
|
|
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.71"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
38
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
39
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
40
|
-
"@
|
|
41
|
-
"@lmzhen/dsh-evolution-
|
|
38
|
+
"@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-session": "^0.1.5-rc.2",
|
|
41
|
+
"@lmzhen/dsh-evolution-io": "^0.3.71",
|
|
42
|
+
"@lmzhen/dsh-evolution-state": "^0.3.71"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
46
|
-
"@
|
|
47
|
-
"@lmzhen/dsh-evolution-
|
|
48
|
-
"@lmzhen/dsh-evolution-
|
|
45
|
+
"@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-session": "^0.1.5-rc.2",
|
|
48
|
+
"@lmzhen/dsh-evolution-core": "^0.3.71",
|
|
49
|
+
"@lmzhen/dsh-evolution-io": "^0.3.71",
|
|
50
|
+
"@lmzhen/dsh-evolution-state": "^0.3.71"
|
|
49
51
|
}
|
|
50
52
|
}
|