tmux-screenshot

Text-first diagnostic capture for terminal sessions with PNG kept as the human glasspane layer.

Primary outputs: .txt and .json

Human output: .png

Current default path: /home/clawdija/htdocs/ai.clawdie.si/screenshots

Viewer URL: https://ai.clawdie.si/screenshots/viewer.html?u=<uuid>

Priority

  1. Read the .txt artifact first for signature matching.
  2. Read the .json artifact for structured metadata.
  3. Open the .png only when a human needs visual context.
Design choice: PNG is no longer the primary diagnostic source. The agent should compare text and JSON state against known troubleshooting signatures from skills such as freebsd-admin, bastille-network, and warden-pf.

JSON Schema

The JSON file is the machine-readable state capture and should be treated as the canonical automation artifact.

FieldPurpose
uuidStable artifact identifier derived from content hash.
captured_atISO timestamp for machine sorting and comparison.
captured_at_displayUser-facing timestamp in dd.mm.yyyy HH:MM:SS.
sessionTmux session name.
hostHost where the capture was taken.
window_index, window_nameWindow context.
pane_id, pane_titlePane context.
pane_current_commandCurrent foreground command in the pane.
pane_current_pathCurrent working directory in the pane.
text_path, png_path, json_pathArtifact filenames for direct linking.
txt_hashFull SHA256 of the stripped text artifact.
line_countQuick signal about capture size.
tagsHigh-level labels for later filtering.
detected_signaturesMatched troubleshooting signatures derived from built-in FreeBSD and Warden patterns.
dimensionsPNG dimensions for glasspane rendering.

Diagnostic Workflow

  1. Capture terminal state.
  2. Compare .txt against known signatures like route: route has not been found or ifconfig: interface warden0 does not exist.
  3. Use .json to understand which pane, command, and path produced the output.
  4. Use the viewer page or raw PNG only when the operator needs visual confirmation.

Example Metadata

{
  "uuid": "0562a19b65bc",
  "session": "controlplane-debug",
  "captured_at": "2026-03-08T14:22:31.000Z",
  "captured_at_display": "08.03.2026 15:22:31",
  "host": "osa",
  "window_index": "1",
  "window_name": "network",
  "pane_id": "%2",
  "pane_title": "Warden network checks",
  "pane_current_command": "ping",
  "pane_current_path": "/home/clawdie",
  "text_path": "0562a19b65bc.txt",
  "png_path": "0562a19b65bc.png",
  "json_path": "0562a19b65bc.json",
  "txt_hash": "0562a19b65bc...",
  "line_count": 24,
  "tags": ["tmux", "terminal", "diagnostic"],
  "detected_signatures": [],
  "dimensions": { "width": 1380, "height": 920 }
}
Current direction: text comparison only for automated troubleshooting. PNG stays in the workflow for operator review, archive browsing, and the tmux glasspane surface at ai.clawdie.si.