@principles/host-runtime 0.13.2 → 0.13.3

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.
@@ -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
- let enrichment = { currentGfi: 0, epTier: 0, bashRisk: 'unknown' };
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.2",
3
+ "version": "0.13.3",
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.0",
34
+ "@principles/core": "^1.297.1",
35
35
  "@principles/install-layout": "^0.4.0",
36
36
  "better-sqlite3": "^13.0.3",
37
37
  "js-yaml": "^5.4.3"