@flue/runtime
2.3.1 · 18 Nov 2026Apache-2.0524.4k / weekRepositoryHomepagenpmAtom feed
2.3.1 is the newest release of 2.x.
In short
3 new5 fixed
Release note
Minor Changes
Trace content budgets are now configurable.
createCloudflareTracing({ contentBudgetBytes })andcreateOpenTelemetryInstrumentation({ contentBudgetBytes })override the default 56 KiB per-span content pool — raise it (e.g.contentBudgetBytes: 200_000) to ship fuller prompts and tool results to an observability backend that isn't bound by workerd's 64 KiB span-attribute cap, or tighten it. The 128-byte sentinel floor and the shared-pool semantics are unchanged.Tools returned by
createMcpConnection()now retain the metadata sent by the MCP server in itstools/listresponse. The metadata is available on each Flue tool astool.annotations:const connection = await createMcpConnection(definition); const deleteIssue = connection.tools.find((tool) => tool.name.endsWith('delete_issue')); console.log(deleteIssue?.annotations?.destructiveHint); // truedefineTool()anduseTool()also acceptannotations, so wrappers can carry the metadata forward. Flue does not automatically change a tool's behavior based on these server-supplied values.Tools can now declare a
timeoutMsexecution bound: on expiry the harness aborts the tool'scontext.signaland settles the call with aToolTimeoutError(the model seesTool "<name>" timed out after <ms>msand the conversation continues) instead of letting one hung call consume the submission's durability budget.import { defineTool } from '@flue/runtime'; import * as v from 'valibot'; export const lookupCatalog = defineTool({ name: 'lookup_catalog', description: 'Query the upstream catalog API.', input: v.object({ sku: v.string() }), timeoutMs: 15_000, async run({ data, signal }) { // If this call exceeds 15s, `signal` aborts, the call settles with a // ToolTimeoutError the model sees, and the conversation continues — // the model can retry or change approach. const response = await fetch(`https://catalog.example.com/${data.sku}`, { signal }); return { output: await response.json() }; }, });
Patch Changes
The OpenTelemetry ecosystem page and Cloudflare target guide now document
contentBudgetBytesoncreateOpenTelemetryInstrumentation()/createCloudflareTracing(): an override for the default 56 KiB per-span content pool. Raising it ships fuller content only on backends not bound by workerd's span cap (the OpenTelemetry adapter); on the Cloudflare target it is a tightening control only, since workerd's 64 KiB span-attribute cap is a platform limit no setting raises.The MCP guide and Agent API reference now document preserved MCP tool annotations, including how trusted applications can inspect them and why server-supplied hints are not a security boundary.
The Tools guide and agent API reference now document
timeoutMson tool definitions: a per-call execution bound that aborts the tool'scontext.signaland settles the call with aToolTimeoutErrorinstead of letting one hung call consume the submission's durability budget.Fix two bugs in the configurable content budget:
An invalid
contentBudgetBytesvalue (non-integer, too small, or too large) now throws aTypeErrorat setup instead of producing confusing trace content later.The span that records conversation compaction now honors the configured budget, so its content is truncated or shipped consistently with every other span.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.