Skip to main content

SupervisorConfig

Struct SupervisorConfig 

Source
pub struct SupervisorConfig {
    pub enabled: bool,
    pub agent: String,
    pub verdict_on_block: String,
    pub constitution_path: Option<PathBuf>,
    pub skip_if_no_constitution: bool,
    pub heartbeat_stale_secs: u64,
    pub timeout_secs: Option<u64>,
    pub api_key_env: Option<String>,
    pub agent_profile: Option<String>,
    pub enable_hooks: bool,
}
Expand description

Supervisor agent configuration (v0.13.17.4).

Controls the AI-powered review that runs after the main agent exits but before ta draft build. The supervisor checks goal alignment and constitution compliance.

[supervisor]
enabled = true
agent = "builtin"              # "builtin" | "claude-code" | "codex" | "ollama" | manifest name
verdict_on_block = "warn"      # "warn" | "block"
constitution_path = ".ta/constitution.toml"
skip_if_no_constitution = true
heartbeat_stale_secs = 30     # kill if no token received for this long (replaces timeout_secs)
# timeout_secs = 120           # deprecated — use heartbeat_stale_secs instead
# api_key_env = "OPENAI_API_KEY"  # optional: pre-flight check for codex / custom agents

Fields§

§enabled: bool

Enable the supervisor agent. Default: true when any agent is configured.

§agent: String

Which agent runs the review.

  • “builtin” / “claude-code”: spawns the claude CLI (uses its own auth).
  • “codex”: spawns codex --approval-mode full-auto --quiet.
  • “ollama”: invokes via ta agent run ollama --headless.
  • any other string: looks up .ta/agents/<name>.toml manifest.
§verdict_on_block: String

Behavior when verdict is Block. “warn” = show in draft view only. “block” = refuse ta draft approve without --override.

§constitution_path: Option<PathBuf>

Path to the project constitution file (relative to workspace root). If absent, falls back to .ta/constitution.toml, then docs/TA-CONSTITUTION.md.

§skip_if_no_constitution: bool

Don’t fail if the constitution file is absent.

§heartbeat_stale_secs: u64

Kill supervisor if no token is received for this many seconds (default 30).

Replaces the wall-clock timeout_secs: a supervisor actively streaming a large diff will never be killed — only one that stops producing output for heartbeat_stale_secs is terminated. Set higher (e.g. 60) if your supervisor uses a slow model.

§timeout_secs: Option<u64>

Deprecated: wall-clock timeout in seconds. Accepted for backward compatibility. When present, emits a deprecation warning and the value is ignored in favour of heartbeat_stale_secs. Will be removed in a future version.

§api_key_env: Option<String>

Optional env var name to pre-flight check before spawning the supervisor agent. When set, TA verifies the var is present and prints an actionable message if missing. The agent binary handles the credential itself — TA never reads or forwards the value. Example: api_key_env = "OPENAI_API_KEY" for the codex agent.

§agent_profile: Option<String>

Optional agent profile name from [agent_profiles]. When set, resolves the framework and model for the supervisor from the profile table, overriding the bare agent string. Any registered framework works — not just claude.

§enable_hooks: bool

Allow session hooks to fire in the supervisor subprocess. Default: false.

By default, TA sets CLAUDE_CODE_DISABLE_HOOKS=1 when spawning the supervisor so that SessionStart and other hooks do not write JSON to stdout (which could be mistaken for supervisor content and trigger false stall timeouts). Set to true only if a custom hook must run during supervisor invocations.

Trait Implementations§

Source§

impl Clone for SupervisorConfig

Source§

fn clone(&self) -> SupervisorConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SupervisorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SupervisorConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SupervisorConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SupervisorConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,