omx(team): auto-checkpoint worker-1 [1]

This commit is contained in:
bellman
2026-05-15 09:45:53 +09:00
parent 0a14f8511e
commit 76920c7d6c
2 changed files with 17 additions and 1 deletions

View File

@@ -4316,7 +4316,7 @@ mod tests {
};
use plugins::{
PluginError, PluginKind, PluginLoadFailure, PluginManager, PluginManagerConfig,
PluginMetadata, PluginSummary,
PluginLifecycle, PluginMetadata, PluginSummary,
};
use runtime::{
CompactionConfig, ConfigLoader, ContentBlock, ConversationMessage, MessageRole, Session,
@@ -5127,6 +5127,7 @@ mod tests {
root: None,
},
enabled: true,
lifecycle: PluginLifecycle::default(),
},
PluginSummary {
metadata: PluginMetadata {
@@ -5140,6 +5141,7 @@ mod tests {
root: None,
},
enabled: false,
lifecycle: PluginLifecycle::default(),
},
]);
@@ -5166,6 +5168,7 @@ mod tests {
root: None,
},
enabled: true,
lifecycle: PluginLifecycle::default(),
}],
&[PluginLoadFailure::new(
PathBuf::from("/tmp/broken-plugin"),

View File

@@ -648,6 +648,7 @@ impl RegisteredPlugin {
PluginSummary {
metadata: self.metadata().clone(),
enabled: self.enabled,
lifecycle: self.definition.lifecycle().clone(),
}
}
}
@@ -656,6 +657,18 @@ impl RegisteredPlugin {
pub struct PluginSummary {
pub metadata: PluginMetadata,
pub enabled: bool,
pub lifecycle: PluginLifecycle,
}
impl PluginSummary {
#[must_use]
pub fn lifecycle_state(&self) -> &'static str {
if self.enabled {
"ready"
} else {
"disabled"
}
}
}
#[derive(Debug)]