principles-disciple 1.223.0 → 1.224.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.
- package/dist/bundle.js +505 -505
- package/dist/core/signal-collector-host.d.ts +11 -0
- package/dist/core/signal-keyword-store.d.ts +12 -35
- package/dist/governance-audit.js +106 -106
- package/dist/hooks/triage-adapter.d.ts +1 -1
- package/dist/openclaw.plugin.json +1 -1
- package/dist/rulehost-evidence.js +112 -112
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
|
@@ -87,9 +87,20 @@ export declare class SignalCollectorHost {
|
|
|
87
87
|
* 3. 按 strength 分流:STRONG → emitPainDetectedEvent;WEAK → trackFriction 累积 GFI;none → 仅记录
|
|
88
88
|
*/
|
|
89
89
|
private detectAsyncAndRoute;
|
|
90
|
+
/**
|
|
91
|
+
* Stable occurrence identity for correction dedup (ADR-0020 §11.4): the real
|
|
92
|
+
* per-session turn index when the caller supplies one (parity with
|
|
93
|
+
* recordUserTurn), otherwise a content-derived legacy fallback. The fallback
|
|
94
|
+
* is a degradation — never silent (rc-9).
|
|
95
|
+
*/
|
|
96
|
+
private resolveOccurrenceId;
|
|
90
97
|
/**
|
|
91
98
|
* STRONG 分流 → emitPainDetectedEvent (修断裂 ③)。
|
|
92
99
|
* 带 STRONG rate limit 门控 (spec §7.2):单 session 每小时上限 strongRateLimitPerHour。
|
|
100
|
+
*
|
|
101
|
+
* Codex Governance Closure Slice B 收敛 (ADR-0020 §11.4):pain id 走
|
|
102
|
+
* production-pain-evidence 的内容派生 canonicalization(同一 pain identity
|
|
103
|
+
* 权威),不再铸造随机 `correction_<traceId>`;trace id 降级为 correlation 字段。
|
|
93
104
|
*/
|
|
94
105
|
private routeStrong;
|
|
95
106
|
/**
|
|
@@ -1,41 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Live Signal Keyword Store —
|
|
3
|
-
* (MVP_CORE_LOOP_CONTRACT INV-01 §3 / P0-B)。
|
|
2
|
+
* Live Signal Keyword Store — OpenClaw delegation wrapper.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* 下一次 detectSync 即消费新词 (cache invalidation via stat mtime)。
|
|
13
|
-
* - empathy cue 不在 learner store 中(learner 是 correction-only),
|
|
14
|
-
* 以 seed overlay 保留,行为不变。
|
|
15
|
-
* - 3 个已证实的高精度纠正短语(不在 learner seed 集内)以 seed overlay
|
|
16
|
-
* 保留,高精度 deterministic path 不回退。
|
|
17
|
-
* - learned 词 weight ≥ HIGH_PRECISION_LEARNED_WEIGHT → precision 'high'
|
|
18
|
-
* (可确定性触发 STRONG);FP 权重衰减(×0.8)是自然降级机制。
|
|
4
|
+
* The store projection itself (learner JSON → UnifiedKeywordStore, mtime
|
|
5
|
+
* refresh, seed overlays) is host-neutral and was extracted to
|
|
6
|
+
* `@principles/host-runtime` `createSharedCorrectionKeywordStore` by Codex
|
|
7
|
+
* Governance Closure Slice B (PRI-623, SPEC §12) so OpenClaw and Codex detect
|
|
8
|
+
* through the SAME keyword store, rule version, and STRONG semantics. This
|
|
9
|
+
* module keeps the OpenClaw-facing signature (WorkspaceContext + SystemLogger)
|
|
10
|
+
* and re-exports the shared constants.
|
|
19
11
|
*/
|
|
20
|
-
import
|
|
12
|
+
import { HIGH_PRECISION_LEARNED_WEIGHT, HIGH_PRECISION_CORRECTION_OVERLAY, EMPATHY_SEED_OVERLAY } from '@principles/host-runtime';
|
|
21
13
|
import type { WorkspaceContext } from './workspace-context.js';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export declare const HIGH_PRECISION_LEARNED_WEIGHT = 0.7;
|
|
25
|
-
/** 高精度纠正短语 overlay(已验证的确定性 STRONG 路径,不属于 learner seed 集) */
|
|
26
|
-
export declare const HIGH_PRECISION_CORRECTION_OVERLAY: ReadonlyArray<readonly [string, number]>;
|
|
27
|
-
/** empathy seed overlay(检测行为不变) */
|
|
28
|
-
export declare const EMPATHY_SEED_OVERLAY: ReadonlyArray<readonly [string, number]>;
|
|
29
|
-
export interface LiveKeywordStore {
|
|
30
|
-
/** 每次检测调用:mtime 未变返回缓存,变了重载并返回新快照 */
|
|
31
|
-
resolve(): UnifiedKeywordStore;
|
|
32
|
-
/** 当前快照的观测元数据(测试/诊断用) */
|
|
33
|
-
stats(): {
|
|
34
|
-
totalTerms: number;
|
|
35
|
-
learnedTerms: number;
|
|
36
|
-
lastReloadedAt: string | null;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
14
|
+
export { HIGH_PRECISION_LEARNED_WEIGHT, HIGH_PRECISION_CORRECTION_OVERLAY, EMPATHY_SEED_OVERLAY, };
|
|
15
|
+
export type { SharedCorrectionKeywordStore as LiveKeywordStore } from '@principles/host-runtime';
|
|
39
16
|
export declare function createLiveSignalKeywordStore(wctx: WorkspaceContext, logger?: {
|
|
40
17
|
debug?: (msg: string) => void;
|
|
41
|
-
}):
|
|
18
|
+
}): import("@principles/host-runtime").SharedCorrectionKeywordStore;
|