Skip to main content

Crate talon

Crate talon 

Source
Expand description

§talon — host orchestrator and CLI

The talon binary is the long-running host process plus the operator CLI:

commandpurpose
talon run (default)orchestrator: channels, message loop, queue, scheduler, IPC watcher, LLM gateway
talon setup <step> [args]setup steps from talon-setup (machine-readable status blocks)
talon doctorenvironment, vLLM, container runtime and LLM gateway diagnostics
talon audit verifyrecompute the hash-chained audit log
talon audit tail [-n N] [--kind prefix]recent audit events as JSON lines
talon versionprint the version

§Architecture of talon run

 channels (http, telegram, emacs, webhook)
    │ ChannelHost::on_message ── sender allowlist (drop) ── store ── Notify
    ▼
 message loop (event-driven, poll fallback) ── trigger gating ── session commands
    │ pipe follow-up into the lane's container (IPC input)  or  enqueue a lane run
    ▼
 GroupQueue (per-lane serialization, global limit) ◀── TaskScheduler (due tasks)
    │ LaneProcessor::process_messages / run_task
    ▼
 Orchestrator::run_agent ── session/provider fingerprint ── snapshots
    │ LLM gateway token (stdin only) ── ContainerRunner ── output frames
    ▼
 outbound: redact ── format per channel dialect ── Channel::send_message

Everything that needs the outside world (container runtime, LLM gateway, channels) sits behind a trait (agent::ContainerLauncher, agent::LlmAccess, talon_core::channel::Channel) so the orchestrator logic is unit-tested with fakes and an in-memory database.

Modules§

agent
Seams between the orchestrator and the outside world: launching agent containers (ContainerLauncher) and handing out model credentials (LlmAccess). Production wires talon-container’s ContainerRunner and talon-llm’s GatewayHandle; tests use fakes.
allowlist
Live view of the sender allowlist.
app
talon run: startup and graceful shutdown.
audit_cmd
talon audit verify and talon audit tail.
cli
Command-line interface (clap derive).
doctor
talon doctor: one command that explains why Talon can or cannot run.
investigation
Investigation bookkeeping: structured verdicts written by the agent and the IOC sightings derived from them.
logging
Structured logging: tracing-subscriber with an EnvFilter (RUST_LOG), human-readable or JSON output (TALON_LOG_FORMAT=json), and redaction of every line before it reaches the terminal or the service log file.
orchestrator
The host orchestrator.
output_limits
Caps on agent output before it is redacted, stored or delivered to a chat channel (MYTH-07).
palace
Containerized MemPalace runner for the CoPilot /palace/* endpoints (MYTH-01).
safe_fs
Descriptor-relative, symlink-safe access to agent-writable directories (MYTH-10).
secrets
Collect the host’s secret values for the Redactor.

Constants§

VERSION
Version of the talon package (CARGO_PKG_VERSION).