chore: prettier format
Some checks are pending
CI / markdown (pull_request) Waiting to run
CI / port (pull_request) Waiting to run
CI / agent-jail-pkgs (pull_request) Waiting to run
CI / rust (pull_request) Waiting to run

This commit is contained in:
Sam & Claude 2026-06-26 09:39:15 +02:00
parent 1f393af09c
commit 36fdfbb2c1
2 changed files with 21 additions and 21 deletions

View file

@ -25,10 +25,10 @@ operator / peer host bridged host
The bridge is a thin `socat` front-end, supervised by the host's service
manager. Both sides are shipped in the repo:
| Host | Service | Packaging |
| --- | --- | --- |
| FreeBSD | rc.d `colibri_bridge` | `packaging/freebsd/colibri_bridge.in` |
| Linux | systemd `colibri-bridge.service` | `packaging/linux/` (unit + env + nft + README) |
| Host | Service | Packaging |
| ------- | -------------------------------- | ---------------------------------------------- |
| FreeBSD | rc.d `colibri_bridge` | `packaging/freebsd/colibri_bridge.in` |
| Linux | systemd `colibri-bridge.service` | `packaging/linux/` (unit + env + nft + README) |
Both run effectively:
@ -51,7 +51,7 @@ native firewall:
- **Linux (ufw):** `ufw allow in on tailscale0 to any port 9190 proto tcp`
On a default-deny host (e.g. ufw), the public side is already blocked, so only
the interface-scoped *allow* is needed. The `packaging/linux/colibri-bridge.nft`
the interface-scoped _allow_ is needed. The `packaging/linux/colibri-bridge.nft`
ruleset is provided for Linux hosts that do **not** run ufw (a default-accept
input chain); under ufw it is redundant.

View file

@ -6,7 +6,7 @@ description: Deduplicated tmux pane history with edge-triggered failure alerts.
Terminal capture is the screen-scraping half of Glasspane. Where the rest of
Glasspane derives agent state from structured JSONL events, this layer records
the **actual terminal text** of a pane and triages it against known patterns —
so Colibri can both *remember* what a terminal showed and *speak up* the moment
so Colibri can both _remember_ what a terminal showed and _speak up_ the moment
something it recognises goes wrong.
It lives in `colibri-glasspane` (`terminal.rs`, `signatures.rs`) and is driven
@ -18,14 +18,14 @@ by the `colibri-daemon` poll loop.
Identical screens produce identical ids.
- **Deduplicated history.** The recorder drops any frame whose hash equals the
previous one, so polling a near-static pane every few seconds collapses into a
compact log of *actual* state transitions, not thousands of duplicates. The
compact log of _actual_ state transitions, not thousands of duplicates. The
history is a bounded ring buffer per pane.
- **Signature triage.** Each captured frame is scanned by a `SignatureSet`.
A signature carries a severity (`error`/`warn`/`info`/`ok`), a plain-language
`next_action`, and an optional `invoke` (a skill to run to remediate). Matches
are classified into `failures` / `warnings` / `info` / `healthy`.
- **Edge-triggered alerts.** A failure/warning is reported only on the frame
where it *first appears* — not on every subsequent frame that still shows it.
where it _first appears_ — not on every subsequent frame that still shows it.
When the condition clears and later recurs, it fires again. This is what keeps
a persistent error from spamming alerts.
@ -42,12 +42,12 @@ different set; the matcher is shared.
Set on the daemon's environment (off by default):
| Variable | Purpose | Default |
| --- | --- | --- |
| `COLIBRI_TERMINAL_CAPTURE` | Enable the poll loop (`1`/`true`/`yes`/`on`) | off |
| `COLIBRI_TERMINAL_CAPTURE_INTERVAL_SECS` | Seconds between captures of each watched pane | `5` |
| `COLIBRI_TERMINAL_WATCH` | Comma-separated tmux targets to watch from startup | _(none)_ |
| `TELEGRAM_BOT_TOKEN` / `TELEGRAM_CHAT_ID` | Route edge-triggered alerts to Telegram | _(unset → log only)_ |
| Variable | Purpose | Default |
| ----------------------------------------- | -------------------------------------------------- | -------------------- |
| `COLIBRI_TERMINAL_CAPTURE` | Enable the poll loop (`1`/`true`/`yes`/`on`) | off |
| `COLIBRI_TERMINAL_CAPTURE_INTERVAL_SECS` | Seconds between captures of each watched pane | `5` |
| `COLIBRI_TERMINAL_WATCH` | Comma-separated tmux targets to watch from startup | _(none)_ |
| `TELEGRAM_BOT_TOKEN` / `TELEGRAM_CHAT_ID` | Route edge-triggered alerts to Telegram | _(unset → log only)_ |
When the bot token/chat id are unset, alerts degrade cleanly to a daemon log
line — the feature is safe to leave enabled without Telegram configured.
@ -56,13 +56,13 @@ line — the feature is safe to leave enabled without Telegram configured.
Over the Colibri socket (newline-delimited JSON):
| Command | Effect |
| --- | --- |
| `{"cmd":"terminal-watch","target":"clawdie:0"}` | Start recording a tmux target (session / `session:window` / `%pane`) |
| `{"cmd":"terminal-unwatch","target":"clawdie:0"}` | Stop recording and drop the pane's history |
| `{"cmd":"terminal-list"}` | Watched panes with frame counts and currently-firing alerts |
| `{"cmd":"terminal-history","target":"clawdie:0","limit":20}` | Recent recorded frames (text + detection) for a pane |
| `{"cmd":"terminal-poll","target":"clawdie:0"}` | Capture now instead of waiting for the tick (`target` optional → all) |
| Command | Effect |
| ------------------------------------------------------------ | --------------------------------------------------------------------- |
| `{"cmd":"terminal-watch","target":"clawdie:0"}` | Start recording a tmux target (session / `session:window` / `%pane`) |
| `{"cmd":"terminal-unwatch","target":"clawdie:0"}` | Stop recording and drop the pane's history |
| `{"cmd":"terminal-list"}` | Watched panes with frame counts and currently-firing alerts |
| `{"cmd":"terminal-history","target":"clawdie:0","limit":20}` | Recent recorded frames (text + detection) for a pane |
| `{"cmd":"terminal-poll","target":"clawdie:0"}` | Capture now instead of waiting for the tick (`target` optional → all) |
`terminal-poll` returns, per pane, whether the frame was `recorded` or
`unchanged` (deduped) and any `new_alerts` that fired on this capture.