@lmzhen/dsh-evolution-commands 0.1.0 → 0.2.0-rc.2
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 +11 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -14,6 +14,7 @@ function apply(ctx) {
|
|
|
14
14
|
name: "evolution",
|
|
15
15
|
description: "Self-evolution status and approval controls",
|
|
16
16
|
recordInput: false,
|
|
17
|
+
input: { hint: "pending | approve <id> | reject <id> | curator run|pause|resume|status|report|scope | restore | consolidate <target> <sources...> | skill restore <name> | skills health | learn [request] | replay" },
|
|
17
18
|
async handler(invocation) {
|
|
18
19
|
const input = invocation.rawInput?.trim() ?? "";
|
|
19
20
|
const ok = (text) => ({
|
|
@@ -133,6 +134,15 @@ function apply(ctx) {
|
|
|
133
134
|
};
|
|
134
135
|
return result.ok ? ok(result.message) : err(result.message);
|
|
135
136
|
}
|
|
137
|
+
if (input === "skills health") {
|
|
138
|
+
const curator = ctx.get("evolutionCurator");
|
|
139
|
+
if (!curator) return err("Curator service not mounted.");
|
|
140
|
+
const [rows, observed] = await Promise.all([curator.healthView(), curator.usageObserved()]);
|
|
141
|
+
const banner = observed ? "" : "Usage observation not yet established — churn (write-ghost) rows are suppressed.";
|
|
142
|
+
const line = (row) => `${row.verdict.padEnd(18)} ${row.name}${row.reasons.length > 0 ? ` — ${row.reasons.join("; ")}` : ""}`;
|
|
143
|
+
if (rows.length === 0) return ok(banner ? `Structure health: all skills healthy. ${banner}` : "Structure health: all skills healthy.");
|
|
144
|
+
return ok([banner ? `Structure health (${rows.length} degraded): ${banner}` : `Structure health (${rows.length} degraded):`, ...rows.map(line)].join("\n"));
|
|
145
|
+
}
|
|
136
146
|
if (input === "learn" || input.startsWith("learn ")) {
|
|
137
147
|
const request = input === "learn" ? "" : input.slice(6).trim();
|
|
138
148
|
invocation.agent.inject(createUserMessage({
|
|
@@ -162,7 +172,7 @@ function apply(ctx) {
|
|
|
162
172
|
if (!replay) return err("Replay service not mounted.");
|
|
163
173
|
return ok(replay.compare().report);
|
|
164
174
|
}
|
|
165
|
-
return ok("Evolution: memory, skills, review, curator. Use /evolution pending | approve <id> | reject <id> | curator run | curator status | curator pause | curator resume | curator report | curator scope | restore | consolidate <target> <source...> | skill restore <name> | learn [request] | replay.");
|
|
175
|
+
return ok("Evolution: memory, skills, review, curator. Use /evolution pending | approve <id> | reject <id> | curator run | curator status | curator pause | curator resume | curator report | curator scope | restore | consolidate <target> <source...> | skill restore <name> | skills health | learn [request] | replay.");
|
|
166
176
|
}
|
|
167
177
|
});
|
|
168
178
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-commands",
|
|
3
3
|
"description": "Human commands for the evolution family (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
36
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
36
|
+
"@lmzhen/dsh-evolution-core": "^0.2.0-rc.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|