@principles/core 1.198.0 → 1.200.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.
Files changed (25) hide show
  1. package/dist/runtime-v2/__tests__/architecture-regression.test.js +3 -32
  2. package/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
  3. package/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js +70 -0
  4. package/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js.map +1 -1
  5. package/dist/runtime-v2/__tests__/golden-trace.test.js +136 -1
  6. package/dist/runtime-v2/__tests__/golden-trace.test.js.map +1 -1
  7. package/dist/runtime-v2/golden-trace-replay-validator.js +1 -1
  8. package/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -1
  9. package/dist/runtime-v2/golden-trace.d.ts +19 -3
  10. package/dist/runtime-v2/golden-trace.d.ts.map +1 -1
  11. package/dist/runtime-v2/golden-trace.js +2 -0
  12. package/dist/runtime-v2/golden-trace.js.map +1 -1
  13. package/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js +135 -0
  14. package/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js.map +1 -1
  15. package/dist/runtime-v2/internalization/artificer-output.d.ts +2 -0
  16. package/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -1
  17. package/dist/runtime-v2/internalization/artificer-output.js.map +1 -1
  18. package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts.map +1 -1
  19. package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js +1 -1
  20. package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -1
  21. package/dist/runtime-v2/tools/artificer-output-typebox.d.ts +2 -0
  22. package/dist/runtime-v2/tools/artificer-output-typebox.d.ts.map +1 -1
  23. package/dist/runtime-v2/tools/artificer-output-typebox.js +1 -0
  24. package/dist/runtime-v2/tools/artificer-output-typebox.js.map +1 -1
  25. package/package.json +1 -1
@@ -312,7 +312,6 @@ const KNOWN_PLUGIN_CORE_FILES = new Set([
312
312
  'migration.ts',
313
313
  'file-store.ts',
314
314
  'pd-task-store.ts',
315
- 'evolution-migration.ts',
316
315
  'empathy-keyword-matcher.ts',
317
316
  'pain-lifecycle.ts',
318
317
  'session-tracker.ts',
@@ -397,7 +396,9 @@ describe('PRI-212 plugin core anti-growth guard', () => {
397
396
  // reading .principles/INTENT.md with TTL+mtime cache for prompt injection.
398
397
  // PRI-468: Added intent-doc-reader-adapter.ts (93 → 94) — plugin adapter
399
398
  // implementing core IntentDocReader port (pure type mapping, no new I/O).
400
- expect(KNOWN_PLUGIN_CORE_FILES.size).toBe(94);
399
+ // Stage-1 cleanup: Removed evolution-migration.ts (94 → 93) — dead code,
400
+ // zero production references after refactor to @principles/core.
401
+ expect(KNOWN_PLUGIN_CORE_FILES.size).toBe(93);
401
402
  });
402
403
  });
403
404
  const REQUIRED_TEST_FILES = [
@@ -609,13 +610,6 @@ describe('openclaw-plugin pain hook integration', () => {
609
610
  });
610
611
  // ── PRI-42: Internalization boundary guards ──────────────────────────────────
611
612
  describe('PRI-42 internalization boundary', () => {
612
- const CONTRACT_TYPES = [
613
- 'RuleHostInput',
614
- 'RuleHostResult',
615
- 'RuleHostDecision',
616
- 'RuleHostMeta',
617
- 'LoadedImplementation',
618
- ];
619
613
  it('core internalization has zero openclaw-plugin imports', async () => {
620
614
  const { existsSync, readdirSync, readFileSync } = await import('node:fs');
621
615
  const { resolve, join } = await import('node:path');
@@ -664,29 +658,6 @@ describe('PRI-42 internalization boundary', () => {
664
658
  expect(src).not.toContain('../../../openclaw-plugin');
665
659
  }
666
660
  });
667
- it('plugin does not re-define RuleHost contract types locally', async () => {
668
- const { existsSync, readFileSync } = await import('node:fs');
669
- const { resolve } = await import('node:path');
670
- const typesPath = resolve(__dirname, '../../../../openclaw-plugin/src/core/rule-host-types.ts');
671
- expect(existsSync(typesPath)).toBe(true);
672
- const src = readFileSync(typesPath, 'utf-8');
673
- // After PRI-42, rule-host-types.ts should re-export from core, not define interfaces
674
- for (const typeName of CONTRACT_TYPES) {
675
- expect(src).toContain(typeName);
676
- expect(src).toContain("from '@principles/core/runtime-v2'");
677
- }
678
- });
679
- it('plugin does not re-define RuleHostHelpers locally', async () => {
680
- const { existsSync, readFileSync } = await import('node:fs');
681
- const { resolve } = await import('node:path');
682
- const helpersPath = resolve(__dirname, '../../../../openclaw-plugin/src/core/rule-host-helpers.ts');
683
- expect(existsSync(helpersPath)).toBe(true);
684
- const src = readFileSync(helpersPath, 'utf-8');
685
- // After PRI-42, rule-host-helpers.ts should re-export from core, not define interface
686
- expect(src).toContain('RuleHostHelpers');
687
- expect(src).toContain('createRuleHostHelpers');
688
- expect(src).toContain("from '@principles/core/runtime-v2'");
689
- });
690
661
  it('plugin rule-host.ts imports contracts from core barrel', async () => {
691
662
  const { existsSync, readFileSync } = await import('node:fs');
692
663
  const { resolve } = await import('node:path');