@lmzhen/dsh-tool-skill-manage 0.20.0 → 0.22.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 +10 -16
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { effectiveSessionPolicy } from "@lmzhen/dsh-evolution-approval";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
4
|
-
import { DEFAULT_ARCHIVE_RETENTION_POLICY, DEFAULT_CITATION_POLICY, DEFAULT_REFERENCE_REWRITE_POLICY, DEFAULT_SKILL_LIMITS, DEFAULT_SKILL_VERSION_KEEP, DEFAULT_SUPPORT_FILE_CHAR_POLICY, DSH_AUTHORING_STANDARDS, SKILLS_GUIDANCE, SKILLS_GUIDANCE_SECTION_ORDER, SKILL_ACTION_REQUIRED_FIELDS, anchorVerdict, authoringFeedback, callingScope,
|
|
4
|
+
import { DEFAULT_ARCHIVE_RETENTION_POLICY, DEFAULT_CITATION_POLICY, DEFAULT_REFERENCE_REWRITE_POLICY, DEFAULT_SKILL_LIMITS, DEFAULT_SKILL_VERSION_KEEP, DEFAULT_SUPPORT_FILE_CHAR_POLICY, DSH_AUTHORING_STANDARDS, SKILLS_GUIDANCE, SKILLS_GUIDANCE_SECTION_ORDER, SKILL_ACTION_REQUIRED_FIELDS, anchorVerdict, authoringFeedback, callingScope, clampOnce, computeDedupGroups, contentHash, errorText, evolutionIoAdapter, fuzzyPatch, isPresent, isUnknown, isUnreadWrite, liveBool, nearDuplicateSummaries, newSkillLibrary, normalizeFrontmatter, paramRowId, parseFrontmatter, policyStageLimits, probePresent, probeUnknown, resolveExecOrigins, sessionReadSkillNames, unwrapLive, userSetKeys } from "@lmzhen/dsh-evolution-core";
|
|
5
5
|
//#region lib/types/write-gates.js
|
|
6
6
|
/**
|
|
7
7
|
* The write-admission sequence: ONE ordered table of the reasons a skill write is refused.
|
|
@@ -537,15 +537,9 @@ function apply(ctx, rawConfig = {}) {
|
|
|
537
537
|
};
|
|
538
538
|
const io = evolutionIoAdapter(() => ctx.evolutionIo.provider());
|
|
539
539
|
const clampedKeys = /* @__PURE__ */ new Set();
|
|
540
|
-
const limit = (name, value, fallback) => {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
if (current !== void 0 && result !== current && !clampedKeys.has(name)) {
|
|
544
|
-
clampedKeys.add(name);
|
|
545
|
-
ctx.logger.warn(`tool-skill-manage: ${name} provided an invalid value; falling back to the default`);
|
|
546
|
-
}
|
|
547
|
-
return result;
|
|
548
|
-
};
|
|
540
|
+
const limit = (name, value, fallback) => clampOnce(clampedKeys, (message) => {
|
|
541
|
+
ctx.logger.warn(message);
|
|
542
|
+
}, `tool-skill-manage: ${name}`, value, fallback, 1);
|
|
549
543
|
/**
|
|
550
544
|
* This row's write knobs as they stand RIGHT NOW (G1 §8.3) — the base layer of the
|
|
551
545
|
* precedence chain. The ten E3 keys are live references the platform updates in
|
|
@@ -554,15 +548,15 @@ function apply(ctx, rawConfig = {}) {
|
|
|
554
548
|
* @returns the row layer of the write settings.
|
|
555
549
|
*/
|
|
556
550
|
const rowSettings = () => ({
|
|
557
|
-
skillContentChars: limit("maxSkillContentChars", rawConfig.skillContentChars
|
|
551
|
+
skillContentChars: limit("maxSkillContentChars", unwrapLive(rawConfig.skillContentChars) ?? rawConfig.maxSkillContentChars, DEFAULT_SKILL_LIMITS.maxSkillContentChars),
|
|
558
552
|
maxSkillFileBytes: limit("maxSkillFileBytes", rawConfig.maxSkillFileBytes, DEFAULT_SKILL_LIMITS.maxSkillFileBytes),
|
|
559
553
|
maxSkillNameLength: limit("maxSkillNameLength", rawConfig.maxSkillNameLength, DEFAULT_SKILL_LIMITS.maxNameLength),
|
|
560
554
|
maxDescriptionLength: limit("maxDescriptionLength", rawConfig.maxDescriptionLength, DEFAULT_SKILL_LIMITS.maxDescriptionLength),
|
|
561
|
-
descriptionStrict: rawConfig.descriptionStrict
|
|
562
|
-
strictCrossSource: rawConfig.strictCrossSource
|
|
563
|
-
citationPolicy: rawConfig.citationPolicy
|
|
564
|
-
supportFileCharPolicy: rawConfig.supportFileCharPolicy
|
|
565
|
-
skillWriteConfirm: rawConfig.skillWriteConfirm
|
|
555
|
+
descriptionStrict: liveBool(rawConfig.descriptionStrict),
|
|
556
|
+
strictCrossSource: liveBool(rawConfig.strictCrossSource),
|
|
557
|
+
citationPolicy: unwrapLive(rawConfig.citationPolicy) ?? DEFAULT_CITATION_POLICY,
|
|
558
|
+
supportFileCharPolicy: unwrapLive(rawConfig.supportFileCharPolicy) ?? DEFAULT_SUPPORT_FILE_CHAR_POLICY,
|
|
559
|
+
skillWriteConfirm: unwrapLive(rawConfig.skillWriteConfirm) ?? "auto",
|
|
566
560
|
skillWriteConfirmTimeoutSeconds: limit("skillWriteConfirmTimeoutSeconds", rawConfig.skillWriteConfirmTimeoutSeconds, 120)
|
|
567
561
|
});
|
|
568
562
|
/**
|
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.
|
|
4
|
+
"version": "0.22.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,24 +27,24 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
30
|
-
"@lmzhen/dsh-evolution-approval": "^0.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
30
|
+
"@lmzhen/dsh-evolution-approval": "^0.22.0",
|
|
31
|
+
"@lmzhen/dsh-evolution-core": "^0.22.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
35
35
|
"@deepseek-ai/dsh-skill": "^0.2.0-rc.1",
|
|
36
36
|
"@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.1",
|
|
37
37
|
"@deepseek-ai/dsh-tools": "^0.2.0-rc.1",
|
|
38
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
39
|
-
"@lmzhen/dsh-skill-usage": "^0.
|
|
38
|
+
"@lmzhen/dsh-evolution-io": "^0.22.0",
|
|
39
|
+
"@lmzhen/dsh-skill-usage": "^0.22.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@deepseek-ai/dsh-agent-loop-testkit": "^0.2.0-rc.1",
|
|
43
43
|
"@deepseek-ai/dsh-skill": "^0.2.0-rc.1",
|
|
44
44
|
"@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.1",
|
|
45
45
|
"@deepseek-ai/dsh-tools": "^0.2.0-rc.1",
|
|
46
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
47
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
48
|
-
"@lmzhen/dsh-skill-usage": "^0.
|
|
46
|
+
"@lmzhen/dsh-evolution-core": "^0.22.0",
|
|
47
|
+
"@lmzhen/dsh-evolution-io": "^0.22.0",
|
|
48
|
+
"@lmzhen/dsh-skill-usage": "^0.22.0"
|
|
49
49
|
}
|
|
50
50
|
}
|