principles-disciple 1.89.0 → 1.91.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.89.0",
5
+ "version": "1.91.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.89.0",
3
+ "version": "1.91.0",
4
4
  "description": "Native OpenClaw plugin for Principles Disciple",
5
5
  "type": "module",
6
6
  "main": "./dist/bundle.js",
package/src/hooks/pain.ts CHANGED
@@ -36,7 +36,7 @@ const WRITE_TOOLS = ['write', 'edit', 'apply_patch', 'write_file', 'edit_file',
36
36
  function createPainToPrincipleService(wctx: WorkspaceContext): PainToPrincipleService {
37
37
  const ledgerAdapter = new PrincipleTreeLedgerAdapter({ stateDir: wctx.stateDir });
38
38
  // PRI-306: Load .pd/config.yaml and pass effectiveConfig to PainToPrincipleService
39
- // so createPainSignalBridge uses config-driven runtime binding resolution.
39
+ // so config-driven runtime binding resolution is used.
40
40
  const configResult = loadPdConfigForPlugin(wctx.workspaceDir);
41
41
  return new PainToPrincipleService({
42
42
  workspaceDir: wctx.workspaceDir,
@@ -226,6 +226,7 @@ async function insertPromptActivation(overrides: {
226
226
  action,
227
227
  targetRef,
228
228
  activatedAt: now,
229
+ deactivatedAt: null,
229
230
  });
230
231
  }
231
232
 
@@ -310,6 +311,35 @@ describe('Runtime V2 prompt activation injection', () => {
310
311
  expect(result?.appendSystemContext).not.toContain(TEST_PRINCIPLE_TEXT);
311
312
  });
312
313
 
314
+ it('deactivated activation is not injected into prompt', async () => {
315
+ const artifactId = 'art-v2-deactivated-200';
316
+ const principleId = 'princ-v2-deactivated-200';
317
+
318
+ insertValidatedPrincipleArtifact({ artifactId, principleId });
319
+ await insertPromptActivation({ artifactId, principleId });
320
+
321
+ // Deactivate the activation
322
+ const store = new SqliteActivationStateStore(sqliteConn);
323
+ const deactivated = await store.deactivateActivation(`act_prompt_${principleId}`, new Date().toISOString());
324
+ expect(deactivated).toBe(true);
325
+
326
+ // Close test connection so the reader gets a fresh view
327
+ sqliteConn.close();
328
+
329
+ // Verify the deactivation persisted via a fresh connection
330
+ const verifyConn = new SqliteConnection(tempWorkspaceDir);
331
+ const row = verifyConn.getDb().prepare(
332
+ 'SELECT deactivated_at FROM activations WHERE activation_id = ?'
333
+ ).get(`act_prompt_${principleId}`) as { deactivated_at: string | null } | undefined;
334
+ expect(row?.deactivated_at).toBeTruthy();
335
+ verifyConn.close();
336
+
337
+ const reader = new PromptActivationReader(tempWorkspaceDir);
338
+ const result = await reader.readActivatedPrinciples();
339
+
340
+ expect(result.principles).toHaveLength(0);
341
+ });
342
+
313
343
  it('prompt feature flag check is present — core flag cannot be disabled by config', async () => {
314
344
  const artifactId = 'art-v2-flag-004';
315
345
  const principleId = 'princ-v2-flag-004';