fix: restore agent tool prep typing

This commit is contained in:
Peter Steinberger
2026-05-02 06:35:27 +01:00
parent b66459e3c2
commit cd398a543d
2 changed files with 3 additions and 1 deletions

View File

@@ -153,7 +153,7 @@ describe("createOAuthManager", () => {
const cfg = {
models: {
providers: {
"openai-codex": { auth: "oauth", models: [] },
"openai-codex": { auth: "oauth", baseUrl: "", models: [] },
},
},
} satisfies OpenClawConfig;

View File

@@ -367,6 +367,8 @@ export function createOpenClawCodingTools(options?: {
authProfileStore?: AuthProfileStore;
/** Callback invoked when sessions_yield tool is called. */
onYield?: (message: string) => Promise<void> | void;
/** Optional instrumentation callback for tool preparation stage timing. */
recordToolPrepStage?: (name: string) => void;
}): AnyAgentTool[] {
const execToolName = "exec";
const sandbox = options?.sandbox?.enabled ? options.sandbox : undefined;