Skip to main content

LifecycleProfile

Struct LifecycleProfile 

Source
pub struct LifecycleProfile {
    pub id: &'static str,
    pub claude_command_prefix: &'static str,
    pub claude_legacy_substrings: &'static [&'static str],
    pub claude_managed_events: &'static [(&'static str, &'static str, &'static str)],
    pub codex_command_prefix: &'static str,
    pub codex_managed_events: &'static [(&'static str, &'static str, &'static str, &'static str)],
}
Expand description

Per-client-profile data driving lifecycle integration asset rendering and merge.

This struct expresses the client-shape of a host integration profile (e.g. CCD compatibility) without pulling client semantics into core types. It is a pure data surface: every field is 'static and the methods are pure functions of those fields.

Fields§

§id: &'static str

Stable profile identifier (e.g. "ccd-compat"). Used in diagnostics; not part of the rendered asset content.

§claude_command_prefix: &'static str

Command prefix Lifeloop renders into .claude/settings.json for managed hook entries. The merge logic uses it as a managed-entry marker (it scrubs entries whose command starts with this prefix and rewrites them).

§claude_legacy_substrings: &'static [&'static str]

Substrings inside .claude/settings.json command strings that the merge logic also treats as managed (legacy/pre-v1 forms whose shape changed across releases). Always merged WITH the prefix scrub, never replacing it. Empty when the profile has no legacy shape to scrub.

§claude_managed_events: &'static [(&'static str, &'static str, &'static str)]

(claude_event, hook_arg, matcher_pattern) tuples this profile installs into Claude’s hook config.

§codex_command_prefix: &'static str

Command prefix Lifeloop renders into .codex/hooks.json for managed hook entries. Merge logic scrubs entries whose command starts with it.

§codex_managed_events: &'static [(&'static str, &'static str, &'static str, &'static str)]

(codex_event, hook_arg, matcher_pattern, status_message) tuples this profile installs into Codex’s hook config.

Implementations§

Source§

impl LifecycleProfile

Source

pub fn validate(&self) -> Result<(), &'static str>

Source

pub fn claude_command(&self, hook_arg: &str) -> String

Render this profile’s .claude/settings.json hook command for hook_arg.

Source

pub fn codex_command(&self, hook_arg: &str) -> String

Render this profile’s .codex/hooks.json hook command for hook_arg.

Trait Implementations§

Source§

impl Clone for LifecycleProfile

Source§

fn clone(&self) -> LifecycleProfile

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 Copy for LifecycleProfile

Source§

impl Debug for LifecycleProfile

Source§

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

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

impl Eq for LifecycleProfile

Source§

impl Hash for LifecycleProfile

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for LifecycleProfile

Source§

fn eq(&self, other: &LifecycleProfile) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LifecycleProfile

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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.