Skip to main content

PersonaPostsConfig

Struct PersonaPostsConfig 

Source
pub struct PersonaPostsConfig {
Show 16 fields pub persona: String, pub enabled: bool, pub post_interval_seconds: u64, pub interval_jitter_pct: u32, pub active_hours: Option<ActiveHoursConfig>, pub candidates_per_draft: usize, pub post_history_store: String, pub post_history_path: Option<String>, pub post_history_lookback_days: i64, pub topic_brief: Option<String>, pub engagement_refresh_seconds: u64, pub engagement_top_n: usize, pub engagement_max_age_days: i64, pub engagement_min_age_hours: i64, pub writer_provider: Option<AgentProviderConfig>, pub image_source: ImageSource,
}
Expand description

Per-persona proactive-posting configuration.

When present, the daemon registers a PersonaPostScheduler that fires DaemonCommand::PersonaPost on the configured cadence (gated by active_hours). The handler runs the topic generator, drafts candidate threads via the existing review pipeline, sends them to Telegram for review, posts the chosen draft.

Configured under [[daemon.persona_posts]] blocks.

Fields§

§persona: String

Persona registry name (e.g. "heartbit-ghost:x").

§enabled: bool

Whether this poster is enabled.

§post_interval_seconds: u64

Posting interval, in seconds. Default 14400 (4 hours). Recommended ≥60. NOTE: this is NOT enforced at config load — the value is consumed as-is by the (cross-crate) scheduler loop.

§interval_jitter_pct: u32

Randomness applied to each post_interval_seconds tick, as a percentage (050). Default 25 = ±25%, so a base 4h interval fires somewhere in [3h, 5h]. Prevents the daemon from posting on a perfectly predictable cadence — that’s a textbook bot signature on X. 0 disables jitter (use only for tests).

§active_hours: Option<ActiveHoursConfig>

Optional "HH:MM-HH:MM" window during which posts are allowed. Outside this window, the scheduler tick is a no-op. When absent, posting is allowed 24/7.

§candidates_per_draft: usize

Number of candidate threads to draft per tick (1..=10). Default 3.

§post_history_store: String

Backend for the post history store: "in_memory" or "jsonl".

§post_history_path: Option<String>

Path to the JSONL store file (only used when post_history_store == "jsonl"). Tilde expansion happens at store-construction time.

§post_history_lookback_days: i64

How far back to check for topic duplicates. Default 30 days.

§topic_brief: Option<String>

Optional fallback brief used when the persona declares no topic-context provider, or appended to the provider’s output.

§engagement_refresh_seconds: u64

Engagement-collector tick interval, in seconds. Default 21600 = 6h. Each tick batch-refreshes every eligible Posted tweet’s metrics from the X API and writes a fresh [EngagementSnapshot].

§engagement_top_n: usize

How many top-engaged posts to inject as writer few-shot exemplars. Default 5. Set to 0 to disable injection — the writer then runs without exemplars, matching pre-P2.0 behavior.

§engagement_max_age_days: i64

Ignore tweets older than this many days when refreshing engagement. Default 30 — older tweets rarely accrue new engagement.

§engagement_min_age_hours: i64

Ignore tweets younger than this many hours when refreshing engagement. Default 24 — gives the algorithm time to fan out.

§writer_provider: Option<AgentProviderConfig>

Override LLM provider for the writer + style-critic stages of the proactive-post pipeline. When set, these two “engagement voice” agents use this provider; the researcher and fact-check stages keep using the global [provider]. Use this to point the engagement voice at a different model (e.g. Grok via OpenRouter) without affecting verification or research quality.

Configured under [daemon.persona_posts.writer_provider]. When absent, the writer and critic share the global provider.

§image_source: ImageSource

How to produce the optional head-tweet image. Default online (Openverse CC0/public-domain search). ai uses the image generator; none disables images.

Trait Implementations§

Source§

impl Clone for PersonaPostsConfig

Source§

fn clone(&self) -> PersonaPostsConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PersonaPostsConfig

Source§

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

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

impl<'de> Deserialize<'de> for PersonaPostsConfig

Source§

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

Deserialize this value from the given Serde deserializer. 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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: Sized + 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: Sized + 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