hosts/.agents/skills/agent-tui/references/output-contract.md

1.2 KiB

JSON Output Contract

Use this file when parsing --format json output.

Spawn / Run

  • agent-tui run ... returns:
    { "session_id": "<id>", "pid": 123 }
    

Screenshot (text)

  • agent-tui screenshot ... returns:
    {
      "session_id": "<id>",
      "screenshot": "<string>",
      "rendered": "<optional>"
    }
    
  • cursor is only present when --include-cursor is passed:
    { "cursor": { "row": 0, "col": 0, "visible": true } }
    

Wait

  • agent-tui wait ... returns:
    { "found": true, "elapsed_ms": 1200 }
    

Resize

  • agent-tui resize ... returns:
    { "success": true, "session_id": "<id>", "cols": 120, "rows": 40 }
    

Restart / Kill

  • restart returns:
    { "old_session_id": "<id>", "new_session_id": "<id>", "command": "<cmd>", "pid": 123 }
    
  • kill returns:
    { "success": true, "session_id": "<id>" }
    

Sessions

  • agent-tui sessions returns:
    {
      "sessions": [
        {
          "id": "<id>",
          "command": "<command>",
          "pid": 123,
          "running": true,
          "created_at": "<timestamp>",
          "size": { "cols": 120, "rows": 40 }
        }
      ],
      "active_session": "<id>"
    }