Spike: fs/upgrade/bench examples, agent resumes interrupted turns, world lock, short trap reasons

This commit is contained in:
2026-10-15 05:00:33 +01:00
parent 83bbbb33a8
commit 0be152dda9
13 changed files with 293 additions and 8 deletions
+7
View File
@@ -0,0 +1,7 @@
[package]
name = "ticker"
version = "0.1.0"
edition = "2024"
[dependencies]
serde_json = "1"
+16
View File
@@ -0,0 +1,16 @@
//! Sends {"type":"add","text":"tick N"} to `notes` every 50 ms, N = 1..=200.
//! Does not read stdin, so the broker kills it at shutdown; that is fine.
use std::io::Write;
fn main() {
let mut out = std::io::stdout().lock();
for n in 1..=200 {
let msg = serde_json::json!({"to": "notes", "body": {"type": "add", "text": format!("tick {n}")}});
writeln!(out, "{msg}").unwrap();
out.flush().unwrap();
std::thread::sleep(std::time::Duration::from_millis(50));
}
// Stay alive without doing anything.
loop {
std::thread::sleep(std::time::Duration::from_secs(3600));
}
}