feat: cross-host tmux screenshot capture + daemon integration #238

Closed
clawdie wants to merge 2 commits from feat/screenshot-auto-capture into main
Owner

Summary

Enables cross-host tmux pane screenshots in the Colibri cost-to-proof pipeline. The daemon can now capture a remote agent's tmux pane (e.g. on domedog) and render it to PNG for the dashboard's ▸ proof lightbox.

Changes

tmux-screenshot.py

  • --host flag for SSH remote pane capture (ssh domedog tmux capture-pane ...)
  • --uuid flag for caller-controlled filenames (daemon passes its own UUID)
  • Content hash still computed and stored in JSON metadata for verification
  • New capture_host metadata field for cross-host provenance

daemon.rsmaybe_capture_screenshot()

  • Two-tier capture: tmux pane preferred, generic screenshot fallback
  • Env var: COLIBRI_SCREENSHOT_TMUX_TARGET=domedog:=1:2 triggers tmux mode
  • Env var: COLIBRI_SCREENSHOT_SCRIPT (default: .agent/skills/tmux-screenshot/tmux-screenshot.py)
  • Backward compatible: existing COLIBRI_SCREENSHOT_CMD fallback unchanged

SKILL.md

  • Cross-host capture workflow documented
  • Daemon-controlled UUID section with env var examples

Verification

# Cross-host capture (tested e2e)
python3 .agent/skills/tmux-screenshot/tmux-screenshot.py \
  --host domedog --session 1 --window 2 \
  --uuid test-cross-host --outdir /tmp/tmux-test

# Daemon integration (env only — no running daemon needed)
COLIBRI_SCREENSHOT_TMUX_TARGET=domedog:=1:2
COLIBRI_SCREENSHOT_DIR=/tmp/screenshots

Gates

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace — 312 passed
## Summary Enables cross-host tmux pane screenshots in the Colibri cost-to-proof pipeline. The daemon can now capture a remote agent's tmux pane (e.g. on domedog) and render it to PNG for the dashboard's ▸ proof lightbox. ## Changes ### `tmux-screenshot.py` - `--host` flag for SSH remote pane capture (`ssh domedog tmux capture-pane ...`) - `--uuid` flag for caller-controlled filenames (daemon passes its own UUID) - Content hash still computed and stored in JSON metadata for verification - New `capture_host` metadata field for cross-host provenance ### `daemon.rs` — `maybe_capture_screenshot()` - Two-tier capture: tmux pane preferred, generic screenshot fallback - Env var: `COLIBRI_SCREENSHOT_TMUX_TARGET=domedog:=1:2` triggers tmux mode - Env var: `COLIBRI_SCREENSHOT_SCRIPT` (default: `.agent/skills/tmux-screenshot/tmux-screenshot.py`) - Backward compatible: existing `COLIBRI_SCREENSHOT_CMD` fallback unchanged ### `SKILL.md` - Cross-host capture workflow documented - Daemon-controlled UUID section with env var examples ## Verification ```sh # Cross-host capture (tested e2e) python3 .agent/skills/tmux-screenshot/tmux-screenshot.py \ --host domedog --session 1 --window 2 \ --uuid test-cross-host --outdir /tmp/tmux-test # Daemon integration (env only — no running daemon needed) COLIBRI_SCREENSHOT_TMUX_TARGET=domedog:=1:2 COLIBRI_SCREENSHOT_DIR=/tmp/screenshots ``` ## Gates - `cargo fmt --all --check` ✅ - `cargo clippy --workspace --all-targets -- -D warnings` ✅ - `cargo test --workspace` — 312 passed ✅
clawdie added 2 commits 2026-06-27 20:19:17 +02:00
When COLIBRI_SCREENSHOT_DIR is set, the daemon generates a UUID via
uuidgen, spawns a screenshot command (COLIBRI_SCREENSHOT_CMD, default
'import -window root'), and attaches the UUID to the mother cost push.

The dashboard already renders ▸ proof badges on cards with screenshot_uuid.
This closes the loop — the daemon now auto-generates screenshots instead
of waiting for an external process to set COLIBRI_TASK_SCREENSHOT_UUID.

Sam & Hermes
tmux-screenshot.py:
- Add --host flag for SSH remote pane capture
- Add --uuid flag for caller-controlled filenames (daemon integration)
- Content hash still computed for verification alongside daemon UUID
- Cross-host metadata: capture_host field in JSON

daemon.rs maybe_capture_screenshot():
- Two-tier: tmux pane capture (COLIBRI_SCREENSHOT_TMUX_TARGET) preferred
  over generic screenshot (COLIBRI_SCREENSHOT_CMD fallback)
- Format: 'domedog:=1:2' for remote host, '=1:2' for local
- Script path configurable via COLIBRI_SCREENSHOT_SCRIPT

SKILL.md: cross-host and daemon-controlled UUID sections
clawdie closed this pull request 2026-06-27 21:09:07 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: clawdie/colibri#238
No description provided.