@lmzhen/dsh-evolution-commands 0.41.0 → 0.42.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 +4 -18
- package/lib/types/doctor.d.ts +0 -1
- package/lib/types/index.d.ts +1 -1
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { DEFAULT_SKILL_LIMITS, DIAGNOSTICS_FACT_KEYS, DIAGNOSTICS_RUNTIME_KEYS, DIAGNOSTICS_VIEW_SCHEMA_VERSION, EVOLUTION_PRESET_IDS, HOST_LOCALES, MAINTAINER_PRESET_ID, MAX_TIMER_DELAY_MS, PARAM_EXPOSURE, PARAM_GROUP_LABELS, PARAM_NAMESPACES, PLATFORM_LINE, REVIEWER_PRESET_ID, absentHostServices, appendEvolutionEvent, applyNamespaceMigration, asRecord,
|
|
2
|
+
import { DEFAULT_SKILL_LIMITS, DIAGNOSTICS_FACT_KEYS, DIAGNOSTICS_RUNTIME_KEYS, DIAGNOSTICS_VIEW_SCHEMA_VERSION, EVOLUTION_PRESET_IDS, HOST_LOCALES, MAINTAINER_PRESET_ID, MAX_TIMER_DELAY_MS, PARAM_EXPOSURE, PARAM_GROUP_LABELS, PARAM_NAMESPACES, PLATFORM_LINE, REVIEWER_PRESET_ID, absentHostServices, appendEvolutionEvent, applyNamespaceMigration, asRecord, atomicWriteFiles, authorityFrom, buildExtractPlanFromLibrary, buildLearnPrompt, canonicalWriteId, clampedNumber, classifyNamespaceMigration, classifySessionEvent, createSubagentChannel, errorText, errorTextIn, eventsFile, evolutionHome, evolutionRoot, hostSurface, isDeprecatedParamId, isPresent, isRecord, isUnknown, liveBool, mutationLockFrom, newRunRegistry, ownerDecisionText, paramSettingsId, planNamespaceMigration, policyStageLimits, probeMtime, probeText, proposalFromPlan, readProposalReport, registerOwnerSettings, reportsSweepLockTarget, resolveParamId, scopedPackageName, scopedProbeReport, sweepReports, transactIo, unwrapLive, writeProposalReport } from "@lmzhen/dsh-evolution-core";
|
|
3
3
|
import { HOST_ROUTES, json, methodNotAllowed, registerHostRoutes } from "@lmzhen/dsh-evolution-core/http-routes";
|
|
4
4
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import z from "@deepseek-ai/schemastery";
|
|
8
8
|
import { effectiveSessionPolicy } from "@lmzhen/dsh-evolution-approval";
|
|
9
|
-
import { createUserMessage } from "@
|
|
9
|
+
import { createUserMessage } from "@lmzhen/dsh-evolution-core/platform";
|
|
10
|
+
import { assertSkillsRootAliasRetired, elapsedSince, newSkillLibrary, partitionVersions, resolveRootConfig } from "@lmzhen/dsh-evolution-core/skills";
|
|
10
11
|
import { composePresetEntry, mergePresetRow, presetPatchText, presetRowBlock, presetRowBody, presetRowId, resolveBasePresetPatch } from "@lmzhen/dsh-evolution-core/composition";
|
|
11
12
|
import { buildEnrichment, buildMaintainFacts, enrichmentSnapshotOptions, runMaintain, snapshotFromLibrary } from "@lmzhen/dsh-evolution-maintenance";
|
|
12
13
|
import { processScopeViolations } from "@lmzhen/dsh-evolution-state-storage";
|
|
@@ -1971,17 +1972,6 @@ function collectEvolutionBundles(home, onReadError) {
|
|
|
1971
1972
|
}
|
|
1972
1973
|
return bundles;
|
|
1973
1974
|
}
|
|
1974
|
-
const SESSION_QUERY_MODES = new Set([
|
|
1975
|
-
"startup",
|
|
1976
|
-
"first-search",
|
|
1977
|
-
"never"
|
|
1978
|
-
]);
|
|
1979
|
-
function envIssues() {
|
|
1980
|
-
const issues = [];
|
|
1981
|
-
const query = process.env.DSH_EVOLUTION_SESSION_QUERY;
|
|
1982
|
-
if (query && !SESSION_QUERY_MODES.has(query)) issues.push(`DSH_EVOLUTION_SESSION_QUERY="${query}" is not one of startup|first-search|never — the patch normalizes it to 'startup' silently; set it to a listed mode.`);
|
|
1983
|
-
return issues;
|
|
1984
|
-
}
|
|
1985
1975
|
/** G3-② (B2): the family delta container. An optionalDependency of this
|
|
1986
1976
|
* package, so resolution may legitimately fail; every failure degrades to
|
|
1987
1977
|
* "unknown" — the doctor never throws.
|
|
@@ -1993,7 +1983,7 @@ const AGENT_PRESET_PACKAGE = scopedPackageName("dsh-evolution-agent-preset", imp
|
|
|
1993
1983
|
* @returns the file path, or null when the package is not installed. */
|
|
1994
1984
|
function resolveAgentPresetAsset(asset) {
|
|
1995
1985
|
try {
|
|
1996
|
-
return
|
|
1986
|
+
return createRequire(import.meta.url).resolve(`${AGENT_PRESET_PACKAGE}/${asset}`);
|
|
1997
1987
|
} catch {
|
|
1998
1988
|
return null;
|
|
1999
1989
|
}
|
|
@@ -2321,8 +2311,6 @@ async function diagnose(ctx, options = {}) {
|
|
|
2321
2311
|
else if (installForm === "none") actions.push("Install the default full bundle: dsh plugin --profile web add @lmzhen/dsh-evolution-all");
|
|
2322
2312
|
else if (installForm === "preset-only") actions.push(`The Evolution preset row is installed but no profile mounts an evolution bundle — re-add @lmzhen/dsh-evolution-host for the layered layout (do NOT add all on top of the preset: that double-mounts the model rows), or drop the row (${layeredArtifactLabel}) from the profile patch if the layered layout is no longer wanted.`);
|
|
2323
2313
|
else if (installForm === "layered") actions.push("Variant form (session opt-in): model tools follow the Evolution preset, and a session on a platform original preset carries no family rows; add @lmzhen/dsh-evolution-all instead if every session should have them.");
|
|
2324
|
-
const env = envIssues();
|
|
2325
|
-
if (env.length > 0) actions.push("Fix the DSH_EVOLUTION_* variable listed above.");
|
|
2326
2314
|
if (capabilityAbsence.length > 0) actions.push(`The family probes ${capabilityAbsence.length} platform capability/ies this deployment does not mount (${capabilityAbsence.map((entry) => entry.service).join(", ")}) — mount the rows that carry the ones you need; the features they gate are listed above.`);
|
|
2327
2315
|
if (processScopeIssues.length > 0) actions.push(`The mounted IO backend does not back every cross-process medium claim: ${processScopeIssues.join("; ")} — mount a provider that declares processScope 'cross-process', or treat this home as single-process (no concurrent writers).`);
|
|
2328
2316
|
if (services.review && !services.curator) actions.push("Curator service is not mounted — automatic curation is off; verify the host/all bundle row set is complete.");
|
|
@@ -2353,7 +2341,6 @@ async function diagnose(ctx, options = {}) {
|
|
|
2353
2341
|
bundles,
|
|
2354
2342
|
foreignProfiles: homeProfiles(home).filter(({ profile, dir }) => mounted === void 0 || profile !== mounted.profile && dir !== mounted.dir).map(({ profile }) => profile),
|
|
2355
2343
|
conflicts,
|
|
2356
|
-
envIssues: env,
|
|
2357
2344
|
budgetIssues,
|
|
2358
2345
|
paramIssues,
|
|
2359
2346
|
queryIssues,
|
|
@@ -2560,7 +2547,6 @@ function renderDoctorText(report, locale = "zh") {
|
|
|
2560
2547
|
if (report.presetIssues.length > 0) extras.push("agent presets:", ...report.presetIssues.map((line) => ` ! ${line}`));
|
|
2561
2548
|
if (report.foreignProfiles.length > 0) extras.push("profiles-foreign: " + report.foreignProfiles.join(", ") + " — not part of this plane: /evolution preset install ignores them, while the bundles (all profiles) line above counts them");
|
|
2562
2549
|
if (report.conflicts.length > 0) extras.push("conflicts:", ...report.conflicts.map((line) => ` ! ${line}`));
|
|
2563
|
-
if (report.envIssues.length > 0) extras.push("env:", ...report.envIssues.map((line) => ` ! ${line}`));
|
|
2564
2550
|
if (report.budgetIssues.length > 0) extras.push("memory budget:", ...report.budgetIssues.map((line) => ` ! ${line}`));
|
|
2565
2551
|
if (report.paramIssues.length > 0) extras.push("parameters:", ...report.paramIssues.map((line) => ` ! ${line}`));
|
|
2566
2552
|
if (report.queryIssues.length > 0) extras.push("session search:", ...report.queryIssues.map((line) => ` ! ${line}`));
|
package/lib/types/doctor.d.ts
CHANGED
|
@@ -94,7 +94,6 @@ export interface DoctorReport {
|
|
|
94
94
|
* list is what makes that difference visible instead of mysterious. */
|
|
95
95
|
foreignProfiles: string[];
|
|
96
96
|
conflicts: string[];
|
|
97
|
-
envIssues: string[];
|
|
98
97
|
/** S4/P-1+P-2 (platform gap, family mitigation): the session-query corpus
|
|
99
98
|
* listing failed — reported verbatim, with the isolation recipe. Empty when the
|
|
100
99
|
* service is absent or answering. */
|
package/lib/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { Context, Volatile } from '@deepseek-ai/cordis';
|
|
6
6
|
import z from '@deepseek-ai/schemastery';
|
|
7
|
-
import type { ContextFormed } from '@
|
|
7
|
+
import type { ContextFormed } from '@lmzhen/dsh-evolution-core/platform';
|
|
8
8
|
declare module '@deepseek-ai/dsh-llm' {
|
|
9
9
|
interface MessageSourceMap {
|
|
10
10
|
'evolution-commands': {
|
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.
|
|
4
|
+
"version": "0.42.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-approval": "^0.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
32
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.
|
|
33
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.
|
|
30
|
+
"@lmzhen/dsh-evolution-approval": "^0.42.0",
|
|
31
|
+
"@lmzhen/dsh-evolution-core": "^0.42.0",
|
|
32
|
+
"@lmzhen/dsh-evolution-maintenance": "^0.42.0",
|
|
33
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.42.0"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@lmzhen/dsh-evolution-agent-preset": "^0.
|
|
36
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.42.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.5",
|