@principles/host-runtime 0.13.1 → 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.
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* Hosts inject: a logger, a structured-event sink, their tool catalog, and an
|
|
21
21
|
* env getter. Everything else is the existing production path.
|
|
22
22
|
*/
|
|
23
|
-
import { createRuntimeStateHandle, InternalizationOrchestrator, DreamerRunner, PhilosopherRunner, ScribeRunner, ArtificerRunner, buildArtificerHostSemanticContext, EvaluatorRunner, RolloutReviewerRunner, DefaultDreamerValidator, DefaultPhilosopherValidator, DefaultScribeValidator, DefaultArtificerValidator, DefaultEvaluatorValidator, DefaultRolloutReviewerValidator, PiAiRuntimeAdapter, L2AgentLoopAdapter, ArtificerL2Adapter, buildL2PrincipleReaderFromLedger,
|
|
23
|
+
import { createRuntimeStateHandle, InternalizationOrchestrator, DreamerRunner, PhilosopherRunner, ScribeRunner, ArtificerRunner, buildArtificerHostSemanticContext, EvaluatorRunner, RolloutReviewerRunner, DefaultDreamerValidator, DefaultPhilosopherValidator, DefaultScribeValidator, DefaultArtificerValidator, DefaultEvaluatorValidator, DefaultRolloutReviewerValidator, PiAiRuntimeAdapter, L2AgentLoopAdapter, ArtificerL2Adapter, buildL2PrincipleReaderFromLedger, storeEmitter, createProductionGateDeps, resolveRuntimeConfigFromPdConfig, resolveRuntimeConfigForAgent, AGENT_NAME_FOR_TASK_KIND, isRuntimeConfigError, computeConsumerDecision, FULL_CHAIN_CONSUMER_RUNNER_KINDS, DEFAULT_CONSUMER_RUNNER_KINDS, InternalizationQueueReadModel, MVP_CORE_TASK_KINDS, SqliteConnection, SqliteReconciliationCursorStore, SUCCEEDED_TRANSITIONS_SCOPE, PrincipleTreeLedgerAdapter,
|
|
24
24
|
// PRI-714: resolve outputLanguage from the same effective config the
|
|
25
25
|
// runners already receive (EP-07: canonical resolved value, not raw input).
|
|
26
26
|
resolveOutputLanguage, hydratePITaskRecord, preflightArtificerOwnerEvidence, preflightArtificerIntentBasis, consumeSourceFaultBackoffSkip, advanceSourceFaultBackoff, } from '@principles/core/runtime-v2';
|
|
@@ -641,13 +641,10 @@ export async function runInternalizationConsumerCycle(workspaceDir, ports) {
|
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
else if (taskRuntimeKind === 'openclaw-cli') {
|
|
645
|
-
adapter = new OpenClawCliRuntimeAdapter({
|
|
646
|
-
runtimeMode: taskRuntimeConfig.openclawMode ?? 'default',
|
|
647
|
-
workspaceDir: workspaceDir,
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
644
|
else {
|
|
645
|
+
// ADR-0029 retired every backend except pi-ai; the resolver can only hand
|
|
646
|
+
// back 'pi-ai', so anything else (including legacy 'openclaw-cli') means
|
|
647
|
+
// the readiness invariant broke.
|
|
651
648
|
throw new Error(`Unsupported runtime kind resolved for auto-consumer: ${taskRuntimeKind}`);
|
|
652
649
|
}
|
|
653
650
|
const { taskId } = wakeResult;
|
|
@@ -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.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.
|
|
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"
|