Packages

@flue/opentelemetry

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

Upgrading @flue/opentelemetry From 0.11.1 to 2.0.0

1 release in betweenevery note read

Other targets from 0.11.1Latest2.3.1
  1. 0.11.1yours
  2. 2.0.0target

Start here

Before you upgrade

Tick each one off as you go
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0
  • Breaking2.0.0

Release by release

  1. 2.0.0

    Migration needed31 Jul 202618 new · 43 fixes
    • Breaking

      Flue is now a Vite plugin — flue dev and flue build are removed. Adopt Flue by adding flue() from the new @flue/vite package to vite.config.ts; vite dev and vite build own the deployable application. The Node target emits dist/server.mjs (run it with node dist/server.mjs; vite preview for Node is deferred). The Cloudflare target is the official @cloudflare/vite-plugin as an explicit sibling — plugins: [flue(), cloudflare({ config: flueWorkerConfig() })] — with the target auto-detected from cloudflare()'s presence; wrangler.jsonc stays user-owned, and Flue's contributions (the generated Worker entry, served as the virtual:flue/worker module, and the per-agent Durable Object bindings) are applied in memory by the flueWorkerConfig() customizer — nothing is generated into the project tree. flue.config.ts survives as the host-independent project config: defineConfig moves to @flue/runtime/config (the @flue/cli/config export is removed), the accepted fields are target, app, db, cloudflare, agents (a glob narrowing the 'use agent' scan), providers, and tracing, and the root/output fields and named vite export are dropped. See the migration guide for the full before/after.

    • Breaking

      File-based routing is removed — app.ts is the route map. The src/agents/*, src/workflows/*, and src/channels/* directory conventions no longer create routes or registrations. An agent module joins the application through the 'use agent' directive (the module's first statement); the build scans source files for the directive and registers every capitalized exported function as an agent, deriving each agent's durable storage identity from the exported function's name — or an agentName static pinning it — never from the file (on Cloudflare, one generated Flue<PascalName>Agent Durable Object class per exported agent function; renaming an unpinned function is the storage-identity change, expressed with wrangler-native renamed_classes, and colliding identities are a build error — renaming the file changes nothing). Every HTTP route is mounted explicitly in app.ts: app.route('/agents/triage', createAgentRouter(Triage)) for agents (createAgentRouter from @flue/runtime/routing), app.route('/channels/slack', slack.route()) for channels (hand-rolled channels mount via createChannelRouter). The router factory is pure and side-effect-free — registration comes from the scan, so dispatch-only agents need no mount, and the same agent can be mounted at two URLs. The agent module's named exports route (middleware), attachments, and description are removed along with the convention that read them: protect a mount with ordinary middleware layered in app.ts before it, and the attachment byte route is part of every agent router rather than opt-in. createDefaultFlueApp() and the runtime flue() router are removed; a missing app.ts is a build error.

    • Breaking

      Workflows are removed. defineWorkflow, invoke, run stores and run event streams, the /runs/:runId and POST /workflows/:name routes (including ?wait=result), listRuns/getRun, the SDK client.workflows/client.runs namespaces, the React workflow hooks, and the dev-console run UI are all deleted, with no compatibility stubs. Conversations are the only durable unit: a workflow becomes a program that drives an agent — flue run in a shell or CI step, the start()/init() JS API from Node, the Agent SDK over HTTP, or an external durable-workflow engine (Cloudflare Workflows, Inngest, Temporal) that checkpoints the dispatch receipt in one step and reads the settled reply in another. A deterministic code-first entrypoint (the old no-model run() body) has no direct replacement. The migration guide covers the conversion.

    • Breaking

      Agent authoring is rewritten: an agent is a plain exported function configured with hooks, and defineAgent is removed. A beta agent was a defineAgent(initializer) default export whose initializer returned a config object (model, instructions, tools, actions, skills, subagents, sandbox, …); now the capitalized exported function in a 'use agent' module is the agent. It runs fresh before every model call (a render), its return string is the instruction document, and everything else is declared by calling hooks during the render: useModel(model, { thinkingLevel?, compaction? }) (required, exactly once — the old model/thinkingLevel/compaction config fields), useInstruction(text), useTool(tool), useSkill(skill), useSubagent(subagent), useMcpConnection(definition), useSandbox(factory, { cwd? }), usePersistentState(name, default?) (durable per-instance state with React-style functional updates), useInitialData() (instance-creation data), useDelivery() (the delivered message in front of the model), useDataWriter(name, { schema }) (named client-facing data parts), useDispatchMessage() (an instance-bound dispatcher), and the lifecycle and response-boundary hooks useAgentStart(run), useAgentFinish(run) (whose ctx.append can send the model back to work in the same response), useResponseStart(fn), and useResponseFinish(fn) (response metadata). Because the render re-runs each turn, declarations may be conditional: a tool, skill, subagent, MCP connection, or sandbox that appears or disappears between renders takes effect at the next turn boundary and is narrated to the model as a structured delta signal. Custom hooks are ordinary use* functions — composition needs no registration. The contract the platform reads without running the function lives in statics on the function itself: agentName (the durable-identity override), initialData (a Valibot schema for creation data), and durability ({ maxAttempts, timeoutMs }, previously a config field). Deleted with the old model: defineAgent, createAgent, defineAgentProfile and AgentProfile, and the whole Actions surface (defineAction, the actions: [...] list, and their error types) — a model-invoked job is a useTool tool now, with harness: true for one that needs to prompt the harness. Subagents are declared values too: useSubagent(defineSubagent({ name, description, agent, model?, thinkingLevel? })) renders a delegate for the always-present task tool, GeneralSubagent is the exported general-purpose delegate, and a task call can only name a declared subagent. See the migration guide.

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.