dsh-continual-evolve 0.7.5 → 0.7.6

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 CHANGED
@@ -19,14 +19,14 @@ Agents accumulate reusable experience (repeated failures, durable facts, reusabl
19
19
 
20
20
  - **Three scopes** with merge semantics (global < project < local): **local** per-session staging, **project** per-workspace cross-session store, **global** cross-project — plus mechanical promotion guards so only portable, substantial, non-duplicate knowledge reaches global
21
21
  - **Typed one-fact memories**: every memory entry carries a recall type (`user | feedback | project | reference`); pitfalls (`feedback`) must include Why + How to apply
22
- - **Dedicated background memory agent**: when `autoReview: true`, eligible successful turns feed a bounded ZCode-style loop that searches the frozen memory manifest and proposes memory-only edits through a closed tool set; it cannot call agents, MCP, the network, or write source files. The generic review/planner/fate path is not run by this listener
22
+ - **Dedicated background memory agent**: eligible successful turns feed a bounded ZCode-style loop that searches the frozen memory manifest and proposes memory-only edits through a closed tool set; it cannot call agents, MCP, the network, or write source files. The generic review/planner/fate path is not run by this listener
23
23
  - **Deterministic rollback**: inverse edits generated from applied results — no LLM re-guessing
24
24
  - **Benchmark loop**: candidate refinements are evaluated against frozen cases by a separate scorer before acceptance (rubric encrypted at rest)
25
25
  - **Store hygiene**: `/evolve consolidate` turns write-time conflict hints and zero-use staleness into one approved, fully reversible batch of archives — with `merge`, near-duplicate content folds into the surviving original
26
26
 
27
27
  ## How it works
28
28
 
29
- 1. **Sediment** — the model creates entries via `evolve_add`, or (only when `autoReview: true`) the automatic Memory Agent consumes incremental snapshots after successful turns (plus compaction checkpoints). Generic review/planner remains manual unless separately invoked.
29
+ 1. **Sediment** — the model creates entries via `evolve_add`, or the automatic Memory Agent consumes incremental snapshots after successful turns. Generic review/planner remains manual unless separately invoked.
30
30
  2. **Capability-aware auxiliary calls** — the memory loop, review, planner, wrapup, and fate resolve exact provider/model metadata through [`src/llm-text.ts`](src/llm-text.ts), use the lowest advertised enabled reasoning effort (falling back to a closing effort only when no enabled level exists), and forward the host session id for provider routing; models without reasoning metadata use their provider default.
31
31
  3. **Guard** — code-enforced validation: edit schema, blast-radius/scope coherence, and the promotion policy (project-scoped markers, thin content, near-duplicate detection, credential screening keep the global store clean — secrets are rejected at every write sink, including mount materialization). Global creates that near-duplicate an existing entry are rejected at write time (≥0.8 similarity); moderate overlaps carry a `conflictHint` for later consolidation.
32
32
  4. **Approve** — global and project writes require explicit human approval; the dialog shows the bounded structured edit diff and conflict warnings, while malformed/lost responses remain retryable rather than counting as rejection.
@@ -79,14 +79,14 @@ Injection shape: prompt notes and delegation specs inject with content (≤6/kin
79
79
  | Key | Default | Meaning |
80
80
  |---|---|---|
81
81
  | `baseDir` | resolved DSH home | root for the `evolve/` stores |
82
- | `autoReview` | `false` | explicit opt-in for the dedicated Memory Agent listener; when true, generic review/planner/fate are not run |
82
+ | `autoReview` | `false` | initial Memory Agent default when no `evolve/runtime.json` exists yet; the listener is always registered, so this is not a registration gate |
83
83
  | `memoryMinUserWords` | `3` | ZCode-style minimum lexical words in one direct user text part; uses CJK-aware segmentation |
84
84
  | `reviewIntervalTurns` | `6` | legacy local-fate cadence fallback; successful-turn review no longer waits for this interval |
85
85
  | `maxReviewInputChars` | `40000` | trajectory slice handed to the gate |
86
86
  | `reviewBudgetTokens` | `4096` | output budget for the gate call |
87
87
  | `notifyOnAutoReview` | `true` | visible follow-up notice after an applied gate run |
88
88
  | `requireGlobalApproval` | `true` | global and project edits ask for explicit approval |
89
- | `localFate` | `false` | optional local-entry promote/archive fate assessment; requires `autoReview: true` and an explicit `localFate: true` |
89
+ | `localFate` | `false` | optional local-entry promote/archive fate assessment; unreachable while the listener runs memory-only, so it only affects direct/full callers |
90
90
  | `fateIntervalTurns` | follows `reviewIntervalTurns` | minimum turns between fate assessments |
91
91
  | `goalBlockedWrapupTurns` | `3` | consecutive blocked-goal gate runs trigger one fate assessment (`0` disables) |
92
92
  | `promotionBlockPatterns` | POSIX paths, session ids, `~/.dsh` | content matching these is project-scoped and never promoted to global |
@@ -112,23 +112,25 @@ Example profile patch:
112
112
  reviewIntervalTurns: 6
113
113
  ```
114
114
 
115
- Automatic evolution is an explicit source-level opt-in. With the default
116
- `autoReview: false`, the plugin does not register turn/compaction listeners.
117
- With `autoReview: true`, it registers only the dedicated Memory Agent listener;
118
- the generic review/planner, prompt/skill writes, and local-fate phases are not
119
- run automatically. The memory trigger follows ZCode's lightweight eligibility:
120
- direct user text must contain at least `memoryMinUserWords` lexical words
121
- (CJK-aware segmentation), while empty/internal/direct-memory-write snapshots
122
- are skipped; compaction does not add a separate memory-only trigger. Manual
123
- `evolve_*` tools and `/evolve` commands remain available. `/evolve pause`,
124
- `/evolve resume`, and `/evolve status` control or report the Memory Agent
125
- listener.
115
+ The Memory Agent listener is registered even when `autoReview` is `false` —
116
+ `autoReview` only supplies the initial default, so an install works without
117
+ editing the profile. Use `/evolve resume` to enable successful-turn snapshots
118
+ immediately, `/evolve pause` to suppress new snapshots and model work, and
119
+ `/evolve status` to inspect the configured default plus the current runtime
120
+ state. The runtime switch is stored in `evolve/runtime.json`; manual `evolve_*`
121
+ tools and `/evolve` commands are not paused. Only the Memory Agent runs
122
+ automatically: the generic review/planner, prompt/skill writes, and local-fate
123
+ phases are not reachable from this listener. The memory trigger follows ZCode's
124
+ lightweight eligibility: direct user text must contain at least
125
+ `memoryMinUserWords` lexical words (CJK-aware segmentation), while
126
+ empty/internal/direct-memory-write snapshots are skipped; compaction does not
127
+ add a separate memory-only trigger.
126
128
 
127
129
  ## Development
128
130
 
129
131
  ```bash
130
132
  pnpm install && pnpm build # deps + tsc -> lib/
131
- pnpm test # vitest (743 tests)
133
+ pnpm test # vitest (742 tests)
132
134
  pnpm test:coverage # v8 coverage, thresholds enforced in CI
133
135
  pnpm lint # oxlint src test
134
136
  ```
@@ -137,7 +139,7 @@ Project layout:
137
139
 
138
140
  ```
139
141
  ├── src/ # engine, tools, commands, memory agent, gate, fate, benchmark, injection + token usage…
140
- ├── test/ # vitest suites (45 files)
142
+ ├── test/ # vitest suites (44 files)
141
143
  ├── lib/ # build output (tsc)
142
144
  ├── docs/
143
145
  │ ├── design.md # full design doc (hardening matrix)
package/README.zh.md CHANGED
@@ -19,14 +19,14 @@ Agent 在每个会话里积累可复用经验(重复失败、持久事实、
19
19
 
20
20
  - **三作用域**与合并语义(global < project < local):**local** 本会话暂存、**project** 本项目跨会话库、**global** 跨项目——配合机械化晋升守卫,只有可携带、有分量、非重复的知识才能进全局
21
21
  - **类型化单条记忆**:每条 memory 带召回类型(`user | feedback | project | reference`);踩坑(`feedback`)必须含 Why + How to apply
22
- - **专用后台记忆 Agent**:`autoReview: true` 时,成功回合通过机械 eligibility 后才有界 ZCode 式 loop 检索冻结的 memory manifest,并经闭集工具提出纯 memory 编辑;不能调用 Agent、MCP、网络,也不能写源码。该 listener 不运行通用 review/planner/fate
22
+ - **专用后台记忆 Agent**:成功回合通过机械 eligibility 后,有界 ZCode 式 loop 检索冻结的 memory manifest,并经闭集工具提出纯 memory 编辑;不能调用 Agent、MCP、网络,也不能写源码。该 listener 不运行通用 review/planner/fate
23
23
  - **确定性回滚**:逆操作编辑由已应用结果生成——不靠 LLM 重新猜测
24
24
  - **benchmark 闭环**:候选沉淀先经冻结用例 + 独立评分者评估再接受(rubric 加密落盘)
25
25
  - **store 卫生**:`/evolve consolidate` 把写入时冲突提示与零使用陈旧条目变成一次批准、完全可逆的批量归档——加 `merge` 可将近重复内容并入幸存原条目
26
26
 
27
27
  ## 工作原理
28
28
 
29
- 1. **沉淀**——模型经 `evolve_add` 创建条目,或仅在 `autoReview: true` 时由专用 Memory Agent 消费成功回合后的增量 snapshot(以及压缩检查点)。通用 review/planner 保持手动,除非另行显式调用。
29
+ 1. **沉淀**——模型经 `evolve_add` 创建条目,或由专用 Memory Agent 消费成功回合后的增量 snapshot。通用 review/planner 保持手动,除非另行显式调用。
30
30
  2. **能力感知的辅助调用**——memory loop、review、planner、wrapup、fate 通过 [`src/llm-text.ts`](src/llm-text.ts) 解析精确 provider/model 能力并使用模型公布的最低开启 reasoning effort,同时转发 host session id 供 provider 路由;只有没有开启档时才回退关闭档,没有 reasoning 元数据时使用 provider 默认行为。
31
31
  3. **守卫**——代码强制校验:编辑 schema、blast-radius 与作用域一致性、晋升政策(项目专属标记 / 过薄内容 / 近似重复检测 / 凭据筛查保持全局库干净——密钥类内容在所有写入出口被拒,含 mount 物化)。全局 create 与既有条目高度相似(≥0.8)时写入即拒;中等重叠带 `conflictHint` 供后续合并。
32
32
  4. **审批**——全局与项目写入需明确人工批准;弹窗展示有界结构化编辑 diff 与冲突提示,弹窗丢失/响应畸形会重试,不会被误记为拒绝。
@@ -79,14 +79,14 @@ dsh plugin add ZK-Andy/dsh-continual-evolve
79
79
  | 键 | 默认 | 含义 |
80
80
  |---|---|---|
81
81
  | `baseDir` | 解析后的 DSH home | `evolve/` 存储根目录 |
82
- | `autoReview` | `false` | 专用 Memory Agent listener 的显式 opt-in;为 true 时也不会自动运行通用 review/planner/fate |
82
+ | `autoReview` | `false` | 没有 `evolve/runtime.json` 时 Memory Agent 的初始默认;监听器始终注册,因此它不是注册门 |
83
83
  | `memoryMinUserWords` | `3` | ZCode 风格:单个直接用户文本至少包含的词数;使用 CJK 分词 |
84
84
  | `reviewIntervalTurns` | `6` | local-fate 的兼容节奏;成功回合 review 不再等待这个间隔 |
85
85
  | `maxReviewInputChars` | `40000` | 交给门禁的轨迹切片 |
86
86
  | `reviewBudgetTokens` | `4096` | 门禁调用输出预算 |
87
87
  | `notifyOnAutoReview` | `true` | 门禁应用后发可见跟进通知 |
88
88
  | `requireGlobalApproval` | `true` | 全局与项目写入需明确批准 |
89
- | `localFate` | `false` | 可选的本地条目晋升/归档 fate 评估;需要同时设置 `autoReview: true` 与显式 `localFate: true` |
89
+ | `localFate` | `false` | 可选的本地条目晋升/归档 fate 评估;listener 以 memory-only 运行时不可达,只对直接/完整调用者生效 |
90
90
  | `fateIntervalTurns` | 跟随 `reviewIntervalTurns` | 归宿评估的最小回合间隔 |
91
91
  | `goalBlockedWrapupTurns` | `3` | 连续阻塞目标的门禁轮数触发一次归宿评估(`0` 关闭) |
92
92
  | `promotionBlockPatterns` | POSIX 路径、session id、`~/.dsh` | 内容命中即判定项目专属,永不晋升全局 |
@@ -112,13 +112,13 @@ profile patch 示例:
112
112
  reviewIntervalTurns: 6
113
113
  ```
114
114
 
115
- 自动进化是项目源码层面的显式 opt-in。默认 `autoReview: false` 时,插件不注册回合/压缩监听器。设置 `autoReview: true` 时只注册专用 Memory Agent listener,不自动运行通用 review/planner、prompt/skill 写入或 local fate。Memory 触发采用 ZCode 的轻量 eligibility:单个直接用户文本至少包含 `memoryMinUserWords` 个词(使用 CJK 分词);空增量、内部 Agent、直接 memory 写入会跳过,压缩不会额外触发 memory-only 管线。手动 `evolve_*` 工具和 `/evolve` 命令仍可用;`/evolve pause`、`/evolve resume`、`/evolve status` 控制或报告 Memory Agent listener。
115
+ 即使 `autoReview` 为 `false`,Memory Agent 监听器也会注册——`autoReview` 只提供初始默认值,装完即用,无需改 profile。使用 `/evolve resume` 立即开启成功回合 snapshot,使用 `/evolve pause` 抑制新 snapshot 与模型调用,使用 `/evolve status` 查看配置默认值与运行时状态。开关保存在 `evolve/runtime.json`;手动 `evolve_*` 工具和 `/evolve` 命令不受暂停影响。自动运行只有 Memory Agent:通用 review/planner、prompt/skill 写入与 local fate 都不由该 listener 触达。Memory 触发采用 ZCode 的轻量 eligibility:单个直接用户文本至少包含 `memoryMinUserWords` 个词(使用 CJK 分词);空增量、内部 Agent、直接 memory 写入会跳过,压缩不会额外触发 memory-only 管线。
116
116
 
117
117
  ## 开发
118
118
 
119
119
  ```bash
120
120
  pnpm install && pnpm build # 依赖 + tsc -> lib/
121
- pnpm test # vitest(743 例)
121
+ pnpm test # vitest(742 例)
122
122
  pnpm test:coverage # v8 覆盖率,CI 强制阈值
123
123
  pnpm lint # oxlint src test
124
124
  ```
@@ -127,7 +127,7 @@ pnpm lint # oxlint src test
127
127
 
128
128
  ```
129
129
  ├── src/ # 引擎、工具、命令、memory Agent、门禁、fate、benchmark、注入 + token 用量…
130
- ├── test/ # vitest 测试套件(45 个文件)
130
+ ├── test/ # vitest 测试套件(44 个文件)
131
131
  ├── lib/ # 构建产物(tsc)
132
132
  ├── docs/
133
133
  │ ├── design.md # 完整设计文档(硬化矩阵)
package/lib/command.d.ts CHANGED
@@ -17,10 +17,11 @@ export interface CommandRuntimeOptions {
17
17
  autoCase: boolean;
18
18
  /** Mechanical promotion guards for wrapup/fate (2026-08-22 policy). */
19
19
  promotionPolicy: PromotionPolicy;
20
- /** Explicit source-level opt-in for the automatic listener. `false` means no wiring. */
20
+ /**
21
+ * Initial Memory Agent default from plugin config. The listener is always
22
+ * registered; this is not a registration gate.
23
+ */
21
24
  autoReview?: boolean;
22
- /** The automatic listener runs only the dedicated Memory Agent. */
23
- memoryOnly?: boolean;
24
25
  }
25
26
  export declare function registerEvolveCommand(ctx: Context, engine: EvolutionEngine, opts: CommandGateOptions, runtime: CommandRuntimeOptions): void;
26
27
  /**
package/lib/command.js CHANGED
@@ -376,10 +376,6 @@ async function executeEvolveCommand(ctx, engine, invocation, opts, runtime) {
376
376
  }
377
377
  case "pause":
378
378
  case "resume": {
379
- if (runtime.autoReview === false) {
380
- return success("automatic evolution wiring is disabled by project policy; no automatic Memory Agent listener is registered. Manual evolve_* tools and /evolve commands keep working.");
381
- }
382
- const memoryOnly = runtime.memoryOnly !== false;
383
379
  // The switch is independent of the static registration flag. A
384
380
  // resume explicitly enables the Memory Agent; a pause leaves the
385
381
  // enable bit intact so status explains the paused state.
@@ -390,7 +386,7 @@ async function executeEvolveCommand(ctx, engine, invocation, opts, runtime) {
390
386
  return success("automatic Memory Agent is already paused (no change).");
391
387
  }
392
388
  if (!pausing && current.enabled && !current.paused) {
393
- return success(memoryOnly ? "automatic Memory Agent is already running (no change)." : "automatic evolution is already running (no change).");
389
+ return success("automatic Memory Agent is already running (no change).");
394
390
  }
395
391
  saveGateRuntime(engine.baseDir, pausing, pausing ? current.enabled : true);
396
392
  return success(pausing
@@ -468,16 +464,12 @@ function demoteEntry(engine, id, sessionId, projectKey) {
468
464
  function renderGateStatus(engine, sessionId, projectKey, runtime) {
469
465
  const configuredDefault = runtime.autoReview === undefined ? "unknown" : runtime.autoReview ? "on" : "off";
470
466
  const current = loadGateRuntime(engine.baseDir, runtime.autoReview ?? false);
471
- const memoryOnly = runtime.memoryOnly !== false;
472
- const effective = runtime.autoReview === false
473
- ? "disabled by project policy"
474
- : current.paused
475
- ? "PAUSED (resume with /evolve resume)"
476
- : current.enabled
477
- ? memoryOnly ? "Memory Agent running" : "running"
478
- : memoryOnly ? "Memory Agent off (enable with /evolve resume)" : "off (enable with /evolve resume)";
479
- const listener = runtime.autoReview === false ? "not wired" : memoryOnly ? "Memory Agent-only listener registered" : "listener registered";
480
- const gateLine = `gate: ${listener} · config default ${configuredDefault} · runtime ${effective}`;
467
+ const effective = current.paused
468
+ ? "PAUSED (resume with /evolve resume)"
469
+ : current.enabled
470
+ ? "Memory Agent running"
471
+ : "Memory Agent off (enable with /evolve resume)";
472
+ const gateLine = `gate: Memory Agent-only listener registered · config default ${configuredDefault} · runtime ${effective}`;
481
473
  const countEntries = (state) => Object.values(state.entries).reduce((n, byKind) => n + Object.keys(byKind).length, 0);
482
474
  const lines = [gateLine];
483
475
  lines.push(`stores: global ${countEntries(engine.load("global", undefined))} entries · local(${sessionId}) ${countEntries(engine.load("local", sessionId))} entries`);
package/lib/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
10
10
  baseDir: z<string, string, "plain">;
11
11
  /** System-prompt section order for the evolution guidance. */
12
12
  sectionOrder: z<number, number, "defined">;
13
- /** Explicit opt-in for the dedicated Memory Agent listener (off by default). */
13
+ /** Initial Memory Agent default when no `evolve/runtime.json` exists; not a registration gate. */
14
14
  autoReview: z<boolean, boolean, "defined">;
15
15
  /** ZCode-style minimum lexical words in one direct user text part. */
16
16
  memoryMinUserWords: z<number, number, "defined">;
@@ -110,7 +110,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
110
110
  baseDir: z<string, string, "plain">;
111
111
  /** System-prompt section order for the evolution guidance. */
112
112
  sectionOrder: z<number, number, "defined">;
113
- /** Explicit opt-in for the dedicated Memory Agent listener (off by default). */
113
+ /** Initial Memory Agent default when no `evolve/runtime.json` exists; not a registration gate. */
114
114
  autoReview: z<boolean, boolean, "defined">;
115
115
  /** ZCode-style minimum lexical words in one direct user text part. */
116
116
  memoryMinUserWords: z<number, number, "defined">;
@@ -215,7 +215,5 @@ export interface EvolutionService {
215
215
  readonly engine: EvolutionEngine;
216
216
  readonly baseDir: string;
217
217
  }
218
- /** True only when the project explicitly opts into automatic evolution wiring. */
219
- export declare function automaticEvolutionWired(config: Pick<EvolveConfig, "autoReview">): boolean;
220
218
  export declare function apply(ctx: Context, config: EvolveConfig): void;
221
219
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -3,10 +3,11 @@
3
3
  *
4
4
  * Mounts the evolution engine, registers the model-facing evolve_* tools,
5
5
  * the human-facing /evolve command, the system-prompt guidance section, and
6
- * (only under an explicit `autoReview: true` opt-in) the dedicated Memory
7
- * Agent listener. With the default `autoReview: false`, the automatic
8
- * turn/compaction listeners are not registered; manual tools and commands
9
- * remain available.
6
+ * the dedicated Memory Agent listener. The listener is always registered so
7
+ * an install works without profile edits; `autoReview` only supplies the
8
+ * initial default when `evolve/runtime.json` does not exist yet, and
9
+ * `/evolve pause|resume` own it afterwards. Generic review/planner/fate are
10
+ * not reachable from this listener.
10
11
  */
11
12
  import { join } from "node:path";
12
13
  import z from "@deepseek-ai/schemastery";
@@ -30,7 +31,7 @@ export const Config = z.object({
30
31
  baseDir: z.string(),
31
32
  /** System-prompt section order for the evolution guidance. */
32
33
  sectionOrder: z.natural().default(118),
33
- /** Explicit opt-in for the dedicated Memory Agent listener (off by default). */
34
+ /** Initial Memory Agent default when no `evolve/runtime.json` exists; not a registration gate. */
34
35
  autoReview: z.boolean().default(false),
35
36
  /** ZCode-style minimum lexical words in one direct user text part. */
36
37
  memoryMinUserWords: z.natural().default(3),
@@ -121,10 +122,6 @@ export const Config = z.object({
121
122
  tokenUsage: z.natural(),
122
123
  }),
123
124
  });
124
- /** True only when the project explicitly opts into automatic evolution wiring. */
125
- export function automaticEvolutionWired(config) {
126
- return config.autoReview === true;
127
- }
128
125
  export function apply(ctx, config) {
129
126
  const baseDir = resolveDshHome(config.baseDir);
130
127
  const skillsRoot = config.skillsDir ? expandHomePath(config.skillsDir) : join(baseDir, "skills");
@@ -171,7 +168,6 @@ export function apply(ctx, config) {
171
168
  autoCase: config.autoCase ?? true,
172
169
  promotionPolicy,
173
170
  autoReview: config.autoReview ?? false,
174
- memoryOnly: config.autoReview === true,
175
171
  });
176
172
  // Plugin-owned file logging: every cordis log message lands in
177
173
  // <baseDir>/evolve/plugin.log regardless of how dsh web was launched —
@@ -186,36 +182,32 @@ export function apply(ctx, config) {
186
182
  void restoreMounted(ctx, baseDir).catch((cause) => {
187
183
  ctx.logger("continual-evolve").warn(`mount restore failed: ${cause instanceof Error ? cause.message : String(cause)}`);
188
184
  });
189
- // `autoReview` is an explicit opt-in for the dedicated Memory Agent only.
190
- // The general review/planner, prompt/skill writes, and local-fate phases
191
- // are not reachable from this listener. Manual tools and commands remain
192
- // available below.
193
- if (automaticEvolutionWired(config)) {
194
- registerAutoReview(ctx, engine, {
195
- intervalTurns: config.reviewIntervalTurns ?? 6,
196
- enabledByDefault: true,
197
- memoryOnly: true,
198
- memoryMinUserWords: config.memoryMinUserWords ?? 3,
199
- maxInputChars: config.maxReviewInputChars ?? 40000,
200
- budgetTokens: config.reviewBudgetTokens ?? 4096,
201
- notifyOnAutoReview: config.notifyOnAutoReview ?? true,
202
- localFate: config.localFate ?? false,
203
- fateIntervalTurns: config.fateIntervalTurns ?? config.reviewIntervalTurns ?? 6,
204
- goalBlockedWrapupTurns: config.goalBlockedWrapupTurns ?? 3,
205
- promotionPolicy,
206
- autoCase: config.autoCase ?? true,
207
- rubricKey,
208
- ...(config.historyRetain?.reviews !== undefined ? { reviewsRetain: config.historyRetain.reviews } : {}),
209
- ...(config.reviewModel ? { reviewModel: config.reviewModel } : {}),
210
- requireGlobalApproval: config.requireGlobalApproval ?? true,
211
- ...(config.plannerPrefixCache ? { prefixCacheMode: config.plannerPrefixCache } : {}),
212
- ...(config.plannerPrefixMaxChars !== undefined ? { prefixMaxChars: config.plannerPrefixMaxChars } : {}),
213
- });
214
- ctx.logger("continual-evolve").info("continual-evolve automatic listener registered (Memory Agent only; generic review/planner/fate disconnected)");
215
- }
216
- else {
217
- ctx.logger("continual-evolve").info("continual-evolve automatic evolution wiring disabled (autoReview is not explicitly true; manual tools and commands remain available)");
218
- }
185
+ // The Memory Agent listener is always registered: an install must work
186
+ // without profile edits, so `autoReview` is only the initial default when
187
+ // no `evolve/runtime.json` exists yet — `/evolve pause|resume` own the
188
+ // switch afterwards. The general review/planner, prompt/skill writes, and
189
+ // local-fate phases are not reachable from this listener.
190
+ registerAutoReview(ctx, engine, {
191
+ intervalTurns: config.reviewIntervalTurns ?? 6,
192
+ enabledByDefault: config.autoReview ?? false,
193
+ memoryOnly: true,
194
+ memoryMinUserWords: config.memoryMinUserWords ?? 3,
195
+ maxInputChars: config.maxReviewInputChars ?? 40000,
196
+ budgetTokens: config.reviewBudgetTokens ?? 4096,
197
+ notifyOnAutoReview: config.notifyOnAutoReview ?? true,
198
+ localFate: config.localFate ?? false,
199
+ fateIntervalTurns: config.fateIntervalTurns ?? config.reviewIntervalTurns ?? 6,
200
+ goalBlockedWrapupTurns: config.goalBlockedWrapupTurns ?? 3,
201
+ promotionPolicy,
202
+ autoCase: config.autoCase ?? true,
203
+ rubricKey,
204
+ ...(config.historyRetain?.reviews !== undefined ? { reviewsRetain: config.historyRetain.reviews } : {}),
205
+ ...(config.reviewModel ? { reviewModel: config.reviewModel } : {}),
206
+ requireGlobalApproval: config.requireGlobalApproval ?? true,
207
+ ...(config.plannerPrefixCache ? { prefixCacheMode: config.plannerPrefixCache } : {}),
208
+ ...(config.plannerPrefixMaxChars !== undefined ? { prefixMaxChars: config.plannerPrefixMaxChars } : {}),
209
+ });
210
+ ctx.logger("continual-evolve").info("continual-evolve automatic listener registered (Memory Agent only; generic review/planner/fate disconnected)");
219
211
  ctx.logger("continual-evolve").info(`continual-evolve mounted (baseDir=${baseDir})`);
220
212
  }
221
213
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-continual-evolve",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "Continual self-evolution plugin for DeepSeek Harness: versioned, auditable, rollback-safe harness state (prompt notes, memories, skills, subagent specs) refined from session trajectories.",
5
5
  "license": "MIT",
6
6
  "repository": {