pub struct ProviderLifecycle {
pub id: String,
pub title: String,
pub lifecycle: Vec<String>,
pub prompt_capture: bool,
pub client_config: String,
pub wired: Vec<String>,
pub note: String,
}Expand description
One provider’s lifecycle surface: what its adapter declares it can do, and what this repository has wired to it.
The two halves come from different places and must not be confused. lifecycle and
prompt_capture are the distribution’s declaration — what the shipped adapter can do
for this provider at all — while wired is this repository’s policy naming that
provider’s hook in wired_by. Either can be empty with the other full, and that pairing
is the interesting finding: a provider this repository wires but the tool ships no
lifecycle for is a hook that will never fire.
Neither half is inferred from a file on disk. Whether a shim is actually installed is
majordomus capture status’s question, and this type deliberately does not answer it.
use majordomus_cli::capability::builtin::lifecycle::ProviderLifecycle;
use serde_json::json;
// a provider the tool adapts and this repository wires: both halves present
let full: ProviderLifecycle = serde_json::from_value(json!({
"id": "claude",
"title": "Claude Code",
"lifecycle": ["SessionStart", "SessionEnd", "PreCompact"],
"prompt_capture": true,
"client_config": ".mcp.json",
"wired": ["session.start", "session.close"],
"note": "adapted and wired",
})).unwrap();
assert!(!full.lifecycle.is_empty() && !full.wired.is_empty());
assert!(full.prompt_capture);
// and one the tool ships no adapter for: it loses the automation and none of the model,
// because every command remains the same
let unadapted: ProviderLifecycle = serde_json::from_value(json!({
"id": "some-editor",
"title": "Some Editor",
"prompt_capture": false,
"note": "no lifecycle adapter ships for it",
})).unwrap();
assert!(unadapted.lifecycle.is_empty(), "nothing will fire for it");
assert!(unadapted.client_config.is_empty(), "and it reads no project-scoped config");Fields§
§id: StringThe provider id: the bootstrap template’s file stem.
title: StringThe name a person knows it by.
lifecycle: Vec<String>The lifecycle events its adapter declares, in the provider’s own vocabulary
(SessionStart, SessionEnd, PreCompact). Empty means the tool ships no
lifecycle adapter for it: such a provider loses the automation and none of the
model, because every command remains the same.
prompt_capture: boolWhether its adapter can archive the worker’s prompts.
client_config: StringThe file it reads a project-scoped MCP client configuration from, when it has one.
wired: Vec<String>The enforcement entries of this repository’s policy that name this provider’s hook
in wired_by. Declared wiring, not a file on disk: whether a shim is installed is a
question for majordomus capture status, which is the command that owns it.
note: StringWhat the two together mean.
Trait Implementations§
Source§impl Clone for ProviderLifecycle
impl Clone for ProviderLifecycle
Source§fn clone(&self) -> ProviderLifecycle
fn clone(&self) -> ProviderLifecycle
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 ProviderLifecycle
impl Debug for ProviderLifecycle
Source§impl<'de> Deserialize<'de> for ProviderLifecycle
impl<'de> Deserialize<'de> for ProviderLifecycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ProviderLifecycle
Source§impl JsonSchema for ProviderLifecycle
impl JsonSchema for ProviderLifecycle
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ProviderLifecycle
impl PartialEq for ProviderLifecycle
Source§fn eq(&self, other: &ProviderLifecycle) -> bool
fn eq(&self, other: &ProviderLifecycle) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ProviderLifecycle
impl Serialize for ProviderLifecycle
impl StructuralPartialEq for ProviderLifecycle
Auto Trait Implementations§
impl Freeze for ProviderLifecycle
impl RefUnwindSafe for ProviderLifecycle
impl Send for ProviderLifecycle
impl Sync for ProviderLifecycle
impl Unpin for ProviderLifecycle
impl UnsafeUnpin for ProviderLifecycle
impl UnwindSafe for ProviderLifecycle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.