From 497c39a198ffd577d1fd1ebbce86fa8d5d0ba0b6 Mon Sep 17 00:00:00 2001 From: Evanfeenstra Date: Thu, 17 Sep 2026 20:37:13 -0700 Subject: [PATCH 1/2] bump to ai-sdk v7 - ai ^7, @ai-sdk/anthropic ^4, aieo ^0.2.0 (peer + dev); node >=22 - v7's result.response is final-step only: chat persistence, agent returnMessages and nudge continuations now read responseMessages (chat history would otherwise drop every tool call but the last step's) - per-step response.messages in v7 also fixes duplicated history in the stream-resume bank (v6 made them cumulative) - totalUsage -> usage, stepCountIs -> isStepCount, onStepFinish/onFinish -> onStepEnd/onEnd, fullStream -> stream - llm step: generateObject -> generateText + Output.object - severed-stream log shows the root cause v7 now wraps; resume-limit test matches 'terminated' on the cause chain yarn.lock needs a refresh once aieo@0.2.0 is published. Co-Authored-By: Claude --- package.json | 15 ++- src/createStrut.ts | 15 ++- src/pricing.ts | 8 +- src/steps/core/agent.test.ts | 7 +- src/steps/core/agent.ts | 68 +++++----- src/steps/core/llm.test.ts | 2 +- src/steps/core/llm.ts | 8 +- yarn.lock | 246 ++++++++++------------------------- 8 files changed, 135 insertions(+), 234 deletions(-) diff --git a/package.json b/package.json index 0b2362d..598e167 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@hono/node-server": "^2.0.4", "@huggingface/transformers": "^4.1.0", "@octokit/rest": "^22.0.1", - "aieo": "^0.1.41", + "aieo": "^0.2.0", "hono": "^4.12.23", "html-to-text": "^10.0.1", "js-yaml": "^4.1.1", @@ -44,23 +44,26 @@ "ws": "^8.21.3" }, "devDependencies": { - "@ai-sdk/anthropic": "^3.0.92", + "@ai-sdk/anthropic": "^4.0.56", "@types/html-to-text": "^9.0.4", "@types/js-yaml": "^4.0.9", "@types/node": "^22.19.0", "@types/uuid": "^10.0.0", "@types/ws": "^8.18.1", - "ai": "^6.0.196", + "ai": "^7.0.105", "tsx": "^4.21.0", "typescript": "^5.9.0", - "zod": "^4.3.6" + "zod": "^4.6.5" }, "peerDependencies": { - "@ai-sdk/anthropic": "^3.0.92", - "ai": "^6.0.175", + "@ai-sdk/anthropic": "^4.0.56", + "ai": "^7.0.105", "zod": "^4.3.6" }, "optionalDependencies": { "sherpa-onnx-node": "^1.13.7" + }, + "engines": { + "node": ">=22" } } diff --git a/src/createStrut.ts b/src/createStrut.ts index a0ee038..48f2610 100644 --- a/src/createStrut.ts +++ b/src/createStrut.ts @@ -1612,7 +1612,7 @@ export async function createStrut( }); try { - const { ToolLoopAgent, stepCountIs } = await import("ai"); + const { ToolLoopAgent, isStepCount } = await import("ai"); const { buildTools, buildSystem } = await import("./ai/index.js"); // The chat's model (`ChatMeta.model`, set by POST /chat) or the @@ -1730,8 +1730,8 @@ export async function createStrut( instructions: await buildSystem(deps), tools: buildTools(deps), maxOutputTokens: llm.maxOutputTokens, - stopWhen: stepCountIs(chatMaxSteps), - onFinish: () => { + stopWhen: isStepCount(chatMaxSteps), + onEnd: () => { registry = deps.registry; }, }); @@ -1740,7 +1740,7 @@ export async function createStrut( const result = await agent.stream({ messages: modelMessages, - onStepFinish: (step) => { + onStepEnd: (step) => { const u = step.usage; console.log( `[chat ${chatId}] turn ${turn} step ${step.stepNumber} finish=${step.finishReason} tokens=in:${u?.inputTokens ?? "?"}/out:${u?.outputTokens ?? "?"}`, @@ -1755,7 +1755,7 @@ export async function createStrut( }, }); - for await (const part of result.fullStream) { + for await (const part of result.stream) { switch (part.type) { case "text-delta": if (part.text) await emit({ type: "text-delta", delta: part.text }); @@ -1793,8 +1793,9 @@ export async function createStrut( } } - const resp = await result.response; - await chatStore.appendMessages(chatId, resp.messages as any); + // Every step's messages (tool calls + results), not just the last: + // v7's `response` is final-step only. + await chatStore.appendMessages(chatId, (await result.responseMessages) as any); await emit({ type: "chat.end" }); await chatStore.setMeta(chatId, { status: "done" }); } catch (err) { diff --git a/src/pricing.ts b/src/pricing.ts index 2544573..ec2484d 100644 --- a/src/pricing.ts +++ b/src/pricing.ts @@ -28,11 +28,11 @@ export function emptyUsage(): TokenUsage { const num = (v: unknown): number => (typeof v === "number" && Number.isFinite(v) ? v : 0); /** - * Normalize a Vercel AI SDK `LanguageModelUsage` (the `.usage` / `.totalUsage` - * on a generate result) into a flat {@link TokenUsage}. Prefers the v6 + * Normalize a Vercel AI SDK `LanguageModelUsage` (the `.usage` on a generate + * result — all steps in v7) into a flat {@link TokenUsage}. Prefers the * `inputTokenDetails` breakdown (noCache / cacheRead / cacheWrite); falls back - * to the flat `inputTokens` + deprecated `cachedInputTokens` when details are - * absent (other providers), treating the remainder as non-cached input. + * to the flat `inputTokens` + pre-v7 `cachedInputTokens` when details are + * absent, treating the remainder as non-cached input. */ export function usageFromResult(usage: unknown): TokenUsage { if (!usage || typeof usage !== "object") return emptyUsage(); diff --git a/src/steps/core/agent.test.ts b/src/steps/core/agent.test.ts index 293e539..17f961e 100644 --- a/src/steps/core/agent.test.ts +++ b/src/steps/core/agent.test.ts @@ -836,7 +836,12 @@ describe("mid-stream socket death is resumed, not lost", () => { }); process.env["ANTHROPIC_BASE_URL"] = `http://127.0.0.1:${s.port}`; try { - await assert.rejects(run(), /terminated/); + // v7 wraps the socket death (APICallError → TypeError: terminated), so + // match anywhere on the cause chain. + await assert.rejects(run(), (e: any) => { + for (let c = e; c; c = c.cause) if (/terminated/.test(String(c.message))) return true; + return false; + }); // 1 good call + the first sever + MAX_STREAM_ERROR_CONTINUATIONS resumes. assert.equal(s.calls(), 7); } finally { diff --git a/src/steps/core/agent.ts b/src/steps/core/agent.ts index c30c675..7758c7e 100644 --- a/src/steps/core/agent.ts +++ b/src/steps/core/agent.ts @@ -732,7 +732,7 @@ export default defineStep({ }), output: z.any(), async run(cfg, ctx) { - const { ToolLoopAgent, Output, tool, stepCountIs, hasToolCall, jsonSchema, streamText } = await import("ai"); + const { ToolLoopAgent, Output, tool, isStepCount, hasToolCall, jsonSchema, streamText } = await import("ai"); // Model/provider resolution via aieo (shared with mcp) through strut's // resolver (src/llm.ts): friendly aliases ("sonnet", "grok"), canonical @@ -921,8 +921,8 @@ export default defineStep({ wrapToolsWithEmit(tools, ctx); const stopWhen = !useSchema && cfg.finalAnswer - ? [hasToolCall("final_answer"), stepCountIs(cfg.maxSteps)] - : [stepCountIs(cfg.maxSteps)]; + ? [hasToolCall("final_answer"), isStepCount(cfg.maxSteps)] + : [isStepCount(cfg.maxSteps)]; // Resolved LAST (after all config validation): the key lookup throws when // no key is configured — a config error should surface before a @@ -961,7 +961,7 @@ export default defineStep({ wrapToolsWithEmit(webTools, ctx); Object.assign(tools, webTools); // Steps that completed BEFORE a mid-stream failure are unreachable through - // the stream's result promises — `steps`, `response`, `totalUsage` and + // the stream's result promises — `steps`, `responseMessages`, `usage` and // `text` all reject with the stream error — so the only way to keep that // work is to bank each step as it finishes. Cumulative across resume // attempts, which is exactly what a continuation needs to replay. @@ -969,8 +969,9 @@ export default defineStep({ const bankedMessages: any[] = []; let bankedUsage = emptyUsage(); // Shared by the main loop and the premature-stop nudge continuation. - const onStepFinish = (sf: any) => { + const onStepEnd = (sf: any) => { bankedSteps.push(sf); + // Per-step in v7 (v6 made these cumulative, so banking them duplicated history). bankedMessages.push(...((sf.response?.messages ?? []) as any[])); bankedUsage = addUsage(bankedUsage, usageFromResult(sf.usage)); // A length finish means the generation was TRUNCATED at the output @@ -1006,7 +1007,7 @@ export default defineStep({ ...(providerOptions ? { providerOptions } : {}), ...(useSchema ? { output: Output.object({ schema: jsonSchema(cfg.schema) }) } : {}), prepareStep, - onStepFinish, + onStepEnd, }); const preamble = buildPreamble(cfg.cwd); @@ -1026,9 +1027,8 @@ export default defineStep({ let streamErrorContinuations = 0; let res!: { steps: any; - response: any; - totalUsage: any; - usage: unknown; + responseMessages: any[]; + usage: any; text: any; output: any; }; @@ -1044,18 +1044,18 @@ export default defineStep({ maxOutputTokens, stopWhen: !useSchema && cfg.finalAnswer - ? [hasToolCall("final_answer"), stepCountIs(remaining)] - : [stepCountIs(remaining)], + ? [hasToolCall("final_answer"), isStepCount(remaining)] + : [isStepCount(remaining)], ...(providerOptions ? { providerOptions } : {}), ...(useSchema ? { output: Output.object({ schema: jsonSchema(cfg.schema) }) } : {}), prepareStep, - onStepFinish, + onStepEnd, }) : agent; const attempt = resuming ? await runner.stream({ messages: [ - // response.messages holds only generated turns, so the task + // responseMessages holds only generated turns, so the task // itself has to lead the replay. { role: "user", content: basePrompt }, ...(bankedMessages as any[]), @@ -1068,9 +1068,9 @@ export default defineStep({ if (!streamError) { res = { steps: await attempt.steps, - response: await attempt.response, - totalUsage: await attempt.totalUsage, - usage: undefined as unknown, + // v7: `response` is final-step only; `responseMessages` spans every step. + responseMessages: await attempt.responseMessages, + usage: await attempt.usage, text: await attempt.text, output: useSchema ? await (attempt as any).output : undefined, }; @@ -1084,10 +1084,14 @@ export default defineStep({ throw streamError; } streamErrorContinuations++; + // v7 wraps the socket fault ("Failed to process successful response"); + // the root cause is the useful part of the log line. + let rootCause: any = streamError; + while (rootCause?.cause) rootCause = rootCause.cause; console.warn( `[agent] stream severed after ${bankedSteps.length} banked step(s) (${ (streamError as Error).message - }); resuming ${streamErrorContinuations}/${MAX_STREAM_ERROR_CONTINUATIONS}.`, + }${rootCause !== streamError ? `: ${rootCause?.message ?? rootCause}` : ""}); resuming ${streamErrorContinuations}/${MAX_STREAM_ERROR_CONTINUATIONS}.`, ); } // A resumed run's final attempt only knows its own segment — the banked @@ -1101,15 +1105,15 @@ export default defineStep({ // The full session is HUGE and the runner persists every step's output, so we // only include it when explicitly asked (a future fork/sub-agent). Off by // default keeps the explore step's persisted output to `{ result, steps, … }`. - const messages = resumedFromStreamError ? bankedMessages : (res.response?.messages ?? []); + const messages = resumedFromStreamError ? bankedMessages : (res.responseMessages ?? []); const maybeMessages = cfg.returnMessages ? { messages } : {}; - // Token usage + cost across the WHOLE agent loop (totalUsage aggregates every - // step; fall back to the final-step usage). `provider` drives the rate table. + // Token usage + cost across the WHOLE agent loop (v7 `usage` aggregates every + // step). `provider` drives the rate table. // Mutable so a forced final-answer turn (below) can be folded in. let usage = resumedFromStreamError ? bankedUsage - : usageFromResult(res.totalUsage ?? res.usage); + : usageFromResult(res.usage); let cost = costOf(usage); console.log( `[agent] tokens in:${usage.inputTokens} cacheRead:${usage.cacheReadTokens} cacheWrite:${usage.cacheWriteTokens} out:${usage.outputTokens} → $${cost.toFixed(4)}`, @@ -1138,15 +1142,15 @@ export default defineStep({ tools, maxOutputTokens, // At least a few turns even when the stop came near the cap. - stopWhen: [stepCountIs(Math.max(4, cfg.maxSteps - stepsUsed))], + stopWhen: [isStepCount(Math.max(4, cfg.maxSteps - stepsUsed))], ...(providerOptions ? { providerOptions } : {}), output: Output.object({ schema: jsonSchema(cfg.schema) }), prepareStep, - onStepFinish, + onStepEnd, }); const nudged = await nudger.stream({ messages: [ - // response.messages holds only generated turns — the task leads. + // responseMessages holds only generated turns — the task leads. { role: "user", content: basePrompt }, ...(messages as any[]), { @@ -1165,8 +1169,8 @@ export default defineStep({ if (nudgeError) throw nudgeError; const nudgedSteps = (await nudged.steps) ?? []; stepsUsed += nudgedSteps.length; - messages.push(...(((await nudged.response)?.messages ?? []) as any[])); - const nu = usageFromResult(await nudged.totalUsage); + messages.push(...(((await nudged.responseMessages) ?? []) as any[])); + const nu = usageFromResult(await nudged.usage); usage = addUsage(usage, nu); cost += costOf(nu); // The continuation may have done real work (a publish) before @@ -1231,15 +1235,15 @@ export default defineStep({ hasToolCall("final_answer"), // At least a few turns even when the stop came near the cap — // finishing file work takes more than one call. - stepCountIs(Math.max(4, cfg.maxSteps - stepsUsed)), + isStepCount(Math.max(4, cfg.maxSteps - stepsUsed)), ], ...(providerOptions ? { providerOptions } : {}), prepareStep, - onStepFinish, + onStepEnd, }); const nudged = await nudger.stream({ messages: [ - // The session's own user prompt first — response.messages holds + // The session's own user prompt first — responseMessages holds // only the generated turns, and the continuation needs the task. { role: "user", content: preamble ? `${preamble}\n\n${cfg.prompt}` : cfg.prompt }, ...(messages as any[]), @@ -1258,14 +1262,14 @@ export default defineStep({ if (nudgeError) throw nudgeError; const nudgedSteps = (await nudged.steps) ?? []; stepsUsed += nudgedSteps.length; - messages.push(...(((await nudged.response)?.messages ?? []) as any[])); + messages.push(...(((await nudged.responseMessages) ?? []) as any[])); for (const step of nudgedSteps) { for (const item of step.content) { if (item.type === "text" && item.text?.trim()) lastText = item.text.trim(); } } final = extractFinal(nudgedSteps); - const nu = usageFromResult(await nudged.totalUsage); + const nu = usageFromResult(await nudged.usage); usage = addUsage(usage, nu); cost += costOf(nu); } catch (e) { @@ -1300,7 +1304,7 @@ export default defineStep({ const ft = ((await forced.text) ?? "").trim(); if (ft) { final = ft; - const fu = usageFromResult(await forced.totalUsage); + const fu = usageFromResult(await forced.usage); usage = addUsage(usage, fu); cost += costOf(fu); } diff --git a/src/steps/core/llm.test.ts b/src/steps/core/llm.test.ts index a74cd41..ae656ff 100644 --- a/src/steps/core/llm.test.ts +++ b/src/steps/core/llm.test.ts @@ -5,7 +5,7 @@ import { jsonSchema } from "ai"; import llm, { toSdkSchema } from "./llm.js"; // OFFLINE: no model call. This covers the normalization a workflow's `schema:` -// goes through before generateObject. The bug it pins: a YAML workflow can only +// goes through before Output.object. The bug it pins: a YAML workflow can only // write a plain JSON Schema object, and handed one bare the SDK assumes a lazy // thunk and throws "schema is not a function". describe("llm step: toSdkSchema", () => { diff --git a/src/steps/core/llm.ts b/src/steps/core/llm.ts index 0bfa022..401a3da 100644 --- a/src/steps/core/llm.ts +++ b/src/steps/core/llm.ts @@ -51,7 +51,7 @@ export default defineStep({ output: z.any(), async run(cfg, ctx?: StepContext) { // Dynamic import to avoid hard dependency if not using LLM steps - const { generateText, generateObject } = await import("ai"); + const { generateText, Output } = await import("ai"); // Provider/model/key via the shared resolver (src/llm.ts → aieo): the key // comes through the secrets boundary (secret store → env). The output @@ -65,13 +65,13 @@ export default defineStep({ if (cfg.schema) { // Structured output - const result = await generateObject({ + const result = await generateText({ model, prompt: cfg.prompt, - schema: (await toSdkSchema(cfg.schema)) as any, + output: Output.object({ schema: (await toSdkSchema(cfg.schema)) as any }), maxOutputTokens, }); - return result.object; + return result.output; } else { // Free-form text const result = await generateText({ diff --git a/yarn.lock b/yarn.lock index ee73ff9..ca59989 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,131 +2,64 @@ # yarn lockfile v1 -"@ai-sdk/anthropic@3.0.105": - version "3.0.105" - resolved "https://registry.npmjs.org/@ai-sdk/anthropic/-/anthropic-3.0.105.tgz" - integrity sha512-6B9UjgK14JwG4PtyhHKMQrqg49s90FClsreNZ9HmMdSWZ9tJFHuYmy4cauS/BqO/6rKC+qcNEXTP45+qivdypA== +"@ai-sdk/anthropic@4.0.56", "@ai-sdk/anthropic@^4.0.56": + version "4.0.56" + resolved "https://registry.yarnpkg.com/@ai-sdk/anthropic/-/anthropic-4.0.56.tgz#5661158febc6852235521d6282a764639c0eabb1" + integrity sha512-rpz9LepVvjCs0YXWN/I5DLNAK/SbaA8g2sMTS1iyWQyH7Vsjqeonc3A7WbZiM6bfhNtrGO6irhvkDjL/xWpE1w== dependencies: - "@ai-sdk/provider" "3.0.14" - "@ai-sdk/provider-utils" "4.0.41" + "@ai-sdk/provider" "4.0.17" + "@ai-sdk/provider-utils" "5.0.43" -"@ai-sdk/anthropic@^3.0.92": - version "3.0.118" - resolved "https://registry.yarnpkg.com/@ai-sdk/anthropic/-/anthropic-3.0.118.tgz#877003ce21a213cc079b0522f0b9f7e32afe7f00" - integrity sha512-5j8Cc9owORxhhZxFtpznXPTdLxeWm6bPCVbndM0e+NdvGVxe9GDgNqQq1V0KqOV54hZ6hyQVEXHkgTRPyXzcQg== +"@ai-sdk/gateway@4.0.85": + version "4.0.85" + resolved "https://registry.yarnpkg.com/@ai-sdk/gateway/-/gateway-4.0.85.tgz#2638546bf188bbe3b5de187bc2a06cf1e1020d97" + integrity sha512-c8ztST/CslupqO3p7izsAuG3TlKg9mhE6mGJ42iUADsSMJIV5IOKd9AsLG33QCAY7SWs6NDO2giM/rq7bUTNlQ== dependencies: - "@ai-sdk/provider" "3.0.16" - "@ai-sdk/provider-utils" "4.0.51" - -"@ai-sdk/gateway@3.0.110": - version "3.0.110" - resolved "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-3.0.110.tgz" - integrity sha512-sbv8+1L9/BRKydn8dMNwoMQKupA4iLJ9N+yvxgW6wMQ/94UepDf3FeYWMj/dLdzolAHZ6izRUP4s5WqQkmJ2Zg== - dependencies: - "@ai-sdk/provider" "3.0.10" - "@ai-sdk/provider-utils" "4.0.26" - "@vercel/oidc" "3.2.0" - -"@ai-sdk/gateway@3.0.157": - version "3.0.157" - resolved "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-3.0.157.tgz" - integrity sha512-jO0LUsIQC+FeJRQI1KFiNcfTGp6a0lXrymekaXfBIvhVEOyt0NUyc9wiVi/dYGHQmWFXUo8QgmghgGAGLOPTAA== - dependencies: - "@ai-sdk/provider" "3.0.14" - "@ai-sdk/provider-utils" "4.0.40" + "@ai-sdk/provider" "4.0.17" + "@ai-sdk/provider-utils" "5.0.43" "@vercel/oidc" "3.2.0" -"@ai-sdk/google@3.0.67": - version "3.0.67" - resolved "https://registry.npmjs.org/@ai-sdk/google/-/google-3.0.67.tgz" - integrity sha512-Qeq+SidYtzMrcf0fdw3L0QLmtXK+ErwdBzbxS4+0Q/2UP85Ges8RJJcbAj7SO8e2JbeJoM35BLqkeNy1o3wJvQ== - dependencies: - "@ai-sdk/provider" "3.0.10" - "@ai-sdk/provider-utils" "4.0.26" - -"@ai-sdk/openai-compatible@2.0.46": - version "2.0.46" - resolved "https://registry.yarnpkg.com/@ai-sdk/openai-compatible/-/openai-compatible-2.0.46.tgz#85639c593f4ab9cd2df498e336acf4eda4cf8e83" - integrity sha512-23ExGdy3p0Grfz3BAjCbIOc74TjQc5nHu72e0+kx3hshvScp32a4nnQlzzG4VT1bDZxa9yPNNUNyb5nN6vJHcQ== - dependencies: - "@ai-sdk/provider" "3.0.10" - "@ai-sdk/provider-utils" "4.0.26" - -"@ai-sdk/openai@3.0.61": - version "3.0.61" - resolved "https://registry.npmjs.org/@ai-sdk/openai/-/openai-3.0.61.tgz" - integrity sha512-L5FdlTo+7IBOdXbnTZqVzowRdLGWnxPn01vHe4leLPp0G4ydoXhySu0tp0ttkoO0ZSzPjHo7iiAkYoT0J91Q8Q== +"@ai-sdk/google@4.0.74": + version "4.0.74" + resolved "https://registry.yarnpkg.com/@ai-sdk/google/-/google-4.0.74.tgz#b8fa386692f8a02bdc267a3eb7c130ba1aab47a9" + integrity sha512-MoWPhC+kwqiAsFF21iPDCxZPXW6lQYY1ImjohQ0q7VHgY4e8I/mfgKeeessYFI/mh0e7vSxG0/P767PSsTdngg== dependencies: - "@ai-sdk/provider" "3.0.10" - "@ai-sdk/provider-utils" "4.0.26" + "@ai-sdk/provider" "4.0.17" + "@ai-sdk/provider-utils" "5.0.43" -"@ai-sdk/provider-utils@4.0.26": - version "4.0.26" - resolved "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.26.tgz" - integrity sha512-CsKNLKsOpvPujRlIYvoz+Ybw+kGn7J4/fIZa/58+R7iWLLfwn6ifE2G6Yq8K9XvH/I/3bzaDAJ3NhRwEMsLBKQ== +"@ai-sdk/openai@4.0.69": + version "4.0.69" + resolved "https://registry.yarnpkg.com/@ai-sdk/openai/-/openai-4.0.69.tgz#6d4a84fec042c3b984bd9f02da75d77c27744a27" + integrity sha512-HAKua/QVNjwsBpJE3SUGLEPCSRThOLiiOy92gsUOkX4ZnEJHubkR6REHvi4RGGIn97lYBma+mq3BjBqgyNuhwQ== dependencies: - "@ai-sdk/provider" "3.0.10" - "@standard-schema/spec" "^1.1.0" - eventsource-parser "^3.0.8" - -"@ai-sdk/provider-utils@4.0.40": - version "4.0.40" - resolved "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.40.tgz" - integrity sha512-OL5IrpUm9Y8Dwy+w/vvFwPotS6m52O9W0op2oXgXdCROMJIBalBI0oro6OIBYkPxvm5Xg02GSkoQN25RlR0bnw== - dependencies: - "@ai-sdk/provider" "3.0.14" - "@standard-schema/spec" "^1.1.0" - eventsource-parser "^3.0.8" - -"@ai-sdk/provider-utils@4.0.41": - version "4.0.41" - resolved "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-4.0.41.tgz" - integrity sha512-I7hhjfw01yEI8NkuAsT8Mv6xbWFr/lqLXMdaJQ2zWfXEpxog1eT7skDcv1+RY29/+5btzH8wD+vVvy48bk9oNQ== - dependencies: - "@ai-sdk/provider" "3.0.14" - "@standard-schema/spec" "^1.1.0" - eventsource-parser "^3.0.8" - undici "^5.29.0" + "@ai-sdk/provider" "4.0.17" + "@ai-sdk/provider-utils" "5.0.43" -"@ai-sdk/provider-utils@4.0.51": - version "4.0.51" - resolved "https://registry.yarnpkg.com/@ai-sdk/provider-utils/-/provider-utils-4.0.51.tgz#705ce13868a01e45f2ee346e36079d6e697086f4" - integrity sha512-ukLTs9x1Xm6lxSIwbJIxYQxbZHmVeIczNntARZrBcOa6pjdBhqeZnATNnJMHa7M9dZ8Ji5NJbpKpvz7o5XyBtg== +"@ai-sdk/provider-utils@5.0.43": + version "5.0.43" + resolved "https://registry.yarnpkg.com/@ai-sdk/provider-utils/-/provider-utils-5.0.43.tgz#602f41419cea9cc0f230dc642ee05486a0af0c10" + integrity sha512-gw/bcNseOGSs59TMtV4H1KwqXXe24NHgx+uBYr98pa4Fg6Uvp8hPPxjuckVnfFFyIxHCDew8so0ujpvcSuyMZA== dependencies: - "@ai-sdk/provider" "3.0.16" + "@ai-sdk/provider" "4.0.17" "@standard-schema/spec" "^1.1.0" + "@workflow/serde" "4.1.0" eventsource-parser "^3.0.8" - undici "^6.28.0" + undici "^7.29.0" -"@ai-sdk/provider@3.0.10": - version "3.0.10" - resolved "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.10.tgz" - integrity sha512-Q3BZ27qfpYqnCYGvE3vt+Qi6LGOF9R5Nmzn+9JoM1lCRsD9mYaIhfJLkSunN48nfGXJ6n+XNV0J/XVpqGQl7Dw== +"@ai-sdk/provider@4.0.17": + version "4.0.17" + resolved "https://registry.yarnpkg.com/@ai-sdk/provider/-/provider-4.0.17.tgz#23c55190cdc3c52c94ea5fbf50ac2072593feab1" + integrity sha512-VYMBxIQdcHqbIf1j+YZlI9Ati6LZ4wJe0GGd4z4a5H/KxTggjeOiyaVYTnfF7LHZK5jMQ+rofmzz4QPqf++NUw== dependencies: json-schema "^0.4.0" -"@ai-sdk/provider@3.0.14": - version "3.0.14" - resolved "https://registry.npmjs.org/@ai-sdk/provider/-/provider-3.0.14.tgz" - integrity sha512-5X1k57JBJ4H7H1QjX7CnJYAB1I19r/trVZTMcSms7/kLNZ8RaU4Nt2agcwZzv82Hfx6Q7/TOLU7agAKeFfc8cA== +"@ai-sdk/xai@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ai-sdk/xai/-/xai-5.0.2.tgz#d4146cc3ca94766ee6bab64941a77803a21bd3f8" + integrity sha512-KVQscOx90KrIQauNua0Dh9jKNEPktqR7SSb2NKKkr1FkTUcKkVGKNDh2dOXtaD+AR5V9+ULe4UhplLvzwY+EKQ== dependencies: - json-schema "^0.4.0" - -"@ai-sdk/provider@3.0.16": - version "3.0.16" - resolved "https://registry.yarnpkg.com/@ai-sdk/provider/-/provider-3.0.16.tgz#f267ea7e9df9ee2aa782c0e50651dd3ac2d145f8" - integrity sha512-9Av6kg0t/IN/dcYAAmEJ4B9OPhcEJqwSR+GfHEA8olRkindXpUHadc3p3cyvgFUQFTVm1G5thtsmgZ9yVb2w3A== - dependencies: - json-schema "^0.4.0" - -"@ai-sdk/xai@3.0.88": - version "3.0.88" - resolved "https://registry.yarnpkg.com/@ai-sdk/xai/-/xai-3.0.88.tgz#3a7334f370ec977a955625348fcf34769f6b0c9c" - integrity sha512-9jc7CT+6YxdPnkMF66jX/LmFoEcRI2Cjr5CTxZcrCA8f764NPF0mGtaNRv3M0OzYwBIppgZ3F0TNhADguHWLrg== - dependencies: - "@ai-sdk/openai-compatible" "2.0.46" - "@ai-sdk/provider" "3.0.10" - "@ai-sdk/provider-utils" "4.0.26" + "@ai-sdk/provider" "4.0.17" + "@ai-sdk/provider-utils" "5.0.43" "@emnapi/runtime@^1.7.0": version "1.11.3" @@ -265,11 +198,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz#10064ee44f4347b90c9a02b446bbf80a91632b12" integrity sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A== -"@fastify/busboy@^2.0.0": - version "2.1.1" - resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz" - integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== - "@googleapis/drive@^20.2.0": version "20.2.0" resolved "https://registry.npmjs.org/@googleapis/drive/-/drive-20.2.0.tgz" @@ -557,20 +485,10 @@ dependencies: "@octokit/openapi-types" "^27.0.0" -"@openrouter/ai-sdk-provider@2.10.0": - version "2.10.0" - resolved "https://registry.npmjs.org/@openrouter/ai-sdk-provider/-/ai-sdk-provider-2.10.0.tgz" - integrity sha512-FMsAEjLUt5pWuRE2LDC/LCvVrFjLlrEzUITH5+5SZtfq7KZ2wrOHjQVxzz92sju8S9ltpzW87CLW8/b0oBXVCw== - -"@opentelemetry/api@1.9.0": - version "1.9.0" - resolved "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz" - integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== - -"@opentelemetry/api@^1.9.0": - version "1.9.1" - resolved "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz" - integrity sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q== +"@openrouter/ai-sdk-provider@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@openrouter/ai-sdk-provider/-/ai-sdk-provider-3.0.0.tgz#712c0a6e0088055483af96d8d6a03a37adab5e83" + integrity sha512-m9XTSWoODH2RM5OsZpaGiN7QRR8cdP5paBWq699Tu3JVmGPBKT8xF8XwV0ZBVVsjikD/JgWfak4VSsTR4wAVbg== "@pkgjs/parseargs@^0.11.0": version "0.11.0" @@ -678,6 +596,11 @@ resolved "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.2.0.tgz" integrity sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug== +"@workflow/serde@4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@workflow/serde/-/serde-4.1.0.tgz#82dbbaf2370f7b8ae46d9a9a4ab0917258f8db62" + integrity sha512-pav4F2BoirECWR7Nf1TKt+2eETcBj7jj4cBefQ8VXQCA6NPkaKeLfj/zMgi+3zYV5ZIBT4GuUiphsj0/b9hPQQ== + adm-zip@^0.5.16: version "0.5.18" resolved "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.18.tgz" @@ -688,38 +611,15 @@ agent-base@^7.1.2: resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz" integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ== -ai@6.0.175: - version "6.0.175" - resolved "https://registry.npmjs.org/ai/-/ai-6.0.175.tgz" - integrity sha512-6fFFHzbh6FIZnYc31V6osOxq25ABJYCShfG0O6ajHiA4FB/DgnPi1mP8cO5aAU3HNSbQHiMazdlh9bIsp97mVA== - dependencies: - "@ai-sdk/gateway" "3.0.110" - "@ai-sdk/provider" "3.0.10" - "@ai-sdk/provider-utils" "4.0.26" - "@opentelemetry/api" "1.9.0" - -ai@^6.0.196: - version "6.0.235" - resolved "https://registry.npmjs.org/ai/-/ai-6.0.235.tgz" - integrity sha512-Uyeuvowo20XChpFC0lUaQq8xf0Kg7OElA56fEjUYoeWMJIzqshDTz4S57KXobcJ4m+iDQxMeJoUj06CIxSLx7A== - dependencies: - "@ai-sdk/gateway" "3.0.157" - "@ai-sdk/provider" "3.0.14" - "@ai-sdk/provider-utils" "4.0.40" - "@opentelemetry/api" "^1.9.0" - -aieo@^0.1.41: - version "0.1.41" - resolved "https://registry.yarnpkg.com/aieo/-/aieo-0.1.41.tgz#97c873dd4ef9294c422044aeecfa8bbaeb3d389c" - integrity sha512-95Kh+H5qXHKr+jpuIXGgDQSBoZw+L/banxN8ZZN0Gcdi/fO9IWywgq7rvCkYYslnInry5rSIrGmu53lT0d5FOA== - dependencies: - "@ai-sdk/anthropic" "3.0.105" - "@ai-sdk/google" "3.0.67" - "@ai-sdk/openai" "3.0.61" - "@ai-sdk/xai" "3.0.88" - "@openrouter/ai-sdk-provider" "2.10.0" - ai "6.0.175" - zod "4.3.6" +ai@^7.0.105: + version "7.0.105" + resolved "https://registry.yarnpkg.com/ai/-/ai-7.0.105.tgz#10e2ef29766ee3b1dbe9fb5d1d463d55eec760c8" + integrity sha512-gkV3W+tTtWwQ41KNV/KjV8wabBrk+bnbnZ3f0AWp/T9LLyljose8uhFViKleVy7tIdEiR2PiS4BpbNdcExf7rQ== + dependencies: + "@ai-sdk/gateway" "4.0.85" + "@ai-sdk/provider" "4.0.17" + "@ai-sdk/provider-utils" "5.0.43" + ansi-regex@^5.0.1: version "5.0.1" @@ -1846,17 +1746,10 @@ undici-types@~8.9.0: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-8.9.0.tgz#e240d97c8b5d85e5347ce73d25865c7906c1ec9f" integrity sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg== -undici@^5.29.0: - version "5.29.0" - resolved "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz" - integrity sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg== - dependencies: - "@fastify/busboy" "^2.0.0" - -undici@^6.28.0: - version "6.28.1" - resolved "https://registry.yarnpkg.com/undici/-/undici-6.28.1.tgz#aa9d2c44aef3840bef80216f2a50f337543a3fbd" - integrity sha512-zWpdTVD54H48CIybL0rWQ3ukpb9d23wM7eH5RtfdmeP70cWHNjtfo7P4vZX+5CoDcO53J4Pu5uXp7lNfjc6DRA== +undici@^7.29.0: + version "7.29.1" + resolved "https://registry.yarnpkg.com/undici/-/undici-7.29.1.tgz#7741c6fc8b3e1a48e30323833642bfbe841443ad" + integrity sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q== universal-user-agent@^7.0.0, universal-user-agent@^7.0.2: version "7.0.3" @@ -1908,12 +1801,7 @@ ws@^8.21.3: resolved "https://registry.yarnpkg.com/ws/-/ws-8.21.3.tgz#660b4faddb6a3e575c86e078126919961f4de4fc" integrity sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw== -zod@4.3.6: - version "4.3.6" - resolved "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz" - integrity sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg== - -zod@^4.3.6: - version "4.6.2" - resolved "https://registry.yarnpkg.com/zod/-/zod-4.6.2.tgz#91b2ce79ec994eaa42675499166587d3d223c961" - integrity sha512-lh5RCAGFa1Cm2hjtNwLQhSs/AsqdWnTQaBER9fEwN/88pSh7KOtJavtBx/0VlkN/uFd61SwYmljLMDAsHlvzBQ== +zod@^4.6.5: + version "4.6.5" + resolved "https://registry.yarnpkg.com/zod/-/zod-4.6.5.tgz#e3af3edbdc260239c52f73caad05dbbffe6e82cd" + integrity sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q== From b5343c0fd67b3e74a2d3e100dfbc99ccd25f7ab7 Mon Sep 17 00:00:00 2001 From: Evanfeenstra Date: Thu, 17 Sep 2026 21:10:16 -0700 Subject: [PATCH 2/2] yarn.lock: aieo 0.2.0 Co-Authored-By: Claude --- yarn.lock | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/yarn.lock b/yarn.lock index ca59989..caea62d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -620,6 +620,16 @@ ai@^7.0.105: "@ai-sdk/provider" "4.0.17" "@ai-sdk/provider-utils" "5.0.43" +aieo@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/aieo/-/aieo-0.2.0.tgz#2af4521d70a16b0e3004f6446289df608e7da591" + integrity sha512-1IPsbqXehtc6+uCM4oL8JZse71Pb4D7NK7xicIhZCYBn8+wLjZ+ne5M4WMJfDkEqGgTfUYFrVlKXrDcRp9SNag== + dependencies: + "@ai-sdk/anthropic" "4.0.56" + "@ai-sdk/google" "4.0.74" + "@ai-sdk/openai" "4.0.69" + "@ai-sdk/xai" "5.0.2" + "@openrouter/ai-sdk-provider" "3.0.0" ansi-regex@^5.0.1: version "5.0.1"