@lmzhen/dsh-evolution-commands 0.3.55 → 0.3.56
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 +13 -13
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -228,7 +228,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
228
228
|
const id = input.slice(8).trim();
|
|
229
229
|
const result = approval ? await approval.approve(id) : {
|
|
230
230
|
ok: false,
|
|
231
|
-
message: "approval service not mounted"
|
|
231
|
+
message: "E-301: approval service not mounted. Next: the evolution-approval row ships with evolution-host/evolution-all — run /evolution doctor to see which services are mounted."
|
|
232
232
|
};
|
|
233
233
|
return result.ok ? ok(result.message) : err(result.message);
|
|
234
234
|
}
|
|
@@ -236,19 +236,19 @@ function apply(ctx, rawConfig = {}) {
|
|
|
236
236
|
const id = input.slice(7).trim();
|
|
237
237
|
const result = approval ? await approval.reject(id) : {
|
|
238
238
|
ok: false,
|
|
239
|
-
message: "approval service not mounted"
|
|
239
|
+
message: "E-301: approval service not mounted. Next: the evolution-approval row ships with evolution-host/evolution-all — run /evolution doctor to see which services are mounted."
|
|
240
240
|
};
|
|
241
241
|
return result.ok ? ok(result.message) : err(result.message);
|
|
242
242
|
}
|
|
243
243
|
if (input === "curator run") {
|
|
244
244
|
const curator = ctx.get("evolutionCurator");
|
|
245
|
-
if (!curator) return err("
|
|
245
|
+
if (!curator) return err("E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
246
246
|
const result = await curator.run({ ignoreGates: true });
|
|
247
247
|
return ok(`Curator run complete: ${result.stale.length} stale, ${result.archived.length} archived, ${result.errors.length} failed.\nrunId=${result.report.runId}${result.report.snapshotPath ? `\nsnapshot=${result.report.snapshotPath}` : ""}`);
|
|
248
248
|
}
|
|
249
249
|
if (input === "curator pause" || input === "curator resume") {
|
|
250
250
|
const curator = ctx.get("evolutionCurator");
|
|
251
|
-
if (!curator) return err("
|
|
251
|
+
if (!curator) return err("E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
252
252
|
const paused = input === "curator pause";
|
|
253
253
|
await curator.setPaused(paused);
|
|
254
254
|
const notPersisted = ctx.get("evolutionState") !== void 0 ? "" : "\nNOTE: no evolution state service is mounted — this setting is NOT persisted and will not survive this process.";
|
|
@@ -256,7 +256,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
256
256
|
}
|
|
257
257
|
if (input === "curator status") {
|
|
258
258
|
const curator = ctx.get("evolutionCurator");
|
|
259
|
-
if (!curator) return err("
|
|
259
|
+
if (!curator) return err("E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
260
260
|
const state = await curator.status();
|
|
261
261
|
if (!state) return ok("No curator state yet: the first automatic pass is deferred until the interval elapses.");
|
|
262
262
|
const lastRun = typeof state.lastRunAt === "number" && Number.isFinite(state.lastRunAt) && state.lastRunAt > 0 ? new Date(state.lastRunAt).toISOString() : "unknown";
|
|
@@ -269,7 +269,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
269
269
|
}
|
|
270
270
|
if (input === "mutations") {
|
|
271
271
|
const curator = ctx.get("evolutionCurator");
|
|
272
|
-
if (!curator) return err("
|
|
272
|
+
if (!curator) return err("E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
273
273
|
const records = await curator.skills.listMutations();
|
|
274
274
|
const usable = Array.isArray(records) ? records.filter((row) => typeof row === "object" && row !== null && typeof row.at === "string" && typeof row.skillName === "string" && typeof row.action === "string" && typeof row.summary === "string") : [];
|
|
275
275
|
if (usable.length === 0) return ok("No mutation records yet.");
|
|
@@ -278,7 +278,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
278
278
|
}
|
|
279
279
|
if (input === "curator scope") {
|
|
280
280
|
const curator = ctx.get("evolutionCurator");
|
|
281
|
-
if (!curator) return err("
|
|
281
|
+
if (!curator) return err("E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
282
282
|
const view = await curator.scopeView();
|
|
283
283
|
const line = (label, names) => `${label}: ${names.length}${names.length === 0 ? "" : `\n ${names.join(", ")}`}`;
|
|
284
284
|
return ok([
|
|
@@ -292,7 +292,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
292
292
|
}
|
|
293
293
|
if (input === "curator report") {
|
|
294
294
|
const curator = ctx.get("evolutionCurator");
|
|
295
|
-
if (!curator) return err("
|
|
295
|
+
if (!curator) return err("E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
296
296
|
const report = await curator.latestReport();
|
|
297
297
|
if (!report) return ok("No curator report available.");
|
|
298
298
|
if (typeof report !== "object" || typeof report.runId !== "string" || typeof report.startedAt !== "string" || !Array.isArray(report.archived) || !Array.isArray(report.failed)) return err("Report file unreadable.");
|
|
@@ -310,7 +310,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
310
310
|
const curator = ctx.get("evolutionCurator");
|
|
311
311
|
const result = curator ? await curator.restoreSnapshot() : {
|
|
312
312
|
ok: false,
|
|
313
|
-
message: "
|
|
313
|
+
message: "E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor."
|
|
314
314
|
};
|
|
315
315
|
return result.ok ? ok(result.message) : err(result.message);
|
|
316
316
|
}
|
|
@@ -322,7 +322,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
322
322
|
const curator = ctx.get("evolutionCurator");
|
|
323
323
|
const result = curator ? await curator.consolidate(target, sources) : {
|
|
324
324
|
ok: false,
|
|
325
|
-
message: "
|
|
325
|
+
message: "E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor."
|
|
326
326
|
};
|
|
327
327
|
if (!result.ok) return err(result.message);
|
|
328
328
|
return ok(planRunId ? `${result.message}\n[audit] plan=${planRunId}` : result.message);
|
|
@@ -333,13 +333,13 @@ function apply(ctx, rawConfig = {}) {
|
|
|
333
333
|
const curator = ctx.get("evolutionCurator");
|
|
334
334
|
const result = curator ? await curator.restore(name) : {
|
|
335
335
|
ok: false,
|
|
336
|
-
message: "
|
|
336
|
+
message: "E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor."
|
|
337
337
|
};
|
|
338
338
|
return result.ok ? ok(result.message) : err(result.message);
|
|
339
339
|
}
|
|
340
340
|
if (input === "skills health") {
|
|
341
341
|
const curator = ctx.get("evolutionCurator");
|
|
342
|
-
if (!curator) return err("
|
|
342
|
+
if (!curator) return err("E-302: curator service not mounted. Next: mount the evolution-curator row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
343
343
|
const [rows, observed] = await Promise.all([curator.healthView(), curator.usageObserved()]);
|
|
344
344
|
const banner = observed ? "" : "Usage observation not yet established — churn (write-ghost) rows are suppressed.";
|
|
345
345
|
const line = (row) => `${row.verdict.padEnd(18)} ${row.name}${row.reasons.length > 0 ? ` — ${row.reasons.join("; ")}` : ""}`;
|
|
@@ -489,7 +489,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
489
489
|
}
|
|
490
490
|
if (input === "replay") {
|
|
491
491
|
const replay = ctx.get("evolutionReplay");
|
|
492
|
-
if (!replay) return err("
|
|
492
|
+
if (!replay) return err("E-303: replay service not mounted. Next: mount the evolution-replay row (evolution-host/evolution-all) and run /evolution doctor.");
|
|
493
493
|
return ok(replay.compare().report);
|
|
494
494
|
}
|
|
495
495
|
if (input === "doctor" || input === "doctor --json") {
|
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 (/evolution pending|curator|maintain|doctor) (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.56",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
],
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
35
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.3.
|
|
33
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.56",
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.3.56",
|
|
35
|
+
"@lmzhen/dsh-evolution-maintenance": "^0.3.56"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@lmzhen/dsh-evolution-agent-preset": "^0.3.
|
|
38
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.3.56"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@deepseek-ai/cordis": "^4.0.1",
|