Skip to main content

GhostWriter

Struct GhostWriter 

Source
pub struct GhostWriter { /* private fields */ }
Expand description

The Ghost Writer daemon. Runs in background, syncs context to ALL detected AI coding assistants.

Implementations§

Source§

impl GhostWriter

Source

pub fn spawn(engine: Arc<MemoryEngineV3>) -> Arc<Self>

Create and AUTO-START the ghost writer (syncs to ALL detected clients)

Source

pub fn spawn_if_available(engine: Arc<MemoryEngineV3>) -> Option<Arc<Self>>

Spawn only if ANY AI client is detected; returns None if none installed

Source

pub fn new(engine: Arc<MemoryEngineV3>) -> Self

Create without auto-start (for testing)

Source

pub fn detect_all_memory_dirs() -> Vec<DetectedClient>

Detect ALL AI coding assistant memory directories. Returns every client whose config directory exists or can be created.

Source

pub fn sync_to_all_clients(&self)

Sync context to ALL detected clients at once.

Source

pub fn format_for_client( context: &SessionResumeResult, client: ClientType, ) -> String

Format context for a specific client. Claude gets the full format. Other clients get a streamlined markdown.

Source

pub fn detected_clients(&self) -> Vec<DetectedClient>

Get all currently detected clients.

Source

pub fn sync_once(&self)

Perform one sync cycle — writes to ALL detected clients.

Source

pub fn stop(&self)

Stop the ghost writer

Source

pub fn is_running(&self) -> bool

Check if running

Source

pub fn last_sync_time(&self) -> Option<DateTime<Utc>>

Get last sync time

Source

pub fn get_claude_memory_dir(&self) -> Option<PathBuf>

Get detected Claude memory directory

Source

pub fn format_as_claude_memory(context: &SessionResumeResult) -> String

Format context as Claude-compatible markdown

Trait Implementations§

Source§

impl Drop for GhostWriter

Source§

fn drop(&mut self)

Executes the destructor for this type. 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.