pub struct HttpConfig {Show 31 fields
pub bind: IpAddr,
pub tls_terminated: bool,
pub max_connections: usize,
pub max_connections_per_ip: usize,
pub header_read_timeout: Duration,
pub port: u16,
pub api_key: ApiKey,
pub base_jid: String,
pub group_folder: String,
pub project_root: PathBuf,
pub groups_dir: PathBuf,
pub data_dir: PathBuf,
pub evals_legacy_group_dir: bool,
pub timezone: Tz,
pub cors_origins: Vec<String>,
pub max_body_bytes: usize,
pub lane_idle: Duration,
pub lane_sweep_interval: Duration,
pub sse_keepalive: Duration,
pub dedup_window: Duration,
pub auth_max_failures: u32,
pub auth_window: Duration,
pub palace_script: PathBuf,
pub palace_host_exec: bool,
pub palace_timeout: Duration,
pub palace_max_output_bytes: usize,
pub palace_max_concurrency: usize,
pub max_user_lanes: usize,
pub max_pending_per_lane: usize,
pub max_streams: usize,
pub seed_digest_task: bool,
}Expand description
Resolved configuration for the HTTP channel.
Fields§
§bind: IpAddrListen address (default 127.0.0.1).
tls_terminated: boolA TLS-terminating proxy fronts the API (operator assertion; only silences the wildcard-bind warning).
max_connections: usizeMax simultaneously open connections.
max_connections_per_ip: usizeMax simultaneously open connections from one peer IP.
header_read_timeout: DurationTime a client has to send complete request headers. Established requests (SSE streams) have no idle timeout.
port: u16Listen port (0 picks a free port; see HttpChannel::local_addr).
api_key: ApiKeyShared secret callers present via X-Api-Key or Authorization: Bearer.
base_jid: StringBase lane JID (http:copilot).
group_folder: StringGroup folder every lane runs in.
project_root: PathBufProject root (mempalace/, siem/, … live below it).
groups_dir: PathBuf<project_root>/groups.
data_dir: PathBufHost runtime data (<project_root>/data): lane state directories
live in <data_dir>/sessions/<session_key>.
evals_legacy_group_dir: boolCOPILOT_EVALS_LEGACY_GROUP_DIR: GET /evals additionally reads
the pre-N-2 location groups/<folder>/evals/ (writable by every
CoPilot lane, so records found there are forgeable). Off by default.
timezone: TzTimezone used for once task timestamps and cron evaluation.
cors_origins: Vec<String>Allowed CORS origins (exact match, or *). Empty => no CORS headers.
max_body_bytes: usizeRequest body limit in bytes.
lane_idle: DurationIdle time after which a per-user lane is swept.
lane_sweep_interval: DurationHow often the idle-lane sweep runs.
sse_keepalive: DurationInterval between SSE keepalive comments.
dedup_window: DurationRepeat triggers for the same alert inside this window return the existing job. Zero disables de-duplication.
auth_max_failures: u32Failed authentications per IP (inside auth_window) before 429s.
auth_window: DurationAuth-failure throttle window.
palace_script: PathBufPath of mempalace/palace-call.sh (only used with
Self::palace_host_exec).
palace_host_exec: boolTALAHON_PALACE_HOST_EXEC=unsafe: without an explicitly supplied
palace runner, run palace_script directly on the host. Dangerous
(MYTH-01); off by default.
palace_timeout: DurationTimeout for one palace call.
palace_max_output_bytes: usizeMax bytes of stdout accepted from a palace call.
palace_max_concurrency: usizeMax concurrently running palace calls.
max_user_lanes: usizeCap on in-memory per-user lanes.
max_pending_per_lane: usizeCap on SSE requests queued on a single lane.
max_streams: usizeCap on concurrently open SSE streams across all lanes.
seed_digest_task: boolSeed the (paused) 15-minute alert digest task on connect.
Implementations§
Source§impl HttpConfig
impl HttpConfig
Sourcepub fn new(project_root: impl Into<PathBuf>) -> Self
pub fn new(project_root: impl Into<PathBuf>) -> Self
Defaults rooted at project_root (API key unset). Intended for tests
and programmatic construction; production uses Self::from_talon_config.
Sourcepub fn from_talon_config(cfg: &TalonConfig) -> Result<Self>
pub fn from_talon_config(cfg: &TalonConfig) -> Result<Self>
Resolve from the host configuration.
Sourcepub fn from_env(
project_root: &Path,
groups_dir: &Path,
timezone: Tz,
env: &EnvFile,
) -> Result<Self>
pub fn from_env( project_root: &Path, groups_dir: &Path, timezone: Tz, env: &EnvFile, ) -> Result<Self>
Resolve from an EnvFile (see the module docs for the keys).
Sourcepub fn exposure_warning(&self) -> Option<String>
pub fn exposure_warning(&self) -> Option<String>
Startup warning for a listen address that exposes the API (and its cleartext API key) on every interface without TLS in front.
Sourcepub fn prompts_dir(&self) -> PathBuf
pub fn prompts_dir(&self) -> PathBuf
<groups_dir>/<group_folder>/prompts.
Sourcepub fn sessions_dir(&self) -> PathBuf
pub fn sessions_dir(&self) -> PathBuf
<data_dir>/sessions: the (operator-controlled) root of every
lane’s private state directory.
Sourcepub fn investigation_session_key(&self) -> &'static str
pub fn investigation_session_key(&self) -> &'static str
Session key of the investigation lane, whose state directory holds
the eval records (the key crate::HttpState::register_base_lanes
registers that lane with).
Sourcepub fn evals_dir(&self) -> PathBuf
pub fn evals_dir(&self) -> PathBuf
<data_dir>/sessions/<investigation session key>/evals — where the
investigation agent writes eval records (/home/agent/.talon/evals
inside its container) and where GET /evals reads them. Reads never
go through this path directly: the lane directory and evals/ are
opened without following symlinks.
Sourcepub fn legacy_evals_dir(&self) -> PathBuf
pub fn legacy_evals_dir(&self) -> PathBuf
<groups_dir>/<group_folder>/evals — the pre-N-2 location, shared by
every CoPilot lane; read only with Self::evals_legacy_group_dir.