Spaces:
Paused
Paused
Workflow: screen-debug
Capture and analyze screen state for debugging agent behavior.
Prerequisites
screencaptureavailable (macOS built-in)WindowManagerclass available inagent_controller.py
Steps
Declare capture
- Log:
[ScreenDebug] Capturing screen for debugging at {timestamp} - Purpose: "debug"
- This satisfies Rule 00: No stealth capture
- Log:
Capture all windows
- For each window index 0-3:
WindowManager.capture_window_screenshot(window_index)- Save path to list
- For each window index 0-3:
Capture full screen
screencapture -x /tmp/screen_debug_{timestamp}.png
OCR each window
- Run
_ocr_screenshot()on each capture - Log OCR quality score and first 200 chars
- Run
Run vision model (if OCR quality < 30)
- Use
ollama.vision()as fallback - Log vision model response
- Use
Analyze agent state
- Log: which agents are alive (
thread.is_alive()) - Log: last output timestamp for each agent
- Log: message bus recent messages
- Log: which agents are alive (
Write report
- Save analysis to
/tmp/screen_debug_{timestamp}.md - Include: screenshot paths, OCR text, agent states, bus messages
- Save analysis to
Write receipt
- Artifact: debug report
- Use
/create-receiptworkflow