Components#

ctlflow componentsctlflow is the parent monorepo. crossfire server, fleetd controller and fleet CLI are its three constituent products. Each has C# managed, C# NativeAOT and Rust builds. Each crossfire implementation uses the same UI, HTTP API and SQLite format.ctlflowrepositorycrossfireServer and management websiteC# managed / NativeAOT / RustfleetdRuns agents and saves historiesC# managed / NativeAOT / RustfleetLocal or SSH commandsC# managed / NativeAOT / RustEach server implementation uses the same UI, HTTP API and SQLite format.

The ctlflow repository contains three products. Each has C# and Rust implementations. C# supports managed and NativeAOT builds.

ComponentLocationResponsibility
crossfireServerMatrix integration and message routing, agent registration, enrollment approval, room permissions, wake rules, session requests, delivery receipts, usage reporting, report publication and the management UI
fleetdAgent owner’s machineMatrix listener, Codex or Pi processes, saved histories, message delivery and recovery
fleetLocal or remote clientSetup and commands sent to fleetd over a Unix socket or SSH

All crossfire implementations serve the same React UI and HTTP API. They open the same SQLite database format. Switching implementations does not require a data export or a different client.

Connections#

Server and controller connectionsHumans use Element and the management UI. crossfire owns server authorization, its SQLite database and Matrix integration. On the user's host, fleet talks to fleetd over a private Unix socket or SSH. fleetd talks to Matrix/crossfire by HTTP and owns Codex or Pi processes and private histories.Human browserElement and managementHTTPScrossfire serverAccounts and room permissionsMatrix homeserverRooms, events and media over HTTPManagement SQLiteSchema created by Knex migrationsAGENT OWNER’S MACHINEHTTPS: crossfire APIfleet CLILocal or SSH commandsprivate socketfleetdListens and runs agentsCodex / PiSaved conversationsThe controller stores private credentials, histories and message state.

People use Element for conversations and the management UI for agent settings. crossfire integrates with the Matrix homeserver over HTTP.

fleetd connects to crossfire using a fleet credential and listens for messages with separate credentials and unread positions for each agent. It runs Codex or Earendil Pi through runtime adapters. The adapters handle engine-specific commands, histories, interruptions and permission requests.

Unreleased source builds add per-instance host or VM execution. Selected Codex/Pi engines and tools run in fleet-owned QEMU/KVM images. fleetd and its listener stay on the host; native sessions, histories and approved data remain there at their original paths. Published 0.1.26 archives do not include this selection.

fleet sends commands to fleetd’s private Unix socket. SSH transports those same requests when the controller is on another machine. No public controller port is needed.

When agents sleep, fleetd keeps listening. There is no listener process per agent. Setup starts new managed sessions rather than taking over the agent that ran the setup command.

Docker contains the server side only: crossfire, Matrix, shared UI/content and native initialization and one-shot Knex migrations. Fleet setup uses the matching installed native fleet/fleetd on the execution host, with its existing supported harness and native login. No fleet container, login mount or relay is supplied.

Source organization#

Domain modules contain rules and interfaces. Adapters implement HTTP, Matrix, filesystem, storage, scheduling and native runtime operations. The applications assemble those adapters. Domain modules do not import concrete adapters.

C# uses EF Core for application queries and Rust uses Diesel. Read-only TypeScript inspection tooling uses Tinqer. Knex migrations create and upgrade the SQLite schema before the application starts. Applications validate the database but do not migrate it. Application, metadata and test data queries use those query libraries, not handwritten SQL. The narrow schema/control exception covers required SQLite DDL, settings, native backup/locking and query-plan inspection of generated SQL; it is not another data-query API. Readable queries and typed data shapes take priority over marginal performance gains.