Repository navigation
FLUJO as a worker program for lite and cloud fleets; release 0.7.0 - #21
Merged
Merged
Conversation
… a busy replica; 0.7.0
A plan can set workerProgram: 'flujo'. Everything shared stays shared: the board, operator
commands, stop receipts, traces, evidence and workflows talk to a driver through the contract
Codex and Claude Code already use.
- FlujoSessionDriver: one FLUJO conversation and workspace per agent, over FLUJO's HTTP API.
- flujoProviderModel: a model provider becomes a stored FLUJO model record, so the key never
enters the environment agent commands inherit.
- startLiteWorker({ provider: 'flujo' }) attaches to a FLUJO or starts one.
- packFactorySdk builds the SDK bundle from the installed package; plan.network gives a fleet
its own private network.
- runtime.mjs: what differs between programs is now one table.
factory-selfhost retire now waits for a stopping app and retries refused deletes.
Fixes #16
Fixes #20
…way can be retired
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.
FLUJO can now be a worker program next to Codex and Claude Code, on a laptop and on cloud lite fleets. Ships as 0.7.0. Plans that do not set
workerProgram: 'flujo'behave as before, and the Codex and Claude Code bootstrap scripts are unchanged.Fixes #16
Fixes #20
Worker program
plan.workerProgram: 'flujo'. A plan needs amodelProvider: FLUJO workers have no subscription login. A plan with a narrowersandboxis refused, because FLUJO's folder settings guide its tools but do not confine them.WORKER_PROGRAM_APISnow lists the APIs each program can use, best first. FLUJO usesresponses, thenchat, thenanthropic.flujoProviderModelmaps a provider to a FLUJO model record. FLUJO stores the key in its encrypted settings, so the FLUJO process and agent commands never have it in their environment.runtime.mjs: what differs between programs is now one table instead of branches.src/cloud-lite/flujo-driver.mjsFlujoSessionDriveroffers the same methods and notifications as the Codex app-server and the Claude Code driver, soNativeOperatorStop,NativeWorkflowWake, traces and the board are shared code.flujo.teamConcurrencyan orchestrator gets the genericswarm_teamflow with one native gate for its subflows.interruptedon the board and not replayed. The same now holds for Claude Code, whose board state stayedinProgressuntil the next turn.FlujoProgramstarts FLUJO and restarts it up to three times in ten minutes.Install
flujo-aitarball on the volume, checked by SHA-256, so a restarted Machine does not install it again. An image withflujoon its path skips this.Local:
startLiteWorker({ provider: 'flujo' })andfactory-lite flujoattach to a FLUJO or start one with its own data folder, and keep the conversation across runs.For apps moving their fleet onto FACTORY
packFactorySdk(file)builds the SDK bundle from the installed package, with nonpmortaron the host.plan.networkgives a fleet's app its own private network.Fixed along the way
factory-selfhost retirewaits for a stopping app and retries refused deletes. An app still stopping at the deadline or a delete that keeps failing stays uncertain, as before.fleet.updateRuntimewrote a Codex bootstrap for every fleet, whatever its program.fleet.retire(). It can now, and a foreign Machine or volume still blocks it.fleet.collect()left FLUJO's key files in scope; they are excluded now, with the board credential file.What the real program taught (each was invisible to a fake, and has a test or a note now)
reasoningEffortfor a model it does not know by name, so it is not sent.openai, FLUJO moves the system message behind the conversation for OpenAI's prompt cache, and Qwen's chat template refuses that with a 400. Only OpenAI's own endpoint now carries that name; a self-hosted model islitellm.Tests and docs:
test/cloud-lite-flujo.test.mjswith a fake FLUJO server intest/fixtures/fake-flujo.mjs, added to the focused list. It covers the same operator lifecycle as Codex and Claude Code: start, jobs, messages during a turn, a verified stop receipt on the real board, restart, lost history, and workflow wakes. PUBLIC_SDK.md has a new section.Live check on a real fleet
A real
FactoryCloudLiteFleeton Fly: 2 Machines (shared, 2 CPUs, 4 GB), an official Node image by digest, the generated bootstrap, FLUJO 3.48.3 from its pinned tarball, a bundle frompackFactorySdk, and a real vLLM endpoint (profileqwen, one H100) through FLUJO's Responses adapter.idle,interrupted, matching command, thread and turn)fleet.quiesce()stops every sessionfleet.collect()downloads an archive from each Machine, with conversations and worktrees but no key files or board credentialfleet.stop()andfleet.retire()remove the app and its volumesThe same checks of a model answer and a board call also passed through FLUJO's Chat Completions adapter, with the real machine code in a Linux container.
factory-selfhost retireright after that busy replica finished in one run, and the app, secret and volumes were checked gone.Real FLUJO with a scripted local model, in a Linux container with
/dataas the volume: the generated bootstrap on a plain Node image (6 min there), agent starts idle, jobs on one session, a message during a turn reaching the model, a verified stop receipt and a new job after it, no key in any file under the state and data folders, no board credential in FLUJO's settings, a hard kill of everything during a turn followed by a restart that keeps the session and closes the turn asinterrupted, a lead with real subflows, andfactory-lite flujostarting its own FLUJO, keeping the conversation across two runs and leaving no process behind.Cost: Modal $1.46 by its billing report. Fly under $0.05 at list price for about six Machine-minutes each; that is an estimate, not an invoice. Everything was retired and checked gone.
Not run: a real FLUJO on Windows, FLUJO's Anthropic adapter against a real server (offline mapping only), a Machine restart on Fly (done in the container), and a team larger than two subflows.
Local CI (AGENTS.md)
Same steps as
.github/workflows/public-sdk.yml(focused list read from the workflow file, 26 files), on a cleangit archiveexport of de6b2b4 with freshnpm ci. Linux ran in disposable containers.factory-selfhost profilesnode:22.17.0-bookworm-slim, Python 3.11node:24.22.2-bookworm-slim, Python 3.11