Skip to main content

Frontmatter

Struct Frontmatter 

Source
pub struct Frontmatter {
    pub session: Option<String>,
    pub resume: Option<String>,
    pub agent: Option<String>,
    pub model: Option<String>,
    pub branch: Option<String>,
    pub tmux_session: Option<String>,
    pub mode: Option<String>,
    pub format: Option<AgentDocFormat>,
    pub write_mode: Option<AgentDocWrite>,
    pub stream_config: Option<StreamConfig>,
    pub claude_args: Option<String>,
}

Fields§

§session: Option<String>

Document/routing UUID — permanent identifier for tmux pane routing. Serialized as agent_doc_session in YAML; reads legacy session via alias.

§resume: Option<String>

Agent conversation ID — used for --resume with agent backends. Separate from session so the routing key never changes.

§agent: Option<String>§model: Option<String>§branch: Option<String>§tmux_session: Option<String>

Tmux session name for pane affinity (e.g., “claude”). Set by claim or sync on first use; used to keep panes in the same session.

§mode: Option<String>

Deprecated. Use agent_doc_format + agent_doc_write instead. Kept for backward compatibility. Values: “append”, “template”, “stream”. Serialized as agent_doc_mode in YAML; reads legacy response_mode and shorthand mode via aliases.

§format: Option<AgentDocFormat>

Document format: controls document structure (append | template).

§write_mode: Option<AgentDocWrite>

Write strategy: controls merge behavior (merge | crdt).

§stream_config: Option<StreamConfig>

Stream mode configuration (used when write strategy is CRDT).

§claude_args: Option<String>

Additional CLI arguments to pass to the claude process. Space-separated string (e.g., “–dangerously-skip-permissions”).

Implementations§

Source§

impl Frontmatter

Source

pub fn resolve_mode(&self) -> ResolvedMode

Resolve the canonical (format, write) pair from all three fields.

Priority:

  1. Explicit agent_doc_format / agent_doc_write fields (highest)
  2. Deprecated agent_doc_mode field (auto-migrated)
  3. Defaults: format=template, write=crdt

Trait Implementations§

Source§

impl Debug for Frontmatter

Source§

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

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

impl Default for Frontmatter

Source§

fn default() -> Frontmatter

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

impl<'de> Deserialize<'de> for Frontmatter

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 Frontmatter

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<M> Meta for M
where M: Default,