Skip to main content

Crate talon

Crate talon 

Source
Expand description

§talon — host orchestrator and CLI

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

commandpurpose
talahon run (default)orchestrator: channels, message loop, queue, scheduler, IPC watcher, LLM gateway
talahon setup <step> [args]setup steps from talon-setup (machine-readable status blocks)
talahon doctorenvironment, vLLM, container runtime and LLM gateway diagnostics
talahon audit verifyrecompute the hash-chained audit log
talahon audit tail [-n N] [--kind prefix]recent audit events as JSON lines
talahon eval score --reports DIRscore saved reports against the golden set (evals/golden/)
talahon eval runinvestigate every golden case through a running Talahon, then score
talahon versionprint the version

§Architecture of talahon 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
talahon run: startup and graceful shutdown.
audit_cmd
talahon audit verify, talahon audit head and talahon audit tail, plus the audit key wiring shared with talahon run and talahon doctor.
cli
Command-line interface (clap derive).
doctor
talahon doctor: one command that explains why Talahon can or cannot run.
entry
Entry point shared by the talahon binary and its deprecated talon alias: parse the command line, set up logging and dispatch.
eval_cmd
talahon eval score and talahon eval run: the golden-set regression harness for investigation quality.
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 (TALAHON_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 talahon package (CARGO_PKG_VERSION).