@principles/core 1.201.0 → 1.203.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.
- package/dist/runtime-v2/__tests__/architecture-regression.test.js +7 -4
- package/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.d.ts +2 -0
- package/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.d.ts.map +1 -0
- package/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.js +246 -0
- package/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.js.map +1 -0
- package/dist/runtime-v2/feature-flags/index.d.ts +2 -0
- package/dist/runtime-v2/feature-flags/index.d.ts.map +1 -1
- package/dist/runtime-v2/feature-flags/index.js +2 -0
- package/dist/runtime-v2/feature-flags/index.js.map +1 -1
- package/dist/runtime-v2/feature-flags/surface-guard-policy.d.ts +41 -0
- package/dist/runtime-v2/feature-flags/surface-guard-policy.d.ts.map +1 -0
- package/dist/runtime-v2/feature-flags/surface-guard-policy.js +143 -0
- package/dist/runtime-v2/feature-flags/surface-guard-policy.js.map +1 -0
- package/dist/runtime-v2/index.d.ts +4 -0
- package/dist/runtime-v2/index.d.ts.map +1 -1
- package/dist/runtime-v2/index.js +3 -0
- package/dist/runtime-v2/index.js.map +1 -1
- package/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.d.ts +2 -0
- package/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.d.ts.map +1 -0
- package/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.js +95 -0
- package/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.js.map +1 -0
- package/dist/runtime-v2/risk/index.d.ts +7 -0
- package/dist/runtime-v2/risk/index.d.ts.map +1 -0
- package/dist/runtime-v2/risk/index.js +6 -0
- package/dist/runtime-v2/risk/index.js.map +1 -0
- package/dist/runtime-v2/risk/risk-calculator-policy.d.ts +18 -0
- package/dist/runtime-v2/risk/risk-calculator-policy.d.ts.map +1 -0
- package/dist/runtime-v2/risk/risk-calculator-policy.js +47 -0
- package/dist/runtime-v2/risk/risk-calculator-policy.js.map +1 -0
- package/package.json +1 -1
|
@@ -313,7 +313,6 @@ const KNOWN_PLUGIN_CORE_FILES = new Set([
|
|
|
313
313
|
// with crypto.createHash + PainDictionary. Kept here because it owns the
|
|
314
314
|
// crypto + dictionary I/O boundary.
|
|
315
315
|
'detection-funnel.ts',
|
|
316
|
-
'risk-calculator.ts',
|
|
317
316
|
'migration.ts',
|
|
318
317
|
'file-store.ts',
|
|
319
318
|
'pd-task-store.ts',
|
|
@@ -330,7 +329,6 @@ const KNOWN_PLUGIN_CORE_FILES = new Set([
|
|
|
330
329
|
// ── Runtime V2 ──────────────────────────────────────────────────────────
|
|
331
330
|
'runtime-v2-prompt-activation-reader.ts',
|
|
332
331
|
'workspace-guidance-migrator.ts',
|
|
333
|
-
'surface-guard.ts',
|
|
334
332
|
// PRI-307: Plugin I/O boundary — reads .pd/config.yaml, delegates validation to core
|
|
335
333
|
'pd-config-loader.ts',
|
|
336
334
|
// PRI-346: Pure function for checking conversation access config (extracted for circular import avoidance)
|
|
@@ -383,7 +381,7 @@ describe('PRI-212 plugin core anti-growth guard', () => {
|
|
|
383
381
|
expect.fail(msg);
|
|
384
382
|
}
|
|
385
383
|
});
|
|
386
|
-
it('known baseline count is self-consistent (
|
|
384
|
+
it('known baseline count is self-consistent (92 files)', async () => {
|
|
387
385
|
// Sanity check: if the baseline grows, update this number.
|
|
388
386
|
// Prevents accidental baseline bloat from going unnoticed.
|
|
389
387
|
// See docs/reviews/plugin-core-inventory-2026-05.md §7
|
|
@@ -405,7 +403,12 @@ describe('PRI-212 plugin core anti-growth guard', () => {
|
|
|
405
403
|
// zero production references after refactor to @principles/core.
|
|
406
404
|
// PRI-482: Added rule-context-assembler.ts (93 → 94) — plugin I/O boundary
|
|
407
405
|
// converting TrajectoryDatabase rows to validated RuleHistoryWindow.
|
|
408
|
-
|
|
406
|
+
// Stage-3: Removed risk-calculator.ts (94 → 93) — pure logic sunk to
|
|
407
|
+
// core runtime-v2/risk/, dead code (assessRiskLevel/getTargetFileLineCount/
|
|
408
|
+
// calculatePercentageThreshold) removed.
|
|
409
|
+
// Stage-3 sink: Removed surface-guard.ts (93 → 92) — pure guard logic
|
|
410
|
+
// migrated to @principles/core/runtime-v2/feature-flags/surface-guard-policy.
|
|
411
|
+
expect(KNOWN_PLUGIN_CORE_FILES.size).toBe(92);
|
|
409
412
|
});
|
|
410
413
|
});
|
|
411
414
|
const REQUIRED_TEST_FILES = [
|