@lmzhen/dsh-evolution-commands 0.1.0-rc.4 → 0.1.0-rc.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/lib/index.js +19 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -56,7 +56,25 @@ function apply(ctx) {
|
|
|
56
56
|
message: "Curator service not mounted."
|
|
57
57
|
}).message };
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
if (input.startsWith("consolidate ")) {
|
|
60
|
+
const [target, ...sources] = input.slice(12).trim().split(/\s+/).filter(Boolean);
|
|
61
|
+
if (!target || sources.length === 0) return { text: "Usage: /evolution consolidate <target> <source...>" };
|
|
62
|
+
const curator = ctx.get("evolutionCurator");
|
|
63
|
+
return { text: (curator ? await curator.consolidate(target, sources) : {
|
|
64
|
+
ok: false,
|
|
65
|
+
message: "Curator service not mounted."
|
|
66
|
+
}).message };
|
|
67
|
+
}
|
|
68
|
+
if (input.startsWith("skill restore ")) {
|
|
69
|
+
const name = input.slice(14).trim();
|
|
70
|
+
if (!name) return { text: "Usage: /evolution skill restore <name>" };
|
|
71
|
+
const curator = ctx.get("evolutionCurator");
|
|
72
|
+
return { text: (curator ? await curator.restore(name) : {
|
|
73
|
+
ok: false,
|
|
74
|
+
message: "Curator service not mounted."
|
|
75
|
+
}).message };
|
|
76
|
+
}
|
|
77
|
+
return { text: "Evolution: memory, skills, review, curator. Use /evolution pending | curator run | curator report | restore | consolidate <target> <source...> | skill restore <name>." };
|
|
60
78
|
}
|
|
61
79
|
});
|
|
62
80
|
});
|