@principles/host-runtime 0.13.2 → 0.13.4
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/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export * from './rule-implementation-runtime.js';
|
|
|
16
16
|
export * from './production-pain-evidence.js';
|
|
17
17
|
export * from './governance-observation-store.js';
|
|
18
18
|
export * from './governance-signal-admission.js';
|
|
19
|
-
export * from './pain-evidence-ingress.js';
|
|
20
19
|
export * from './host-liveness-contract.js';
|
|
21
20
|
export * from './internalization-consumer-governance.js';
|
|
22
21
|
export * from './internalization-consumer-cycle.js';
|
package/dist/index.js
CHANGED
|
@@ -26,9 +26,6 @@ export * from './rule-implementation-runtime.js';
|
|
|
26
26
|
export * from './production-pain-evidence.js';
|
|
27
27
|
export * from './governance-observation-store.js';
|
|
28
28
|
export * from './governance-signal-admission.js';
|
|
29
|
-
// PRI-642 Scope B: shared Pain Evidence Ingress — one validated gate for
|
|
30
|
-
// every emitter (OpenClaw / Codex / CLI adapters).
|
|
31
|
-
export * from './pain-evidence-ingress.js';
|
|
32
29
|
export * from './host-liveness-contract.js';
|
|
33
30
|
// PRI-624 Slice C: shared internalization consumer execution (OpenClaw
|
|
34
31
|
// auto-consumer + Companion workspace worker call the same cycle).
|
|
@@ -2,6 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { buildRuleHostAction, buildToolSemanticRegistry, deriveToolHintsFromCanonicalKind, estimateLineChanges, mergeDecisions, SqliteConnection, UNAVAILABLE_RULE_CONTEXT, validateRuleContextV2, validateRuleHostResult, verifyPiArtifactRowDigest, } from '@principles/core/runtime-v2';
|
|
4
4
|
import { isSensitiveSystemPath } from '@principles/core/runtime-v2/internalization/rule-host-input-builder';
|
|
5
|
+
import { classifyBashRisk } from '@principles/core/runtime-v2/internalization/bash-risk';
|
|
5
6
|
import { scanRetiredContractSymbols } from './legacy-rule-contract-symbols.js';
|
|
6
7
|
import { recordDegradedEnforcement } from './degraded-enforcement-marker.js';
|
|
7
8
|
import { createNodeRuleImplementationRuntime, MAX_ACTIVE_RULES, RULE_BATCH_SOURCE_BYTES, RULE_SOURCE_BYTES, } from './rule-implementation-runtime.js';
|
|
@@ -100,7 +101,16 @@ export function createProductionRuleHostGate(options = {}) {
|
|
|
100
101
|
* telemetry instead of merging into one opaque 'unavailable'.
|
|
101
102
|
*/
|
|
102
103
|
let contextFault;
|
|
103
|
-
|
|
104
|
+
// PRI-1047 Owner review R6 #1: the default bashRisk is the deterministic
|
|
105
|
+
// shared classifier (NOT 'unknown') — hosts that wire no enrichment
|
|
106
|
+
// provider (the Codex path) previously fed every rule bashRisk='unknown',
|
|
107
|
+
// so no approval-gate rule could ever exempt read-only investigation.
|
|
108
|
+
// A wired provider remains the host truth and overrides the default.
|
|
109
|
+
let enrichment = {
|
|
110
|
+
currentGfi: 0,
|
|
111
|
+
epTier: 0,
|
|
112
|
+
bashRisk: classifyBashRisk(canonicalKind === 'execute', input.params),
|
|
113
|
+
};
|
|
104
114
|
const request = {
|
|
105
115
|
workspaceDir: event.context.workspaceDir, sessionId: event.context.sessionId,
|
|
106
116
|
targetPath: action.normalizedPath, toolName: input.toolName, rawPayload: event.rawPayload,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/host-runtime",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"description": "Shared host-neutral orchestration for Principles Disciple MVP-Core hook paths.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"lint": "eslint \"src/**/*.ts\""
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@principles/core": "^1.297.
|
|
34
|
+
"@principles/core": "^1.297.2",
|
|
35
35
|
"@principles/install-layout": "^0.4.0",
|
|
36
36
|
"better-sqlite3": "^13.0.3",
|
|
37
37
|
"js-yaml": "^5.4.3"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pain Evidence Ingress — PRI-642 SPEC §8.
|
|
3
|
-
*
|
|
4
|
-
* THIN RE-EXPORT: the ingress semantic authority lives in
|
|
5
|
-
* `@principles/core/runtime-v2` (pain-ingress.ts + pain-ingress-payload.ts)
|
|
6
|
-
* so that EVERY adapter — OpenClaw funnel, pd-cli, and future hosts —
|
|
7
|
-
* evaluates pain ingress facts through ONE implementation. Host adapters
|
|
8
|
-
* differ only in acquisition (session/trajectory/evidence I/O); the
|
|
9
|
-
* interpretation of those facts has a single home in core.
|
|
10
|
-
*
|
|
11
|
-
* This module keeps the existing `@principles/host-runtime` import surface
|
|
12
|
-
* stable for adapters that already import from here. It adds nothing
|
|
13
|
-
* semantic of its own.
|
|
14
|
-
*/
|
|
15
|
-
export { evaluatePainIngress, parsePainIngressReport, validateOriginCorrelationInvariant, SENTINEL_SESSION_IDS, isSentinelSessionId, } from '@principles/core/runtime-v2';
|
|
16
|
-
export type { PainIngressReport, PainIngressDecision, PainIngressParseResult, LegacyPainSubmission, PainOrigin, PainCorrelation, IngressEvidenceEntry, PainEvidenceBundle, PainEvidenceUnavailableReason, PainIngressV1Payload, } from '@principles/core/runtime-v2';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pain Evidence Ingress — PRI-642 SPEC §8.
|
|
3
|
-
*
|
|
4
|
-
* THIN RE-EXPORT: the ingress semantic authority lives in
|
|
5
|
-
* `@principles/core/runtime-v2` (pain-ingress.ts + pain-ingress-payload.ts)
|
|
6
|
-
* so that EVERY adapter — OpenClaw funnel, pd-cli, and future hosts —
|
|
7
|
-
* evaluates pain ingress facts through ONE implementation. Host adapters
|
|
8
|
-
* differ only in acquisition (session/trajectory/evidence I/O); the
|
|
9
|
-
* interpretation of those facts has a single home in core.
|
|
10
|
-
*
|
|
11
|
-
* This module keeps the existing `@principles/host-runtime` import surface
|
|
12
|
-
* stable for adapters that already import from here. It adds nothing
|
|
13
|
-
* semantic of its own.
|
|
14
|
-
*/
|
|
15
|
-
export { evaluatePainIngress, parsePainIngressReport, validateOriginCorrelationInvariant, SENTINEL_SESSION_IDS, isSentinelSessionId, } from '@principles/core/runtime-v2';
|