chromatophore_context.rs
rust
1pub struct ChromatophorePolicy { /* ... */ }
2
3impl ChromatophorePolicy {
4 pub fn new(config: ChromatophoreConfig) -> Result<Self, ChromatophoreError>;
5 pub fn balanced() -> Self;
6
7 // Item lifecycle
8 pub fn introduce(&mut self, content: String, commitment: CommitmentLevel) -> ItemId;
9 pub fn reference(&mut self, id: ItemId);
10 pub fn decide(&mut self, id: ItemId);
11 pub fn commit(&mut self, id: ItemId);
12 pub fn complete(&mut self, id: ItemId);
13 pub fn supersede(&mut self, id: ItemId, superseded_by: ItemId);
14 pub fn add_blocks(&mut self, from: ItemId, to: ItemId);
15
16 // Activation (call before each LLM step)
17 pub fn activate(&mut self) -> ActivationResult;
18
19 // Interrupt/Resume
20 pub fn interrupt(&mut self, signal: &InterruptSignal) -> ActivationPlan;
21 pub fn resume(&mut self) -> Result<ActivationPlan, ChromatophoreError>;
22}
23
24impl Maintainable for ChromatophorePolicy {
25 fn tick(&mut self) -> MaintenanceReport;
26}
27