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, lifeloop-direct callback) 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 strStable profile identifier (e.g. "ccd-compat",
"lifeloop-direct"). Used in diagnostics; not part of the
rendered asset content.
claude_command_prefix: &'static strCommand 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 strCommand 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
impl LifecycleProfile
pub fn validate(&self) -> Result<(), &'static str>
Sourcepub fn claude_command(&self, hook_arg: &str) -> String
pub fn claude_command(&self, hook_arg: &str) -> String
Render this profile’s .claude/settings.json hook command for
hook_arg.
Sourcepub fn codex_command(&self, hook_arg: &str) -> String
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
impl Clone for LifecycleProfile
Source§fn clone(&self) -> LifecycleProfile
fn clone(&self) -> LifecycleProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LifecycleProfile
impl Debug for LifecycleProfile
Source§impl Hash for LifecycleProfile
impl Hash for LifecycleProfile
Source§impl PartialEq for LifecycleProfile
impl PartialEq for LifecycleProfile
Source§fn eq(&self, other: &LifecycleProfile) -> bool
fn eq(&self, other: &LifecycleProfile) -> bool
self and other values to be equal, and is used by ==.impl Copy for LifecycleProfile
impl Eq for LifecycleProfile
impl StructuralPartialEq for LifecycleProfile
Auto Trait Implementations§
impl Freeze for LifecycleProfile
impl RefUnwindSafe for LifecycleProfile
impl Send for LifecycleProfile
impl Sync for LifecycleProfile
impl Unpin for LifecycleProfile
impl UnsafeUnpin for LifecycleProfile
impl UnwindSafe for LifecycleProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.