Skip to content

Upgrade Flue 0.3.11 → 0.9.1 - #1

Open
adewale wants to merge 2 commits into
mainfrom
claude/flue-upgrade-compatibility-2eb3w
Open

Upgrade Flue 0.3.11 → 0.9.1#1
adewale wants to merge 2 commits into
mainfrom
claude/flue-upgrade-compatibility-2eb3w

Conversation

@adewale

@adewale adewale commented Jun 3, 2026

Copy link
Copy Markdown
Owner

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/sdk was renamed to @flue/runtime, and @flue/sdk now 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

Area Before (0.3) After (0.9)
Runtime package @flue/sdk @flue/runtime
Module location .flue/agents/*.ts .flue/workflows/*.ts
Handler export default fn(ctx) export function run(ctx)
HTTP trigger export const triggers = { webhook: true } export const route: WorkflowRouteHandler
Init await init({ sandbox, model, providers })agent.session() await init(createAgent(() => ({...})))harness.session()
Structured result const x = await session.prompt(.., { result }) const { data } = await session.prompt(.., { result })
Shell allowlist session.shell(cmd, { commands: [...] }) + defineCommand() removed; local() host sandbox
Provider config init({ providers }) configureProvider('anthropic', {...})
Roles role: 'maintainer' + .flue/roles/*.md agent instructions
Skills session.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.1
  • wrangler^4.97.0 (required by the new @cloudflare/vite-plugin peer; the node build fails otherwise)

Workflows (.flue/agents/.flue/workflows/)

  • daily-maintenance: run() export + route; createAgent/harness wiring; CF AI Gateway moved to configureProvider; maintainer persona moved from the deleted role into agent instructions; .data destructuring on the two LLM calls.
  • deep-verify: run() export (CLI-only, no route); local() sandbox from @flue/runtime/node; commands/defineCommand removed; .data destructuring on skill calls.

Skills — converted .agents/skills/deep-verify/{plan,summarize}.md into spec-compliant deep-verify-plan/SKILL.md and deep-verify-summarize/SKILL.md (frontmatter name matches directory; bodies unchanged).

Cloudflare / CLI

  • Workflows are now SQLite Durable Objects → added the required migrations (DailyMaintenanceWorkflow, DeepVerifyWorkflow, FlueRegistry) to wrangler.jsonc.
  • --output semantics changed (default is now dist; cloudflare emits dist/<worker>/wrangler.json). Removed the stale --output . from all scripts and repointed deploy:cloudflare at dist/maintainerbot/wrangler.json.
  • Dropped the removed --id flag from the daily run command.
  • Ignored the .flue-vite build intermediates.

Docs — updated README / SPEC / ARCHITECTURE to the new workflows/ layout and local() + skill model.

Verification

  • pnpm run build (node) → dist/server.mjs
  • pnpm run build:cloudflaredist/maintainerbot/wrangler.json with DO migrations ✅
  • flue run deep-verify executes the new run() handler; no-payload invocation returns the clean payload.repo must be owner/name error ✅

Reviewer notes / behavioral changes to confirm

  • deep-verify sandbox posture: 0.9 removed the per-call commands allowlist framework-wide. deep-verify now uses local(), so its plan/summarize reasoning 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.
  • Webhook URL: workflows are now served on Flue's workflow routes rather than the old agent route, so the deployed webhook target path may change — worth confirming after the first Cloudflare deploy.
  • docs/gists/mediabunny-flue-video-conversion.md is 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

claude added 2 commits June 3, 2026 12:20
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants