Skip to main content

Module spawner

Module spawner 

Source
Expand description

Agent-agnostic process spawning, tracking, and log capture.

Provides Spawner which manages the lifecycle of agent processes: building commands from config templates, redirecting output to log files, tracking running processes, and handling unit claim/release lifecycle.

Structs§

AgentProcess
A running agent process tracked by the spawner.
CompletedAgent
Result of a completed agent process.
Spawner
Agent-agnostic process spawner with tracking and log capture.

Enums§

AgentAction
What action an agent should perform.

Functions§

build_log_path
Build the log file path for a unit spawn.
find_all_logs
Find all log files for a unit, sorted oldest to newest.
find_latest_log
Find the most recent log file for a unit.
log_dir
Return the log directory path, creating it if needed.
substitute_template
Replace {id} and {model} placeholders in a command template.
substitute_template_with_model
Replace {id} and {model} placeholders in a command template.