unstale

npm / @flue/cli

@flue/cli

What changed in @flue/cli 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-15.

85 breaking1 security59 new APIs and options1 performance6 behavior and defaults5 tooling18 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

@flue/cli 2175 changes

Breaking changes 85

  • Tool arguments are now recorded on the standard OTel attribute for every payload shape, so OTel backends can display them.

    2.1.1release notes

  • Tool results are now recorded on the standard OTel attribute for every payload shape, so OTel backends can display them.

    2.1.1release notes

  • AgentDispatchOptions is renamed AgentReadOptions and belongs to read().

    2.0.0release notes

  • AgentPromptImage is renamed to DeliveredAttachment in @flue/sdk and @flue/react.

    2.0.0release notes

  • The SDK message option is now a DeliveredMessage rather than a string; images fold into attachments.

    2.0.0release notes

  • Adapter submission input types collapse into one interface for dispatch and direct submissions.

    2.0.0release notes

  • Custom stores must implement atomic, queued-gated terminal settlement for submissions that can never be claimed; no attempt is created.

    2.0.0release notes

  • Routes must now be mounted explicitly in app.ts; a missing app.ts is a build error.

    2.0.0release notes

  • Assistant steps within one submission now fold into one conversation message, accumulating parts in record order and summing usage.

    2.0.0release notes

  • The callback type is removed, and admission no longer accepts an onEvent callback parameter.

    2.0.0release notes

  • The agent module's named attachments export is removed; the attachment byte route is part of every agent router.

    2.0.0release notes

  • The MCP connection API is replaced by connection definitions and createMcpConnection.

    2.0.0release notes

  • Channel helper APIs rename conversationKey to instanceId without aliases.

    2.0.0release notes

  • Cloudflare Durable Object SQLite batches above 1 MB now spill into 512 KB chunk rows; batches above 12 MB fail with an actionable error.

    2.0.0release notes

  • Mount an agent explicitly in app.ts with createAgentRouter from @flue/runtime/routing.

    2.0.0release notes

  • The built-in bash tool is now a composable per-tool factory that accepts an environment.

    2.0.0release notes

  • Conversation content is captured into Workers Traces by default. Set content to false for content-free spans or provide a transform to redact or drop content.

    2.0.0release notes

  • The default Flue app factory is removed.

    2.0.0release notes

  • The SDK client now addresses one conversation by its full mount URL rather than baseUrl and agent-name/id.

    2.0.0release notes

  • Create an imperative MCP connection for module-scope use on the Node target.

    2.0.0release notes

  • The Actions surface is removed; model-invoked jobs are tools declared with useTool.

    2.0.0release notes

  • The initializer-based agent API is removed; a capitalized exported function in a use agent module is the agent.

    2.0.0release notes

  • The agent profile helper and AgentProfile type are removed.

    2.0.0release notes

  • The configuration helper moves to @flue/runtime/config; the @flue/cli/config export is removed.

    2.0.0release notes

  • instructions is now required; defineSkill validates and freezes definitions rather than packaging them, which happens lazily.

    2.0.0release notes

  • The single signature is dispatch(agent, { id, message }); the named-string form is removed and rejects non-definition arguments.

    2.0.0release notes

  • Dispatch requests now carry a validated DeliveredMessage instead of opaque input; user messages can include image attachments.

    2.0.0release notes

  • Configure maxAttempts and timeoutMs as a static on the agent function rather than in the removed config object.

    2.0.0release notes

  • Now contains the exception class name, while Flue's error taxonomy remains on error.type.

    2.0.0release notes

  • The Flue build command is removed; use Vite commands instead.

    2.0.0release notes

  • The Flue development command is removed; use Vite commands instead.

    2.0.0release notes

  • The terminal chat console package is removed.

    2.0.0release notes

  • Adapter authors use FLUE_FORMAT_VERSION and assertSupportedFlueFormatVersion instead of the schema-version contract.

    2.0.0release notes

  • The command now compiles and runs one agent module locally under Node without an HTTP listener or Cloudflare emulation; it streams events to stderr and prints the reply and conversation id.

    2.0.0release notes

  • Supply the prompt using --message; it replaces --input.

    2.0.0release notes

  • Flue is now adopted as a Vite plugin; use vite dev and vite build, with the Cloudflare plugin as an explicit sibling when targeting Cloudflare.

    2.0.0release notes

  • The output field is no longer accepted in the host-independent project configuration.

    2.0.0release notes

  • The root field is no longer accepted in the host-independent project configuration.

    2.0.0release notes

  • The telemetry attribute is removed; flue.submission.id is its replacement.

    2.0.0release notes

  • The dispatchId correlation field is removed; submissionId identifies activity for dispatched and direct submissions.

    2.0.0release notes

  • Remote aborts are distinguishable from failures using the value 'aborted'.

    2.0.0release notes

  • Persisted stores are stamped with format version 1 and refuse unsupported formats; beta-era stores must be cleared because there is no migration.

    2.0.0release notes

  • The fabricated GenAI semantic-conventions schema URL export is removed.

    2.0.0release notes

  • The public content policy type is removed in favor of the content transform surface.

    2.0.0release notes

  • Dispatch now resolves at admission with a durable DispatchReceipt and no longer accepts options; use handle.read to await the reply.

    2.0.0release notes

  • Read a settled reply by receipt or submissionId, including after process restarts; it rejects with AgentRunError on failure or abort.

    2.0.0release notes

  • The harness interface flattens to name, prompt(), compact(), and sandbox; session, sessions, shell, and fs are removed.

    2.0.0release notes

  • Channel packages use instanceId for the agent instance identifier previously named conversationKey.

    2.0.0release notes

  • Commands killed by their timeout now resolve with exit code 124, matching the timeout(1) convention.

    2.0.0release notes

  • Channel helper APIs rename parseConversationKey to parseInstanceId without aliases.

    2.0.0release notes

  • parseInstanceId replaces parseConversationKey and is now an escape hatch; agents should receive structured facts as creation data.

    2.0.0release notes

  • The direct agent HTTP body now accepts the validated DeliveredMessage shape instead of { message, images? }.

    2.0.0release notes

  • The adapter helper is renamed from prepareDirectSubmission.

    2.0.0release notes

  • Local CORS defaults now cover vite preview on both targets and are restricted to localhost-family origins; user overrides still win.

    2.0.0release notes

  • The SDK prompt method is removed; use send, wait, and history.

    2.0.0release notes

  • The function now returns AgentSubmission or undefined rather than a ReconciliationResult union.

    2.0.0release notes

  • The API provider registration helper is removed.

    2.0.0release notes

  • The option-bag provider registration API is removed; custom providers are pi-ai Provider objects registered with setProvider.

    2.0.0release notes

  • The agent module's named route middleware export is removed; protect mounts with ordinary middleware layered in app.ts.

    2.0.0release notes

  • Agents no longer receive an implicit in-memory sandbox; execution environments and shell/filesystem tools are available only when an agent declares useSandbox.

    2.0.0release notes

  • The contract now requires in-flight operations to settle when the sandbox dies, by a mechanism supported by the provider SDK.

    2.0.0release notes

  • Hand-rolled implementations that late-reject without the runtime wrappers are out of contract; adapters must not add their own abort race.

    2.0.0release notes

  • When options.signal aborts mid-command, the promise now rejects immediately with AbortError. A still-running remote command is treated as an orphan and its eventual settlement is consumed, not recorded.

    2.0.0release notes

  • The directory convention no longer creates routes or registrations; agents are registered by scanning for the use agent directive.

    2.0.0release notes

  • The directory convention no longer creates routes or registrations.

    2.0.0release notes

  • Resuming beyond the available stream head now returns a structured 416 error with the requested offset and current head.

    2.0.0release notes

  • Replaying a streaming record after its message has resolved now fails loudly instead of silently deduplicating it.

    2.0.0release notes

  • Canonical records now require submissionId, and joined deliveries' live events carry their own submission ID.

    2.0.0release notes

  • Reusing an idempotency key with a different payload rejects with a structured 409 containing the existing submission id.

    2.0.0release notes

  • Signal tagName is validated as an XML tag name at admission; malformed values throw InvalidRequestError.

    2.0.0release notes

  • A model-invoked task naming an undeclared agent now returns a plain tool result describing the miss and roster; programmatic resolution still throws SubagentNotDeclaredError.

    2.0.0release notes

  • Terminalizing a durable submission now records an interrupted-error outcome for every tool call without a confirmed outcome and commits the batch.

    2.0.0release notes

  • Tool run functions return an { output?, terminate? } envelope; bare strings remain shorthand, undefined is allowed in specified cases, and other bare values are rejected.

    2.0.0release notes

  • Schema-parsed tool arguments are now exposed as data rather than input.

    2.0.0release notes

  • MCP definitions can allowlist server tool names; a name the server does not expose is a hard error.

    2.0.0release notes

  • An agent module is identified by this first-statement directive; the build scans for it and registers each capitalized exported function as an agent.

    2.0.0release notes

  • The React hook now accepts the conversation URL instead of name and id.

    2.0.0release notes

  • Declare the required model during each agent render, exactly once; thinkingLevel and compaction are options.

    2.0.0release notes

  • Attach an execution environment explicitly; sandbox declarations can change at turn boundaries.

    2.0.0release notes

  • Declare subagents as values during an agent render; task calls can only name a declared subagent.

    2.0.0release notes

  • SDK wait now resolves void on completion and throws FlueExecutionError on failure or abort; aborted settlements use failure 'aborted'.

    2.0.0release notes

  • Synchronous result mode on agent HTTP POSTs is removed; prompts always return a 202 admission.

    2.0.0release notes

  • Markdown import attributes are removed; the resolved specifier determines the import behavior.

    2.0.0release notes

  • Skill import attributes are removed; the resolved specifier determines whether an import is a skill.

    2.0.0release notes

  • Workflow definitions, invocation, run stores and event streams, workflow routes, SDK namespaces, React hooks, and run UI are deleted without compatibility stubs.

    2.0.0release notes

Security 1

  • Webhook verification and request handling are hardened across channel packages, including timestamp freshness checks, repeated-value signing, guarded key refresh, and safer body-stream cancellation.

    2.0.0release notes

New APIs and options 59

  • Pin an agent's durable storage identity independently of its exported function name.

    2.0.0release notes

  • Settlements expose which submission answered a delivery that joined a running response.

    2.0.0release notes

  • Conversation settlements expose the submission whose response answered the settled submission, derived from shared attempt linkage.

    2.0.0release notes

  • Terminal advisories now provide the interrupted-call list as structured attributes so apps can settle run state without parsing text.

    2.0.0release notes

  • MCP definitions can supply a static bearer token or a resolver called freshly on each request.

    2.0.0release notes

  • Use cloudflareSandbox(stub) to run commands in a Cloudflare Sandbox container.

    2.0.0release notes

  • Adds optional checkpoint methods for incremental conversation folds; custom adapters without them remain functional but fall back to full replay with one warning per path.

    2.0.0release notes

  • An optional callback observes settlement of orphaned commands; its settlement value uses the exported OrphanedExecSettlement type.

    2.0.0release notes

  • Tools declared durable: true receive checkpointed steps whose completed results replay during recovery; step values must be small and JSON-serializable.

    2.0.0release notes

  • Validate and freeze an exportable MCP connection definition.

    2.0.0release notes

  • A unified message shape represents either user chat turns or structured signal events.

    2.0.0release notes

  • A caller-chosen key makes repeated admissions to the same agent instance converge on one submission and receipt; replays are marked deduplicated.

    2.0.0release notes

  • Public conversation messages expose display classification values for visible, hidden, or diagnostic messages.

    2.0.0release notes

  • Logged internal 500-class errors include a correlation ref in the response envelope, enabling callers to identify the matching server log entry.

    2.0.0release notes

  • Gains an optional second type parameter for typing the environment read by instrumentation.

    2.0.0release notes

  • Logged internal errors include a correlation-ref response header, including on body-less HEAD responses.

    2.0.0release notes

  • The CLI can seed instance creation data with --data and condition sends on an incarnation with --uid or --new.

    2.0.0release notes

  • A dependency-free, Node-evaluable subpath exposes shared GenAI content projection, transforms, truncation, content attributes, and semantic-convention revision constants.

    2.0.0release notes

  • The SDK error exposes the correlation ref from the envelope or header and includes it in the composed error message.

    2.0.0release notes

  • History snapshots now carry the stream's durable generation identity so observers can detect reset and regrowth.

    2.0.0release notes

  • Explicitly request durable abort of the running head and every queued submission.

    2.0.0release notes

  • Creates a durable handle for an agent instance with dispatch(), read(), and abort(); creating the handle itself performs no I/O.

    2.0.0release notes

  • Declare a Valibot schema for agent creation data as a function static.

    2.0.0release notes

  • Agent instances can declare typed creation data, read with useInitialData(), and receive it from senders; admission validates it synchronously and ignores it for existing instances.

    2.0.0release notes

  • Use local() from @flue/runtime/node as a sandbox factory that runs commands on the host.

    2.0.0release notes

  • Set optional: true to let a failed MCP server resolve to zero tools for that submission instead of failing it.

    2.0.0release notes

  • The direct agent endpoint accepts idempotencyKey as a reserved request-body sibling beside initialData and uid.

    2.0.0release notes

  • The exhaustive provider list selects which built-in providers, catalogs, and protocol implementations are bundled and resolvable; it can also be supplied inline on the Vite plugin.

    2.0.0release notes

  • Public conversation messages expose typed purpose values so clients can distinguish chat from internal, control, and advisory activity.

    2.0.0release notes

  • The SDK can await a submission's settled reply by admission or submission id, reattach after settlement, and throw FlueExecutionError for failed or aborted outcomes.

    2.0.0release notes

  • A pure SDK projection extracts the reply from history or observe state, including a reply coalesced from a busy conversation.

    2.0.0release notes

  • SDK sends accept an optional idempotencyKey so retries converge instead of duplicating submissions.

    2.0.0release notes

  • Register custom or customized pi-ai Provider objects with setProvider.

    2.0.0release notes

  • useFlueAgent() snapshots now expose the settlements index, and FlueConversationSettlement is re-exported.

    2.0.0release notes

  • The Node runtime can be assembled without an HTTP server so scripts, cron jobs, and tests can drive agents; stop() and await using drain and dispose it.

    2.0.0release notes

  • Programmatic runs can select providers using Provider objects.

    2.0.0release notes

  • Runs a named tool step with durable result recording before resolution; completed steps replay on recovery, while execution may repeat if a crash occurs before recording.

    2.0.0release notes

  • The updates view emits a checkpoint chunk so observers can detect stream incarnation changes and rehydrate.

    2.0.0release notes

  • observe() emits a live event immediately after durable admission; idempotent replays may emit it again.

    2.0.0release notes

  • observe() surfaces contained coordinator recovery failures as live events with operation and outcome discriminators.

    2.0.0release notes

  • observe() emits a live event from each attempt's context, including attemptCount and maxAttempts.

    2.0.0release notes

  • A tool can return terminate: true to end the agent turn after the current tool batch settles; the flag is durable across recovery.

    2.0.0release notes

  • In-process observe() streams tool-call argument text deltas for live previews; these events are not persisted or replayed.

    2.0.0release notes

  • Public conversation messages can include optional turn grouping and a signal descriptor, consistently across history snapshots and live updates.

    2.0.0release notes

  • Each instance receives a birth-time uid. Sends can require a matching incarnation, create only with null, or remain unconditional when omitted.

    2.0.0release notes

  • Register agent finish work; ctx.append can send the model back to work in the same response.

    2.0.0release notes

  • Register agent lifecycle work through a render hook.

    2.0.0release notes

  • Declare named client-facing data parts with a schema.

    2.0.0release notes

  • Read the delivered message in front of the model.

    2.0.0release notes

  • Obtain an instance-bound dispatcher from the agent render.

    2.0.0release notes

  • The hook exposes refresh() so applications can re-check conversations created out of band without faking an empty history snapshot.

    2.0.0release notes

  • Read the data supplied when an agent instance is created.

    2.0.0release notes

  • Declare instruction text through a hook during the agent render.

    2.0.0release notes

  • Declare an MCP server connection from the agent render; its tools mount under the mcp__server__tool naming scheme.

    2.0.0release notes

  • Add durable per-instance state with React-style functional updates.

    2.0.0release notes

  • Register a response-finish callback for response metadata.

    2.0.0release notes

  • Register a response-start callback during the agent render.

    2.0.0release notes

  • Declare a skill through a hook; it accepts a SkillReference or SkillDefinition directly.

    2.0.0release notes

  • Declare tools through a hook during the agent render.

    2.0.0release notes

Performance 1

  • Agent rescans and Cloudflare input regeneration now coalesce bursts into at most one in-flight pass and one queued pass.

    2.0.0release notes

Behavior and default changes 6

  • A delivery arriving mid-response can join the live response at the next turn boundary; a delivery that misses it runs afterward as its own submission.

    2.0.0release notes

  • Initialization is interactive and scaffolds the project skeleton; --target and --deploy answer prompts for scripted runs, while existing non-config files are not overwritten.

    2.0.0release notes

  • The native Cloudflare adapter's chat spans now include this attribute.

    2.0.0release notes

  • Adds a 90-second transport-silence watchdog, retries auth failures with fresh credentials up to three consecutive failures, and rehydrates on stream incarnation changes.

    2.0.0release notes

  • Terminal advisory messages for failed or aborted turns now carry a structured settlement outcome marker in snapshots and live updates.

    2.0.0release notes

  • On the Node target, the dev server loads the project's .env file set into the application environment, with shell-exported values taking precedence.

    2.0.0release notes

Tooling 5

  • Flue packages and newly scaffolded applications use compatible Hono dependencies, avoiding a newer root Hono alongside the runtime's older exact version and the resulting typecheck failure.

    2.1.1release notes

  • Its types now reference cloudflare:workers as type-only, leaving the runtime import graph unchanged.

    2.0.0release notes

  • The dev-only 503 runtime-unavailable envelope includes the underlying application load failure, and load-failure stacks are remapped to authored sources.

    2.0.0release notes

  • The Vite plugin now dedupes @flue/runtime and hono, warns about conflicting enforced config and multiple config files, and improves diagnostics and transform filtering.

    2.0.0release notes

  • Node-target preview serves the built app.mjs natively and requires a prior build; vite build emits both server.mjs and app.mjs.

    2.0.0release notes

Fixes and other changes 18

  • Flue accepts the Agent Skills spec field as guidance but does not enforce it; authorization must be enforced in your own tools and approval gates.

    2.1.1release notes

  • Installed packages once again include the bundled Flue documentation, so this command works out of the box.

    2.0.7release notes

  • Channel examples now preserve sender identity and event metadata as flat attributes during dispatch; Telegram media-only updates receive a placeholder body.

    2.0.0release notes

  • Wrong-environment import diagnostics now print the import chain, and identify import type as an escape hatch.

    2.0.0release notes

  • Workers AI binding models now include the hydrated AI Gateway catalog with metadata; OpenAI-prefixed gateway models use the Responses wire format, and uncatalogued gateway IDs still stream.

    2.0.0release notes

  • Resolved dynamic-tool parts now expose durably recorded tool-call duration in history snapshots and live updates.

    2.0.0release notes

  • Now reads HGETALL and CONFIG GET replies in both RESP2 and RESP3 shapes.

    2.0.0release notes

  • The documented pattern for reaching a private Flue agent over a Cloudflare service binding is to point the client's fetch option at the binding.

    2.0.0release notes

  • Both trace backends now stamp this attribute on execute_tool spans when the owning agent is known.

    2.0.0release notes

  • Completed assistant messages now preserve their submissionId in conversation history snapshots.

    2.0.0release notes

  • The documented convention distinguishes direct user-to-assistant chats (user) from broader channels and multi-user conversations (signal).

    2.0.0release notes

  • MCP tool connections no longer crash on Cloudflare Workers when a connected server advertises an output schema.

    2.0.0release notes

  • Now recovers from stalled streams, transient auth failures, stream resets, and stale offsets while following a settlement.

    2.0.0release notes

  • A provider-neutral error is thrown when the Cloudflare sandbox container dies during an RPC, allowing the operation to settle.

    2.0.0release notes

  • The native Cloudflare adapter's chat spans now include this attribute.

    2.0.0release notes

  • Local CORS defaults now cover Cloudflare-target vite dev; credentialed requests are allowed from localhost-family origins, and user overrides still win.

    2.0.0release notes

  • Now recognizes a settlement folded into a conversation-reset snapshot instead of waiting for another stream event.

    2.0.0release notes

  • Settlement followers now recover from stalls, transient auth failures, stream resets, and stale offsets rather than hanging or failing immediately.

    2.0.0release notes