fix: pass current snapshot to embedded runs · openclaw/openclaw@5655c2b
shakkernerd
·
2026-05-06
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-embedded-runner
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,6 +21,7 @@ import {
|
21 | 21 | import { formatErrorMessage } from "../../infra/errors.js"; |
22 | 22 | import { getMachineDisplayName } from "../../infra/machine-name.js"; |
23 | 23 | import { generateSecureToken } from "../../infra/secure-random.js"; |
| 24 | +import { getCurrentPluginMetadataSnapshot } from "../../plugins/current-plugin-metadata-snapshot.js"; |
24 | 25 | import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js"; |
25 | 26 | import { extractModelCompat } from "../../plugins/provider-model-compat.js"; |
26 | 27 | import type { ProviderRuntimeModel } from "../../plugins/provider-runtime-model.types.js"; |
@@ -962,6 +963,11 @@ async function compactEmbeddedPiSessionDirectOnce(
|
962 | 963 | cwd: effectiveWorkspace, |
963 | 964 | agentDir, |
964 | 965 | cfg: params.config, |
| 966 | +pluginMetadataSnapshot: getCurrentPluginMetadataSnapshot({ |
| 967 | +config: params.config, |
| 968 | +env: process.env, |
| 969 | +workspaceDir: effectiveWorkspace, |
| 970 | +}), |
965 | 971 | contextTokenBudget: ctxInfo.tokens, |
966 | 972 | }); |
967 | 973 | // Sets compaction/pruning runtime state and returns extension factories |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -23,6 +23,7 @@ import { resolveHeartbeatSummaryForAgent } from "../../../infra/heartbeat-summar
|
23 | 23 | import { getMachineDisplayName } from "../../../infra/machine-name.js"; |
24 | 24 | import { MAX_IMAGE_BYTES } from "../../../media/constants.js"; |
25 | 25 | import { listRegisteredPluginAgentPromptGuidance } from "../../../plugins/command-registry-state.js"; |
| 26 | +import { getCurrentPluginMetadataSnapshot } from "../../../plugins/current-plugin-metadata-snapshot.js"; |
26 | 27 | import { buildAgentHookContextChannelFields } from "../../../plugins/hook-agent-context.js"; |
27 | 28 | import { getGlobalHookRunner } from "../../../plugins/hook-runner-global.js"; |
28 | 29 | import { |
@@ -1449,6 +1450,11 @@ export async function runEmbeddedAttempt(
|
1449 | 1450 | cwd: effectiveWorkspace, |
1450 | 1451 | agentDir, |
1451 | 1452 | cfg: params.config, |
| 1453 | +pluginMetadataSnapshot: getCurrentPluginMetadataSnapshot({ |
| 1454 | +config: params.config, |
| 1455 | +env: process.env, |
| 1456 | +workspaceDir: effectiveWorkspace, |
| 1457 | +}), |
1452 | 1458 | contextTokenBudget: params.contextTokenBudget, |
1453 | 1459 | }); |
1454 | 1460 | const piAutoCompactionGuardArgs = { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。