mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-27 15:08:01 +00:00
fix: repair agent runtime rebase drift
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
fc8b66cdae850d22bd2baee2232892c5d511c394eca2d29a20c0a562ed60882d plugin-sdk-api-baseline.json
|
||||
cd314fd9ae8a6063c767e630e94ede222ff4234ae670a7bddc6d0fbb8bf0e280 plugin-sdk-api-baseline.jsonl
|
||||
7051d6cd04877de837987c10c8392e6ff8001d929e520ba3fed1b056e05325e6 plugin-sdk-api-baseline.json
|
||||
a6c77206e28fd1a4c697f61ab44c43b38dae68a8ab715cac9058eaeac7a0f6cc plugin-sdk-api-baseline.jsonl
|
||||
|
||||
@@ -458,35 +458,6 @@ export {
|
||||
resolveEmbeddedAgentStreamFn,
|
||||
};
|
||||
|
||||
function collectTrustedPluginLocalMediaToolNames(params: {
|
||||
tools: Array<{ name?: string }>;
|
||||
}): Set<string> {
|
||||
const trusted = new Set<string>();
|
||||
for (const tool of params.tools) {
|
||||
const toolName = tool.name?.trim();
|
||||
if (!toolName) {
|
||||
continue;
|
||||
}
|
||||
const meta = getPluginToolMeta(tool as Parameters<typeof getPluginToolMeta>[0]);
|
||||
if (meta?.trustedLocalMedia === true) {
|
||||
trusted.add(toolName);
|
||||
}
|
||||
}
|
||||
return trusted;
|
||||
}
|
||||
|
||||
function collectTrustedLocalMediaToolNames(params: {
|
||||
coreBuiltinToolNames: ReadonlySet<string>;
|
||||
trustedPluginToolNames: ReadonlySet<string>;
|
||||
}): Set<string> {
|
||||
return new Set([
|
||||
...[...params.coreBuiltinToolNames].filter((toolName) =>
|
||||
isCoreToolResultMediaTrustedName(toolName),
|
||||
),
|
||||
...params.trustedPluginToolNames,
|
||||
]);
|
||||
}
|
||||
|
||||
function logRuntimeToolSchemaQuarantine(params: {
|
||||
diagnostics: readonly RuntimeToolSchemaDiagnostic[];
|
||||
tools: readonly Parameters<typeof getPluginToolMeta>[0][];
|
||||
@@ -2012,7 +1983,6 @@ export async function runEmbeddedAttempt(
|
||||
catalogRef: toolSearchCatalogRef,
|
||||
toolHookContext: catalogToolHookContext,
|
||||
});
|
||||
toolSearchCatalogApplied = true;
|
||||
const projectedToolSearchTools = filterLocalModelLeanTools({
|
||||
tools: toolSearch.tools,
|
||||
config: params.config,
|
||||
|
||||
@@ -20,13 +20,13 @@ import {
|
||||
INTERNAL_MESSAGE_CHANNEL,
|
||||
} from "../../utils/message-channel.js";
|
||||
import { listAgentIds } from "../agent-scope.js";
|
||||
import { resolveNestedAgentLaneForSession } from "../lanes.js";
|
||||
import {
|
||||
type EmbeddedPiQueueMessageOptions,
|
||||
formatEmbeddedPiQueueFailureSummary,
|
||||
queueEmbeddedPiMessageWithOutcomeAsync,
|
||||
type EmbeddedAgentQueueMessageOptions,
|
||||
formatEmbeddedAgentQueueFailureSummary,
|
||||
queueEmbeddedAgentMessageWithOutcomeAsync,
|
||||
resolveActiveEmbeddedRunSessionId,
|
||||
} from "../pi-embedded-runner/runs.js";
|
||||
} from "../embedded-agent-runner/runs.js";
|
||||
import { resolveNestedAgentLaneForSession } from "../lanes.js";
|
||||
import {
|
||||
type AgentWaitResult,
|
||||
readLatestAssistantReplySnapshot,
|
||||
@@ -188,13 +188,13 @@ async function startAgentRun(params: {
|
||||
const messageText =
|
||||
typeof params.sendParams.message === "string" ? params.sendParams.message : undefined;
|
||||
if (activeRunSessionId && fallbackSessionKey && messageText) {
|
||||
const queueOptions: EmbeddedPiQueueMessageOptions = {
|
||||
const queueOptions: EmbeddedAgentQueueMessageOptions = {
|
||||
steeringMode: "all",
|
||||
debounceMs: 0,
|
||||
deliveryTimeoutMs: params.deliveryTimeoutMs,
|
||||
waitForTranscriptCommit: true,
|
||||
};
|
||||
let queueOutcome = await queueEmbeddedPiMessageWithOutcomeAsync(
|
||||
let queueOutcome = await queueEmbeddedAgentMessageWithOutcomeAsync(
|
||||
activeRunSessionId,
|
||||
messageText,
|
||||
queueOptions,
|
||||
@@ -202,7 +202,7 @@ async function startAgentRun(params: {
|
||||
if (!queueOutcome.queued && queueOutcome.reason === "transcript_commit_wait_unsupported") {
|
||||
const bestEffortQueueOptions = { ...queueOptions };
|
||||
delete bestEffortQueueOptions.waitForTranscriptCommit;
|
||||
queueOutcome = await queueEmbeddedPiMessageWithOutcomeAsync(
|
||||
queueOutcome = await queueEmbeddedAgentMessageWithOutcomeAsync(
|
||||
activeRunSessionId,
|
||||
messageText,
|
||||
bestEffortQueueOptions,
|
||||
@@ -230,7 +230,7 @@ async function startAgentRun(params: {
|
||||
};
|
||||
} catch (err) {
|
||||
const queueSummary =
|
||||
formatEmbeddedPiQueueFailureSummary(queueOutcome) ?? "active run queue rejected";
|
||||
formatEmbeddedAgentQueueFailureSummary(queueOutcome) ?? "active run queue rejected";
|
||||
throw new Error(`${queueSummary}; fallback_failed error=${formatErrorMessage(err)}`, {
|
||||
cause: err,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user