Skip to content

Commit 9116a4e

Browse files
committed
fix(eval): restore any-typing on ai-sdk onStepFinish params for mixed-zod workspace
CI typecheck on the merge commit failed in the eval package: the onStepFinish destructure inherited from main resolves to implicit-any under this branch's workspace where the cockpit pins zod v4 and the server pins zod v3, so the ai-sdk generate() option type widens. Re- introduce the explicit `any` annotations + biome-ignore comments that the branch carried before the merge took main's cleaner shape; the runtime contract is unchanged. Single-agent.ts: `onStepFinish: async (step: any)` with biome-ignore. Tool-loop-executor-backend.ts: typed destructure literal with two biome-ignores on the toolCalls and toolResults any fields.
1 parent d3c9948 commit 9116a4e

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

packages/browseros-agent/apps/eval/src/agents/orchestrated/backends/tool-loop/tool-loop-executor-backend.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,21 @@ export class ToolLoopExecutorBackend implements ExecutorBackend {
6262
prompt: instruction,
6363
abortSignal: signal,
6464

65-
onStepFinish: async ({ toolCalls, toolResults, text }) => {
65+
onStepFinish: async ({
66+
toolCalls,
67+
toolResults,
68+
text,
69+
}: {
70+
// ai-sdk option-type widening under this branch's mixed-zod
71+
// workspace (cockpit pins zod v4, server pins v3) drops the
72+
// destructure to implicit-any. The explicit `any` keeps the
73+
// call compiling; the runtime contract is unchanged.
74+
// biome-ignore lint/suspicious/noExplicitAny: see comment above
75+
toolCalls?: any
76+
// biome-ignore lint/suspicious/noExplicitAny: see comment above
77+
toolResults?: any
78+
text?: string
79+
}) => {
6680
// Pre-v6.0.208 split this into experimental_onToolCallStart and
6781
// experimental_onToolCallFinish; ToolLoopAgent no longer exposes
6882
// those per-call hooks. Replay both lifecycle callbacks here so

packages/browseros-agent/apps/eval/src/agents/single-agent.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ export class SingleAgentEvaluator implements AgentEvaluator {
107107
prompt,
108108
abortSignal: signal,
109109

110-
onStepFinish: async (step) => {
110+
// biome-ignore lint/suspicious/noExplicitAny: ai-sdk option-type widening under this branch's mixed-zod workspace; see tool-loop-executor-backend.ts for the longer note.
111+
onStepFinish: async (step: any) => {
111112
const { toolCalls, toolResults, text } = step
112113
addTokenUsageFromAiSdkStep(tokenUsage, step)
113114
if (toolCalls) {

0 commit comments

Comments
 (0)