principles-disciple 1.178.0 → 1.180.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.
@@ -68,7 +68,8 @@ export declare class SignalCollectorHost {
68
68
  * ★ 异步路径 (fire-and-forget)。
69
69
  *
70
70
  * 1. Stage2 LLM 确认 (后台,不阻塞用户)
71
- * 2. LLM 不可用 → 降级:丢弃 ambiguous 候选 (不触发 STRONG,避免误判泛滥)
71
+ * 2. LLM 不可用 → 降级:empathy ambiguous 候选作为 WEAK 信号路由(保留旧版 GFI 累积);
72
+ * correction ambiguous / 未命中候选丢弃(不触发 STRONG,避免误判泛滥)
72
73
  * 3. 按 strength 分流:STRONG → emitPainDetectedEvent;WEAK → trackFriction 累积 GFI;none → 仅记录
73
74
  */
74
75
  private detectAsyncAndRoute;
@@ -120,7 +120,8 @@ export class SignalCollectorHost {
120
120
  * ★ 异步路径 (fire-and-forget)。
121
121
  *
122
122
  * 1. Stage2 LLM 确认 (后台,不阻塞用户)
123
- * 2. LLM 不可用 → 降级:丢弃 ambiguous 候选 (不触发 STRONG,避免误判泛滥)
123
+ * 2. LLM 不可用 → 降级:empathy ambiguous 候选作为 WEAK 信号路由(保留旧版 GFI 累积);
124
+ * correction ambiguous / 未命中候选丢弃(不触发 STRONG,避免误判泛滥)
124
125
  * 3. 按 strength 分流:STRONG → emitPainDetectedEvent;WEAK → trackFriction 累积 GFI;none → 仅记录
125
126
  */
126
127
  async detectAsyncAndRoute(pending) {
@@ -145,9 +146,27 @@ export class SignalCollectorHost {
145
146
  }
146
147
  }
147
148
  else {
148
- // LLM 不可用 → 降级纯关键词:丢弃 ambiguous 候选 (不触发 STRONG,避免误判泛滥)
149
- // (Stage1 已对该候选标 needsLlmConfirmation=true isSignal=false,这里维持不触发)
150
- SystemLogger.log(this.wctx.workspaceDir, 'SIGNAL_LLM_DEGRADED', 'LLM unavailable, dropping ambiguous candidate (no STRONG trigger)');
149
+ // LLM 不可用 → 降级:empathy ambiguous 候选作为 WEAK 信号路由(累积 GFI,不触发 STRONG)
150
+ // 保留旧版 empathy keyword matcher 的 GFI 累积行为,避免 LLM 未配置(默认)
151
+ // empathy 检测完全失效。correction ambiguous 候选仍然丢弃(旧版 correction cue
152
+ // 不触发 trackFriction,仅 recordUserTurn,已在 detectSync 中完成)。
153
+ if (pending.output.matchedPrecision === 'ambiguous' && pending.output.matchedTerms.length > 0) {
154
+ const hasEmpathyMatch = pending.output.matchedTerms.some((term) => this.store.terms[term]?.category === 'empathy');
155
+ if (hasEmpathyMatch) {
156
+ SystemLogger.log(this.wctx.workspaceDir, 'SIGNAL_LLM_DEGRADED_WEAK', 'LLM unavailable, routing empathy ambiguous as WEAK (GFI accumulation, no STRONG trigger)');
157
+ const degradedOutput = {
158
+ ...pending.output,
159
+ isSignal: true,
160
+ type: 'empathy',
161
+ strength: 'WEAK',
162
+ detectionSource: 'keyword',
163
+ needsLlmConfirmation: false,
164
+ };
165
+ this.routeWeak(degradedOutput, pending.sessionId);
166
+ return;
167
+ }
168
+ }
169
+ SystemLogger.log(this.wctx.workspaceDir, 'SIGNAL_LLM_DEGRADED', 'LLM unavailable, dropping candidate (no STRONG trigger)');
151
170
  return;
152
171
  }
153
172
  // 3. 按 strength 分流
@@ -2,7 +2,7 @@
2
2
  "id": "principles-disciple",
3
3
  "name": "Principles Disciple",
4
4
  "description": "Evolutionary programming agent framework with strategic guardrails and reflection loops.",
5
- "version": "1.178.0",
5
+ "version": "1.180.0",
6
6
  "activation": {
7
7
  "onCapabilities": [
8
8
  "hook"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "principles-disciple",
3
- "version": "1.178.0",
3
+ "version": "1.180.0",
4
4
  "description": "Native OpenClaw plugin for Principles Disciple",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",