Add state-machine sessions, event table and TUI overview

- machine.rs: TOML machine parser/validator, four example machines
- db.rs: per-goal SQLite (.hx/orch.db) with append-only events
- runner.rs: session runner for computer steps (catches, retries, resume)
- view.rs + tui/: sessions overview built from events; bare `orch` opens it
- orch session: create and run a session from the CLI
- devenv with git and sqlite

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
johannesandClaude Sonnet 5.5 committed 2026-11-14 11:58:23 +01:00
1 parent 374cf28aed
commit d66a014bc5
19 files changed
+4525 -8

No files matched your search

+2 -2
View File
@@ -14,7 +14,7 @@ use std::process::{Command, Stdio};
use std::sync::mpsc;
use std::time::{Duration, Instant};
fn git(dir: &Path, args: &[&str]) -> Result<String> {
pub(crate) fn git(dir: &Path, args: &[&str]) -> Result<String> {
let o = Command::new("git")
.args(["-c", "user.name=orch", "-c", "user.email=orch@localhost"])
.args(args)
@@ -124,7 +124,7 @@ fn is_rate_limit(reason: &str) -> bool {
/// Max bytes of gate output fed back to hx (the tail: errors are at the end).
const GATE_LOG_LIMIT: usize = 8000;
fn tail(b: &[u8], limit: usize) -> String {
pub(crate) fn tail(b: &[u8], limit: usize) -> String {
let s = String::from_utf8_lossy(&b[b.len().saturating_sub(limit)..]).into_owned();
s.trim_start_matches('\u{FFFD}').to_string()
}