create-principles-disciple 1.147.5 → 1.147.6

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.
Files changed (167) hide show
  1. package/_release/product-identity.json +1 -1
  2. package/codex-adapter/package.json +1 -1
  3. package/console/dist/server/models/HealthCheckModel.d.ts +0 -1
  4. package/console/dist/server/models/HealthCheckModel.js +0 -54
  5. package/console/dist/server/types/index.d.ts +1 -9
  6. package/console/dist/web/assets/app.js +18 -18
  7. package/core/dist/index.d.ts +1 -1
  8. package/core/dist/index.d.ts.map +1 -1
  9. package/core/dist/index.js +1 -1
  10. package/core/dist/index.js.map +1 -1
  11. package/core/dist/prompt-builder/index.d.ts +0 -1
  12. package/core/dist/prompt-builder/index.d.ts.map +1 -1
  13. package/core/dist/prompt-builder/index.js +0 -1
  14. package/core/dist/prompt-builder/index.js.map +1 -1
  15. package/core/dist/runtime-v2/adapter/output-schema-registry.js +2 -2
  16. package/core/dist/runtime-v2/control-plane-triage.d.ts +1 -1
  17. package/core/dist/runtime-v2/control-plane-triage.d.ts.map +1 -1
  18. package/core/dist/runtime-v2/control-plane-triage.js +0 -15
  19. package/core/dist/runtime-v2/control-plane-triage.js.map +1 -1
  20. package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts +3 -6
  21. package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts.map +1 -1
  22. package/core/dist/runtime-v2/evidence-triage/observation-resolver.js +5 -10
  23. package/core/dist/runtime-v2/evidence-triage/observation-resolver.js.map +1 -1
  24. package/core/dist/runtime-v2/evidence-triage/source-descriptors.d.ts +2 -1
  25. package/core/dist/runtime-v2/evidence-triage/source-descriptors.d.ts.map +1 -1
  26. package/core/dist/runtime-v2/evidence-triage/source-descriptors.js +3 -8
  27. package/core/dist/runtime-v2/evidence-triage/source-descriptors.js.map +1 -1
  28. package/core/dist/runtime-v2/evidence-triage/types.d.ts +1 -1
  29. package/core/dist/runtime-v2/evidence-triage/types.d.ts.map +1 -1
  30. package/core/dist/runtime-v2/evidence-triage/types.js +0 -1
  31. package/core/dist/runtime-v2/evidence-triage/types.js.map +1 -1
  32. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  33. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +4 -1
  34. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  35. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
  36. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +3 -8
  37. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
  38. package/core/dist/runtime-v2/golden-trace.d.ts.map +1 -1
  39. package/core/dist/runtime-v2/golden-trace.js +0 -1
  40. package/core/dist/runtime-v2/golden-trace.js.map +1 -1
  41. package/core/dist/runtime-v2/index.d.ts +5 -9
  42. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  43. package/core/dist/runtime-v2/index.js +4 -8
  44. package/core/dist/runtime-v2/index.js.map +1 -1
  45. package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts +0 -1
  46. package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts.map +1 -1
  47. package/core/dist/runtime-v2/operator-health-read-model.d.ts +0 -2
  48. package/core/dist/runtime-v2/operator-health-read-model.d.ts.map +1 -1
  49. package/core/dist/runtime-v2/operator-health-read-model.js +1 -55
  50. package/core/dist/runtime-v2/operator-health-read-model.js.map +1 -1
  51. package/core/dist/runtime-v2/signal-collector/confidence-gate.d.ts +1 -5
  52. package/core/dist/runtime-v2/signal-collector/confidence-gate.d.ts.map +1 -1
  53. package/core/dist/runtime-v2/signal-collector/confidence-gate.js +0 -9
  54. package/core/dist/runtime-v2/signal-collector/confidence-gate.js.map +1 -1
  55. package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts +2 -2
  56. package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts.map +1 -1
  57. package/core/dist/runtime-v2/signal-collector/keyword-stage.js +6 -10
  58. package/core/dist/runtime-v2/signal-collector/keyword-stage.js.map +1 -1
  59. package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts +1 -1
  60. package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts.map +1 -1
  61. package/core/dist/runtime-v2/signal-collector/llm-stage.js +3 -4
  62. package/core/dist/runtime-v2/signal-collector/llm-stage.js.map +1 -1
  63. package/core/dist/runtime-v2/signal-collector/signal-collector.js +4 -4
  64. package/core/dist/runtime-v2/signal-collector/signal-collector.js.map +1 -1
  65. package/core/dist/runtime-v2/signal-collector/types.d.ts +6 -8
  66. package/core/dist/runtime-v2/signal-collector/types.d.ts.map +1 -1
  67. package/core/dist/runtime-v2/signal-collector/types.js +6 -6
  68. package/core/dist/runtime-v2/signal-collector/types.js.map +1 -1
  69. package/core/dist/runtime-v2/trajectory-schema.d.ts +24 -4
  70. package/core/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
  71. package/core/dist/runtime-v2/trajectory-schema.js +58 -2
  72. package/core/dist/runtime-v2/trajectory-schema.js.map +1 -1
  73. package/core/dist/runtime-v2/types/event-types.d.ts +0 -35
  74. package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
  75. package/core/dist/runtime-v2/types/event-types.js +0 -19
  76. package/core/dist/runtime-v2/types/event-types.js.map +1 -1
  77. package/core/dist/runtime-v2/types/index.d.ts +2 -2
  78. package/core/dist/runtime-v2/types/index.d.ts.map +1 -1
  79. package/core/dist/runtime-v2/types/index.js +1 -1
  80. package/core/dist/runtime-v2/types/index.js.map +1 -1
  81. package/core/dist/trajectory-types.d.ts +0 -2
  82. package/core/dist/trajectory-types.d.ts.map +1 -1
  83. package/core/package.json +1 -1
  84. package/dist/mvp-config.d.ts +2 -2
  85. package/dist/mvp-config.d.ts.map +1 -1
  86. package/dist/mvp-config.js +4 -2
  87. package/dist/mvp-config.js.map +1 -1
  88. package/host-runtime/dist/governance-signal-admission.d.ts +0 -2
  89. package/host-runtime/dist/governance-signal-admission.js +14 -15
  90. package/host-runtime/dist/production-pain-evidence.d.ts +1 -1
  91. package/host-runtime/dist/production-pain-evidence.js +42 -7
  92. package/host-runtime/dist/production-rulehost-gate.d.ts +0 -1
  93. package/host-runtime/dist/production-rulehost-gate.js +3 -4
  94. package/host-runtime/dist/signal-classifier.d.ts +8 -0
  95. package/host-runtime/dist/signal-classifier.js +10 -2
  96. package/host-runtime/package.json +1 -1
  97. package/package.json +3 -3
  98. package/pd-cli/dist/commands/pain-evidence.d.ts +2 -4
  99. package/pd-cli/dist/commands/pain-evidence.d.ts.map +1 -1
  100. package/pd-cli/dist/commands/pain-evidence.js +2 -4
  101. package/pd-cli/dist/commands/pain-evidence.js.map +1 -1
  102. package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -1
  103. package/pd-cli/dist/commands/runtime-canary.js +2 -68
  104. package/pd-cli/dist/commands/runtime-canary.js.map +1 -1
  105. package/pd-cli/dist/commands/runtime-diagnostics-export.d.ts.map +1 -1
  106. package/pd-cli/dist/commands/runtime-diagnostics-export.js +1 -25
  107. package/pd-cli/dist/commands/runtime-diagnostics-export.js.map +1 -1
  108. package/pd-cli/dist/commands/runtime-health-snapshot.d.ts.map +1 -1
  109. package/pd-cli/dist/commands/runtime-health-snapshot.js +0 -9
  110. package/pd-cli/dist/commands/runtime-health-snapshot.js.map +1 -1
  111. package/pd-cli/dist/index.js +0 -9
  112. package/pd-cli/dist/index.js.map +1 -1
  113. package/pd-mcp-server/dist/version.d.ts +1 -1
  114. package/pd-mcp-server/dist/version.js +1 -1
  115. package/pd-mcp-server/package.json +1 -1
  116. package/plugin/dist/bundle.js +492 -481
  117. package/plugin/dist/config/defaults/runtime.d.ts +0 -4
  118. package/plugin/dist/core/config.d.ts +0 -35
  119. package/plugin/dist/core/pain.d.ts +0 -1
  120. package/plugin/dist/core/session-tracker.d.ts +3 -51
  121. package/plugin/dist/core/signal-collector-host.d.ts +5 -13
  122. package/plugin/dist/core/signal-keyword-store.d.ts +2 -2
  123. package/plugin/dist/core/trajectory.d.ts +0 -2
  124. package/plugin/dist/governance-audit.js +2 -2
  125. package/plugin/dist/hooks/after-tool-call-helpers.d.ts +5 -12
  126. package/plugin/dist/hooks/after-tool-call-types.d.ts +0 -2
  127. package/plugin/dist/hooks/gate-block-helper.d.ts +1 -1
  128. package/plugin/dist/hooks/gate.d.ts +3 -4
  129. package/plugin/dist/hooks/pain.d.ts +4 -4
  130. package/plugin/dist/openclaw.plugin.json +1 -1
  131. package/plugin/dist/rulehost-evidence.js +45 -45
  132. package/plugin/dist/templates/pain_settings.json +0 -46
  133. package/plugin/dist/types/event-types.d.ts +1 -1
  134. package/plugin/openclaw.plugin.json +1 -1
  135. package/plugin/package.json +1 -1
  136. package/plugin/templates/pain_settings.json +0 -46
  137. package/release-manager/dist/mvp-config.js +4 -2
  138. package/release-manager/package.json +1 -1
  139. package/workbuddy-adapter/package.json +1 -1
  140. package/core/dist/prompt-builder/attitude-directive.d.ts +0 -7
  141. package/core/dist/prompt-builder/attitude-directive.d.ts.map +0 -1
  142. package/core/dist/prompt-builder/attitude-directive.js +0 -39
  143. package/core/dist/prompt-builder/attitude-directive.js.map +0 -1
  144. package/core/dist/runtime-v2/gfi/gfi-kernel.d.ts +0 -12
  145. package/core/dist/runtime-v2/gfi/gfi-kernel.d.ts.map +0 -1
  146. package/core/dist/runtime-v2/gfi/gfi-kernel.js +0 -148
  147. package/core/dist/runtime-v2/gfi/gfi-kernel.js.map +0 -1
  148. package/core/dist/runtime-v2/gfi/gfi-policy.d.ts +0 -3
  149. package/core/dist/runtime-v2/gfi/gfi-policy.d.ts.map +0 -1
  150. package/core/dist/runtime-v2/gfi/gfi-policy.js +0 -23
  151. package/core/dist/runtime-v2/gfi/gfi-policy.js.map +0 -1
  152. package/core/dist/runtime-v2/gfi/gfi-read-model.d.ts +0 -78
  153. package/core/dist/runtime-v2/gfi/gfi-read-model.d.ts.map +0 -1
  154. package/core/dist/runtime-v2/gfi/gfi-read-model.js +0 -129
  155. package/core/dist/runtime-v2/gfi/gfi-read-model.js.map +0 -1
  156. package/core/dist/runtime-v2/gfi/gfi-types.d.ts +0 -70
  157. package/core/dist/runtime-v2/gfi/gfi-types.d.ts.map +0 -1
  158. package/core/dist/runtime-v2/gfi/gfi-types.js +0 -2
  159. package/core/dist/runtime-v2/gfi/gfi-types.js.map +0 -1
  160. package/core/dist/runtime-v2/gfi/index.d.ts +0 -6
  161. package/core/dist/runtime-v2/gfi/index.d.ts.map +0 -1
  162. package/core/dist/runtime-v2/gfi/index.js +0 -4
  163. package/core/dist/runtime-v2/gfi/index.js.map +0 -1
  164. package/pd-cli/dist/commands/runtime-gfi-snapshot.d.ts +0 -7
  165. package/pd-cli/dist/commands/runtime-gfi-snapshot.d.ts.map +0 -1
  166. package/pd-cli/dist/commands/runtime-gfi-snapshot.js +0 -101
  167. package/pd-cli/dist/commands/runtime-gfi-snapshot.js.map +0 -1
@@ -4,7 +4,7 @@
4
4
  * Extracted functions from handleAfterToolCall that implement
5
5
  * individual pipeline stages. Each function has a focused responsibility.
6
6
  *
7
- * Pipeline order: classify → record → friction tracking → hygiene
7
+ * Pipeline order: classify → record → hygiene
8
8
  *
9
9
  * ERR checklist:
10
10
  * - ERR-001: No `as` casts on untrusted runtime values.
@@ -37,22 +37,15 @@ export declare function classifyToolCallOutcome(event: PluginHookAfterToolCallEv
37
37
  */
38
38
  export declare function buildToolCallObservation(event: PluginHookAfterToolCallEvent, outcome: ToolCallOutcome, workspaceDir: string, profile: ReturnType<typeof normalizeProfile>): ToolCallObservation;
39
39
  /**
40
- * Handle friction tracking for a tool failure.
41
- *
42
- * Updates GFI, records to event log and trajectory.
43
- * Returns the updated session state and friction info.
40
+ * Record a failed tool call and mark session activity.
44
41
  */
45
- export declare function handleFrictionTrackingForFailure(sessionId: string, event: PluginHookAfterToolCallEvent, outcome: ToolCallOutcome, observation: ToolCallObservation, gfiBefore: number, workspaceDir: string, config: {
46
- get: (key: string) => unknown;
47
- }, wctx: WorkspaceContext, options?: {
42
+ export declare function recordToolCallFailure(sessionId: string, event: PluginHookAfterToolCallEvent, outcome: ToolCallOutcome, observation: ToolCallObservation, workspaceDir: string, wctx: WorkspaceContext, options?: {
48
43
  recordTrajectory?: boolean;
49
44
  }): SessionState;
50
45
  /**
51
- * Handle friction relief and recording for a tool success.
52
- *
53
- * Relieves both tool_failure and dispatch_error GFI sources proportionally.
46
+ * Record a successful tool call and mark session activity.
54
47
  */
55
- export declare function handleFrictionTrackingForSuccess(sessionId: string, event: PluginHookAfterToolCallEvent, outcome: ToolCallOutcome, observation: ToolCallObservation, gfiBefore: number, workspaceDir: string, wctx: WorkspaceContext, options?: {
48
+ export declare function recordToolCallSuccess(sessionId: string, event: PluginHookAfterToolCallEvent, outcome: ToolCallOutcome, observation: ToolCallObservation, workspaceDir: string, wctx: WorkspaceContext, options?: {
56
49
  recordTrajectory?: boolean;
57
50
  }): SessionState;
58
51
  /**
@@ -50,8 +50,6 @@ export interface ToolCallObservation {
50
50
  readonly errorHash: string;
51
51
  /** Error text for logging */
52
52
  readonly errorText: string;
53
- /** Pain score (only meaningful for write-tool failures on risky paths) */
54
- readonly painScore: number;
55
53
  /** Trace ID for this observation chain */
56
54
  readonly traceId: string;
57
55
  }
@@ -54,7 +54,7 @@ export declare function persistGateBlock(wctx: WorkspaceContext, blockCtx: Block
54
54
  * Single authoritative block helper.
55
55
  *
56
56
  * Responsibilities:
57
- * 1. Call trackBlock() for session-level GFI tracking
57
+ * 1. Call trackBlock() for the session block tally
58
58
  * 2. Record to EventLog for operator visibility
59
59
  * 3. Record to trajectory for analytics
60
60
  * 4. Handle retry logic for trajectory persistence failures
@@ -17,8 +17,7 @@ export declare function handleBeforeToolCall(event: PluginHookBeforeToolCallEven
17
17
  pluginConfig?: Record<string, unknown>;
18
18
  logger?: Partial<PluginLogger>;
19
19
  }): PluginHookBeforeToolCallResult | void;
20
- export declare function buildOpenClawRuleInputEnrichment(event: PluginHookBeforeToolCallEvent, workspaceDir: string, sessionId: string | undefined): {
21
- currentGfi: number;
20
+ export declare function buildOpenClawRuleInputEnrichment(event: PluginHookBeforeToolCallEvent): {
22
21
  epTier: number;
23
22
  bashRisk: "dangerous" | "normal" | "safe" | "unknown";
24
23
  };
@@ -47,8 +46,8 @@ export declare function handleSharedRuleHostResult(event: PluginHookBeforeToolCa
47
46
  *
48
47
  * Both shared-handler deny branches (resolvable and unresolved target path)
49
48
  * 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
49
+ * parity with the legacy hook path) plus persistGateBlock (session block
50
+ * tally, EventLog gate_block, trajectory gate_blocks with bounded retry). A null
52
51
  * filePath is accounted with a null trajectory file_path; the EventLog copy
53
52
  * carries an '<unresolved>' placeholder. Never throws into the caller;
54
53
  * every skip/failure warns with a reasonCode (rc-9).
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * After-tool-call hook. Phase A retired every automatic Pain admission that
5
5
  * was triggered by a technical tool failure: failures are still classified,
6
- * recorded in the trajectory, and tracked for GFI health, but they never
7
- * create a Pain Event or a Diagnostician task by themselves.
6
+ * recorded in the trajectory, and recorded as events, but they never create
7
+ * a Pain Event or a Diagnostician task by themselves.
8
8
  *
9
9
  * Remaining stages (delegated to after-tool-call-helpers):
10
10
  * 1. classifyToolCallOutcome — determine failure/success + source
11
11
  * 2. buildToolCallObservation — normalize event into observation
12
- * 3. handleFrictionTracking — GFI, event log, trajectory recording
12
+ * 3. recordToolCallFailure/Success — event log + trajectory recording
13
13
  *
14
14
  * The manual pain path (toolName === 'pain') remains inline because it
15
15
  * has a different control flow (early return, Owner-explicit admission).
@@ -34,7 +34,7 @@ export declare function handleAfterToolCall(event: PluginHookAfterToolCallEvent,
34
34
  }, api?: OpenClawPluginApi): void;
35
35
  /**
36
36
  * OpenClaw-owned enrichment for the shared ordinary after-tool kernel.
37
- * Session/GFI, event-log, PROFILE and hygiene behavior stays here;
37
+ * Session/event-log, PROFILE and hygiene behavior stays here;
38
38
  * the shared runtime owns classification/admission and the atomic trajectory write.
39
39
  */
40
40
  export declare function prepareOrdinaryAfterToolCallForSharedRuntime(event: PluginHookAfterToolCallEvent, ctx: PluginHookToolContext & {
@@ -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": "2.5.0",
5
+ "version": "2.6.0",
6
6
  "activation": {
7
7
  "onStartup": true,
8
8
  "onCapabilities": [