@lmzhen/dsh-tool-skill-manage 0.32.3 → 0.32.4
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 +9 -4
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_ARCHIVE_RETENTION_POLICY, DEFAULT_CITATION_POLICY, DEFAULT_HEALTH_THRESHOLDS, DEFAULT_REFERENCE_REWRITE_POLICY, DEFAULT_SKILL_LIMITS, DEFAULT_SKILL_VERSION_KEEP, DEFAULT_SUPPORT_FILE_CHAR_POLICY, DSH_AUTHORING_STANDARDS, EXTRACT_PROMPT_V1, SKILLS_GUIDANCE, SKILLS_GUIDANCE_SECTION_ORDER, anchorVerdict, authoringFeedback, authorityFrom, buildExtractPlanFromLibrary, callingScope, clampOnce, computeDedupGroups, contentHash, createSubagentChannel, evolutionIoAdapter, fuzzyPatch, isPresent, isUnknown, liveBool, nearDuplicateSummaries, newSkillLibrary, normalizeFrontmatter, ownerCandidatesFromSummaries, ownerDecisionText, paramRowId, parseFrontmatter, policyStageLimits, probePresent, probeUnknown, projectExtractBodies, proposalFromPlan, protectedSkillNamesOf, resolveExecOrigins, sessionReadSkillNames, skillWriteGateContext, unwrapLive, userSetKeys, writeProposalReport } from "@lmzhen/dsh-evolution-core";
|
|
1
|
+
import { DEFAULT_ARCHIVE_RETENTION_POLICY, DEFAULT_CITATION_POLICY, DEFAULT_HEALTH_THRESHOLDS, DEFAULT_REFERENCE_REWRITE_POLICY, DEFAULT_SKILL_LIMITS, DEFAULT_SKILL_VERSION_KEEP, DEFAULT_SUPPORT_FILE_CHAR_POLICY, DSH_AUTHORING_STANDARDS, EXTRACT_PROMPT_V1, SKILLS_GUIDANCE, SKILLS_GUIDANCE_SECTION_ORDER, anchorVerdict, authoringFeedback, authorityFrom, buildExtractPlanFromLibrary, callingScope, clampOnce, computeDedupGroups, contentHash, createSubagentChannel, evolutionIoAdapter, fuzzyPatch, isPresent, isUnknown, liveBool, nearDuplicateSummaries, newSkillLibrary, normalizeFrontmatter, ownerCandidatesFromSummaries, ownerDecisionText, paramRowId, parseFrontmatter, policyStageLimits, probePresent, probeUnknown, projectExtractBodies, proposalFromPlan, protectedSkillNamesOf, resolveExecOrigins, sessionReadSkillNames, sessionReadSupportFiles, skillWriteGateContext, unwrapLive, userSetKeys, writeProposalReport } from "@lmzhen/dsh-evolution-core";
|
|
2
2
|
import { effectiveSessionPolicy } from "@lmzhen/dsh-evolution-approval";
|
|
3
3
|
import z from "@deepseek-ai/schemastery";
|
|
4
4
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
@@ -778,9 +778,13 @@ function apply(ctx, rawConfig = {}) {
|
|
|
778
778
|
}
|
|
779
779
|
if (result.normalizedFrontmatterFields && result.normalizedFrontmatterFields.length > 0) feedbackLines.push(`frontmatter auto-quoted (YAML compatibility): ${result.normalizedFrontmatterFields.join(", ")}`);
|
|
780
780
|
const mutating = !isReadOnlyAction(action) && !(action === "extract" && args.dry_run === true);
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
781
|
+
try {
|
|
782
|
+
if (name && action === "create") await ctx.skillUsage.ensureRecordCreated(name, origin !== "foreground");
|
|
783
|
+
if (name && action === "delete") await ctx.skillUsage.markArchived(name);
|
|
784
|
+
else if (name && mutating && action !== "create" && result.noop !== true) await ctx.skillUsage.record(name, "patch");
|
|
785
|
+
} catch (error) {
|
|
786
|
+
ctx.logger.warn("evolution skill_manage: usage bookkeeping failed after the write landed: " + (error instanceof Error ? error.message : String(error)));
|
|
787
|
+
}
|
|
784
788
|
}
|
|
785
789
|
return {
|
|
786
790
|
ok: result.ok,
|
|
@@ -987,6 +991,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
987
991
|
origin: libraryOrigin,
|
|
988
992
|
protectedNames: protectedSkillNamesOf(ctx.get("evolutionPolicy")),
|
|
989
993
|
readNames: sessionReadSkillNames(ctx, exec.agent?.session),
|
|
994
|
+
readSupportFiles: sessionReadSupportFiles(ctx, exec.agent?.session, { root: library.root }),
|
|
990
995
|
confirm: async (request) => confirmSkillWrite(request, exec),
|
|
991
996
|
confirmMode: approvalSeam !== void 0 && approvalSeam.isEnabled !== false && sessionPolicy !== "never" && (libraryOrigin === "background_review" || approvalSeam.stageForeground !== false) ? "auto" : settings().skillWriteConfirm,
|
|
992
997
|
confirmTimeoutSeconds: settings().skillWriteConfirmTimeoutSeconds,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-tool-skill-manage",
|
|
3
3
|
"description": "Model-facing skill_manage tool (community build)",
|
|
4
|
-
"version": "0.32.
|
|
4
|
+
"version": "0.32.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-approval": "^0.32.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
30
|
+
"@lmzhen/dsh-evolution-approval": "^0.32.4",
|
|
31
|
+
"@lmzhen/dsh-evolution-core": "^0.32.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.2",
|
|
37
37
|
"@deepseek-ai/dsh-tools": "^0.2.1-rc.2",
|
|
38
38
|
"@deepseek-ai/dsh-agent": "^0.2.1-rc.2",
|
|
39
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
40
|
-
"@lmzhen/dsh-skill-usage": "^0.32.
|
|
39
|
+
"@lmzhen/dsh-evolution-io": "^0.32.4",
|
|
40
|
+
"@lmzhen/dsh-skill-usage": "^0.32.4"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@deepseek-ai/dsh-agent-loop-testkit": "^0.2.1-rc.2",
|
|
44
44
|
"@deepseek-ai/dsh-skill": "^0.2.1-rc.2",
|
|
45
45
|
"@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.2",
|
|
46
46
|
"@deepseek-ai/dsh-tools": "^0.2.1-rc.2",
|
|
47
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
48
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
49
|
-
"@lmzhen/dsh-skill-usage": "^0.32.
|
|
47
|
+
"@lmzhen/dsh-evolution-core": "^0.32.4",
|
|
48
|
+
"@lmzhen/dsh-evolution-io": "^0.32.4",
|
|
49
|
+
"@lmzhen/dsh-skill-usage": "^0.32.4"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|