principles-disciple 1.88.0 → 1.89.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.88.0",
5
+ "version": "1.89.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.88.0",
3
+ "version": "1.89.0",
4
4
  "description": "Native OpenClaw plugin for Principles Disciple",
5
5
  "type": "module",
6
6
  "main": "./dist/bundle.js",
@@ -7,6 +7,7 @@ import type { EmpathyEventStats } from '../types/event-types.js';
7
7
  import type { EvolutionLoopEvent } from '../core/evolution-types.js';
8
8
  import { computeHash } from '../utils/hashing.js';
9
9
  import { PainToPrincipleService, PrincipleTreeLedgerAdapter } from '@principles/core/runtime-v2';
10
+ import { loadPdConfigForPlugin } from '../core/pd-config-loader.js';
10
11
 
11
12
  /**
12
13
  * Creates a visual progress bar (e.g., [██████░░░░])
@@ -310,12 +311,16 @@ export async function handlePainReportCommand(ctx: PluginCommandContext): Promis
310
311
 
311
312
  try {
312
313
  const ledgerAdapter = new PrincipleTreeLedgerAdapter({ stateDir: wctx.stateDir });
314
+ // PRI-306: Load .pd/config.yaml for config-driven runtime binding
315
+ const configResult = loadPdConfigForPlugin(wctx.workspaceDir);
313
316
  const service = new PainToPrincipleService({
314
317
  workspaceDir: wctx.workspaceDir,
315
318
  stateDir: wctx.stateDir,
316
319
  ledgerAdapter,
317
320
  owner: 'openclaw-plugin',
318
321
  autoIntakeEnabled: true,
322
+ effectiveConfig: configResult.effective,
323
+ getEnvVar: (name: string) => process.env[name],
319
324
  });
320
325
 
321
326
  const result = await service.recordPain({
package/src/hooks/pain.ts CHANGED
@@ -14,6 +14,7 @@ import { resolveWorkspaceDirForRuntimeV2 } from '../utils/workspace-resolver.js'
14
14
  import { PainToPrincipleService, PrincipleTreeLedgerAdapter, type PainDetectedData, type PainEvidenceEntry, MAX_EVIDENCE_ENTRIES, MAX_EVIDENCE_NOTE_CHARS } from '@principles/core/runtime-v2';
15
15
  import { evaluatePainDiagnosticGate } from '../core/pain-diagnostic-gate.js';
16
16
  import { sanitizeAssistantText } from './message-sanitize.js';
17
+ import { loadPdConfigForPlugin } from '../core/pd-config-loader.js';
17
18
 
18
19
  /**
19
20
  * Interface for tool parameters to avoid 'any'
@@ -34,12 +35,17 @@ const WRITE_TOOLS = ['write', 'edit', 'apply_patch', 'write_file', 'edit_file',
34
35
 
35
36
  function createPainToPrincipleService(wctx: WorkspaceContext): PainToPrincipleService {
36
37
  const ledgerAdapter = new PrincipleTreeLedgerAdapter({ stateDir: wctx.stateDir });
38
+ // PRI-306: Load .pd/config.yaml and pass effectiveConfig to PainToPrincipleService
39
+ // so createPainSignalBridge uses config-driven runtime binding resolution.
40
+ const configResult = loadPdConfigForPlugin(wctx.workspaceDir);
37
41
  return new PainToPrincipleService({
38
42
  workspaceDir: wctx.workspaceDir,
39
43
  stateDir: wctx.stateDir,
40
44
  ledgerAdapter,
41
45
  owner: 'openclaw-plugin',
42
46
  autoIntakeEnabled: true,
47
+ effectiveConfig: configResult.effective,
48
+ getEnvVar: (name: string) => process.env[name],
43
49
  });
44
50
  }
45
51