Skip to main content

visdom_cli/
mode.rs

1//! How a project's sessions reach AI Tracing.
2
3use std::path::Path;
4
5use serde::Serialize;
6
7/// The capture path a project uses. Exactly one is meant to be active.
8#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize)]
9#[serde(rename_all = "snake_case")]
10pub enum TracingMode {
11    /// Agent hooks and git hooks capture the session.
12    Hooks,
13    /// The agent's LLM traffic goes through the AI Gateway; no capture hooks.
14    Gateway,
15}
16
17/// The tracing mode of the project at `project_dir`.
18///
19/// The mode is a per-project Control Plane setting that the CLI cannot read
20/// yet, so every project is `Hooks` — also the agreed default whenever the
21/// mode is unknown. This is the single place that decides it: components take
22/// the mode as an input and never assume one.
23pub fn resolve_tracing_mode(_project_dir: Option<&Path>) -> TracingMode {
24    TracingMode::Hooks
25}