@lmzhen/dsh-evolution-review 0.32.5 → 0.33.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.
Files changed (3) hide show
  1. package/README.md +18 -11
  2. package/lib/index.js +4 -3
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -1,23 +1,30 @@
1
1
  # @lmzhen/dsh-evolution-review
2
2
 
3
- > 后台复盘:在自然节点回顾对话并给改进建议。
3
+ Session review orchestration. It measures completed turns, defers due reviews to the appropriate task boundary, and delivers a memory or skill review prompt.
4
4
 
5
- ## 你会看到
5
+ ## Trigger model
6
6
 
7
- 偶尔出现在会话里的复盘提示;不是每句话都跑。
7
+ Review is enabled by default. The memory and skill cadence intervals both default to 10 tool calls. A turn advances by its tool-call count, with the minimum/skill-use rules implemented by the shared review signal fold.
8
8
 
9
- ## 什么时候会用到
9
+ A cadence threshold reached during a task is latched; the review runs when the conversation completes rather than interrupting in the middle of the task. The default `skillReviewTrigger` is `cadence`. `completion` or `both` additionally allows one completion-channel skill review after a qualifying long session. Both channels are mutually exclusive at one boundary.
10
10
 
11
- Agent 干完一段活、达到节奏时。
11
+ Subagent-origin, background-visibility, and review-child sessions are excluded. Variant deployments also require the session to carry the family model rows.
12
12
 
13
- ## 默认 / 前提
13
+ ## Delivery modes
14
14
 
15
- 默认在会话内、按 cadence 触发。
15
+ | Mode | Behavior | Recorded history |
16
+ |---|---|---|
17
+ | `inject` (default) | Sends the review prompt into the parent session. `reviewWakeInject=true` uses a waking follow-up when available. | Emits `review-scheduled`; does **not** emit `plan-applied`, so plan-based activity/replay stays empty. |
18
+ | `branch` | Creates a child agent with a seed from the live session log and delivers the result to the parent. | Emits `review-completed` and `plan-applied`, including failure/timeout status when known. |
16
19
 
17
- ## 边界
20
+ Branch mode requires `agents`. It is a temporary platform-gap path with trade-offs among durable-log governance, parent prefix-cache reuse, and workspace pollution; it is not the default product path.
18
21
 
19
- 子会话模式需要 agents;当前有已知通知边界。
22
+ `reviewNotice=true` allows result notices. It does not suppress an inject-mode review prompt, because that prompt is the review itself.
20
23
 
21
- ## 维护者参考:参数别名(G0/S0.3)
24
+ ## Events and limits
22
25
 
23
- `memoryInterval` → `reviewMemoryInterval`;`skillInterval` → `reviewSkillInterval`。旧名仍可读,写入会拒绝。
26
+ The package emits `evolution/review-scheduled`, `evolution/review-completed` (branch), `evolution/review-error`, and branch-mode `evolution/plan-applied`. `reviewTimeoutMs` bounds the branch run. Review cadence state is persisted when `evolution-state` is available; without it, cadence can reset between turns.
27
+
28
+ **Unimplemented metadata:** `reviewProvider`, `reviewContextMessages`, `reviewMessageChars`, `reviewMaxDepth`, and `reviewToolAllow` may still appear in generated parameter/bundle metadata, but this plugin does not read them. Do not rely on them for provider selection, context limits, delegation depth, or tool restrictions. `reviewTimeoutMs` is implemented.
29
+
30
+ `memoryInterval` and `skillInterval` remain readable deprecated aliases of `reviewMemoryInterval` and `reviewSkillInterval`; writes to the old names are refused (G0/S0.3).
package/lib/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
4
- import { SessionId, SessionLogOffset } from "@deepseek-ai/dsh-session";
5
- import { COMPLETION_SKILL_REVIEW_PROMPT, DEFAULT_REVIEW_MEMORY_INTERVAL, DEFAULT_REVIEW_SKILL_INTERVAL, DEFAULT_REVIEW_TIMEOUT_MS, DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS, DEFAULT_SKILL_REVIEW_TRIGGER, DEFAULT_SUBSTANTIVE_MIN_AGENT_CHARS, DEFAULT_SUBSTANTIVE_MIN_TOOL_CALLS, DEFAULT_SUBSTANTIVE_MIN_USER_CHARS, MAX_TIMER_DELAY_MS, MEMORY_REVIEW_PROMPT, PROMPT_BUNDLE, advanceReview, assertSkillsRootAliasRetired, clampOnce, classifySessionEvent, clearReviewChannel, filterUnreadSkillOps, liveBool, markReviewChannel, paramRowId, pickWithPolicy, readDispatchSignal, reviewPrompt, sessionAudited, sessionTurnSignals, sweepReviewChannelSessions, unwrapLive, userSetKeys, verifyPromptBundle } from "@lmzhen/dsh-evolution-core";
4
+ import { SessionId } from "@deepseek-ai/dsh-session";
5
+ import { COMPLETION_SKILL_REVIEW_PROMPT, DEFAULT_REVIEW_MEMORY_INTERVAL, DEFAULT_REVIEW_SKILL_INTERVAL, DEFAULT_REVIEW_TIMEOUT_MS, DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS, DEFAULT_SKILL_REVIEW_TRIGGER, DEFAULT_SUBSTANTIVE_MIN_AGENT_CHARS, DEFAULT_SUBSTANTIVE_MIN_TOOL_CALLS, DEFAULT_SUBSTANTIVE_MIN_USER_CHARS, MAX_TIMER_DELAY_MS, MEMORY_REVIEW_PROMPT, PROMPT_BUNDLE, advanceReview, assertSkillsRootAliasRetired, clampOnce, classifySessionEvent, clearReviewChannel, filterUnreadSkillOps, liveBool, markReviewChannel, paramRowId, pickWithPolicy, readDispatchSignal, registerOwnerSettings, reviewPrompt, sessionAudited, sessionTurnSignals, sweepReviewChannelSessions, unwrapLive, userSetKeys, verifyPromptBundle } from "@lmzhen/dsh-evolution-core";
6
6
  /**
7
7
  * Whether a message is a notice this plugin delivered, judged only by durable source fields.
8
8
  *
@@ -213,6 +213,7 @@ function resolveReviewRowSettings(rawConfig, warn) {
213
213
  };
214
214
  }
215
215
  function apply(ctx, rawConfig = {}) {
216
+ registerOwnerSettings(ctx, "evolution-review", Config);
216
217
  ctx.inject(["settings"], (injected) => {
217
218
  const settings = injected.settings;
218
219
  if (typeof settings?.configure !== "function") return;
@@ -646,7 +647,7 @@ function apply(ctx, rawConfig = {}) {
646
647
  sessionId: childId,
647
648
  parentAgent: agent,
648
649
  seed,
649
- inheritedEventCount: SessionLogOffset(seed.length),
650
+ inheritedEventCount: seed.length,
650
651
  meta: {
651
652
  parentSession: session.id,
652
653
  isSeeded: true,
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.32.5",
4
+ "version": "0.33.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,7 +27,7 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.5",
30
- "@lmzhen/dsh-evolution-core": "^0.32.5"
30
+ "@lmzhen/dsh-evolution-core": "^0.33.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.5",
@@ -35,8 +35,8 @@
35
35
  "@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
36
36
  "@deepseek-ai/dsh-session": "^0.2.1-rc.2",
37
37
  "@deepseek-ai/dsh-tools": "^0.2.1-rc.2",
38
- "@lmzhen/dsh-evolution-policy": "^0.32.5",
39
- "@lmzhen/dsh-evolution-state": "^0.32.5"
38
+ "@lmzhen/dsh-evolution-policy": "^0.33.0",
39
+ "@lmzhen/dsh-evolution-state": "^0.33.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@deepseek-ai/dsh-agent": "^0.2.1-rc.2",
@@ -44,8 +44,8 @@
44
44
  "@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
45
45
  "@deepseek-ai/dsh-session": "^0.2.1-rc.2",
46
46
  "@deepseek-ai/dsh-tools": "^0.2.1-rc.2",
47
- "@lmzhen/dsh-evolution-core": "^0.32.5",
48
- "@lmzhen/dsh-evolution-state": "^0.32.5"
47
+ "@lmzhen/dsh-evolution-core": "^0.33.0",
48
+ "@lmzhen/dsh-evolution-state": "^0.33.0"
49
49
  },
50
50
  "engines": {
51
51
  "dsh": ">=0.2.1-rc.2 <0.2.2-0"