Skip to main content

Crate layover_tower

Crate layover_tower 

Source
Expand description

The supervisor: starting an agent CLI, watching it, and writing down what happened.

§What lives here and what does not

Everything in layover-core is a decision that can be checked without running anything — whether a route is permitted, whether an itinerary has Fuel left, what a run should be told. This crate is where those decisions meet an operating system, and it is the first place in the project that can do something irreversible.

It deliberately decides nothing. Routing, accounting and prompt composition belong to layover-core and are already tested without a process in sight. What this adds is the part that cannot be tested that way: a child that writes to disk, spends money, and may not come back.

§The order of operations is a safety property

A run is recorded as started before the process is spawned, and the record carries the process identifier and the moment it began. That order is not an implementation detail:

  • A run that was alive when the supervisor died leaves no exit code. The only way to know it existed is to have written it down first.
  • A record written after spawning leaves a window in which a real process is running and nothing knows about it — exactly the window a crash falls into.

Recovery needs to say “this was running, and it is confirmed gone”. Both halves come from the record written before the spawn.

Re-exports§

pub use barriers::Abandoned;
pub use barriers::Barriers;
pub use clock::Clock;
pub use clock::Due;
pub use clock::Skipped;
pub use cost::Reported;
pub use cost::from_transcript;
pub use dispatch::Authorised;
pub use dispatch::Refusal;
pub use dispatch::authorise;
pub use factory::Dispatched;
pub use factory::Factory;
pub use runtime::Chains;
pub use runtime::FactoryRuntime;
pub use runtime::Wiring;
pub use spawn::Finished;
pub use spawn::Plan;
pub use spawn::SpawnError;
pub use spawn::Started;
pub use spawn::start;
pub use state::Ledger;
pub use state::Live;
pub use state::Verdict;
pub use tokens::ENDPOINT_VAR;
pub use tokens::TOKEN_VAR;
pub use tokens::Tokens;
pub use tokens::write_config;
pub use wait::Ended;
pub use wait::kill_tree;
pub use wait::wait_for;

Modules§

barriers
Barriers a running factory is holding, and what happens to a flight that meets one.
clock
When a scheduled pipeline is next due, and whether it should actually fire.
cost
Reading what a run cost out of what it printed.
dispatch
Deciding whether a flight may fly, and what starting it would mean.
factory
The loop: taking work that is waiting and turning it into runs that happened.
runtime
What a tool call actually does, once it reaches the factory.
spawn
Starting one agent CLI and watching it finish.
state
Knowing a run existed, even if nothing was watching when it ended.
tokens
Per-run tokens, and the configuration file that tells a child where to find Layover.
wait
Waiting for a run, and ending one that will not end by itself.