principles-disciple 1.114.1 → 1.115.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.
@@ -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.114.1",
5
+ "version": "1.115.0",
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.114.1",
3
+ "version": "1.115.0",
4
4
  "description": "Native OpenClaw plugin for Principles Disciple",
5
5
  "type": "module",
6
6
  "main": "./dist/bundle.js",
@@ -50,7 +50,7 @@
50
50
  "@types/micromatch": "^4.0.10",
51
51
  "@types/node": "^25.6.2",
52
52
  "@types/ws": "^8.5.13",
53
- "@typescript-eslint/eslint-plugin": "^8.58.2",
53
+ "@typescript-eslint/eslint-plugin": "^8.61.0",
54
54
  "@typescript-eslint/parser": "^8.58.0",
55
55
  "@vitest/coverage-v8": "^4.1.8",
56
56
  "esbuild": "^0.28.0",
@@ -68,6 +68,10 @@ export interface TrajectoryPainEventInput {
68
68
  confidence?: number | null;
69
69
  text?: string;
70
70
  createdAt?: string;
71
+ /** PRI-406: Canonical pain identity (e.g. manual_<ts>_<hash> or pain_<ts>_<hash>). */
72
+ canonicalPainId?: string;
73
+ /** PRI-406: Runtime V2 diagnostician task ID linked to this pain event. */
74
+ runtimeTaskId?: string;
71
75
  }
72
76
 
73
77
  export interface TrajectoryGateBlockInput {
@@ -243,8 +243,9 @@ export class TrajectoryDatabase {
243
243
  this.withWrite(() => {
244
244
  const runResult = this.db.prepare(`
245
245
  INSERT INTO pain_events (
246
- session_id, source, score, reason, severity, origin, confidence, text, created_at
247
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
246
+ session_id, source, score, reason, severity, origin, confidence, text, created_at,
247
+ canonical_pain_id, runtime_task_id
248
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
248
249
  `).run(
249
250
  input.sessionId,
250
251
  input.source,
@@ -255,6 +256,8 @@ export class TrajectoryDatabase {
255
256
  input.confidence ?? null,
256
257
  input.text ?? null,
257
258
  input.createdAt ?? nowIso(),
259
+ input.canonicalPainId ?? null,
260
+ input.runtimeTaskId ?? null,
258
261
  );
259
262
  insertedId = runResult.lastInsertRowid as number;
260
263
  });
@@ -1332,6 +1335,28 @@ export class TrajectoryDatabase {
1332
1335
  }
1333
1336
  }
1334
1337
 
1338
+ // PRI-406: Add canonical_pain_id and runtime_task_id columns to pain_events
1339
+ for (const col of [
1340
+ { name: 'canonical_pain_id', type: 'TEXT' },
1341
+ { name: 'runtime_task_id', type: 'TEXT' },
1342
+ ]) {
1343
+ try {
1344
+ this.db.exec(`ALTER TABLE pain_events ADD COLUMN ${col.name} ${col.type}`);
1345
+ } catch (err: unknown) {
1346
+ const message = err instanceof Error ? err.message : String(err);
1347
+ if (!message.includes('duplicate column name') && !message.includes('no column named')) {
1348
+ throw err;
1349
+ }
1350
+ }
1351
+ }
1352
+
1353
+ // PRI-406: Partial unique index on canonical_pain_id (non-null only) for dedup
1354
+ this.db.exec(`
1355
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_pain_events_canonical_pain_id
1356
+ ON pain_events(canonical_pain_id)
1357
+ WHERE canonical_pain_id IS NOT NULL
1358
+ `);
1359
+
1335
1360
  // Create FTS5 virtual table for pain_events text search (MEM-04)
1336
1361
  this.db.exec(`
1337
1362
  CREATE VIRTUAL TABLE IF NOT EXISTS pain_events_fts USING fts5(