Skip to main content

Module run

Module run 

Source
Expand description

lev run - run an agent in the shared-world daemon.

run resolves the blueprint + task locally and asks the running daemon (auto- started if needed) to create the agent in the one shared ECS world. The request-building + daemon exchange live in crate::daemon::client; this module keeps the manifest/session/tool-source helpers still shared across the CLI, and the RunArgs the binary wires into that path.

Re-exports§

pub use session::build_provider_registry_from_config;
pub use session::provider_creds_from_config;

Modules§

manifest
Filesystem discovery of agent.leviath manifests.
session
Provider registry construction from the CLI’s Config.
task
Turning what the caller typed into the text an agent actually runs on.

Structs§

ProviderCreds
Decoupled provider credentials.
RunArgs
Arguments for lev run.

Functions§

build_provider_registry
Build a ProviderRegistry from decoupled ProviderCreds.
effective_workdir
The run’s effective working directory: the --workdir flag when given (canonicalized, and refused early when it does not exist - a bad workdir would otherwise spawn an agent whose every tool call fails), else cwd (the directory the command was invoked from, resolved by the caller).
extract_region_flags
Pre-scan a full argv (program name first) for dynamic --<region> flags on the run subcommand, since region names are blueprint-defined and clap can’t declare them. Returns (argv_for_clap, region_flags): a --<name> (or --<name>=<value>) whose <name> is not a known run flag is pulled out (with its value) into the map; every other token passes through untouched.
output_request
Build the caller’s requested output shape from the --output-* flags, or None when none were given (leaving whatever the blueprint declares).