diff --git a/crates/colibri-glasspane/src/lib.rs b/crates/colibri-glasspane/src/lib.rs index 59670e3..ccf2ecc 100644 --- a/crates/colibri-glasspane/src/lib.rs +++ b/crates/colibri-glasspane/src/lib.rs @@ -49,8 +49,8 @@ pub enum AgentState { /// Fold one Pi `--mode json` event (its raw `type` field) into the agent state. /// Mirrors the colibri-pi-events taxonomy; unknown types preserve the state /// (forward-compatible with new Pi event kinds). -pub fn apply_pi_event(state: AgentState, pi_type: &str) -> AgentState { - match pi_type { +pub fn apply_pi_event(state: AgentState, event_type: &str) -> AgentState { + match event_type { "session" | "session_started" => AgentState::Idle, "agent_start" | "turn_start" @@ -221,7 +221,7 @@ pub fn pane_from_jsonl(agent: impl Into, jsonl: &str) -> Pane { /// One accepted structured event from a streaming Pi JSONL reader. #[derive(Debug, Clone, PartialEq, Eq)] pub struct PiStreamUpdate { - pub pi_type: String, + pub event_type: String, pub state: AgentState, pub session_id: Option, pub cwd: Option, @@ -320,7 +320,7 @@ impl PiJsonlIngestor { } Some(PiStreamUpdate { - pi_type: ty.to_string(), + event_type: ty.to_string(), state: self.state, session_id: self.session_id.clone(), cwd: self.cwd.clone(), @@ -819,7 +819,7 @@ mod tests { let update = ingestor .ingest_line_at(r#"{"type":"session","id":"pi-s","cwd":"/repo"}"#, t(10)) .unwrap(); - assert_eq!(update.pi_type, "session"); + assert_eq!(update.event_type, "session"); assert_eq!(update.observed_at, t(10)); assert_eq!(ingestor.session_id(), Some("pi-s")); assert_eq!(ingestor.cwd(), Some("/repo")); @@ -898,7 +898,7 @@ mod tests { assert_eq!(stats.total_lines, 4); assert_eq!(stats.accepted_lines, 3); assert_eq!(stats.skipped_lines, 1); - assert_eq!(stats.last_update.unwrap().pi_type, "turn_end"); + assert_eq!(stats.last_update.unwrap().event_type, "turn_end"); let pane = supervisor.get("pane-reader").unwrap(); assert_eq!(pane.state(), AgentState::Done); diff --git a/docs/wiki/naming-decisions.md b/docs/wiki/naming-decisions.md index ef0385b..be32430 100644 --- a/docs/wiki/naming-decisions.md +++ b/docs/wiki/naming-decisions.md @@ -16,6 +16,7 @@ linked code before trusting a row. | `fake-pi-agent.py` → `sample-pi-agent.py` | "fake" too loaded; it emits a canned _sample_ | `scripts/sample-pi-agent.py` | | non-local spawn default `hermes-agent` → `zot` | `hermes-agent` was a nonexistent leftover binary | `socket.rs` (`default_agent_args`) | | `usb_nodes` → `hive_nodes` | a node is any host that joined the hive, not only a USB boot (`+node_type`); #161 | `packaging/mother/mother_schema.sql` | +| `pi_type` → `event_type` | internal name for the normalized event type; harness-neutral (not serialized) | `crates/colibri-glasspane/src/lib.rs` | ## In-flight @@ -23,18 +24,17 @@ _None currently._ ## Known residue (not yet actioned) -| Item | Note | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `pi_type` | pi-era name for "normalized event type"; **internal only**, not serialized. Optional rename → `event_type`. `crates/colibri-glasspane/src/lib.rs` | -| `FEATURE_COLIBRI` | `AGENTS.md`/README imply "no separate feature flag," but the build keeps it (default YES, "internal escape hatch"). Reconcile wording or flag. (clawdie-iso) | -| `clawdie-startx` | README teaches `clawdie-gui`; `startx` kept as the internal wrapper — documented transition, verify the user-facing launcher leads with `gui`. (clawdie-iso) | -| `ADR-agent-harness-consolidation.md` | Referenced but does not exist; `AGENTS.md` is the real anchor. See [agent-harness](./agent-harness.md). | +| Item | Note | +| ------------------------------------ | ------------------------------------------------------------------------------------------------------- | +| `ADR-agent-harness-consolidation.md` | Referenced but does not exist; `AGENTS.md` is the real anchor. See [agent-harness](./agent-harness.md). | ## Structural decisions -| Decision | Why / lesson | Anchor | -| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | -| Single home for mother infra = colibri | The mother MCP scripts were copied into both colibri and clawdie-iso; the iso copy drifted to an **SQL-injectable** `node-register-mcp` on `main`. Same script in two repos drifts — a lint pass should flag cross-repo duplicates. | colibri `packaging/mother/`; iso removal in iso PR #129 | +| Decision | Why / lesson | Anchor | +| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | +| Single home for mother infra = colibri | The mother MCP scripts were copied into both colibri and clawdie-iso; the iso copy drifted to an **SQL-injectable** `node-register-mcp` on `main`. Same script in two repos drifts — a lint pass should flag cross-repo duplicates. | colibri `packaging/mother/`; iso removal in iso PR #129 | +| `FEATURE_COLIBRI` is internal, not user-facing | colibri is staged by default; `FEATURE_COLIBRI=NO` is a build-time escape hatch (e.g. no colibri checkout). README clarified. | clawdie-iso #130 | +| `clawdie-gui` is the stable operator command | `clawdie-startx` retained as a back-compat alias (both installed); docs teach `clawdie-gui`. Verified intentional, not drift. | `clawdie-iso/README.md` §clawdie-gui; `clawdie-iso/build.sh` | ## See also