@lmzhen/dsh-evolution-maintenance 0.19.3 → 0.21.0
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 +5 -2
- package/lib/types/orchestrate.d.ts +9 -0
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -379,14 +379,14 @@ function formatPlan(validated, runId) {
|
|
|
379
379
|
lines.push(...noteLines);
|
|
380
380
|
return lines.join("\n");
|
|
381
381
|
}
|
|
382
|
-
for (const item of plan.plan) {
|
|
382
|
+
for (const [index, item] of plan.plan.entries()) {
|
|
383
383
|
const flags = [
|
|
384
384
|
item.impact,
|
|
385
385
|
`rev=${item.reversibility}`,
|
|
386
386
|
`conf=${item.confidence.toFixed(2)}`,
|
|
387
387
|
item.needs_human ? "HUMAN" : ""
|
|
388
388
|
].filter(Boolean);
|
|
389
|
-
lines.push(`- [${item.kind}] ${item.names.join(", ")} · rule=${item.rule} · ${flags.join(" ")}`);
|
|
389
|
+
lines.push(`- [${index + 1}] [${item.kind}] ${item.names.join(", ")} · rule=${item.rule} · ${flags.join(" ")}`);
|
|
390
390
|
lines.push(` finding: ${sanitizeField(item.finding)}`);
|
|
391
391
|
lines.push(` action: ${sanitizeField(item.recommendation)}`);
|
|
392
392
|
if (item.undo_path && item.undo_path !== "n/a") lines.push(` undo: ${sanitizeField(item.undo_path)}`);
|
|
@@ -560,6 +560,9 @@ ${MAINTAIN_OUTPUT_INSTRUCTION}`;
|
|
|
560
560
|
runId,
|
|
561
561
|
verdict: validated.plan.verdict,
|
|
562
562
|
forcedHuman: validated.forcedHuman,
|
|
563
|
+
items: validated.plan.plan,
|
|
564
|
+
notes: validated.plan.notes,
|
|
565
|
+
needsHumanCount: validated.plan.plan.filter((item) => item.needs_human).length,
|
|
563
566
|
recommendationCount: validated.plan.plan.length,
|
|
564
567
|
text: formatPlan(validated, runId)
|
|
565
568
|
};
|
|
@@ -8,6 +8,7 @@ import { type DriftReport, type DriftSkillSnapshot } from '@lmzhen/dsh-evolution
|
|
|
8
8
|
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
9
9
|
import { type SkillLibraryLike } from './drift-scan.ts';
|
|
10
10
|
import { type Enrichment } from './enrichment.ts';
|
|
11
|
+
import { type MaintainPlanItem } from './validate-plan.ts';
|
|
11
12
|
/** I-5 (v37): the platform's `SubagentStartRequest` fields this orchestrator sends.
|
|
12
13
|
* Typed locally (not imported) because the platform type lives behind the subagent row this
|
|
13
14
|
* package does not depend on; the required `parent` and `signal` mirror the platform. */
|
|
@@ -109,6 +110,14 @@ export interface MaintainOutcome {
|
|
|
109
110
|
verdict?: 'issues' | 'no_issues' | undefined;
|
|
110
111
|
text?: string | undefined;
|
|
111
112
|
forcedHuman?: string[] | undefined;
|
|
113
|
+
/** G1 (0.20.0): the VALIDATED plan entries in render order — the report's machine-readable
|
|
114
|
+
* ledger. `formatPlan` numbers this same array with stable `[n]` ids, and
|
|
115
|
+
* `needsHumanCount` below is derived from it here, so no reader re-derives either. */
|
|
116
|
+
items?: MaintainPlanItem[] | undefined;
|
|
117
|
+
/** The validated plan's notes, carried beside `items` so a reader never infers them. */
|
|
118
|
+
notes?: string[] | undefined;
|
|
119
|
+
/** How many entries need the operator's confirmation (`needs_human`, gate included). */
|
|
120
|
+
needsHumanCount?: number | undefined;
|
|
112
121
|
/** V10-09 (F-05): structured count of recommendations in the VALIDATED plan
|
|
113
122
|
* (plan entries, never notes). Consumers must read this field instead of
|
|
114
123
|
* parsing the rendered `text` — the text is display-only. 0 on every
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-maintenance",
|
|
3
3
|
"description": "Deterministic maintenance-scan surface: skill-library snapshot assembly, drift signals and mechanical-facts rendering (design 011) (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.0",
|
|
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.4",
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.21.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/dsh-agent": "^0.2.0-rc.1",
|