@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.
- package/LICENSE +73 -0
- package/NOTICE +2 -0
- package/dist/host/host-installer.d.ts +3 -1
- package/dist/host/host-installer.d.ts.map +1 -1
- package/dist/host/host-installer.js.map +1 -1
- package/dist/runtime-v2/admission-gate.d.ts +8 -0
- package/dist/runtime-v2/admission-gate.d.ts.map +1 -1
- package/dist/runtime-v2/admission-gate.js +3 -2
- package/dist/runtime-v2/admission-gate.js.map +1 -1
- package/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/dist/runtime-v2/config/pd-config-defaults.js +16 -1
- package/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
- package/dist/runtime-v2/context-payload.d.ts +43 -3
- package/dist/runtime-v2/context-payload.d.ts.map +1 -1
- package/dist/runtime-v2/context-payload.js +15 -1
- package/dist/runtime-v2/context-payload.js.map +1 -1
- package/dist/runtime-v2/evidence-guards.d.ts +6 -0
- package/dist/runtime-v2/evidence-guards.d.ts.map +1 -1
- package/dist/runtime-v2/evidence-guards.js +11 -0
- package/dist/runtime-v2/evidence-guards.js.map +1 -1
- package/dist/runtime-v2/evolution/evolution-types.d.ts +4 -4
- package/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -1
- package/dist/runtime-v2/evolution/evolution-types.js +1 -1
- package/dist/runtime-v2/evolution/evolution-types.js.map +1 -1
- package/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
- package/dist/runtime-v2/feature-flags/feature-flag-contract.js +6 -0
- package/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
- package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +8 -0
- package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
- package/dist/runtime-v2/index.d.ts +5 -2
- package/dist/runtime-v2/index.d.ts.map +1 -1
- package/dist/runtime-v2/index.js +3 -1
- package/dist/runtime-v2/index.js.map +1 -1
- package/dist/runtime-v2/internalization-queue-read-model.d.ts +6 -0
- package/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -1
- package/dist/runtime-v2/internalization-queue-read-model.js +8 -1
- package/dist/runtime-v2/internalization-queue-read-model.js.map +1 -1
- package/dist/runtime-v2/intervention-evidence-normalizer.d.ts.map +1 -1
- package/dist/runtime-v2/intervention-evidence-normalizer.js +10 -3
- package/dist/runtime-v2/intervention-evidence-normalizer.js.map +1 -1
- package/dist/runtime-v2/pain-ingress.d.ts +1 -1
- package/dist/runtime-v2/pain-ingress.d.ts.map +1 -1
- package/dist/runtime-v2/pain-signal-bridge.d.ts +68 -2
- package/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/dist/runtime-v2/pain-signal-bridge.js +541 -18
- package/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/dist/runtime-v2/pain-signal-runtime-factory.js +4 -0
- package/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts +2 -2
- package/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts.map +1 -1
- package/dist/runtime-v2/product-telemetry/snapshot-contract.js +2 -2
- package/dist/runtime-v2/product-telemetry/snapshot-contract.js.map +1 -1
- package/dist/runtime-v2/store/candidate/admission-document.d.ts +90 -0
- package/dist/runtime-v2/store/candidate/admission-document.d.ts.map +1 -0
- package/dist/runtime-v2/store/candidate/admission-document.js +142 -0
- package/dist/runtime-v2/store/candidate/admission-document.js.map +1 -0
- package/dist/runtime-v2/store/candidate/candidate-store.d.ts +53 -0
- package/dist/runtime-v2/store/candidate/candidate-store.d.ts.map +1 -1
- package/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts +35 -0
- package/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -1
- package/dist/runtime-v2/store/candidate/memory-candidate-store.js +48 -0
- package/dist/runtime-v2/store/candidate/memory-candidate-store.js.map +1 -1
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts +44 -0
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -1
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +136 -0
- package/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -1
- package/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
- package/dist/runtime-v2/store/intervention-evidence-schema.js +1 -1
- package/dist/runtime-v2/store/runtime-state-manager.d.ts +65 -0
- package/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -1
- package/dist/runtime-v2/store/runtime-state-manager.js +46 -0
- package/dist/runtime-v2/store/runtime-state-manager.js.map +1 -1
- package/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
- package/dist/runtime-v2/store/sqlite-connection.js +42 -0
- package/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
- package/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts +1 -1
- package/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts.map +1 -1
- package/dist/runtime-v2/store/sqlite-intervention-evidence-store.js.map +1 -1
- package/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts +19 -0
- package/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts.map +1 -0
- package/dist/runtime-v2/store/task/sqlite-family-reopen.js +36 -0
- package/dist/runtime-v2/store/task/sqlite-family-reopen.js.map +1 -0
- package/dist/runtime-v2/store/task/sqlite-task-store.d.ts +23 -0
- package/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -1
- package/dist/runtime-v2/store/task/sqlite-task-store.js +50 -0
- package/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -1
- package/dist/runtime-v2/task-status.d.ts +3 -1
- package/dist/runtime-v2/task-status.d.ts.map +1 -1
- package/dist/runtime-v2/task-status.js +1 -1
- package/dist/runtime-v2/task-status.js.map +1 -1
- package/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
- package/dist/runtime-v2/trajectory-schema.js +11 -0
- package/dist/runtime-v2/trajectory-schema.js.map +1 -1
- package/dist/runtime-v2/types/event-types.d.ts +2 -2
- package/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/dist/runtime-v2/types/event-types.js +1 -1
- package/dist/runtime-v2/types/event-types.js.map +1 -1
- package/dist/runtime-v2/types/evidence-chain-contract.d.ts +1 -1
- package/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -1
- package/dist/runtime-v2/types/evidence-chain-contract.js +2 -2
- package/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
- package/dist/runtime-v2/types/intervention-evidence-contract.d.ts +3 -3
- package/dist/runtime-v2/types/intervention-evidence-contract.d.ts.map +1 -1
- package/dist/runtime-v2/types/intervention-evidence-contract.js +1 -0
- package/dist/runtime-v2/types/intervention-evidence-contract.js.map +1 -1
- package/dist/telemetry-event.d.ts +2 -2
- package/dist/telemetry-event.d.ts.map +1 -1
- package/dist/telemetry-event.js +4 -0
- package/dist/telemetry-event.js.map +1 -1
- package/dist/trajectory-types.d.ts +2 -2
- package/dist/trajectory-types.d.ts.map +1 -1
- package/package.json +7 -5
- package/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts +0 -54
- package/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts.map +0 -1
- package/dist/runtime-v2/internalization/dimension-coverage-policy.js +0 -70
- 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"}
|