principles-disciple 1.222.1 → 1.222.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 +343 -343
- package/dist/hooks/gate-block-helper.d.ts +8 -1
- package/dist/hooks/gate.d.ts +22 -0
- package/dist/openclaw.plugin.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,14 @@ import type { PluginHookBeforeToolCallResult } from '../openclaw-sdk.js';
|
|
|
15
15
|
* Block context containing all information needed for block persistence
|
|
16
16
|
*/
|
|
17
17
|
export interface BlockContext {
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Target path. Nullable by contract (PRI-569 round 3): the shared
|
|
20
|
+
* host-runtime path may deny a call whose path cannot be normalized, and
|
|
21
|
+
* trajectory.db accepts a null file_path — a deny is always accounted,
|
|
22
|
+
* never dropped for lack of a path. Display-only contexts use
|
|
23
|
+
* `<unresolved>` via the caller-side displayPath coercion.
|
|
24
|
+
*/
|
|
25
|
+
filePath: string | null;
|
|
19
26
|
reason: string;
|
|
20
27
|
toolName: string;
|
|
21
28
|
sessionId?: string;
|
package/dist/hooks/gate.d.ts
CHANGED
|
@@ -42,3 +42,25 @@ export declare function handleSharedRuleHostResult(event: PluginHookBeforeToolCa
|
|
|
42
42
|
workspaceDir: string;
|
|
43
43
|
logger?: Partial<PluginLogger>;
|
|
44
44
|
}, result: HostEventResult): void;
|
|
45
|
+
/**
|
|
46
|
+
* Authoritative accounting for ONE shared-path deny decision (PRI-569).
|
|
47
|
+
*
|
|
48
|
+
* Both shared-handler deny branches (resolvable and unresolved target path)
|
|
49
|
+
* funnel here: receipt-ledger effect row (flag-gated, failure-degrading —
|
|
50
|
+
* parity with the legacy hook path) plus persistGateBlock (session GFI,
|
|
51
|
+
* EventLog gate_block, trajectory gate_blocks with bounded retry). A null
|
|
52
|
+
* filePath is accounted with a null trajectory file_path; the EventLog copy
|
|
53
|
+
* carries an '<unresolved>' placeholder. Never throws into the caller;
|
|
54
|
+
* every skip/failure warns with a reasonCode (rc-9).
|
|
55
|
+
*/
|
|
56
|
+
export declare function accountSharedDeny(wctx: WorkspaceContext, accounting: {
|
|
57
|
+
sessionId?: string;
|
|
58
|
+
toolName: string;
|
|
59
|
+
filePath: string | null;
|
|
60
|
+
reason: string;
|
|
61
|
+
ruleId?: string;
|
|
62
|
+
principleId?: string;
|
|
63
|
+
}, logger: {
|
|
64
|
+
warn?: (_message: string) => void;
|
|
65
|
+
error?: (_message: string) => void;
|
|
66
|
+
}): 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.222.
|
|
5
|
+
"version": "1.222.2",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onCapabilities": [
|
|
8
8
|
"hook"
|
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.222.
|
|
5
|
+
"version": "1.222.2",
|
|
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.222.
|
|
3
|
+
"version": "1.222.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",
|