mind-stream: her stream of thought, offline (cut stream-thoughts steps 2-5)
The stream organ projects her own state through Ghostlight's Projector (a pinned git dependency), lets a base model continue it raw over loopback Ollama, keeps the continuation least near her earlier thoughts by the daemon's scores, and admits it as one thought with its whole trace. mind-stream --instance <slug> [--once] [--dry-run]. Cadence is derived from her newest thought; nothing is delivered to any Persona. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3d33771cca
commit
e08b99daba
1 changed files with 3 additions and 1 deletions
|
|
@ -70,6 +70,7 @@ fn run() -> Result<()> {
|
|||
let mode = if args.dry_run { Mode::DryRun } else { Mode::Live };
|
||||
let once = args.once || args.dry_run;
|
||||
loop {
|
||||
let mut faulted = false;
|
||||
let waits = match tick(&organs, &|| read_effective(&instance), mode, Utc::now()) {
|
||||
Ok(Outcome::Thought { thought, admitted }) => {
|
||||
if admitted {
|
||||
|
|
@ -87,11 +88,12 @@ fn run() -> Result<()> {
|
|||
Ok(Outcome::NotDue) => false,
|
||||
Err(fault) => {
|
||||
eprintln!("mind-stream: {}", format!("{fault:#}").replace('\n', " "));
|
||||
faulted = true;
|
||||
true
|
||||
}
|
||||
};
|
||||
if once {
|
||||
return Ok(());
|
||||
return if faulted { Err(anyhow!("the tick faulted")) } else { Ok(()) };
|
||||
}
|
||||
std::thread::sleep(Duration::from_secs(if waits { STREAM_MIN_GAP_S as u64 } else { POLL_S }));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue