Packages

@flue/runtime

2.3.1 · 18 Nov 2026Apache-2.0524.4k / weekRepositoryHomepagenpmAtom feed

Your version

2.1.0

18 Sep 2026Where it was published

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 }) and createOpenTelemetryInstrumentation({ 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 its tools/list response. The metadata is available on each Flue tool as tool.annotations:

    const connection = await createMcpConnection(definition);
    const deleteIssue = connection.tools.find((tool) => tool.name.endsWith('delete_issue'));
    
    console.log(deleteIssue?.annotations?.destructiveHint); // true

    defineTool() and useTool() also accept annotations, 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 timeoutMs execution bound: on expiry the harness aborts the tool's context.signal and settles the call with a ToolTimeoutError (the model sees Tool "<name>" timed out after <ms>ms and 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 contentBudgetBytes on createOpenTelemetryInstrumentation() / 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 timeoutMs on tool definitions: a per-call execution bound that aborts the tool's context.signal and settles the call with a ToolTimeoutError instead of letting one hung call consume the submission's durability budget.

  • Fix two bugs in the configurable content budget:

    • An invalid contentBudgetBytes value (non-integer, too small, or too large) now throws a TypeError at 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.