chore(deps): Update dependency @flue/cli to ^0.11.0#48
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
593ce33 to
fb46113
Compare
6dbc439 to
73ffc20
Compare
73ffc20 to
d1ce0b2
Compare
d1ce0b2 to
9e7b815
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.3.10→^0.11.0Release Notes
withastro/flue (@flue/cli)
v0.11.1Compare Source
New Features
@flue/sdkprompts can include images with up to 14 MiB of encoded data per image. Node and Cloudflare SQLite persistence stores image data in safe chunks and restores it for future turns and after restarts.Fixes & Other Changes
v0.11.0New Features
flue docsbrowses the documentation offline. The docs markdown already shipped inside@flue/cliis now reachable from the command line:flue docslists every page,flue docs read <path>prints one page as Markdown, andflue docs search <query>prints ranked JSON results. Content requires no network access and always matches the installed CLI version. Designed for coding agents (search → read), per Documentation.Fixes & Other Changes
message_*,turn_request,turn_end,agent_end,tool_call) keep theirmimeTypebut havedatareplaced with the exportedIMAGE_DATA_OMITTEDsentinel before events reach observers and persisted run history. Model context and persisted session history retain the real bytes. Events persisted before this change are unaffected.@earendil-works/pi-aiand@earendil-works/pi-agent-coreto 0.79.1.v0.10.2Fixes & Other Changes
message_update,text_delta,thinking_start,thinking_delta,thinking_end) are now throttle-batched and flushed to the event stream store at most once every 3 seconds instead of on every chunk. Live stream readers still see deltas; history replay and interrupted-stream recovery are unaffected.Breaking Changes
GET(catch-up, long-poll, SSE) with automatic offset-based reconnection.POST /agents/:name/:idnow returns202 { streamUrl, offset }; add?wait=resultfor200 { result, streamUrl, offset }.GET /agents/:name/:idreads the event stream.GET /runs/:runIdreplaces both/runs/:runId/eventsand/runs/:runId/stream. WebSocket transport,AgentSocket,WorkflowSocket, and all socket-related types are removed from@flue/runtimeand@flue/sdk.sessionparameter is removed from prompt submission, dispatch, SDK, and CLI. Agent instances always use the"default"session internally. An agent instance is now a single conversation with a single event stream.@durable-streams/client.@flue/sdknow exportsagents.prompt(),agents.send(),agents.stream(),runs.stream(),runs.events(), andworkflows.invoke().agents.prompt()waits for the result;agents.send()returns stream coordinates immediately.FlueEventStream<T>wraps the DS client'sjsonStream()as an async iterable withcancel()andoffsetsupport.connectEventStreamStore()is now required onPersistenceAdapter. Custom adapters must implement this method and provide durable event-stream storage. The built-insqlite()and@flue/postgresadapters provide implementations.client.runs.get()now reads from the admin mount. Applications using that SDK method must mountadmin()and configure the client with the matching admin base path.New Features
@flue/postgressupports durable event streams.PgEventStreamStoreprovides a Postgres-backed implementation ofEventStreamStorewith transactionalappendEvent, in-process subscriber hooks, and full DDL in the existing migration transaction. Postgres deployments now have workingGETstream endpoints for agents and workflow runs.GETsupports catch-up (JSON array), long-poll (30s timeout withStream-Cursor), and SSE (with 15s heartbeat and control events).HEADreturns stream metadata. Responses includeStream-Next-Offset,Stream-Up-To-Date,Stream-Closed,ETag, andCache-Controlheaders per the DS protocol spec. Reads useCache-Control: no-store; there is no fallback polling path when a live subscription is unavailable.Fixes & Other Changes
RunStorereduced to metadata only.appendEvent()andgetEvents()removed; events are exclusively inEventStreamStore.RunSubscriberRegistrydeleted.202with stream coordinates;?wait=resultreturns the terminal result. Event observation is decoupled from POST responses via the DS stream read path.SqliteEventStreamStorecreates its own tables in the constructor. No separateensureEventStreamTables()call required; removed fromensureSqlAgentExecutionTables()and@flue/runtime/internalexports.flue logsrewritten to use@flue/sdkDS streaming. Removed dead--sessionflag.v0.10.1Compare Source
Fixes & Other Changes
appbindings.@earendil-works/pi-aiand@earendil-works/pi-agent-coreto 0.79.0.InvalidStateErrorwhenCmd/Ctrl+Kis pressed while already open (#214).deleted_classesandrenamed_classesmigration examples to the Cloudflare target documentation (#203).v0.10.0Compare Source
This is a large pre-1.0 release that establishes Flue's durability model across Node.js and Cloudflare. Rather than cataloging every intermediate beta change, this entry highlights the final APIs and the most important upgrade work. For guides and API reference, see the documentation.
Breaking Changes
FLUE_<NAME>_AGENT,FLUE_<NAME>_WORKFLOW,FLUE_REGISTRY,Flue<Name>Agent,Flue<Name>Workflow, andFlueRegistry. Existing deployments must add authored Wranglerrenamed_classesmigrations for already-deployed agent and workflow classes, update direct binding access such asenv.Assistanttoenv.FLUE_ASSISTANT_AGENT, and introduce fresh SQLite-backed agent classes throughnew_sqlite_classes; existing KV-backed classes cannot be converted in place. Installagents >=0.14.1 <0.15.0for the audited Agents SDK behavior used by this release.tool_execution_*event types, the@flue/runtime/app,@flue/runtime/client, and@flue/runtime/sandboxcompat subpaths, publicAgentConfig/DirectAgentPayloadexports, public Cloudflare agent WebSocket adapters,store()from@flue/runtime/cloudflare, and the old Cloudflare shell migration stubs.connectRunStore()andconnectRunRegistry()onPersistenceAdapter, useSubmissionClaimRefforclaimSubmission(), and providerenewLeases(),listExpiredSubmissions(), anddeleteSession()onAgentSubmissionStore.task:are now reserved for framework-owned delegated-task history, and existing version-4 beta session state is rejected because provider affinity now uses one opaqueaff_<ULID>key instead of derived instance/harness/session identifiers.captureContentis replaced by an application-ownedsanitize(event)callback; metadata and generic failure messages are exported by default.New Features
Unified durable agent execution. Direct HTTP, SSE, WebSocket, local CLI, and
dispatch(...)inputs now share one SQL-backed submission lifecycle on Node and Cloudflare: admission, same-session ordering, claiming, journaled execution, conservative recovery, and retained terminal receipts.Pluggable persistence. Add source-root
db.tsadapters, built-insqlite(path?)persistence for Node, the new@flue/postgrespackage, and the@flue/runtime/adapter/@flue/runtime/test-utilssubpaths for custom backend authors.Signal messages and mid-turn recovery. Stream chunks are persisted during provider output so interrupted turns can resume from partial assistant text. Framework-injected context now uses signal messages for stream interruption/continuation, terminal submission advisories, dispatched input, compaction summaries, and branch summaries.
Cloudflare extension hooks. Agent and workflow modules may export
cloudflare = extend({ base, wrap })from@flue/runtime/cloudflareto add native Agents SDK lifecycle hooks beneath Flue-owned routing or wrap generated Durable Object classes with integrations such as Sentry.Fixes & Other Changes
@flue/postgresstores runs, run events, and the run registry in SQL-backed tables; built-in SQLite keeps run history in memory.(runId, eventIndex), and Cloudflare workflow storage preserves same-ID reset behavior and explicit terminalnullresults.resolveRootContext(event, ctx)for parenting Flue roots under application-owned spans.v0.9.2Compare Source
Fixes & Other Changes
activate_skilltool.v0.9.1Compare Source
Fixes & Other Changes
cwdexactly once duringinit(), relative to the connector's provider-owned base directory.SandboxFactory.createSessionEnv()now receives only{ id }; connector implementations should stop consumingcwdthere.@flue/sdknow exports option types for direct agent invocation, socket prompts, workflow-run event retrieval and streaming, and admin run listing, plus theRunStatustype.GET /admin/agentsandclient.admin.agents.list()return one unpaginated list of all built agents. The unusednextCursorresponse field was removed from the SDK and OpenAPI schema.requestIdvalues, including optional agent ping IDs.cloudflare.tsmodule to export application-owned Durable Objects and compose non-HTTP Worker handlers. Addressable agent modules may exportcloudflare = extend({ base, wrap })from@flue/runtime/cloudflareto add native Agents SDK lifecycle hooks beneath Flue-owned routing or wrap the final generated Durable Object class with integrations such as Sentry.cloudflare.tsmodule instead of relying on the removedSandbox-suffix auto-wiring.v0.9.0Compare Source
Breaking Changes
@flue/runtime/app. Importflue,admin, andFetchablefrom@flue/runtime/routing. Import provider APIs andobservefrom@flue/runtime, and Workers AI binding types from@flue/runtime/cloudflare. Rename theProviderSettingstype toProviderConfiguration..flue/,src/, then the project root. If your project already has asrc/directory, move root-level agents and workflows into the selected source directory so Flue continues to discover them.flue-class-*migration history from the previously generated.flue-vite.wrangler.jsoncor builtwrangler.jsoninto the project-root Wrangler config. Keep deployed tags unchanged, and append a uniquely taggednew_sqlite_classesentry whenever you add an agent or workflow class.provider-id/model-id.registerProvider(providerId, ...)no longer accepts a separateprovideroverride,configureProvider(providerId, ...)uses the same ID, and binding-backedcloudflare/...models now report provider IDcloudflare. Prompt responses now exposemodel: { provider, id }.baseUrl. Its pathname is now used for public HTTP, SSE, and WebSocket routes. RemovewebsocketBasePath; keepadminBasePathonly for an independent admin mount.New Features
.envvalues automatically. Use--env <path>to select one alternate file; shell values still take precedence.flue devafter configuration changes. Creating, editing, or deleting an auto-discoveredflue.config.*file restarts the development session with freshly resolved settings. Explicit--config <path>files are watched too.flue logs. Repeat--header 'Name: value'to send application-owned headers when inspecting workflow runs. Redirects are rejected so credentials stay on the selected server.WorkflowSocket.runIdresolves after admission, before the workflow result arrives.FlueApiError.@flue/sdknow exports the error type with the HTTP status and parsed response body when available.cloudflare/...models now pass reasoning effort toenv.AI.run(...)for models that support it.Fixes & Other Changes
observe()subscribers now receive isolated event snapshots, and rejected async callbacks no longer interrupt runtime execution.local()sandboxes.--envfile.flue build,flue dev,flue run, andflue connectreject repeated--envflags. Combine values into one file or use shell environment overrides.session.delete()andharness.sessions.delete()now reject while the selected session has an active operation.registerFauxProvider(...),fauxAssistantMessage(...),fauxText(...), andfauxToolCall(...)from@earendil-works/pi-aiinstead of@flue/runtime.v0.8.1Compare Source
New Features
@flue/opentelemetryfor tracing Flue model turns through OpenTelemetry-compatible observability tooling.Fixes & Other Changes
v0.8.0Compare Source
This is a large pre-1.0 release that establishes Flue's model for building persistent agents and finite workflows. Rather than cataloging every intermediate beta change, this entry highlights the final APIs and the most important upgrade work. For guides and API reference, see the documentation.
New Features
agents/now define persistent, addressable agent instances withcreateAgent(...); files inworkflows/define finite executions withrun(...). Agents maintain sessions across direct interactions and dispatched inputs, while workflows own persisted runs and results.dispatch(...), and WebSocket conversations. Workflows support HTTP and WebSocket invocation, and@flue/sdknow includes typed clients for connecting to deployed Flue applications.createAgent(...),defineAgentProfile(...),defineTool(...), and named subagents provide explicit reusable building blocks for model configuration, runtime resources, tools, skills, and delegation.SKILL.mddependencies as validatedSkillReferencevalues, bundle their supporting files for Node or Cloudflare, and import attributed Markdown through the shared Vite build pipeline.Breaking Changes
agents/toworkflows/; long-lived agent modules now default-exportcreateAgent(...). Workflows create harnesses withinit(agent)rather than inlineinit({ ... })configuration.routeandwebsocketmiddleware exports. Runs,/runs, andflue logsnow describe workflows only; direct or dispatched agent interactions correlate by instance, session, operation, anddispatchIdinstead ofrunId.task({ role })to nameddefineAgentProfile(...)subagents andtask({ agent }); migrate reusable agent definitions to profiles andToolDefimports toToolDefinition..dev.vars/.envandCLOUDFLARE_ENVconventions. Cloudflare workflows now receive per-workflow Durable Object bindings, so review generated Wrangler configuration when upgrading.flue add @​cloudflare/shelland import its workspace sandbox helpers from the generated connector rather than@flue/runtime/cloudflare.Fixes & Other Changes
v0.7.1Fixes & Other Changes
v0.7.0New Features
getShellSandbox({ workspace, loader }),getDefaultWorkspace(), andhydrateFromBucket()from@flue/runtime/cloudflare. The new sandbox wires@cloudflare/shellWorkspaces into Flue through a codemodecodetool backed by a Worker Loader binding. Agents usestate.*inside thecodetool instead of bash/read/write/grep/glob. Use@cloudflare/shelldirectly for primitives likeWorkspace,WorkspaceFileSystem, andcreateGit.Breaking Changes
getVirtualSandbox()now throws with a migration message. The previous API described R2 as if it were mounted directly as the harness filesystem, but@cloudflare/shellWorkspaces are SQLite-indexed filesystems with optional R2 blob spillover; raw bucket keys uploaded outside Workspace were invisible. Migrate bucket-backed agents togetShellSandbox({ workspace, loader })plushydrateFromBucket(workspace, env.BUCKET)beforeinit(). If you used zero-arggetVirtualSandbox(), remove it and omitsandboxfrominit()to use Flue's default in-memory sandbox.v0.6.2Fixes & Other Changes
init({ cwd })with a relative path now resolves against the sandbox cwd. Previously,init({ cwd: 'relative/path' })was treated as if absolute against the sandbox root ('relative/path'→/relative/path), so agents ran in the wrong directory — potentially discovering the wrongAGENTS.md, skills, or pointing shell/file operations at unintended paths. Relativecwdvalues now resolve against the parentSessionEnv'scwd, matching the pattern already used for task sessions. Absolute paths are unchanged. Fixes #152.flue --config <path>resolves against the caller's cwd, not--root. The explicit--configflag was being resolved againstsearchFrom(effectively--root), contradicting the CLI help text and the config-module doc comment, and diverging from Vite/Astro behavior. Explicit--configpaths now resolve againstprocess.cwd(). Auto-discovery (no--configflag) still scanssearchFrom, so--rootcontinues to influence where the config is looked up when one wasn't named explicitly. Fixes #152.isBashLikeduck-check no longer acceptsfs: null. Becausetypeof null === 'object', an object like{ exec, getCwd, fs: null }slipped pastassertBashLike/isBashLikeand crashed later insidecreateBashSessionEnvon the firstfs.readFile(...)call instead of failing with the clear"BashFactory must return a Bash-like object"validation error. The check now rejectsfs: nullexplicitly, and the predicate is shared betweensandbox.tsandclient.tsso the two copies can't drift. Fixes #149.v0.6.1Fixes & Other Changes
@earendil-works/*package scope. Replaced deprecated@mariozechner/pi-aiand@mariozechner/pi-agent-coredependencies and imports with@earendil-works/pi-aiand@earendil-works/pi-agent-core, and updated the website model registry endpoint to read from the new package scope. Fixes #143.v0.6.0New Features
Compaction tuning on
init({ compaction })and on-demandsession.compact(). Compaction (the mechanism that summarizes older messages when context approaches the window limit) is now configurable from agent code.init({ compaction: { reserveTokens, keepRecentTokens, model } })lets agents shape the headroom buffer, the verbatim tail size, and the summarization model.init({ compaction: false })disables threshold compaction entirely (overflow recovery still runs).session.compact()triggers compaction on demand for Claude-Code-style/compactUX — surfaces in the event stream ascompaction_startwithreason: 'manual'and asoperation_startwithoperationKind: 'compact'. Throws if another operation (prompt/skill/task/shell) is in flight on the session. Fixes #135, #136.local()sandbox factory for host-bound agents on Node. A new factory exported from@flue/runtime/node.init({ sandbox: local() })builds aSessionEnvthat binds directly to the host:execruns through the user's shell, file methods hit the real filesystem, andcwddefaults toprocess.cwd(). Env exposure is opt-in by design — only a small allowlist of shell essentials (PATH,HOME,USER,LOGNAME,HOSTNAME,SHELL,LANG,LC_ALL,LC_CTYPE,TZ,TERM,TMPDIR,TMP,TEMP) is inherited fromprocess.env. Anything else, including API keys and tokens, must be passed explicitly via theenvoption, which keeps host secrets out of the agent'sbashtool by default. Set a key toundefinedto drop a default; passenv: { ...process.env }to opt into the full host env.Public OpenAPI spec for Flue's built-in routes.
GET /openapi.jsonnow serves an OpenAPI 3.1 document forPOST /agents/<name>/<id>andGET /runs/<runId>{,/events,/stream}. The spec is generated from Valibot schemas viahono-openapi, includes Flue's canonical error envelope, documents SSE routes withx-flue-streaming: true, and marks agent invocation payloads as user-defined.Read-only admin API sub-app.
admin()is now exported from@flue/runtime/appand can be mounted by user apps with their own auth middleware, e.g.app.use('/admin/*', myAuthMiddleware); app.route('/admin', admin()). It servesGET /openapi.json,GET /agents,GET /agents/<name>/instances,GET /agents/<name>/instances/<id>/runs,GET /runs, andGET /runs/<runId>relative to the mount point. Flue ships no auth opinions; middleware order in the user's Hono app controls access.SDK scaffold for public and admin APIs. The
@flue/sdkworkspace package now contains a private, hand-written typed client scaffold for deployed Flue apps. It covers agent invocation modes, run lookup/events/streams, and read-only admin routes. The runtime still serves OpenAPI specs, but SDK code generation is deferred until a later pass can wire real spec snapshots and generated request methods end-to-end.Breaking Changes
sandboxmagic strings removed.init({ sandbox })no longer accepts the literal strings'empty'or'local'. The TypeScript union excludes both, and the runtime throws with a migration message for JS callers /any-typed inputs.sandboxoption entirely or passfalse.local()factory from@flue/runtime/node. It also lets you opt host env vars into the sandbox vialocal({ env: { ... } }).Malformed run-event query parameters now return structured 400 errors.
GET /runs/<runId>/eventsvalidates query params before reading run history.limitmust be an integer in[1, 1000];aftermust be a non-negative integer;typesmust be a comma-separated list of known Flue event type names. Previously malformedlimit/aftervalues were silently defaulted or ignored.Run-lookup HTTP routes are now identified by
runIdalone. The previousGET /agents/<name>/<id>/runs/<runId>{,/events,/stream}route family is removed and replaced withGET /runs/<runId>{,/events,/stream}. The new routes work end-to-end on both Node and Cloudflare for any run that exists anywhere in the deployment — the server resolves the owning(agentName, instanceId)via a new internal run registry, so callers no longer need to know which agent or instance ran a given run id. External consumers hitting the old paths will get a 404; update to the bare form. ThePOST /agents/<name>/<id>invocation route is unchanged.flue logsnow takes only the run id. The CLI signature simplifies fromflue logs <agent> <id> <runId>toflue logs <runId>, matching the new route shape. The<agent>and<id>positional arguments are removed.Cloudflare deployments gain a new
FlueRegistryDurable Object class. Auto-injected into the generateddist/wrangler.jsoncas a SQLite-backed DO binding (FLUE_REGISTRY) and a migration entry (flue-class-FlueRegistry). New deployments include it in their initial migration; existing deployments upgrading get a single appended migration entry. No user action required — the build's wrangler-merge owns the injection.@flue/sdkhas been renamed to@flue/runtime. The runtime library that user agent code and the generated server depend on is now published as@flue/runtime. User-facing agent, connector, MCP, and sandbox helper APIs now import from the root@flue/runtimeentry; the old@flue/sdk/clientand@flue/sdk/sandboxsubpaths are folded into root. Platform/internal subpaths remain (@flue/runtime/app,@flue/runtime/cloudflare,@flue/runtime/node,@flue/runtime/internal). To migrate, replace user-code@flue/sdkimports with@flue/runtime. Generateddist/artifacts must be rebuilt — the new build emits@flue/runtime/*imports inserver.mjs/_entry.ts.The transitional
@flue/runtime/clientand@flue/runtime/sandboxsubpaths still resolve for now, but immediately throw with migration guidance. They will be removed in a later release.Build tooling (
build,dev,parseEnvFiles,resolveEnvFiles,resolveSourceRoot, the build plugins, env-file helpers) has moved from@flue/sdkto@flue/cli.@flue/runtimeis now a pure runtime library with noesbuild/typescript/wranglerbaggage. Thewranglerpeer dependency moved with it and is now on@flue/cli. If you were driving the build programmatically viaimport { build } from '@​flue/sdk', update to import from@flue/cli(currently via internal paths; a stable public API will land separately).flue.config.tsnow importsdefineConfigfrom@flue/cli/config. Update existing configs:This sets up the eventual collapse to
import { defineConfig } from 'flue/config'(matching Astro/Vite).flue initnow scaffolds the new import. The@flue/sdk/configsubpath no longer exists.The
@flue/sdkpackage is now a migration placeholder. It keeps publishing with the old export map (.,./app,./client,./sandbox,./internal,./cloudflare,./node,./config) but has no runtime dependencies and every import throws with migration guidance. This prevents old installs from silently staying on an obsolete package while reserving the name for a future client-side SDK for talking to deployed Flue applications (send agent interactions, invoke or inspect workflow runs, stream events, etc.).Fixes & Other Changes
Structured output options use
resultagain. Theschemaoption onprompt()/skill()/task()made it unclear whether the schema described input or output, especially next toskill({ args }). Useresult: <schema>for structured output going forward. Theschemaoption remains accepted at runtime for backwards compatibility, but is deprecated in TypeScript and will be removed in a future release. Structured calls still return{ data, usage, model }; the response field alias{ result }remains deprecated in favor of{ data }.Compaction defaults are now model-aware. Previously every session used flat
reserveTokens: 16384andkeepRecentTokens: 20000, which were calibrated for Sonnet-class 200k windows but broke on small-window models (Gemma, Llama-3.1-8B at 8–16k windows): the reserve exceeded the window, so threshold compaction misfired on every turn, andkeepRecentTokensexceeded the window entirely soprepareCompactioncould never find a valid cut point. Defaults are now derived from the model's metadata:reserveTokens = min(20_000, model.maxTokens)capped further when it would exceed half the contextWindow, andkeepRecentTokens = 8000(matching the convention used by OpenCode and similar agents — recent-context fidelity doesn't scale with window size). Effect on existing Sonnet/Kimi-class sessions: marginally different trigger points and a smaller verbatim tail (8k vs 20k). Effect on small-window sessions: compaction actually works.cloudflare/<model>resolutions now carry realcontextWindow,maxTokens,cost,reasoning, andinputmetadata. Previously the binding branch ofbuildModelFromRegistrationsynthesized a model from scratch withcontextWindow: 0, which madeshouldCompactevaluatecontextTokens > 0 - reserveTokensas true on every turn after the first — spamming[flue:compaction] Threshold reached — window 0and running no-op compaction prep on every turn. Resolution now hydrates from pi-ai'scloudflare-workers-aicatalog when the model id is known. Uncatalogued ids (embeddings, image-gen, anything outside pi-ai's chat-completion subset of Workers AI) fall back to zero metadata, andshouldCompactnow treatscontextWindow <= 0as unknown and skips the threshold check — overflow recovery still runs. Fixes #132.registerProvider(...)now acceptscontextWindow,maxTokens, and per-model overrides for HTTP providers. Registered HTTP providers (litellm, openrouter, vLLM, custom OpenAI-compatible proxies, etc.) had no way to declare model metadata, so resolved models hardcodedcontextWindow: 0andmaxTokens: 0— same bug class as #132 on the binding side. Now the registration accepts provider-level defaults (contextWindow,maxTokens) and amodels: Record<string, { contextWindow?, maxTokens? }>map for per-model overrides. Per-model overrides win over provider-level defaults; unset stays0, whichshouldCompacttreats as unknown.v0.5.3New Features
observe(...)exported from@flue/sdk/appfor isolate-global subscriptions to the Flue event stream. Cross-cutting integrations — error reporting, log forwarding, metrics — can now tap every Flue event in the current isolate from a single module-scoped call, without per-agent or per-context wiring. The subscriber receives the fully decoratedFlueEvent(withrunId,eventIndex,timestamp, and tree-correlation fields) and the originatingFlueContext. On the Cloudflare target each Durable Object is its own V8 isolate, soapp.ts(and thus theobserveregistration) is evaluated per-DO — each isolate captures its own events independently, which is the intended shape. Seeexamples/sentry/for a fully documented Sentry error-reporting integration built on top of this hook.v0.5.2New Features
Cloudflare AI Gateway is now enabled by default on the Cloudflare target. Every
cloudflare/...model call passesgateway: { id: 'default' }toenv.AI.run(...), which the Workers AI binding spins up on demand for the account. No setup required — you get caching, logs, and budget controls in the Cloudflare dashboard out of the box. Existing zero-config agents pick this up automatically on rebuild.Customize or opt out of the AI Gateway from
app.ts. Re-register thecloudflareprefix with agatewayfield to target a named gateway and tune its options (id,cacheTtl,cacheKey,skipCache,metadata,collectLog,eventId,requestTimeoutMs). Passgateway: falseto disable the gateway entirely. User registrations always win over the auto-registered default.See https://developers.cloudflare.com/ai-gateway/integrations/worker-binding-methods/ for the full options reference.
v0.5.1Fixes & Other Changes
sessionId. Derived from the(instanceId, harnessName, sessionName)triple as<instanceId>::<harnessName>::<sessionName>, this key is forwarded by pi-ai to providers that support session-aware prompt caching and routing (Anthropic, OpenAI Responses, OpenAI Codex, Workers AI viax-session-affinity, and others). Stable across runs of the same triple, distinct across different ones. Child task sessions get their own key automatically because their session name istask:<parent>:<taskId>.v0.5.0Breaking Changes
FlueAgentis nowFlueHarness. The value returned frominit()is a harness: a configured handle for model defaults, tools, sandbox, filesystem, and sessions. Rename imports/usages fromFlueAgenttoFlueHarness, and preferconst harness = await init(...)in agent files.init({ id })is nowinit({ name }), defaulting to"default". The returned harness exposes.nameinstead of.id.harness.session(id?),harness.sessions.get/create/delete(id?), andFlueSession.idare now name-based APIs (name?,.name).runIdinstead ofrequestId. Every HTTP invocation now gets a generatedrun_<ulid>exposed to handlers asctx.runId. Webhook mode returns{ status: 'accepted', runId }.tool_endis nowtool_call,operation_endis nowoperation, and session correlation fields useharness,session, andparentSessioninstead of the previous id-oriented names. Consumers of the rawFlueEventstream should update event-type checks and field names.event: resultwas removed. Terminal result/error state is now delivered by the widerun_endevent. Sync responses still return{ result, _meta: { runId } }.New Features
run_start/run_endlifecycle events and a monotoniceventIndex. Cloudflare persists run history in the Agent Durable Object SQLite storage; Node keeps an in-memory ring buffer of recent completed runs.GET /agents/<name>/<id>/runs/<runId>,GET /agents/<name>/<id>/runs/<runId>/events, andGET /agents/<name>/<id>/runs/<runId>/stream. There is intentionally no list-runs endpoint yet; broader run discovery remains admin-API territory./runs/<runId>/streamreplays durable history and then tails active runs. It honors standardLast-Event-IDresume semantics and closes whenrun_endis observed.flue logscommand.flue logs <agent> <id> <runId>replays or tails a known run from a running Flue dev server. It supports--follow/--no-follow,--since,--types,--limit, and--format pretty|json|ndjson.ctx.log.info(...),ctx.log.warn(...), andctx.log.error(...)to emit structuredlogevents into the run event stream and persisted history.flue runsurfaces run ids. One-shot runs now print the generated run id to stderr and include_meta.runIdin sync responses, making it easier to inspect the same run withflue logs.Fixes & Other Changes
run_endevents are appended before live subscribers are notified and before the run is marked terminal, avoiding missed terminal events for clients connecting near completion."runs"no longer collides with the/runsroute marker.v0.4.1Fixes & Other Changes
session.shell()now redactsenvvalues in transcript history. When you pass per-call environment variables tosession.shell(cmd, { env }), the keys still appear in the recorded tool-call arguments — so the model can reason about which variables were set on a later turn — but the values are replaced with<redacted>. The real values are still passed toenv.exec(), so the command itself runs with the actual environment. This prevents API keys and other secrets from leaking into session storage.v0.4.0Big release! We are working hard to stabilize our APIs and add any missing and essential features to Flue that you need. There are some breaking changes to be aware of, when upgrading from
v0.3tov0.4. Read through the list below to understand what's new and what's changed. Or, point your coding agent to this changelog URL for a more automated upgrade experience).Breaking Changes
New return type for
prompt()/skill()/task()/shell(). Two changes folded into one new shape:CallHandle<T>instead of aPromise<T>.awaitworks exactly as before. The handle is aPromiseLikewith.signal: AbortSignaland.abort(reason?)for synchronous cancellation, replacing the removedPromptOptions.timeout/SkillOptions.timeout/ShellOptions.timeoutfields. Code that uses these as plain Promises withoutawait(e.g. raw.then()/.catch()chains) may need adjustment.{ text | data, usage, model }instead of a bare string or schema value. Schema-typed calls returnPromptResultResponse<T>; non-schema calls returnPromptResponsewith the newusageandmodelfields. To migrate, readresponse.textorresponse.data:Structured results use the
resultoption and return validated data onresponse.data.Schema results are now extracted via injected
finish/give_upmodel-facing tools instead of---RESULT_START---/---RESULT_END---text markers. The unusedResultExtractionErrorclass is removed; a newResultUnavailableErroris thrown when the model invokesgive_up.commandsanddefineCommandare removed. The original idea — register first-party CLI tools the agent could shell out to — only worked under just-bash and saw little real use. The same surface is better expressed today by passingenvto scope what a connector sees, or by choosing a sandbox connector that gives you the isolation you want. just-bash itself still supports custom commands — you just register them on your bash instance directly instead of through Flue's helper. Removed: thecommands?:option oninit()/prompt()/skill()/task()/shell(); theCommand,CommandDef,CommandOptions,CommandExecutor,CommandExecutorResulttypes; thedefineCommandexport from@flue/sdk/nodeand@flue/sdk/cloudflare; thecommand_start/command_endFlueEventvariants; and theBashLike.registerCommand/SessionEnv.scopeconnector hooks.Default
thinkingLevelchanged from'off'to'medium'. Reasoning-capable models (e.g. gpt-5, claude-opus-4-7) will now reason by default on everyprompt()/skill()/task()call. Non-reasoning models are unaffected (clamped to'off'per the model'sthinkingLevelMap). To restore the old behavior, setthinkingLevel: 'off'explicitly oninit(), your role frontmatter, or the call options.sandbox: 'local'now runs locally. Originally,'local'was a half-isolated layer — ajust-bashsubprocess with aReadWriteFs/MountableFsoverlay mountingprocess.cwd()at/workspace. That made sense when every Flue agent ran on a developer laptop, but increasingly people are deploying the agent itself inside a real sandbox (a container, a microVM, a Cloudflare Sandbox), where wrapping the host in a second virtual filesystem is pure overhead — and actively confusing, because paths get remapped twice.sandbox: 'local'now binds directly to the host:execruns through the user's shell with fullprocess.env, file methods hit the real filesystem, defaultcwdisprocess.cwd(), and there are no path remappings or command restrictions. Agents that hard-coded/workspacepaths must migrate to real host paths. If you want isolation on a developer laptop, reach for a real sandbox connector (Daytona, E2B, Mirage, smolvm, etc.).commands/defineCommandremoved. ThecommandsAPI let you register user CLIs (gh,npm, etc.) into a sandbox-scoped$PATH, isolating secrets from the model. In practice it only ever worked when the sandbox was aBashFactory(the default in-memory sandbox orgetVirtualSandboxon Cloudflare), and threw a runtime error on'local', every remote connector (Daytona, E2B, Mirage, etc.), and Cloudflare Containers — so the documented "CI agent withdefineCommand('gh', { env: { GH_TOKEN } })" pattern has been broken for most users since'local'was rebuilt. We're collapsing the API:'local'sandbox, the host shell is exposed directly. The agent'sbashtool can rungh issue view,npm test, etc. with whatever's on$PATHand whatever env you launched flue with. The runner / container / VM is the isolation boundary.'local'sandboxes, install the binaries inside the sandbox image, or wrap the operation as a custom tool withinit({ tools: [...] }). Tools have a structured parameter schema, are visible to the model directly, and recover the "secrets stay on the host" property — the tool readsprocess.env, the agent only sees the tool's params and result.Removed:
Command,CommandDef,CommandOptions,CommandExecutor,CommandExecutorResulttypes;defineCommandfrom@flue/sdk/nodeand@flue/sdk/cloudflare;commands?:field oninit(),prompt(),skill(),task(),shell();BashLike.registerCommand?,SessionEnv.scope?; the deadcommand_start/command_endFlueEventvariants.init({ providers: { … } })has moved. Provider configuration moved to the newapp.tsruntime registration model (see below). Migrate by creating anapp.tsat your project root and callingconfigureProvider()(to patch a built-in catalog provider'sbaseUrl/apiKey/headers/storeResponses) orregisterProvider()(to register a brand-new URL-prefix provider). Both are exported from@flue/sdk/app. TheProvidersConfigtype andprovidersfield are removed fromAgentInitandAgentConfig.FlueAgent.destroy()andSessionEnv.cleanup()are removed. Flue no longer manages sandbox lifetime — sandboxes are user-owned. Connectors that previously took acleanupoption (Boxd, Daytona, E2B, Exedev, islo, Modal, Vercel) no longer accept it; some lose their options argument entirely (e.g.daytona(sandbox)instead ofdaytona(sandbox, { cleanup })). If you were relying on automatic teardown, destroy your sandbox explicitly when your handler is done.CLI
--workspaceflag renamed to--rootacrossflue dev/flue run/flue build. The corresponding programmatic options also moved:BuildOptions.workspaceDir→BuildOptions.root,BuildContext.workspaceDir→BuildContext.root. Theflue.config.tskey isroot, notworkspace.outputDirrenamed tooutputacrossBuildOptions,BuildContext, andDevOptions. Build plugin authors readingctx.outputDirmust update toctx.output. The CLI flag remains `--outpuConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.