Upgrade Flue 0.3.11 → 0.9.1 - #1
Open
adewale wants to merge 2 commits into
Open
Conversation
@flue/sdk was renamed: the agent runtime now ships as @flue/runtime, while
@flue/sdk is a separate client SDK. This upgrade migrates MaintainerBot to the
redesigned 0.9 authoring model.
Dependencies
- Replace @flue/sdk (latest) with @flue/runtime ^0.9.1; bump @flue/cli to ^0.9.1.
- Bump wrangler to ^4.97.0 to satisfy the new @cloudflare/vite-plugin peer.
Agents -> workflows
- Move .flue/agents/* to .flue/workflows/* and export `run()` instead of a
default handler.
- Replace `export const triggers = { webhook: true }` with an exported
WorkflowRouteHandler `route` (HTTP exposure); deep-verify stays CLI-only with
no route.
Runtime API
- init() now takes a createAgent() initializer and returns a harness:
`const harness = await init(createAgent(() => ({...}))); harness.session()`.
- prompt()/skill() with `result` now resolve to `{ data }`; destructure it.
- Drop the removed `commands`/defineCommand allowlist; deep-verify now uses the
`local()` host sandbox from @flue/runtime/node.
- Move provider transport settings from init({ providers }) to
configureProvider('anthropic', ...).
- Replace the `maintainer` role (roles were removed) with agent `instructions`.
Skills
- Convert .agents/skills/deep-verify/{plan,summarize}.md to spec-compliant
deep-verify-plan/ and deep-verify-summarize/ SKILL.md directories, activated by
name.
Cloudflare/CLI
- Workflows are now SQLite Durable Objects; add the required wrangler `migrations`
for DailyMaintenanceWorkflow, DeepVerifyWorkflow, and FlueRegistry.
- Drop the removed `--id` flag from the daily run command and run-daily.mjs.
- Ignore the .flue-vite build intermediates.
Verified: `flue build` (node + cloudflare) and `flue run deep-verify` succeed.
https://claude.ai/code/session_018FxLp8WAsLLZJ4Qso2Nz1b
Follow-up audit of the upgrade surfaced that Flue 0.9 changed `flue build` output semantics: `--output` is now the literal output directory (the default is `dist`), node builds emit `dist/server.mjs`, and cloudflare builds emit `dist/<worker-name>/wrangler.json` (no longer `dist/wrangler.jsonc`). - Drop the now-misleading `--output .` from the build/run scripts; with 0.9 it dumped artifacts into the repo root and tripped a Vite outDir-collision warning. They now use the default `dist` output. - Point `deploy:cloudflare` at the real generated config path `dist/maintainerbot/wrangler.json` instead of `dist/wrangler.jsonc`. - Drop `--output .` from scripts/run-daily.mjs for the same reason. - Guard `payload?.repo` in deep-verify so a no-payload `flue run deep-verify` reports the clean "payload.repo must be owner/name" error instead of a TypeError (matches the existing `payload?.webhookSecret` guard). Verified: `pnpm run build`, `pnpm run build:cloudflare` (emits dist/maintainerbot/wrangler.json with the DO migrations), and `flue run deep-verify` with no payload all behave correctly. https://claude.ai/code/session_018FxLp8WAsLLZJ4Qso2Nz1b
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.
What & why
Upgrades MaintainerBot to the latest Flue (0.3.11 → 0.9.1). This is not a routine bump: in 0.9 the package
@flue/sdkwas renamed to@flue/runtime, and@flue/sdknow refers to a completely different client SDK. The old@flue/sdk/*subpath imports are stubbed to throw a migration error, so every agent had to be rewritten against the redesigned authoring model.Key API changes handled
@flue/sdk@flue/runtime.flue/agents/*.ts.flue/workflows/*.tsexport default fn(ctx)export function run(ctx)export const triggers = { webhook: true }export const route: WorkflowRouteHandlerawait init({ sandbox, model, providers })→agent.session()await init(createAgent(() => ({...})))→harness.session()const x = await session.prompt(.., { result })const { data } = await session.prompt(.., { result })session.shell(cmd, { commands: [...] })+defineCommand()local()host sandboxinit({ providers })configureProvider('anthropic', {...})role: 'maintainer'+.flue/roles/*.mdinstructionssession.skill('deep-verify/plan.md')(path)session.skill('deep-verify-plan')(name →<name>/SKILL.md)Changes
Dependencies
@flue/sdk→@flue/runtime ^0.9.1;@flue/cli→^0.9.1wrangler→^4.97.0(required by the new@cloudflare/vite-pluginpeer; the node build fails otherwise)Workflows (
.flue/agents/→.flue/workflows/)daily-maintenance:run()export +route;createAgent/harness wiring; CF AI Gateway moved toconfigureProvider; maintainer persona moved from the deleted role into agentinstructions;.datadestructuring on the two LLM calls.deep-verify:run()export (CLI-only, no route);local()sandbox from@flue/runtime/node;commands/defineCommandremoved;.datadestructuring on skill calls.Skills — converted
.agents/skills/deep-verify/{plan,summarize}.mdinto spec-compliantdeep-verify-plan/SKILL.mdanddeep-verify-summarize/SKILL.md(frontmatternamematches directory; bodies unchanged).Cloudflare / CLI
migrations(DailyMaintenanceWorkflow,DeepVerifyWorkflow,FlueRegistry) towrangler.jsonc.--outputsemantics changed (default is nowdist; cloudflare emitsdist/<worker>/wrangler.json). Removed the stale--output .from all scripts and repointeddeploy:cloudflareatdist/maintainerbot/wrangler.json.--idflag from the daily run command..flue-vitebuild intermediates.Docs — updated README / SPEC / ARCHITECTURE to the new
workflows/layout andlocal()+ skill model.Verification
pnpm run build(node) →dist/server.mjs✅pnpm run build:cloudflare→dist/maintainerbot/wrangler.jsonwith DO migrations ✅flue run deep-verifyexecutes the newrun()handler; no-payload invocation returns the cleanpayload.repo must be owner/nameerror ✅Reviewer notes / behavioral changes to confirm
commandsallowlist framework-wide.deep-verifynow useslocal(), so itsplan/summarizereasoning steps gain host-shell access where they previously had none. deep-verify is the CLI-only verifier that clones and runs untrusted repos and is intended to run in CI where the runner is the isolation boundary — but if you want the old hard sandbox back, it would need a re-architecture (e.g. a separate virtual-sandbox harness for the reasoning steps). Flagging since it's a real posture change, not a 1:1 port.docs/gists/mediabunny-flue-video-conversion.mdis left untouched: it's a historical published gist documenting a separate example agent, not MaintainerBot code.https://claude.ai/code/session_018FxLp8WAsLLZJ4Qso2Nz1b
Generated by Claude Code