principles-disciple 1.242.1 → 1.242.2
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 +434 -434
- package/dist/core/signal-collector-host.d.ts +10 -0
- package/dist/core/signal-health.d.ts +25 -0
- package/dist/openclaw.plugin.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -109,6 +109,16 @@ export declare class SignalCollectorHost {
|
|
|
109
109
|
* 语义覆盖由 G3 的词库扩充/earned 解锁承担。
|
|
110
110
|
*/
|
|
111
111
|
private queueUnconfirmedForBatch;
|
|
112
|
+
/** PRI-788 G4: 未经确认就消失的候选计数(旁路,失败不阻塞)。 */
|
|
113
|
+
private countStage2Dropped;
|
|
114
|
+
/**
|
|
115
|
+
* PRI-788 G4: stage1Strong 计数(旁路观测),刻意离开同步检测路径。
|
|
116
|
+
*
|
|
117
|
+
* `updateSignalHealth` 是同步 read-modify-write,直接放在 `detectSync` 里会让
|
|
118
|
+
* `before_prompt_build` 承担磁盘延迟。这里只触发计数,实际写入推迟到微任务
|
|
119
|
+
* 队列执行(写入本身仍在一个 tick 内同步完成,不会与其它写入交错)。
|
|
120
|
+
*/
|
|
121
|
+
private countStage1Strong;
|
|
112
122
|
/**
|
|
113
123
|
* PRI-788 G2: 批量确认一条持久化的待确认信号(CorrectionObserverService 每
|
|
114
124
|
* 周期调用)。用调用方提供的 classifier(每 cycle 新鲜解析)重新分类:
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface SignalHealthState {
|
|
2
|
+
/** 当日计数:跨日首写归零 */
|
|
3
|
+
stage1Strong: number;
|
|
4
|
+
stage2Confirmed: number;
|
|
5
|
+
stage2Queued: number;
|
|
6
|
+
stage2Dropped: number;
|
|
7
|
+
/** 最近一次刷新的队列深度(非计数) */
|
|
8
|
+
pendingCount: number;
|
|
9
|
+
lastStage2SuccessAt: string | null;
|
|
10
|
+
observerLastSuccessAt: string | null;
|
|
11
|
+
/** observer 周期连续失败次数(成功即归零) */
|
|
12
|
+
observerConsecutiveFailures: number;
|
|
13
|
+
/** 归零基准日(YYYY-MM-DD) */
|
|
14
|
+
day: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 读健康状态(doctor 用)。文件缺失/损坏返回 null,由读取方呈现 unknown。
|
|
19
|
+
*/
|
|
20
|
+
export declare function readSignalHealth(stateDir: string): SignalHealthState | null;
|
|
21
|
+
/**
|
|
22
|
+
* 原子更新健康状态。mutator 收到当前状态(已做跨日归零),就地修改后写回。
|
|
23
|
+
* 任何失败都不抛出——旁路观测不阻塞检测管线。
|
|
24
|
+
*/
|
|
25
|
+
export declare function updateSignalHealth(stateDir: string, mutate: (state: SignalHealthState) => void): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
|
-
"version": "1.242.
|
|
5
|
+
"version": "1.242.2",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
|
-
"version": "1.242.
|
|
5
|
+
"version": "1.242.2",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "1.242.
|
|
3
|
+
"version": "1.242.2",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|