principles-disciple 1.145.1 → 1.145.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.
@@ -78,15 +78,11 @@ export function recordGateBlockAndReturn(wctx, blockCtx, logger) {
78
78
  // so one mild block does not start a long diagnostician run.
79
79
  if (sessionId) {
80
80
  const GATE_BLOCK_PAIN_SCORE = 45; // Must be >= pain_trigger (40) so single gate block can trigger diagnosis (PRI-274)
81
- // Record to trajectory (fire-and-forget, no .pain_flag file needed)
82
- wctx.trajectory?.recordPainEvent?.({
83
- sessionId,
84
- source: 'gate_blocked',
85
- score: GATE_BLOCK_PAIN_SCORE,
86
- reason: `Gate blocked ${toolName} on ${filePath}: ${reason}`,
87
- severity: 'mild',
88
- origin: 'system_infer',
89
- });
81
+ // PRI-453: Generate painId early. SDK observability path (emitPainDetectedEvent
82
+ // with default recordObservability: true) handles all writes: events_*.jsonl +
83
+ // evolution.jsonl + trajectory.db (with canonicalPainId for dedup). No separate
84
+ // legacy recordPainEvent call needed — avoids double-write to trajectory.db.
85
+ const gatePainId = `gate_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`;
90
86
  // PEAT-B1: Evidence triage (feature-flagged)
91
87
  let triageAdmitted = true;
92
88
  const gateBlockTriageFlag = loadFeatureFlagFromConfig(wctx.workspaceDir, 'painEvidenceAdmission');
@@ -142,7 +138,7 @@ export function recordGateBlockAndReturn(wctx, blockCtx, logger) {
142
138
  ts: new Date().toISOString(),
143
139
  type: 'pain_detected',
144
140
  data: {
145
- painId: `gate_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`,
141
+ painId: gatePainId,
146
142
  painType: 'user_frustration',
147
143
  source: 'gate_blocked',
148
144
  reason: `Gate blocked ${toolName} on ${filePath}: ${reason}`,
@@ -2,7 +2,7 @@
2
2
  "id": "principles-disciple",
3
3
  "name": "Principles Disciple",
4
4
  "description": "Evolutionary programming agent framework with strategic guardrails and reflection loops.",
5
- "version": "1.145.1",
5
+ "version": "1.145.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.145.1",
3
+ "version": "1.145.2",
4
4
  "description": "Native OpenClaw plugin for Principles Disciple",
5
5
  "type": "module",
6
6
  "main": "./dist/bundle.js",