Skip to main content

PersonaBlogConfig

Struct PersonaBlogConfig 

Source
pub struct PersonaBlogConfig {
Show 15 fields pub persona: String, pub enabled: bool, pub poll_interval_seconds: u64, pub interval_jitter_pct: u32, pub active_hours: Option<ActiveHoursConfig>, pub posts_dir: String, pub out_dir: String, pub seed_lookback_days: i64, pub candidates_per_draft: usize, pub site_url: String, pub site_title: String, pub writer_provider: Option<AgentProviderConfig>, pub deploy_command: Option<String>, pub x_announce: Option<XAnnounceConfig>, pub github_readme: Option<GithubReadmeConfig>,
}
Expand description

Personal-blog publishing configuration.

When present, the daemon registers a PersonaBlogScheduler that fires DaemonCommand::PersonaBlog on a weekly cadence (with jitter). The handler picks the highest-engagement X post from the prior seed_lookback_days (default 7) as the topic seed, drafts a long-form essay via the blog_writer agent, routes through Telegram for review, writes the picked draft as Markdown to posts_dir, and re-renders the static site into out_dir.

Configured under [daemon.persona_blog] (single block, not a list — one blog per daemon).

Fields§

§persona: String

Persona registry name (e.g. "heartbit-ghost:x"). Must match an existing persona whose post history + engagement store are already configured under [[daemon.persona_posts]] for the same slug — the blog reuses those stores for seed selection.

§enabled: bool

Whether the blog scheduler is enabled.

§poll_interval_seconds: u64

Polling interval in seconds. Default 604_800 (7 days = weekly). Validation: must be ≥3600 (1 hour) — anything tighter is almost certainly a misconfig and produces thin posts.

§interval_jitter_pct: u32

Jitter percentage applied to the cadence. Default 10 — tighter than X posts because weekly is already coarse and operators usually want a predictable day-of-week.

§active_hours: Option<ActiveHoursConfig>

Optional active-hours window for the scheduler.

§posts_dir: String

Directory holding the generated Markdown post files. Relative to the daemon’s CWD; tilde-expanded. Default: "blog-site/posts".

§out_dir: String

Directory where the rendered static site is written. Relative to CWD; tilde-expanded. This is what gets deployed to Cloudflare Pages (commit + push triggers deploy). Default: "blog-site/public".

§seed_lookback_days: i64

How many days back to look for the highest-engagement X post used as the topic seed. Default 7. Set to 0 to disable X-derived seeding (forces the operator to set topic_brief).

§candidates_per_draft: usize

Number of candidate essay drafts per tick. Default 2 — long-form drafts are expensive (~3-5k tokens each); 2 is enough for meaningful comparison without blowing the budget.

§site_url: String

Public site URL (required) — used to build canonical URLs, OpenGraph tags, the sitemap, and the RSS feed.

§site_title: String

Site title rendered in <title> and the index page header. Default: "pascal.heartbit.ai".

§writer_provider: Option<AgentProviderConfig>

Optional override LLM provider for the blog_writer + critic. None falls back to the global [provider]. Same shape as persona_posts.writer_provider.

§deploy_command: Option<String>

Optional shell command run after a successful BlogOutcome::Posted. Runs from the daemon CWD; env is inherited (use this with CLOUDFLARE_API_TOKEN exported in the daemon shell to invoke wrangler pages deploy …). Empty/None skips the hook.

§x_announce: Option<XAnnounceConfig>

Optional X self-amplification — when Some(cfg) and cfg.enabled, each successful blog publish (after deploy_command succeeds or is absent) enqueues a DaemonCommand::BlogAnnounceX that drafts an announcement thread through the existing X persona pipeline + Telegram review.

§github_readme: Option<GithubReadmeConfig>

Optional GitHub Profile README auto-update — when Some(cfg) and cfg.enabled, each successful blog publish re-renders the operator’s profile README to feature the 3 most recent essays and pushes the change to GitHub via the local repo clone.

Trait Implementations§

Source§

impl Clone for PersonaBlogConfig

Source§

fn clone(&self) -> PersonaBlogConfig

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 PersonaBlogConfig

Source§

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

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

impl<'de> Deserialize<'de> for PersonaBlogConfig

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