@lmzhen/dsh-evolution-review 0.3.76 → 0.3.77

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
@@ -2,7 +2,7 @@ import { createHash, randomUUID } from "node:crypto";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
4
4
  import { SessionId } from "@deepseek-ai/dsh-session";
5
- import { COMPLETION_SKILL_REVIEW_PROMPT, DEFAULT_MAX_OPS_PER_PLAN, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_MEMORY_REVIEW_MODEL, DEFAULT_REVIEW_CONTEXT_MESSAGES, DEFAULT_REVIEW_MEMORY_INTERVAL, DEFAULT_REVIEW_MESSAGE_CHARS, DEFAULT_REVIEW_SKILL_INTERVAL, DEFAULT_REVIEW_TIMEOUT_MS, DEFAULT_SKILL_CONTENT_CHARS, DEFAULT_SKILL_LIMITS, DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS, DEFAULT_SKILL_REVIEW_MODEL, DEFAULT_SKILL_REVIEW_TRIGGER, DEFAULT_SUBSTANTIVE_MIN_AGENT_CHARS, DEFAULT_SUBSTANTIVE_MIN_TOOL_CALLS, DEFAULT_SUBSTANTIVE_MIN_USER_CHARS, DEFAULT_USER_CHAR_LIMIT, MAX_TIMER_DELAY_MS, PROMPT_BUNDLE, advanceReview, assertSkillsRootAliasRetired, clampedNumber, clearReviewChannel, contentHash, evolutionIoAdapter, foldToolDispatches, foldTurn, markReviewChannel, newSkillLibrary, readDispatchSignal, redactSecrets, resolveOrigins, resolveRootConfig, reviewPrompt, skillReadNameOf, sweepReviewChannelSessions, verifyPromptBundle } from "@lmzhen/dsh-evolution-core";
5
+ import { COMPLETION_SKILL_REVIEW_PROMPT, DEFAULT_MAX_OPS_PER_PLAN, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_MEMORY_REVIEW_MODEL, DEFAULT_REVIEW_CONTEXT_MESSAGES, DEFAULT_REVIEW_MEMORY_INTERVAL, DEFAULT_REVIEW_MESSAGE_CHARS, DEFAULT_REVIEW_SKILL_INTERVAL, DEFAULT_REVIEW_TIMEOUT_MS, DEFAULT_SKILL_CONTENT_CHARS, DEFAULT_SKILL_LIMITS, DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS, DEFAULT_SKILL_REVIEW_MODEL, DEFAULT_SKILL_REVIEW_TRIGGER, DEFAULT_SUBSTANTIVE_MIN_AGENT_CHARS, DEFAULT_SUBSTANTIVE_MIN_TOOL_CALLS, DEFAULT_SUBSTANTIVE_MIN_USER_CHARS, DEFAULT_USER_CHAR_LIMIT, MAX_TIMER_DELAY_MS, PROMPT_BUNDLE, advanceReview, assertSkillsRootAliasRetired, clampedNumber, clearReviewChannel, contentHash, evolutionIoAdapter, foldToolDispatches, foldTurn, markReviewChannel, newSkillLibrary, readDispatchSignal, redactSecrets, resolveOrigins, resolveRootConfig, reviewPrompt, sessionAudited, skillReadNameOf, sweepReviewChannelSessions, verifyPromptBundle } from "@lmzhen/dsh-evolution-core";
6
6
  import { validateEvolutionPlan } from "@lmzhen/dsh-evolution-plan-validator";
7
7
  //#region lib/types/index.js
8
8
  /**
@@ -28,6 +28,7 @@ const Config = z.object({
28
28
  z.const("both")
29
29
  ]).default(DEFAULT_SKILL_REVIEW_TRIGGER),
30
30
  reviewWakeInject: z.boolean().default(true),
31
+ sessionScoped: z.boolean().default(false),
31
32
  skillReviewCompletionMinToolCalls: z.number().min(1).default(DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS),
32
33
  root: z.string().default(""),
33
34
  skillsRoot: z.string().default("")
@@ -123,6 +124,7 @@ function apply(ctx, rawConfig = {}) {
123
124
  }
124
125
  }
125
126
  ctx.on("session/event", (session, event) => {
127
+ if (!sessionAudited(ctx, session.id, config.sessionScoped)) return;
126
128
  if (event.type === "turn/start" && session.header.origin !== "subagent") turnStarts.set(session.id, session.seq - 1);
127
129
  if (event.type === "user/message") {
128
130
  if ((event.data?.source)?.kind === "user") clearReviewChannel(session.id);
@@ -65,6 +65,14 @@ export interface Config {
65
65
  * config that still sets it reaches {@link assertSkillsRootAliasRetired} and
66
66
  * fails the load instead of being silently dropped. Never read. */
67
67
  skillsRoot?: string;
68
+ /**
69
+ * Act only on sessions that carry the family's model tools (evolution-core's
70
+ * per-session probe). The shipped bundles set it: at profile root every
71
+ * session carries them, inside a variant preset only the sessions that
72
+ * selected one do. False — a bare library mount, the host-only infrastructure
73
+ * mode, and every deployment that predates this field — acts on every session.
74
+ */
75
+ sessionScoped?: boolean;
68
76
  }
69
77
  export declare const Config: z<Config>;
70
78
  /** V8-01 (0.3.45): the review subagent's structured-output contract. The
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-review",
3
3
  "description": "Background review orchestration (community build)",
4
- "version": "0.3.76",
4
+ "version": "0.3.77",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,9 +27,9 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.1",
30
- "@lmzhen/dsh-evolution-approval": "^0.3.76",
31
- "@lmzhen/dsh-evolution-core": "^0.3.76",
32
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.76"
30
+ "@lmzhen/dsh-evolution-approval": "^0.3.77",
31
+ "@lmzhen/dsh-evolution-core": "^0.3.77",
32
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.77"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@deepseek-ai/cordis": "^4.0.1",
@@ -37,8 +37,8 @@
37
37
  "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
38
38
  "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
39
39
  "@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
40
- "@lmzhen/dsh-evolution-state": "^0.3.76",
41
- "@lmzhen/dsh-evolution-policy": "^0.3.76"
40
+ "@lmzhen/dsh-evolution-state": "^0.3.77",
41
+ "@lmzhen/dsh-evolution-policy": "^0.3.77"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
@@ -48,10 +48,10 @@
48
48
  "@deepseek-ai/dsh-session-persistence": "^0.1.5-rc.2",
49
49
  "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.5-rc.2",
50
50
  "@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
51
- "@lmzhen/dsh-evolution-approval": "^0.3.76",
52
- "@lmzhen/dsh-evolution-core": "^0.3.76",
53
- "@lmzhen/dsh-evolution-curator": "^0.3.76",
54
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.76",
55
- "@lmzhen/dsh-evolution-state": "^0.3.76"
51
+ "@lmzhen/dsh-evolution-approval": "^0.3.77",
52
+ "@lmzhen/dsh-evolution-core": "^0.3.77",
53
+ "@lmzhen/dsh-evolution-curator": "^0.3.77",
54
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.77",
55
+ "@lmzhen/dsh-evolution-state": "^0.3.77"
56
56
  }
57
57
  }