@lmzhen/dsh-evolution-review 0.3.42 → 0.3.44
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/README.md +7 -0
- package/lib/index.js +9 -1
- package/lib/types/index.d.ts +3 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -34,3 +34,10 @@ Independent of request-prefix construction. This package does not alter the asse
|
|
|
34
34
|
`reviewProvider` selects the LLM provider for review subagents. When omitted, the subagent inherits the deployment default route instead of a hardcoded provider name. Model selection stays on the policy (`memoryReviewModel` / `skillReviewModel`).
|
|
35
35
|
|
|
36
36
|
`reviewTimeoutMs` bounds each review subagent run (an `AbortSignal.timeout`; `0` aborts immediately). `executionTimeoutMs` is a leftover declaration and is **not consumed** — it is kept only as a code comment and has no effect; configure `reviewTimeoutMs` instead.
|
|
37
|
+
|
|
38
|
+
### Review delivery contract (0.3.38-0.3.42)
|
|
39
|
+
|
|
40
|
+
- **Both channels execute at conversation end only** (a `turn/end` with `reason.kind === 'completed'`): a cadence threshold fire mid-task merely latches the kind — no subagent spawn, no inject. The flush runs BEFORE the latch block (the completing turn may itself be a threshold-firing turn). `reviewMode` (`'subagent'` default / `'inject'`) selects how the flush delivers; the explicit `'inject'` mode's historical "immediate on threshold" contract was superseded in 0.3.39 — both modes are end-of-conversation.
|
|
41
|
+
- **`skillReviewTrigger`** (default `'cadence'`): `'cadence'` runs one end-of-conversation review from the cadence latch; `'completion'` uses the separate long-session completion gate (session-cumulative tool-call threshold); `'both'` enables both (note: with the deferred cadence execution the `'both'` combination would inject a second task-complete prompt at the same boundary — prefer `'cadence'`).
|
|
42
|
+
- **`reviewWakeInject`** (default `true`): deliveries use `agent.followup` (next-turn + wake — the model starts processing immediately) instead of the non-waking `agent.inject` (which waits for the next driver wake). The host falls back to `inject` when it has no followup or the option is `false`. The woken turn's own cadence fire is suppressed once (an injected review prompt alone must not re-trigger a review under `interval=1`); a restart clears the queue, so the loop cannot survive it.
|
|
43
|
+
- **Counting window = injection-to-injection**: the `turnsSinceMemory`/`turnsSinceSkill` counters are monotonic across threshold fires (`resetOnFire: false`) and are zeroed at the flush delivery — a continued conversation starts a fresh segment from the injection. A threshold fire on the completing turn is caught by the flush (`pendingKind = latch ?? kind`). All deliveries (review prompt AND result notices) share the same waking channel; a failed counter-reset persist warns once per session (a stateful reload may re-deliver).
|
package/lib/index.js
CHANGED
|
@@ -22,7 +22,11 @@ const Config = z.object({
|
|
|
22
22
|
reviewMessageChars: z.number().min(1).default(2e3),
|
|
23
23
|
reviewMaxDepth: z.number().min(1).default(1),
|
|
24
24
|
reviewProvider: z.string(),
|
|
25
|
-
skillReviewTrigger: z.
|
|
25
|
+
skillReviewTrigger: z.union([
|
|
26
|
+
z.const("cadence"),
|
|
27
|
+
z.const("completion"),
|
|
28
|
+
z.const("both")
|
|
29
|
+
]).default(DEFAULT_SKILL_REVIEW_TRIGGER),
|
|
26
30
|
reviewWakeInject: z.boolean().default(true),
|
|
27
31
|
skillReviewCompletionMinToolCalls: z.number().min(1).default(DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS)
|
|
28
32
|
});
|
|
@@ -495,6 +499,10 @@ function apply(ctx, rawConfig) {
|
|
|
495
499
|
turnStarts.clear();
|
|
496
500
|
cumulativeToolCalls.clear();
|
|
497
501
|
completionInjected.clear();
|
|
502
|
+
pendingCadenceReviews.clear();
|
|
503
|
+
pendingCadenceWarned.clear();
|
|
504
|
+
skipNextCadenceFire.clear();
|
|
505
|
+
cadenceResetWarned.clear();
|
|
498
506
|
}, "dsh-evolution-review.cleanup");
|
|
499
507
|
}
|
|
500
508
|
/** Completion-channel decision: task finished normally AND the session is proven long. */
|
package/lib/types/index.d.ts
CHANGED
|
@@ -29,7 +29,9 @@ export interface Config {
|
|
|
29
29
|
/** LLM provider for review subagents. Omit to inherit the deployment default route. */
|
|
30
30
|
reviewProvider?: string;
|
|
31
31
|
/** Skill-review trigger: cadence (interval) | completion (once after a proven-long task) | both. */
|
|
32
|
-
|
|
32
|
+
/** Which channel runs the end-of-conversation summary: the cadence latch
|
|
33
|
+
* ('cadence'), the long-session completion gate ('completion'), or both. */
|
|
34
|
+
skillReviewTrigger?: 'cadence' | 'completion' | 'both';
|
|
33
35
|
/** Cumulative session tool calls before a session counts as proven-long for the completion channel. */
|
|
34
36
|
skillReviewCompletionMinToolCalls?: number;
|
|
35
37
|
/** 0.3.40: deliver the deferred review with a WAKING inject for a summary 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.
|
|
4
|
+
"version": "0.3.44",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,9 +31,9 @@
|
|
|
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.
|
|
36
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.44",
|
|
35
|
+
"@lmzhen/dsh-evolution-core": "^0.3.44",
|
|
36
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.44"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
43
43
|
"@deepseek-ai/dsh-session": "^0.1.1-rc.2",
|
|
44
44
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
45
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
46
|
-
"@lmzhen/dsh-evolution-policy": "^0.3.
|
|
45
|
+
"@lmzhen/dsh-evolution-state": "^0.3.44",
|
|
46
|
+
"@lmzhen/dsh-evolution-policy": "^0.3.44"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@deepseek-ai/dsh-session-persistence": "^0.1.1-rc.2",
|
|
55
55
|
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.1-rc.2",
|
|
56
56
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
57
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
58
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
59
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
60
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
57
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.44",
|
|
58
|
+
"@lmzhen/dsh-evolution-core": "^0.3.44",
|
|
59
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.44",
|
|
60
|
+
"@lmzhen/dsh-evolution-state": "^0.3.44"
|
|
61
61
|
}
|
|
62
62
|
}
|