@lmzhen/dsh-evolution-maintenance 0.18.0 → 0.19.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/README.md +1 -0
- package/lib/index.js +2 -2
- package/lib/tools.js +5 -2
- package/lib/types/orchestrate.d.ts +4 -0
- package/lib/types/tools.d.ts +6 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ chain behind `/evolution maintain` (`evolution-core` `drift-signals`).
|
|
|
16
16
|
## Known limitations
|
|
17
17
|
|
|
18
18
|
- Phase 1-2 expose no service beyond the command surface: the chain (scan → render → subagent → validate) is wired through `/evolution maintain`.
|
|
19
|
+
- **The scan's lifetime is the RUN's, not the request's (0.19.0).** `/evolution maintain` starts a run through `evolution-core`'s run registry and answers with a pointer; `evolution-commands` writes the resulting plan to `<evolutionHome>/reports/maintain-<runId>.{json,md}` — this package persists no report of its own. Measured: 949.7 s end to end on the web plane, ~305 s of REQUEST lifetime on the desktop shell (which used to abort the scan; it no longer does). `maintainTimeoutMs` (default 600000) bounds the run, and a run that produced nothing is recorded as such rather than as an empty plan. The published inventory of long runs is `packages/README.md` §"Long-running work", rendered from `evolution-core/src/long-runs.ts`.
|
|
19
20
|
- **Plan validation is instance-granular (§3 completeness).** Notes stay id-level: one mention explains away every instance of that id.
|
|
20
21
|
- **A budget-capped dedup scan is reported, never silently shortened.**
|
|
21
22
|
- `maintenance_probe` is readable by every session; maintenance subagents reach it through the orchestrate `toolFilter` allow-list.
|
package/lib/index.js
CHANGED
|
@@ -428,7 +428,7 @@ async function runMaintain(runtime, options = {}) {
|
|
|
428
428
|
return {
|
|
429
429
|
ok: true,
|
|
430
430
|
recommendationCount: 0,
|
|
431
|
-
runId: randomUUID(),
|
|
431
|
+
runId: options.runId ?? randomUUID(),
|
|
432
432
|
verdict: "no_issues",
|
|
433
433
|
text: "Maintenance scan: empty skill library. Nothing to do."
|
|
434
434
|
};
|
|
@@ -554,7 +554,7 @@ ${MAINTAIN_OUTPUT_INSTRUCTION}`;
|
|
|
554
554
|
recommendationCount: 0,
|
|
555
555
|
error: `Maintain plan rejected by validator: ${validated.errors.slice(0, 5).join("; ")}`
|
|
556
556
|
};
|
|
557
|
-
const runId = randomUUID();
|
|
557
|
+
const runId = options.runId ?? randomUUID();
|
|
558
558
|
return {
|
|
559
559
|
ok: true,
|
|
560
560
|
runId,
|
package/lib/tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as snapshotFromLibrary, i as enrichmentSnapshotOptions, n as computeProbe, r as buildEnrichment, t as PROBE_SIGNALS } from "./probe-Bojb0piw.js";
|
|
2
|
-
import { assertSkillsRootAliasRetired, newSkillLibrary, redactSecrets, resolveRootConfig } from "@lmzhen/dsh-evolution-core";
|
|
2
|
+
import { DEFAULT_PROBE_TIMEOUT_MS, MAX_TIMER_DELAY_MS, assertSkillsRootAliasRetired, clampedNumber, newSkillLibrary, redactSecrets, resolveRootConfig } from "@lmzhen/dsh-evolution-core";
|
|
3
3
|
import z from "@deepseek-ai/schemastery";
|
|
4
4
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
5
5
|
//#region lib/types/tools.js
|
|
@@ -16,15 +16,18 @@ import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
|
16
16
|
const name = "evolution-maintenance-tools";
|
|
17
17
|
const Config = z.object({
|
|
18
18
|
root: z.string().default(""),
|
|
19
|
-
skillsRoot: z.string().default("")
|
|
19
|
+
skillsRoot: z.string().default(""),
|
|
20
|
+
probeTimeoutMs: z.number().min(1).max(MAX_TIMER_DELAY_MS).default(DEFAULT_PROBE_TIMEOUT_MS)
|
|
20
21
|
});
|
|
21
22
|
function apply(ctx, rawConfig = {}) {
|
|
22
23
|
assertSkillsRootAliasRetired(rawConfig);
|
|
23
24
|
const rootConfig = resolveRootConfig(rawConfig);
|
|
25
|
+
const probeTimeoutMs = clampedNumber(rawConfig.probeTimeoutMs, DEFAULT_PROBE_TIMEOUT_MS, { min: 1 });
|
|
24
26
|
ctx.inject(["tools"], (toolCtx) => {
|
|
25
27
|
const tools = toolCtx.get("tools");
|
|
26
28
|
toolCtx.effect(() => tools.register(defineTool({
|
|
27
29
|
name: "maintenance_probe",
|
|
30
|
+
timeoutMs: probeTimeoutMs,
|
|
28
31
|
description: "Read-only deep-dive into maintenance scan signals: library-level group/cluster membership or per-skill detail (line numbers, pointer gaps, narrow shapes, stamp samples). Machine-derived from the same calculators as the facts block — never introduces new evidence ids. Output is JSON detail.",
|
|
29
32
|
parameters: {
|
|
30
33
|
signal: {
|
|
@@ -86,6 +86,10 @@ export interface MaintainRuntime {
|
|
|
86
86
|
}
|
|
87
87
|
export interface MaintainOptions {
|
|
88
88
|
timeoutMs?: number;
|
|
89
|
+
/** 0.19.0 (S2): the run id chosen by the run registry, so the registry record,
|
|
90
|
+
* the persisted event and the report file all name ONE run. Absent under the
|
|
91
|
+
* legacy synchronous call sites, which keep generating their own. */
|
|
92
|
+
runId?: string | undefined;
|
|
89
93
|
/** E-6 (v18): external cancel signal (session/UI); combined with timeoutMs. */
|
|
90
94
|
signal?: AbortSignal | undefined;
|
|
91
95
|
maxDepth?: number;
|
package/lib/types/tools.d.ts
CHANGED
|
@@ -18,13 +18,19 @@ export interface Config {
|
|
|
18
18
|
/** V27 G2.4 (M-08): RETIRED alias of `root`. Declared so the loader passes it
|
|
19
19
|
* to the load-time gate (which rejects it loudly) instead of dropping it. */
|
|
20
20
|
skillsRoot?: string | undefined;
|
|
21
|
+
/** Model-facing budget of one probe call (ms). A hang guard: see
|
|
22
|
+
* `DEFAULT_PROBE_TIMEOUT_MS` for the measurement behind the default and for
|
|
23
|
+
* the conditions that would reopen it. */
|
|
24
|
+
probeTimeoutMs?: number | undefined;
|
|
21
25
|
}
|
|
22
26
|
export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
23
27
|
root: z<string, string, "defined">;
|
|
24
28
|
skillsRoot: z<string, string, "defined">;
|
|
29
|
+
probeTimeoutMs: z<number, number, "defined">;
|
|
25
30
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
26
31
|
root: z<string, string, "defined">;
|
|
27
32
|
skillsRoot: z<string, string, "defined">;
|
|
33
|
+
probeTimeoutMs: z<number, number, "defined">;
|
|
28
34
|
}>>, "plain">;
|
|
29
35
|
export declare function apply(ctx: Context, rawConfig?: Config): void;
|
|
30
36
|
//# sourceMappingURL=tools.d.ts.map
|
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.19.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.19.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/dsh-agent": "^0.2.0-rc.1",
|