mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:20:44 +00:00
fix: pass current snapshot to embedded runs
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
import { formatErrorMessage } from "../../infra/errors.js";
|
||||
import { getMachineDisplayName } from "../../infra/machine-name.js";
|
||||
import { generateSecureToken } from "../../infra/secure-random.js";
|
||||
import { getCurrentPluginMetadataSnapshot } from "../../plugins/current-plugin-metadata-snapshot.js";
|
||||
import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js";
|
||||
import { extractModelCompat } from "../../plugins/provider-model-compat.js";
|
||||
import type { ProviderRuntimeModel } from "../../plugins/provider-runtime-model.types.js";
|
||||
@@ -962,6 +963,11 @@ async function compactEmbeddedPiSessionDirectOnce(
|
||||
cwd: effectiveWorkspace,
|
||||
agentDir,
|
||||
cfg: params.config,
|
||||
pluginMetadataSnapshot: getCurrentPluginMetadataSnapshot({
|
||||
config: params.config,
|
||||
env: process.env,
|
||||
workspaceDir: effectiveWorkspace,
|
||||
}),
|
||||
contextTokenBudget: ctxInfo.tokens,
|
||||
});
|
||||
// Sets compaction/pruning runtime state and returns extension factories
|
||||
|
||||
@@ -23,6 +23,7 @@ import { resolveHeartbeatSummaryForAgent } from "../../../infra/heartbeat-summar
|
||||
import { getMachineDisplayName } from "../../../infra/machine-name.js";
|
||||
import { MAX_IMAGE_BYTES } from "../../../media/constants.js";
|
||||
import { listRegisteredPluginAgentPromptGuidance } from "../../../plugins/command-registry-state.js";
|
||||
import { getCurrentPluginMetadataSnapshot } from "../../../plugins/current-plugin-metadata-snapshot.js";
|
||||
import { buildAgentHookContextChannelFields } from "../../../plugins/hook-agent-context.js";
|
||||
import { getGlobalHookRunner } from "../../../plugins/hook-runner-global.js";
|
||||
import {
|
||||
@@ -1449,6 +1450,11 @@ export async function runEmbeddedAttempt(
|
||||
cwd: effectiveWorkspace,
|
||||
agentDir,
|
||||
cfg: params.config,
|
||||
pluginMetadataSnapshot: getCurrentPluginMetadataSnapshot({
|
||||
config: params.config,
|
||||
env: process.env,
|
||||
workspaceDir: effectiveWorkspace,
|
||||
}),
|
||||
contextTokenBudget: params.contextTokenBudget,
|
||||
});
|
||||
const piAutoCompactionGuardArgs = {
|
||||
|
||||
Reference in New Issue
Block a user