@principles/host-runtime 0.3.8 → 0.3.10
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.
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
* env getter. Everything else is the existing production path.
|
|
22
22
|
*/
|
|
23
23
|
import { createHash } from 'node:crypto';
|
|
24
|
-
import { createRuntimeStateHandle, InternalizationOrchestrator, DreamerRunner, PhilosopherRunner, ScribeRunner, ArtificerRunner, EvaluatorRunner, RolloutReviewerRunner, DefaultDreamerValidator, DefaultPhilosopherValidator, DefaultScribeValidator, DefaultArtificerValidator, DefaultEvaluatorValidator, DefaultRolloutReviewerValidator, PiAiRuntimeAdapter, L2AgentLoopAdapter, buildL2PrincipleReaderFromLedger, OpenClawCliRuntimeAdapter, storeEmitter, createProductionGateDeps, resolveRuntimeConfigFromPdConfig, isRuntimeConfigError, computeConsumerDecision, FULL_CHAIN_CONSUMER_RUNNER_KINDS, DEFAULT_CONSUMER_RUNNER_KINDS, InternalizationQueueReadModel, MVP_CORE_TASK_KINDS, SqliteConnection, SqliteReconciliationCursorStore, SUCCEEDED_TRANSITIONS_SCOPE,
|
|
24
|
+
import { createRuntimeStateHandle, InternalizationOrchestrator, DreamerRunner, PhilosopherRunner, ScribeRunner, ArtificerRunner, EvaluatorRunner, RolloutReviewerRunner, DefaultDreamerValidator, DefaultPhilosopherValidator, DefaultScribeValidator, DefaultArtificerValidator, DefaultEvaluatorValidator, DefaultRolloutReviewerValidator, PiAiRuntimeAdapter, L2AgentLoopAdapter, buildL2PrincipleReaderFromLedger, OpenClawCliRuntimeAdapter, storeEmitter, createProductionGateDeps, resolveRuntimeConfigFromPdConfig, isRuntimeConfigError, computeConsumerDecision, FULL_CHAIN_CONSUMER_RUNNER_KINDS, DEFAULT_CONSUMER_RUNNER_KINDS, InternalizationQueueReadModel, MVP_CORE_TASK_KINDS, SqliteConnection, SqliteReconciliationCursorStore, SUCCEEDED_TRANSITIONS_SCOPE,
|
|
25
|
+
// PRI-714: resolve outputLanguage from the same effective config the
|
|
26
|
+
// runners already receive (EP-07: canonical resolved value, not raw input).
|
|
27
|
+
resolveOutputLanguage, } from '@principles/core/runtime-v2';
|
|
25
28
|
import { loadLedger } from '@principles/core/principle-tree-ledger';
|
|
26
29
|
import { loadPdConfigForPlugin, loadFeatureFlagFromConfig } from './pd-config.js';
|
|
27
30
|
import { createEvaluatorRepairDeps, createRolloutGovernanceDeps } from './internalization-consumer-governance.js';
|
|
@@ -278,6 +281,8 @@ export async function runInternalizationConsumerCycle(workspaceDir, ports) {
|
|
|
278
281
|
baseUrl: runtimeConfigResult.baseUrl,
|
|
279
282
|
workspace: workspaceDir,
|
|
280
283
|
totalBudgetMs: runtimeConfigResult.timeoutMs,
|
|
284
|
+
// PRI-633: profile systemPrompt rides as the append layer.
|
|
285
|
+
...(runtimeConfigResult.systemPrompt ? { systemPrompt: runtimeConfigResult.systemPrompt } : {}),
|
|
281
286
|
}, {
|
|
282
287
|
artifactReader: {
|
|
283
288
|
// Explicit adapter: PIArtifactRecord → PdL2ArtifactReader. The store returns
|
|
@@ -304,6 +309,8 @@ export async function runInternalizationConsumerCycle(workspaceDir, ports) {
|
|
|
304
309
|
timeoutMs: runtimeConfigResult.timeoutMs,
|
|
305
310
|
baseUrl: runtimeConfigResult.baseUrl,
|
|
306
311
|
workspace: workspaceDir,
|
|
312
|
+
// PRI-633: profile systemPrompt rides as the append layer.
|
|
313
|
+
...(runtimeConfigResult.systemPrompt ? { systemPrompt: runtimeConfigResult.systemPrompt } : {}),
|
|
307
314
|
});
|
|
308
315
|
}
|
|
309
316
|
}
|
|
@@ -327,11 +334,16 @@ export async function runInternalizationConsumerCycle(workspaceDir, ports) {
|
|
|
327
334
|
// so slow/local models could never finish dreamer/evaluator stages.
|
|
328
335
|
// runtimeConfigResult.timeoutMs is profile-first with a 300s default —
|
|
329
336
|
// behavior only changes for workspaces that declare a larger timeoutMs.
|
|
337
|
+
// PRI-714: also forward the owner's outputLanguage so every full-chain
|
|
338
|
+
// stage (dreamer/philosopher/scribe/artificer/evaluator/rollout_reviewer)
|
|
339
|
+
// emits owner-facing fields in the configured language. Resolved from the
|
|
340
|
+
// same effective config (EP-07 canonical value).
|
|
330
341
|
const runnerOptions = {
|
|
331
342
|
owner,
|
|
332
343
|
runtimeKind,
|
|
333
344
|
effectiveConfig: configResult.effective,
|
|
334
345
|
timeoutMs: runtimeConfigResult.timeoutMs,
|
|
346
|
+
outputLanguage: resolveOutputLanguage(configResult.effective.config.principles?.outputLanguage).outputLanguage,
|
|
335
347
|
};
|
|
336
348
|
// PRI-634 A3: workspace-scoped telemetry sink for the evaluator runner.
|
|
337
349
|
// Constructed here (per-wake, workspaceDir in scope) so events from THIS
|