@lmzhen/dsh-tool-skill-manage 0.3.50 → 0.3.52

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 CHANGED
@@ -34,7 +34,8 @@ const Config = z.object({
34
34
  maxDescriptionLength: z.number().min(1).default(DEFAULT_SKILL_LIMITS.maxDescriptionLength),
35
35
  maxSkillContentChars: z.number().min(1).default(DEFAULT_SKILL_LIMITS.maxSkillContentChars),
36
36
  maxSkillFileBytes: z.number().min(1).default(DEFAULT_SKILL_LIMITS.maxSkillFileBytes),
37
- descriptionStrict: z.boolean().default(false)
37
+ descriptionStrict: z.boolean().default(false),
38
+ threatExemptLabels: z.array(z.string()).default([])
38
39
  });
39
40
  function apply(ctx, rawConfig = {}) {
40
41
  const systemPrompt = ctx.get("systemPrompt");
@@ -50,14 +51,15 @@ function apply(ctx, rawConfig = {}) {
50
51
  if (value !== void 0 && result !== value) numericClamped.push(name);
51
52
  return result;
52
53
  };
53
- const library = new SkillLibrary(resolveSkillsRoot(rawConfig), io, {
54
+ const libraryOptions = {
54
55
  maxNameLength: limit("maxSkillNameLength", rawConfig.maxSkillNameLength, DEFAULT_SKILL_LIMITS.maxNameLength),
55
56
  maxDescriptionLength: limit("maxDescriptionLength", rawConfig.maxDescriptionLength, DEFAULT_SKILL_LIMITS.maxDescriptionLength),
56
57
  maxSkillContentChars: limit("maxSkillContentChars", rawConfig.maxSkillContentChars, DEFAULT_SKILL_LIMITS.maxSkillContentChars),
57
58
  maxSkillFileBytes: limit("maxSkillFileBytes", rawConfig.maxSkillFileBytes, DEFAULT_SKILL_LIMITS.maxSkillFileBytes)
58
- }, (event) => {
59
+ };
60
+ const library = new SkillLibrary(resolveSkillsRoot(rawConfig), io, libraryOptions, (event) => {
59
61
  ctx.emit("evolution/skill-mutated", event);
60
- });
62
+ }, void 0, [...rawConfig.threatExemptLabels ?? []]);
61
63
  if (numericClamped.length > 0) ctx.logger.warn(`tool-skill-manage: ${numericClamped.join(", ")} provided an invalid value; falling back to the default`);
62
64
  async function executeCore(args, origin = "foreground") {
63
65
  const action = args.action;
@@ -216,7 +218,7 @@ function apply(ctx, rawConfig = {}) {
216
218
  },
217
219
  isConcurrencySafe: () => false,
218
220
  async execute(args, exec) {
219
- const origins = resolveOrigins(exec.agent?.session.header.origin);
221
+ const origins = resolveOrigins(exec.agent?.session?.header.origin);
220
222
  const reviewOrigin = origins.approval;
221
223
  const libraryOrigin = origins.library;
222
224
  const sessionPolicy = effectiveSessionPolicy(ctx, exec.agent?.session);
@@ -231,7 +233,7 @@ function apply(ctx, rawConfig = {}) {
231
233
  libraryOrigin
232
234
  },
233
235
  origin: reviewOrigin,
234
- ...exec.agent?.session.id ? { sessionId: exec.agent.session.id } : {},
236
+ ...exec.agent?.session?.id ? { sessionId: exec.agent.session.id } : {},
235
237
  ...exec.agent?.session ? { session: exec.agent.session } : {},
236
238
  ...sessionPolicy !== void 0 ? { sessionPolicy } : {}
237
239
  });
@@ -27,6 +27,11 @@ export interface Config {
27
27
  maxSkillFileBytes?: number;
28
28
  /** When true, create/update refuse a description over the 60-char authoring bar (default: advisory feedback only). */
29
29
  descriptionStrict?: boolean;
30
+ /** V10-03 (P2-18): threat-scan exemption labels forwarded to the skill
31
+ * write path (core `ScanOptions.excludeLabels`). Default empty — the
32
+ * strict ANY-hit-blocks behavior is unchanged; deployments opt in per
33
+ * label for known false-positive content. */
34
+ threatExemptLabels?: string[];
30
35
  }
31
36
  export declare const Config: z<Config>;
32
37
  export declare function apply(ctx: Context, rawConfig?: Config): void;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-tool-skill-manage",
3
3
  "description": "Model-facing skill_manage tool (community build)",
4
- "version": "0.3.50",
4
+ "version": "0.3.52",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/lmzhen/dsh-evolution.git",
11
- "directory": "packages/dsh-tool-skill-manage"
11
+ "directory": "packages/tool-skill-manage"
12
12
  },
13
13
  "type": "module",
14
14
  "main": "lib/index.js",
@@ -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.50",
35
- "@lmzhen/dsh-evolution-core": "^0.3.50"
34
+ "@lmzhen/dsh-evolution-approval": "^0.3.52",
35
+ "@lmzhen/dsh-evolution-core": "^0.3.52"
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.50",
42
- "@lmzhen/dsh-skill-usage": "^0.3.50"
41
+ "@lmzhen/dsh-evolution-io": "^0.3.52",
42
+ "@lmzhen/dsh-skill-usage": "^0.3.52"
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.50",
49
- "@lmzhen/dsh-evolution-io": "^0.3.50",
50
- "@lmzhen/dsh-skill-usage": "^0.3.50"
48
+ "@lmzhen/dsh-evolution-core": "^0.3.52",
49
+ "@lmzhen/dsh-evolution-io": "^0.3.52",
50
+ "@lmzhen/dsh-skill-usage": "^0.3.52"
51
51
  }
52
52
  }