@principles/core 1.291.5 → 1.292.1

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 (118) hide show
  1. package/LICENSE +73 -0
  2. package/NOTICE +2 -0
  3. package/dist/host/host-installer.d.ts +3 -1
  4. package/dist/host/host-installer.d.ts.map +1 -1
  5. package/dist/host/host-installer.js.map +1 -1
  6. package/dist/runtime-v2/admission-gate.d.ts +8 -0
  7. package/dist/runtime-v2/admission-gate.d.ts.map +1 -1
  8. package/dist/runtime-v2/admission-gate.js +3 -2
  9. package/dist/runtime-v2/admission-gate.js.map +1 -1
  10. package/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
  11. package/dist/runtime-v2/config/pd-config-defaults.js +16 -1
  12. package/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
  13. package/dist/runtime-v2/context-payload.d.ts +43 -3
  14. package/dist/runtime-v2/context-payload.d.ts.map +1 -1
  15. package/dist/runtime-v2/context-payload.js +15 -1
  16. package/dist/runtime-v2/context-payload.js.map +1 -1
  17. package/dist/runtime-v2/evidence-guards.d.ts +6 -0
  18. package/dist/runtime-v2/evidence-guards.d.ts.map +1 -1
  19. package/dist/runtime-v2/evidence-guards.js +11 -0
  20. package/dist/runtime-v2/evidence-guards.js.map +1 -1
  21. package/dist/runtime-v2/evolution/evolution-types.d.ts +4 -4
  22. package/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -1
  23. package/dist/runtime-v2/evolution/evolution-types.js +1 -1
  24. package/dist/runtime-v2/evolution/evolution-types.js.map +1 -1
  25. package/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  26. package/dist/runtime-v2/feature-flags/feature-flag-contract.js +6 -0
  27. package/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  28. package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
  29. package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +8 -0
  30. package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
  31. package/dist/runtime-v2/index.d.ts +5 -2
  32. package/dist/runtime-v2/index.d.ts.map +1 -1
  33. package/dist/runtime-v2/index.js +3 -1
  34. package/dist/runtime-v2/index.js.map +1 -1
  35. package/dist/runtime-v2/internalization-queue-read-model.d.ts +6 -0
  36. package/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -1
  37. package/dist/runtime-v2/internalization-queue-read-model.js +8 -1
  38. package/dist/runtime-v2/internalization-queue-read-model.js.map +1 -1
  39. package/dist/runtime-v2/intervention-evidence-normalizer.d.ts.map +1 -1
  40. package/dist/runtime-v2/intervention-evidence-normalizer.js +10 -3
  41. package/dist/runtime-v2/intervention-evidence-normalizer.js.map +1 -1
  42. package/dist/runtime-v2/pain-ingress.d.ts +1 -1
  43. package/dist/runtime-v2/pain-ingress.d.ts.map +1 -1
  44. package/dist/runtime-v2/pain-signal-bridge.d.ts +68 -2
  45. package/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
  46. package/dist/runtime-v2/pain-signal-bridge.js +541 -18
  47. package/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
  48. package/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
  49. package/dist/runtime-v2/pain-signal-runtime-factory.js +4 -0
  50. package/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
  51. package/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts +2 -2
  52. package/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts.map +1 -1
  53. package/dist/runtime-v2/product-telemetry/snapshot-contract.js +2 -2
  54. package/dist/runtime-v2/product-telemetry/snapshot-contract.js.map +1 -1
  55. package/dist/runtime-v2/store/candidate/admission-document.d.ts +90 -0
  56. package/dist/runtime-v2/store/candidate/admission-document.d.ts.map +1 -0
  57. package/dist/runtime-v2/store/candidate/admission-document.js +142 -0
  58. package/dist/runtime-v2/store/candidate/admission-document.js.map +1 -0
  59. package/dist/runtime-v2/store/candidate/candidate-store.d.ts +53 -0
  60. package/dist/runtime-v2/store/candidate/candidate-store.d.ts.map +1 -1
  61. package/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts +35 -0
  62. package/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -1
  63. package/dist/runtime-v2/store/candidate/memory-candidate-store.js +48 -0
  64. package/dist/runtime-v2/store/candidate/memory-candidate-store.js.map +1 -1
  65. package/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts +44 -0
  66. package/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -1
  67. package/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +136 -0
  68. package/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -1
  69. package/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
  70. package/dist/runtime-v2/store/intervention-evidence-schema.js +1 -1
  71. package/dist/runtime-v2/store/runtime-state-manager.d.ts +65 -0
  72. package/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -1
  73. package/dist/runtime-v2/store/runtime-state-manager.js +46 -0
  74. package/dist/runtime-v2/store/runtime-state-manager.js.map +1 -1
  75. package/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
  76. package/dist/runtime-v2/store/sqlite-connection.js +42 -0
  77. package/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
  78. package/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts +1 -1
  79. package/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts.map +1 -1
  80. package/dist/runtime-v2/store/sqlite-intervention-evidence-store.js.map +1 -1
  81. package/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts +19 -0
  82. package/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts.map +1 -0
  83. package/dist/runtime-v2/store/task/sqlite-family-reopen.js +36 -0
  84. package/dist/runtime-v2/store/task/sqlite-family-reopen.js.map +1 -0
  85. package/dist/runtime-v2/store/task/sqlite-task-store.d.ts +23 -0
  86. package/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -1
  87. package/dist/runtime-v2/store/task/sqlite-task-store.js +50 -0
  88. package/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -1
  89. package/dist/runtime-v2/task-status.d.ts +3 -1
  90. package/dist/runtime-v2/task-status.d.ts.map +1 -1
  91. package/dist/runtime-v2/task-status.js +1 -1
  92. package/dist/runtime-v2/task-status.js.map +1 -1
  93. package/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
  94. package/dist/runtime-v2/trajectory-schema.js +11 -0
  95. package/dist/runtime-v2/trajectory-schema.js.map +1 -1
  96. package/dist/runtime-v2/types/event-types.d.ts +2 -2
  97. package/dist/runtime-v2/types/event-types.d.ts.map +1 -1
  98. package/dist/runtime-v2/types/event-types.js +1 -1
  99. package/dist/runtime-v2/types/event-types.js.map +1 -1
  100. package/dist/runtime-v2/types/evidence-chain-contract.d.ts +1 -1
  101. package/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -1
  102. package/dist/runtime-v2/types/evidence-chain-contract.js +2 -2
  103. package/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
  104. package/dist/runtime-v2/types/intervention-evidence-contract.d.ts +3 -3
  105. package/dist/runtime-v2/types/intervention-evidence-contract.d.ts.map +1 -1
  106. package/dist/runtime-v2/types/intervention-evidence-contract.js +1 -0
  107. package/dist/runtime-v2/types/intervention-evidence-contract.js.map +1 -1
  108. package/dist/telemetry-event.d.ts +2 -2
  109. package/dist/telemetry-event.d.ts.map +1 -1
  110. package/dist/telemetry-event.js +4 -0
  111. package/dist/telemetry-event.js.map +1 -1
  112. package/dist/trajectory-types.d.ts +2 -2
  113. package/dist/trajectory-types.d.ts.map +1 -1
  114. package/package.json +7 -5
  115. package/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts +0 -54
  116. package/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts.map +0 -1
  117. package/dist/runtime-v2/internalization/dimension-coverage-policy.js +0 -70
  118. package/dist/runtime-v2/internalization/dimension-coverage-policy.js.map +0 -1
@@ -1,70 +0,0 @@
1
- /**
2
- * Dreamer dimension coverage policy (design §6.5.1).
3
- *
4
- * The **single source of truth** for how the dreamer's five decision
5
- * dimensions map to fidelity-judgement coverage classes. Both Layer 1
6
- * (context-manifest well-formedness, INV-MANIFEST-CRITERION) and Layer 2 / PR 4
7
- * (the progressive evaluator's flagged criteria) read this table — neither
8
- * inlines a dimension-name array.
9
- *
10
- * rc-5 / ERR-013: dimension lookups must NOT use plain object indexing on an
11
- * untrusted string (`table['__proto__']` would hit `Object.prototype`). This
12
- * module only ever looks up dimensions it defines itself, so a typed record is
13
- * safe here — but consumers that look up an LLM-supplied string must guard with
14
- * `Object.hasOwn` or a `Map`.
15
- */
16
- /**
17
- * The coverage policy table (design §6.5.1).
18
- *
19
- * required normative content: must have a semantically-equivalent
20
- * expression in the principle text; absence counts as a defect
21
- * and enters `missingDimensions` + the flag path.
22
- * optional counted as covered when present in `antiPatterns`; absence is
23
- * NOT a defect, only recorded in `optionalUncovered` for diagnosis.
24
- * Never enters `missingDimensions` and never flags.
25
- * excluded an evaluation-lens label, not normative content; the criteria
26
- * must NOT draw a conclusion about it, and it is never injected
27
- * into the adjudicating manifest (§6.6.1).
28
- */
29
- export const DIMENSION_COVERAGE_POLICY = {
30
- betterDecision: 'required',
31
- rationale: 'required',
32
- riskLevel: 'required',
33
- badDecision: 'optional',
34
- strategicPerspective: 'excluded',
35
- };
36
- /**
37
- * The required dimensions, derived from the policy table (order stable for
38
- * deterministic output). Consumers read this instead of inlining a string
39
- * array.
40
- */
41
- export const REQUIRED_FIDELITY_DIMENSIONS = Object.entries(DIMENSION_COVERAGE_POLICY)
42
- .filter(([, cls]) => cls === 'required')
43
- .map(([dim]) => dim);
44
- /** All five dimension names (order stable). */
45
- export const ALL_DREAMER_DIMENSIONS = [
46
- 'badDecision',
47
- 'betterDecision',
48
- 'rationale',
49
- 'riskLevel',
50
- 'strategicPerspective',
51
- ];
52
- /**
53
- * rc-5-safe policy lookup for an untrusted (LLM-supplied) string. Returns the
54
- * class only when `dim` is genuinely one of the five declared dimensions;
55
- * `undefined` otherwise (so callers can ignore unknown / optional / excluded
56
- * values the model may have stuffed into `missingDimensions`).
57
- */
58
- export function lookupDimensionPolicy(dim) {
59
- if (!Object.hasOwn(DIMENSION_COVERAGE_POLICY, dim))
60
- return undefined;
61
- return DIMENSION_COVERAGE_POLICY[dim];
62
- }
63
- /**
64
- * True iff `dim` is a required dimension (used by the flagged-criteria filter,
65
- * §6.5.3). Accepts an untrusted string.
66
- */
67
- export function isRequiredDimension(dim) {
68
- return lookupDimensionPolicy(dim) === 'required';
69
- }
70
- //# sourceMappingURL=dimension-coverage-policy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dimension-coverage-policy.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dimension-coverage-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA+D;IACnG,cAAc,EAAE,UAAU;IAC1B,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,UAAU;IACrB,WAAW,EAAE,UAAU;IACvB,oBAAoB,EAAE,UAAU;CACxB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,MAAM,CAAC,OAAO,CAAC,yBAAyB,CACzC;KACE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC;KACvC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;AAEvB,+CAA+C;AAC/C,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE,aAAa;IACb,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,sBAAsB;CACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACrE,OAAO,yBAAyB,CAAC,GAAuB,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC7C,OAAO,qBAAqB,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC;AACnD,CAAC"}