principles-disciple 2.2.11 → 2.2.13
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 +447 -442
- package/dist/core/config.d.ts +0 -2
- package/dist/core/trajectory.d.ts +0 -6
- package/dist/hooks/llm.d.ts +0 -1
- package/dist/hooks/prompt-helpers.d.ts +2 -1
- package/dist/hooks/raw-observation-adapter.d.ts +6 -4
- package/dist/hooks/triage-adapter.d.ts +1 -1
- package/dist/openclaw.plugin.json +1 -1
- package/dist/rulehost-evidence.js +52 -49
- package/dist/templates/pain_settings.json +0 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/templates/pain_settings.json +0 -2
- package/dist/core/detection-funnel.d.ts +0 -47
- package/dist/core/detection-service.d.ts +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.13",
|
|
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",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"compile-principles": "node scripts/compile-principles.mjs"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@principles/core": "^
|
|
79
|
-
"@principles/host-runtime": "^0.14.
|
|
78
|
+
"@principles/core": "^2.0.0",
|
|
79
|
+
"@principles/host-runtime": "^0.14.5",
|
|
80
80
|
"@types/better-sqlite3": "^9.6.0",
|
|
81
81
|
"@types/js-yaml": "^4.0.9",
|
|
82
82
|
"@types/micromatch": "^4.0.10",
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
"thresholds": {
|
|
4
4
|
"pain_trigger": 40,
|
|
5
5
|
"cognitive_paralysis_input": 4000,
|
|
6
|
-
"stuck_loops_trigger": 4,
|
|
7
6
|
"semantic_min_score": 0.7,
|
|
8
7
|
"promotion_count_threshold": 3,
|
|
9
8
|
"promotion_similarity_threshold": 0.8
|
|
10
9
|
},
|
|
11
10
|
"scores": {
|
|
12
|
-
"paralysis": 30,
|
|
13
11
|
"default_confusion": 30,
|
|
14
12
|
"default_loop": 40,
|
|
15
13
|
"tool_failure_friction": 15,
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detection Funnel — PRI-446 thin adapter
|
|
3
|
-
*
|
|
4
|
-
* The pure three-layer funnel logic (LRU cache, async queue, layer dispatch)
|
|
5
|
-
* now lives in principles-core
|
|
6
|
-
* (runtime-v2/detection/detection-funnel-policy.ts). This file is a thin shell
|
|
7
|
-
* that wires DetectionFunnelCore with the two environment-coupled dependencies
|
|
8
|
-
* the plugin owns:
|
|
9
|
-
* - crypto.createHash (the L2 cache key hasher)
|
|
10
|
-
* - PainDictionary.match (the L1 exact matcher)
|
|
11
|
-
* - shouldIgnorePainProtocolText (the protocol-token gate)
|
|
12
|
-
*
|
|
13
|
-
* It re-exports DetectionFunnel (same class name + constructor signature) and
|
|
14
|
-
* DetectionResult so DetectionService and llm.ts keep working
|
|
15
|
-
* unchanged.
|
|
16
|
-
*
|
|
17
|
-
* ERR checklist:
|
|
18
|
-
* - ERR-011: this is a thin adapter delegating to core pure logic.
|
|
19
|
-
*/
|
|
20
|
-
import { type PainDictionary } from './dictionary.js';
|
|
21
|
-
import { type DetectionResult } from '@principles/core/runtime-v2';
|
|
22
|
-
export type { DetectionResult };
|
|
23
|
-
/**
|
|
24
|
-
* Orchestrates the three-layer detection funnel for pain signals.
|
|
25
|
-
*
|
|
26
|
-
* Delegates to the core DetectionFunnelCore, injecting the crypto hasher,
|
|
27
|
-
* the dictionary matcher, and the protocol-token gate.
|
|
28
|
-
*/
|
|
29
|
-
export declare class DetectionFunnel {
|
|
30
|
-
private readonly core;
|
|
31
|
-
constructor(dictionary: PainDictionary);
|
|
32
|
-
/**
|
|
33
|
-
* Detects pain in the given text using L1 (Exact), L2 (Cache), and L3 (Async).
|
|
34
|
-
*/
|
|
35
|
-
detect(text: string): DetectionResult;
|
|
36
|
-
/**
|
|
37
|
-
* Internal method for the worker to update the cache after a semantic hit.
|
|
38
|
-
*/
|
|
39
|
-
updateCache(text: string, result: {
|
|
40
|
-
detected: boolean;
|
|
41
|
-
severity?: number;
|
|
42
|
-
}): void;
|
|
43
|
-
/**
|
|
44
|
-
* Retrieves and clears the current asynchronous queue.
|
|
45
|
-
*/
|
|
46
|
-
flushQueue(): string[];
|
|
47
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DetectionFunnel } from './detection-funnel.js';
|
|
2
|
-
/**
|
|
3
|
-
* Singleton service to manage the Semantic Detection Funnel.
|
|
4
|
-
*/
|
|
5
|
-
export declare const DetectionService: {
|
|
6
|
-
/**
|
|
7
|
-
* Gets or initializes the Detection Funnel instance.
|
|
8
|
-
* @param stateDir The directory used to initialize the dictionary.
|
|
9
|
-
*/
|
|
10
|
-
get(stateDir: string): DetectionFunnel;
|
|
11
|
-
/**
|
|
12
|
-
* Resets the singleton instance (primarily for testing).
|
|
13
|
-
*/
|
|
14
|
-
reset(): void;
|
|
15
|
-
};
|