principles-disciple 1.245.2 → 2.0.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 +545 -528
- package/dist/governance-audit.js +211 -211
- package/dist/hooks/prompt-helpers.d.ts +10 -17
- package/dist/hooks/prompt-types.d.ts +1 -3
- package/dist/openclaw.plugin.json +1 -1
- package/dist/rulehost-evidence.js +221 -221
- package/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +8 -1
- package/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +15 -6
- package/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +17 -5
- package/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +5 -1
- package/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +11 -5
- package/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +12 -4
- package/dist/utils/retry.d.ts +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/templates/langs/en/skills/pd-cli-operator/SKILL.md +8 -1
- package/templates/langs/en/skills/pd-pain-signal/SKILL.md +15 -6
- package/templates/langs/en/skills/pd-runtime-v2/SKILL.md +17 -5
- package/templates/langs/zh/skills/pd-cli-operator/SKILL.md +5 -1
- package/templates/langs/zh/skills/pd-pain-signal/SKILL.md +11 -5
- package/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +12 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Extracted from hooks/prompt.ts per PRI-444. These functions contain NO I/O
|
|
5
5
|
* and NO side effects — they are independently unit-testable.
|
|
6
6
|
*
|
|
7
|
-
* I/O helpers (cachedReadFile, loadContextInjectionConfig
|
|
7
|
+
* I/O helpers (cachedReadFile, loadContextInjectionConfig)
|
|
8
8
|
* remain in prompt.ts because they depend on module-level cache state and fs.
|
|
9
9
|
*
|
|
10
10
|
* Pattern follows after-tool-call-helpers.ts (PRI-326): plugin-internal
|
|
@@ -25,8 +25,8 @@ import type { ExtractedUserMessage, CorePrincipleEntry, EvolutionPrincipleEntry,
|
|
|
25
25
|
* - Feishu wrapper format 2: "Conversation info (untrusted metadata): ```json {...}``` text"
|
|
26
26
|
* - Clean user message text
|
|
27
27
|
*
|
|
28
|
-
* Also detects
|
|
29
|
-
*
|
|
28
|
+
* Also detects agent-to-agent messages (so user-interaction-only injections —
|
|
29
|
+
* correction cues, behavioral constraints — are skipped for them).
|
|
30
30
|
*
|
|
31
31
|
* Pure logic — no I/O, no side effects.
|
|
32
32
|
*/
|
|
@@ -44,6 +44,13 @@ export declare function buildGovernanceContext(): string;
|
|
|
44
44
|
/**
|
|
45
45
|
* Build the empathy output restriction constraint text.
|
|
46
46
|
*
|
|
47
|
+
* Still live after PRI-819: PD's signal pipeline parses structured empathy
|
|
48
|
+
* markers (damageDetected / <empathy> tags) out of agent output as evidence.
|
|
49
|
+
* A main agent emitting them itself would corrupt that evidence channel, so
|
|
50
|
+
* normal output must keep them out. (PRI-819: the stale claim that "the
|
|
51
|
+
* empathy observer subagent" handles detection was removed — detection is
|
|
52
|
+
* owned by signal-collector-host / DetectionService.)
|
|
53
|
+
*
|
|
47
54
|
* Pure logic — returns a constant string.
|
|
48
55
|
*/
|
|
49
56
|
export declare function buildEmpathySilenceConstraint(): string;
|
|
@@ -89,17 +96,3 @@ export declare function formatEvolutionPrinciples(active: EvolutionPrincipleEntr
|
|
|
89
96
|
* @returns Assembled appendSystemContext (empty string if no parts)
|
|
90
97
|
*/
|
|
91
98
|
export declare function assembleAppendSystemContext(parts: AppendSystemContextParts): string;
|
|
92
|
-
/**
|
|
93
|
-
* Extracts short, distinct keyword phrases from an EmpathyObserver reason string.
|
|
94
|
-
*
|
|
95
|
-
* Used to feed newly detected expressions back into the keyword store, so the
|
|
96
|
-
* keyword-based fast path can catch them on future turns without re-running
|
|
97
|
-
* the more expensive observer.
|
|
98
|
-
*
|
|
99
|
-
* Pure function — no I/O, no side effects. Fully unit-testable.
|
|
100
|
-
*
|
|
101
|
-
* @param reason - observer's reason string (e.g., "用户表达了强烈的挫败感,提到反复尝试失败")
|
|
102
|
-
* @param lang - UI locale for minimum length threshold (zh=2 chars, en=3 chars)
|
|
103
|
-
* @returns deduplicated array of up to 3 candidate phrases
|
|
104
|
-
*/
|
|
105
|
-
export declare function extractPhrasesFromReason(reason: string, lang: 'zh' | 'en'): string[];
|
|
@@ -38,10 +38,8 @@ export interface PromptHookApi {
|
|
|
38
38
|
export interface ExtractedUserMessage {
|
|
39
39
|
/** Cleaned user message (empty string for boot checks). */
|
|
40
40
|
message: string;
|
|
41
|
-
/** True if the message appears to be from another agent (skip
|
|
41
|
+
/** True if the message appears to be from another agent (skip user-interaction-only injections). */
|
|
42
42
|
isAgentToAgent: boolean;
|
|
43
|
-
/** True if the message looks like empathy observer output (prevent recursion). */
|
|
44
|
-
isEmpathyPrompt: boolean;
|
|
45
43
|
}
|
|
46
44
|
/** Input for formatting core principles into prompt text. */
|
|
47
45
|
export interface CorePrincipleEntry {
|
|
@@ -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": "
|
|
5
|
+
"version": "2.0.0",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|