@lmzhen/dsh-evolution-commands 0.30.38 → 0.30.40
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 +6 -4
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, MAINTAINER_PRESET_ID, MAX_TIMER_DELAY_MS, PARAM_EXPOSURE, PARAM_GROUP_LABELS, PLATFORM_LINE, REVIEWER_PRESET_ID, absentHostServices, appendEvolutionEvent, applyNamespaceMigration, asRecord, assertSkillsRootAliasRetired, atomicWriteFiles, authorityFrom, buildExtractPlanFromLibrary, buildLearnPrompt, canonicalWriteId, clampedNumber, classifyNamespaceMigration, classifySessionEvent, createSubagentChannel, elapsedSince, errorText, eventsFile, evolutionHome, evolutionRoot, hostSurface, isDeprecatedParamId, isPresent, isRecord, isUnknown, liveBool, newRunRegistry, newSkillLibrary, paramSettingsId, partitionVersions, planNamespaceMigration, policyStageLimits, probeMtime, probeText, proposalFromPlan, reportsSweepLockTarget, resolveParamId, resolveRootConfig, scopedPackageName, scopedProbeReport, sweepReports, transactIo, writeProposalReport } from "@lmzhen/dsh-evolution-core";
|
|
2
|
+
import { DEFAULT_SKILL_LIMITS, DIAGNOSTICS_FACT_KEYS, DIAGNOSTICS_RUNTIME_KEYS, DIAGNOSTICS_VIEW_SCHEMA_VERSION, EVOLUTION_PRESET_IDS, MAINTAINER_PRESET_ID, MAX_TIMER_DELAY_MS, PARAM_EXPOSURE, PARAM_GROUP_LABELS, PLATFORM_LINE, REVIEWER_PRESET_ID, absentHostServices, appendEvolutionEvent, applyNamespaceMigration, asRecord, assertSkillsRootAliasRetired, atomicWriteFiles, authorityFrom, buildExtractPlanFromLibrary, buildLearnPrompt, canonicalWriteId, clampedNumber, classifyNamespaceMigration, classifySessionEvent, createSubagentChannel, elapsedSince, errorText, eventsFile, evolutionHome, evolutionRoot, hostSurface, isDeprecatedParamId, isPresent, isRecord, isUnknown, liveBool, newRunRegistry, newSkillLibrary, ownerDecisionText, paramSettingsId, partitionVersions, planNamespaceMigration, policyStageLimits, probeMtime, probeText, proposalFromPlan, reportsSweepLockTarget, resolveParamId, resolveRootConfig, scopedPackageName, scopedProbeReport, sweepReports, transactIo, 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";
|
|
@@ -3177,13 +3177,14 @@ function apply(ctx, rawConfig = {}) {
|
|
|
3177
3177
|
}
|
|
3178
3178
|
if (input.startsWith("extract ")) {
|
|
3179
3179
|
const extractParsed = parseSubcommand(rawInputTrimmed);
|
|
3180
|
-
if (isParseFailure(extractParsed) || extractParsed.name !== "extract") return err("用法:/evolution extract <source> <target> \"<heading>\" [--start <line>] [--end <line>]");
|
|
3180
|
+
if (isParseFailure(extractParsed) || extractParsed.name !== "extract") return err("用法:/evolution extract <source> <target> \"<heading>\" [--start <line>] [--end <line>] [--owner-covers]");
|
|
3181
3181
|
const source = extractParsed.positionals[0] ?? "";
|
|
3182
3182
|
const target = extractParsed.positionals[1] ?? "";
|
|
3183
3183
|
const heading = extractParsed.positionals[2] ?? "";
|
|
3184
3184
|
if (source === "" || target === "" || heading === "") return err("用法:/evolution extract <source> <target> \"<heading>\" [--start <line>] [--end <line>]");
|
|
3185
3185
|
const startFlag = extractParsed.flags.get("start");
|
|
3186
3186
|
const endFlag = extractParsed.flags.get("end");
|
|
3187
|
+
const ownerCovers = extractParsed.flags.has("owner-covers");
|
|
3187
3188
|
const outcomeFlag = extractParsed.flags.get("outcome");
|
|
3188
3189
|
if (outcomeFlag !== void 0 && outcomeFlag !== "extract" && outcomeFlag !== "mixed") return err("--outcome 只能是 extract 或 mixed。");
|
|
3189
3190
|
const start = typeof startFlag === "string" ? startFlag : void 0;
|
|
@@ -3209,7 +3210,8 @@ function apply(ctx, rawConfig = {}) {
|
|
|
3209
3210
|
...end === void 0 ? {} : { end },
|
|
3210
3211
|
to_skill: target
|
|
3211
3212
|
}],
|
|
3212
|
-
...outcomeFlag === void 0 ? {} : { outcome: outcomeFlag }
|
|
3213
|
+
...outcomeFlag === void 0 ? {} : { outcome: outcomeFlag },
|
|
3214
|
+
...ownerCovers ? { ownerCovers: true } : {}
|
|
3213
3215
|
});
|
|
3214
3216
|
if (!built.ok) return err(built.message);
|
|
3215
3217
|
const plan = built.plan;
|
|
@@ -3218,7 +3220,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
3218
3220
|
const proposal = proposalFromPlan(plan, { runId: "cli-" + Date.now().toString(36) });
|
|
3219
3221
|
const io = ctx.get("evolutionIo")?.provider();
|
|
3220
3222
|
if (io !== void 0) await writeProposalReport(io, proposal).catch(() => {});
|
|
3221
|
-
return ok("提取计划(未写入;默认 plan,--apply 才写):" + plan.parts.map((part) => "## " + part.heading).join(", ") + " -> " + target + "\n提取判定:outcome=" + plan.outcome + ";target=" + target + ";owner=
|
|
3223
|
+
return ok("提取计划(未写入;默认 plan,--apply 才写):" + plan.parts.map((part) => "## " + part.heading).join(", ") + " -> " + target + "\n提取判定:outcome=" + plan.outcome + ";target=" + target + ";owner=" + ownerDecisionText(plan.owner) + warnings);
|
|
3222
3224
|
}
|
|
3223
3225
|
if (approval) {
|
|
3224
3226
|
const session = invocationAgent?.session;
|
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.30.
|
|
4
|
+
"version": "0.30.40",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-approval": "^0.30.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.30.
|
|
32
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.30.
|
|
30
|
+
"@lmzhen/dsh-evolution-approval": "^0.30.40",
|
|
31
|
+
"@lmzhen/dsh-evolution-core": "^0.30.40",
|
|
32
|
+
"@lmzhen/dsh-evolution-maintenance": "^0.30.40"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@lmzhen/dsh-evolution-agent-preset": "^0.30.
|
|
35
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.30.40"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.5",
|