@lmzhen/dsh-tool-skill-manage 0.3.34 → 0.3.35
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 +12 -5
- 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_SKILL_LIMITS, DSH_AUTHORING_STANDARDS, SKILLS_GUIDANCE, SkillLibrary, authoringFeedback, computeDedupGroups, evolutionIoAdapter, parseFrontmatter, resolveOrigins, resolveSkillsRoot } from "@lmzhen/dsh-evolution-core";
|
|
4
|
+
import { DEFAULT_SKILL_LIMITS, DSH_AUTHORING_STANDARDS, SKILLS_GUIDANCE, SkillLibrary, authoringFeedback, clampedNumber, computeDedupGroups, evolutionIoAdapter, parseFrontmatter, resolveOrigins, resolveSkillsRoot } from "@lmzhen/dsh-evolution-core";
|
|
5
5
|
//#region lib/types/index.js
|
|
6
6
|
/**
|
|
7
7
|
* Model-facing skill_manage tool over ctx.evolutionIo + ctx.skillUsage.
|
|
@@ -44,11 +44,18 @@ function apply(ctx, rawConfig = {}) {
|
|
|
44
44
|
text: SKILLS_GUIDANCE
|
|
45
45
|
}), "tool-skill-manage.skills-guidance");
|
|
46
46
|
const io = evolutionIoAdapter(() => ctx.evolutionIo.provider());
|
|
47
|
+
const numericClamped = [];
|
|
48
|
+
const limit = (name, value, fallback) => {
|
|
49
|
+
const result = clampedNumber(value, fallback, { min: 1 });
|
|
50
|
+
if (value !== void 0 && result !== value) numericClamped.push(name);
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
if (numericClamped.length > 0) ctx.logger.warn(`tool-skill-manage: ${numericClamped.join(", ")} provided an invalid value; falling back to the default`);
|
|
47
54
|
const library = new SkillLibrary(resolveSkillsRoot(rawConfig), io, {
|
|
48
|
-
maxNameLength: rawConfig.maxSkillNameLength
|
|
49
|
-
maxDescriptionLength: rawConfig.maxDescriptionLength
|
|
50
|
-
maxSkillContentChars: rawConfig.maxSkillContentChars
|
|
51
|
-
maxSkillFileBytes: rawConfig.maxSkillFileBytes
|
|
55
|
+
maxNameLength: limit("maxSkillNameLength", rawConfig.maxSkillNameLength, DEFAULT_SKILL_LIMITS.maxNameLength),
|
|
56
|
+
maxDescriptionLength: limit("maxDescriptionLength", rawConfig.maxDescriptionLength, DEFAULT_SKILL_LIMITS.maxDescriptionLength),
|
|
57
|
+
maxSkillContentChars: limit("maxSkillContentChars", rawConfig.maxSkillContentChars, DEFAULT_SKILL_LIMITS.maxSkillContentChars),
|
|
58
|
+
maxSkillFileBytes: limit("maxSkillFileBytes", rawConfig.maxSkillFileBytes, DEFAULT_SKILL_LIMITS.maxSkillFileBytes)
|
|
52
59
|
}, (event) => {
|
|
53
60
|
ctx.emit("evolution/skill-mutated", event);
|
|
54
61
|
});
|
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.3.
|
|
4
|
+
"version": "0.3.35",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
35
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.35",
|
|
35
|
+
"@lmzhen/dsh-evolution-core": "^0.3.35"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
39
39
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
40
40
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
41
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
42
|
-
"@lmzhen/dsh-skill-usage": "^0.3.
|
|
41
|
+
"@lmzhen/dsh-evolution-io": "^0.3.35",
|
|
42
|
+
"@lmzhen/dsh-skill-usage": "^0.3.35"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.1-rc.2",
|
|
46
46
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
47
47
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
48
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
49
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
50
|
-
"@lmzhen/dsh-skill-usage": "^0.3.
|
|
48
|
+
"@lmzhen/dsh-evolution-core": "^0.3.35",
|
|
49
|
+
"@lmzhen/dsh-evolution-io": "^0.3.35",
|
|
50
|
+
"@lmzhen/dsh-skill-usage": "^0.3.35"
|
|
51
51
|
}
|
|
52
52
|
}
|