Skip to content
Sign in

tmux

v0.2.5

tmux as an iii worker — list, create, rename and kill sessions and windows and move windows between sessions, see which pane runs Claude Code or Codex (working, waiting for you, idle), which runs `iii compose` and every listening port by process and pane, plus a Console page whose terminal is a live tmux client.

license: Apache-2.0agentsconsolemultiplexerportssessionsterminaltmux

Install

bash
iii call compose::add worker=tmux@0.2.5

Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.

Agent-ready brief for v0.2.5
Install, config, dependencies, readme, skills and API reference, all in one place. Fetch as agent-context.md for an LLM to consume.
The same content rendered as discrete blocks below is exposed as a single markdown document at /registry/workers/tmux.md?version=0.2.5. Paste it into an LLM prompt or pipe it through curl from a worker.

Install

iii call compose::add worker=tmux@0.2.5

Configuration

iii-config.yaml
- max_terminals: 8
  poll_interval_ms: 1000
  ports_interval_ms: 3000
  terminal_idle_timeout_ms: 30000
  tmux_binary: tmux

Dependencies

Dependency · 2Version

Readme

README.md

tmux

tmux as an iii worker. It lists every tmux session, window and pane on the host, creates, renames and kills sessions and windows, moves windows between sessions, and tells you what is running where: which pane holds Claude Code or Codex and whether that agent is working, waiting for you or idle, which pane runs iii compose and on which port its engine listens, and every TCP port your processes listen on, traced back to the pane that started them. Its Console page embeds a terminal that is a real tmux client: what you type goes straight into the session, and the screen updates as tmux draws it, the same way a second terminal attached with tmux attach would.

Install

iii call compose::add worker=tmux

The worker drives the tmux binary installed on the host (Linux or macOS) and talks to the same tmux server you use from your terminal. Without tmux it still starts and reports available: false, and tmux::install can put it there.

Installing tmux

iii call tmux::install               # starts or joins the install, answers at once
iii call tmux::install::status       # poll until succeeded or failed
Computer What runs, in order
macOS Homebrew when brew is there (never as root), otherwise MacPorts as root or with sudo -n; then the official build
Linux, as root or with sudo -n The first of apt-get (after apt-get update), dnf, pacman (never -Sy, so a stale or empty database falls through), zypper, apk; then the official build
Linux, no root and no passwordless sudo The official build
Linux on a processor with no official build (armv7) Only a package manager, and without root or sudo the error says what to ask an administrator to run

Nothing ever waits for a password or for an answer. The official build is tmux/tmux-builds 3.7c for Linux and macOS on x86_64 and arm64, pinned by SHA-256 in this worker's source. It goes to ~/.local/bin/tmux: checked before it is unpacked, asked -V before it lands there, moved atomically. A file already at that path is never replaced.

An attempt only counts when tmux then resolves, answers -V and starts a server on a private socket of its own, and one that reports a failure counts when tmux works anyway. A package manager that fails falls through to the official build, and the failure's log says so. With tmux already there the install changes nothing: it makes the same check and answers succeeded with method: null. An install never talks to your tmux server.

The answer of both functions:

{ "state": "running", "step": "downloading", "label": "Downloading tmux…",
  "hints": ["From the tmux project's official builds", "tmux 3.7c"],
  "progress": 0.42, "method": "prebuilt", "path": null, "version": null,
  "error": null, "log": [] }

state is idle, running, succeeded or failed; step is checking, updating, downloading, verifying, installing or finishing; method is apt, dnf, pacman, zypper, apk, homebrew, macports or prebuilt. label and hints are the words to show while it runs, error is one sentence, and log is empty until a failure, when it holds every command and its output. A worker that restarted mid-install answers idle.

tmux::status says installable: true when tmux is missing and this can try: Linux or macOS, with tmux_binary left as plain tmux, on a processor with an official build or a computer with one of those package managers.

A daemon's PATH is often short, so plain tmux is also looked for after PATH in ~/.local/bin, /opt/homebrew/bin, /usr/local/bin, /home/linuxbrew/.linuxbrew/bin and /opt/local/bin.

On a system with no terminfo entry for xterm-256color (Alpine without ncurses-terminfo-base), the official build can run every command but can't attach a terminal, so the install also writes that one entry to ~/.terminfo/x/xterm-256color.

tmux --install-tmux runs the same install with no engine and exits: the steps and the log on stderr, the final status as the last line of stdout.

Quickstart

Open the tmux page in the Console to browse sessions, open one in the terminal, and see the Ports tab. From code or an agent:

# Every session → window → pane, with agent / compose / port status
iii call tmux::sessions::list

# A new session running a dev server, then a second window in it
iii call tmux::sessions::create name=api cwd=~/code/api command="pnpm dev"
iii call tmux::windows::create session=api name=logs

# Who listens on which port, and which compose stacks are up
iii call tmux::ports::list

Names are taken as typed: tmux 2.7 and later read # in a session or window name as a format (#{…}, or #(…), which runs a command), so the worker doubles it there, and only there. A name shaped like an id ($2, @3, %4) is refused, since a session is named by its id or its name. A session named like that outside the worker never stands in for the session with that id: when $2 is one session's id and another's name the call is refused, saying which session to rename. Refusals are one sentence, There is no pane %9. rather than tmux's can't find pane: %9.

A new window without cwd starts in the directory its session was created in. tmux older than 3.2 can't tell a session's directory, so there it starts in the home folder.

A pane whose program ends closes, as in tmux, and so does its window and its session when it was their last. With remain_on_exit: true, tmux::sessions::create, tmux::windows::create and tmux::panes::split keep the new pane on screen once its program ends, dead in the listing, for tmux::panes::respawn to start again. The pane first runs a placeholder, then remain-on-exit is turned on and the command starts in its place, so even a command that fails at once stays. It is the pane's own option from tmux 3.0; on tmux 2.x, which has no pane options, every pane of its window stays.

iii call tmux::windows::create session=api name=build command="npm run build" remain_on_exit=true

A pane running an agent and a pane running iii compose look like this in tmux::sessions::list:

{ "id": "%3", "command": "claude",
  "agent": { "id": "claude", "label": "Claude Code", "state": "waiting", "since_ms": 1791936000000,
             "title": "Fix the login redirect" } }
{ "id": "%7", "command": "iii:c:default",
  "compose": { "namespace": "default", "pid": 2759592 },
  "ports": [ { "port": 49135, "role": "engine", "process": "iii:e:default" },
             { "port": 3111, "role": "worker", "worker": "http" },
             { "port": 3114, "role": "worker", "worker": "ade" } ] }

Agent state comes from the pane's last lines: a permission or choice prompt is waiting, Claude Code's esc to interrupt line is working. Claude Code and Codex also count as working while their sub-agents run after the main turn ended, which their screen does not show; the worker reads what they record on disk (Claude Code's ~/.claude/sessions/<pid>.json and each sub-agent's meta file and transcript, the rollout-*.jsonl files Codex holds open) and lists those sub-agents in subagents:

{ "id": "%9", "command": "codex",
  "agent": { "id": "codex", "label": "Codex", "state": "working", "since_ms": 1792698537000,
             "title": null,
             "subagents": [ { "id": "01a16528-d646", "description": "review/tests", "kind": null,
                              "depth": 1, "since_ms": 1792698537000 } ] } }

The Console page shows the count on the agent's badge and a row per sub-agent under its window. A sub-agent has no pane of its own: selecting its row opens its transcript, which tmux::subagents::transcript returns from the same files. That is the task it was given, what it wrote and reasoned, and the tools it called with what they returned, oldest first, while it runs and after it finished:

iii call tmux::subagents::transcript pane=%9 subagent=01a16528-d646
{ "pane_id": "%9", "agent": "codex", "subagent_id": "01a16528-d646", "working": true,
  "prompt": "Message Type: NEW_TASK\nTask name: /root/review/tests\n…",
  "items": [ { "kind": "tool_call", "at_ms": 1792698540000, "text": "cargo test",
               "tool": "shell", "error": false },
             { "kind": "tool_result", "at_ms": 1792698551000, "text": "test result: ok…",
               "tool": "shell", "error": false } ],
  "truncated": false }

Item kinds are user (a later message from the main agent), text, thinking (when the agent records it in clear), tool_call and tool_result. Each text is cut at 4 000 characters, and only the last 4 MiB of a long transcript are read, plus its task. Codex keeps a sub-agent's task encrypted, so there the prompt shows only its name and sender.

The agent's title is the session title it put on its pane (Claude Code's conversation topic) without the ✳ or spinner in front; it is null while the pane shows tmux's default title, the host name. Selecting a window (tmux::windows::select) works like tmux itself: every client attached to that session, your own terminal included, switches to it.

tmux::windows::move moves a window to another session, or next to one of its windows. The window keeps its id, panes and programs:

# After the last window of `work`
iii call tmux::windows::move session=api window=@3 target_session=work
# Just before (or after) window 0 of `work`; in the window's own session this reorders it
iii call tmux::windows::move session=work window=@3 target_session=work before=0
{ "session_id": "$2", "window_id": "@3", "window_index": 0, "source_session_closed": false }

Without before or after the window goes after the session's last window, even when an index between two windows is free (tmux's own move-window -t work: would take that gap): from tmux 3.2 that is move-window -a after the last window, decided by tmux in one step; before 3.2 the worker names the index after the last one, and should another client take it first the answer says to move it again. before and after are tmux's move-window -b and -a: the window takes its neighbour's index (or the next one), and the windows from there up to the first free index move up one, so a window past a gap keeps its index. Both need tmux 3.2 or later, and an older tmux gets one sentence saying so: -b came in 3.2, and before it -a put the window after the session's current window whatever the target, and inside one session ended the tmux 2.6 and 3.0a server. The destination's current window stays as it was, and a session's current window reordered inside it stays current. When the window was the last one of its session, tmux closes that session and source_session_closed is true; with tmux's default detach-on-destroy on, clients attached there (a Console terminal too) end, so switch a terminal to the target session first. The window already in the target session without before/after, both at once, or a window next to itself are refused in one sentence.

Panes work the same way. tmux::panes::select makes a pane active, for every client looking at that window. zoom sets the window's zoom and never toggles it the way prefix z does: zoom: true zooms the window on that pane (or keeps it zoomed there), zoom: false unzooms it, and without zoom the window keeps its zoom, moved to that pane. A window with one pane can't zoom, and the answer's zoomed stays false. tmux itself only toggles a zoom, so this is a read and then a toggle, not one step: another client can zoom or unzoom the window in between. The worker reads the zoom again after toggling, toggles once more if it doesn't match, and the answer says what it ended as. tmux::panes::capture returns a pane's visible screen with its colour escapes, its size and cursor:

iii call tmux::panes::select pane=%3 zoom=true
iii call tmux::panes::capture pane=%3

tmux::panes::split puts a new pane to the right of a pane or below it. It starts in that pane's current directory unless cwd says otherwise, runs the default shell unless command does, and becomes the active pane unless select: false; remain_on_exit: true keeps it once its program ends (see above). tmux::panes::kill kills a pane and its program; when that was its window's last pane the window closes too (window_closed), and when that window was its session's last, the session (session_closed). tmux::panes::respawn starts a pane's program again in the same pane, the command it was started with unless command. A pane whose program still runs is refused unless kill: true; one kept on screen after its program ended (tmux's remain-on-exit) is dead and restarts without it.

iii call tmux::panes::split pane=%3 direction=below command="npm test" select=false
iii call tmux::panes::respawn pane=%7 kill=true
iii call tmux::panes::kill pane=%7
{ "session_id": "$1", "window_id": "@4", "pane_id": "%7" }
{ "pane_id": "%7" }
{ "killed": true, "window_closed": false, "session_closed": false }

Configuration

tmux_binary: tmux            # name on PATH or absolute path (never this worker's own binary)
socket_name: null            # tmux -L <name>; null = your default tmux server
socket_path: null            # tmux -S <path>; wins over socket_name
poll_interval_ms: 1000       # live feed cadence for sessions and agent state
ports_interval_ms: 3000      # process and listening-port re-scan cadence
busy_window_ms: 2000         # agents without working patterns: "working" while the pane changed this recently
command_timeout_ms: 5000     # one tmux command
max_terminals: 8             # concurrent Console terminals (each one is a tmux client)
terminal_idle_timeout_ms: 30000  # detach a Console terminal its page stopped heart-beating
agents:                      # first match wins; patterns are case-insensitive regexes over the pane's last lines
  - id: claude
    label: Claude Code
    process: [claude]
    working_patterns: ["esc to interrupt"]
    waiting_patterns: ["❯\\s*1\\.\\s*Yes", "Do you want to proceed\\?", "Enter to select"]

The built-in list also recognises codex, opencode and gemini; see src/config.rs. Edit the configuration from the page's settings action or with configuration::set.

Observable functions

Function Args Delivery Event
tmux::on-changed none; the overview has no field to filter on iii's default delivery; once a new observer is accepted, the worker calls the function with the current overview for that observer alone (metadata { for_observer: <observer id> }), delivered like every other call Overview { sessions, ports }: the shapes tmux::sessions::list and tmux::ports::list return

tmux::on-changed is private: only this worker calls it, whenever sessions, windows, panes, agent states, compose stacks or listening ports change. The worker polls tmux only while something observes it.

Overviews can arrive out of order: each one is its own call, and iii doesn't order deliveries across calls, so two sent milliseconds apart (a mutation's and the next poll's) may land the other way round, and nothing re-sends until something changes again. Keep the overview with the highest sessions.generated_at_ms (and ports.generated_at_ms) and drop an older one that comes after it; the same rule settles a list answer racing a push.

iii.registerFunction('my-worker::on-tmux', async ({ output: { sessions, ports } }) => {
  // compare agent states with the previous overview
})
iii.observe({ function_id: 'tmux::on-changed', capture: ['output'] }, 'my-worker::on-tmux')

The Console page's terminal functions, tmux::terminal::open, write, resize, switch, replay, redraw, close and upload, cannot be observed (NOT_OBSERVABLE): open returns the terminal's access key, every other call carries it, write carries what is typed into the terminal and upload the file being pasted.

tmux::terminal::upload is how a file is pasted into a terminal. It only writes a file: data (base64, any type, at most 12 MiB decoded) goes to a new folder of its own in the cache folder of the user this worker runs as, under name made safe, and the answer is that file's absolute path. It types nothing into the terminal; the page pastes the path itself, and Claude Code and Codex then attach it (an image as [Image #1]; Codex only when the paste is that path alone and its model takes images); any other program just receives the path as text.

{ "path": "/home/me/.cache/iii/tmux/uploads/20261110-161648-0a1b2c3d/Quarterly-report.pdf",
  "bytes": 48213, "mime": "application/pdf" }
Computer Folder
Linux $XDG_CACHE_HOME/iii/tmux/uploads when that's an absolute path, otherwise ~/.cache/iii/tmux/uploads
macOS ~/Library/Caches/iii/tmux/uploads

Each upload gets its own folder, <UTC yyyymmdd-hhmmss>-<8 hex>, so its name survives. The name keeps only its base name, made one token a shell or Codex reads whole: characters outside A-Z a-z 0-9 . _ - become - (no spaces), runs collapse, no leading dot, at most 100 bytes with its extension kept, and file when nothing is left (../x is x, My report (1).pdf is My-report-1.pdf). A PNG, JPEG, GIF or WebP, told by its first bytes, gets the extension its content has (photo.HEIC that is a JPEG is photo.jpg), so agents read it as an image; mime in the answer is then that type, otherwise the request's, otherwise application/octet-stream.

The folders are readable by this user only (0700) and so is each file (0600), never executable. Every folder on the way below the cache folder (iii, tmux, uploads) is made one at a time and has to be a real folder of this user that no other user can write to, never a symbolic link; a folder of ours that is wider is narrowed. A file is written whole to a temporary file and then linked under its name, so a kill or a full disk never leaves a cut-short file there. Uploads older than 7 days are removed when the worker starts and on each upload, then the oldest while all of them add up to more than 256 MiB; nothing but folders of that name pattern is touched. They are not removed right away because Codex reads a file only when the message it is attached to is sent.

Skills

API reference (JSON)

agent-api-reference.json
{
  "functions": [
    {
      "description": "Returns this worker instance's effective configuration entry ID, without its value.",
      "metadata": {
        "internal": true
      },
      "name": "tmux::configuration-id",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Empty user request. Ignore transport metadata such as `_caller_worker_id`, which the engine adds to routed calls; no payload field selects the entry.",
        "title": "ConfigurationIdentityRequest",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Only the entry ID is exposed; configuration values and secrets stay in the service.",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "ConfigurationIdentityResponse",
        "type": "object"
      }
    },
    {
      "description": "Install the tmux program on this computer, in the background, and answer at once: the system's package manager when this user may run it without a password (Homebrew, MacPorts, apt, dnf, pacman, zypper, apk), otherwise tmux's official build into ~/.local/bin. Starting during a run joins it. Poll tmux::install::status.",
      "metadata": {},
      "name": "tmux::install",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "No parameters.",
        "title": "EmptyInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "InstallMethod": {
            "oneOf": [
              {
                "description": "`apt-get`.",
                "enum": [
                  "apt"
                ],
                "type": "string"
              },
              {
                "description": "`dnf`.",
                "enum": [
                  "dnf"
                ],
                "type": "string"
              },
              {
                "description": "`pacman`.",
                "enum": [
                  "pacman"
                ],
                "type": "string"
              },
              {
                "description": "`zypper`.",
                "enum": [
                  "zypper"
                ],
                "type": "string"
              },
              {
                "description": "`apk`.",
                "enum": [
                  "apk"
                ],
                "type": "string"
              },
              {
                "description": "Homebrew's `brew`.",
                "enum": [
                  "homebrew"
                ],
                "type": "string"
              },
              {
                "description": "MacPorts' `port`.",
                "enum": [
                  "macports"
                ],
                "type": "string"
              },
              {
                "description": "The tmux project's official build, into `~/.local/bin`.",
                "enum": [
                  "prebuilt"
                ],
                "type": "string"
              }
            ]
          },
          "InstallState": {
            "oneOf": [
              {
                "description": "No install ran since the worker started.",
                "enum": [
                  "idle"
                ],
                "type": "string"
              },
              {
                "description": "An install is going on.",
                "enum": [
                  "running"
                ],
                "type": "string"
              },
              {
                "description": "tmux is installed and resolves.",
                "enum": [
                  "succeeded"
                ],
                "type": "string"
              },
              {
                "description": "Every way to install it failed.",
                "enum": [
                  "failed"
                ],
                "type": "string"
              }
            ]
          },
          "InstallStep": {
            "oneOf": [
              {
                "description": "Looking at the computer.",
                "enum": [
                  "checking"
                ],
                "type": "string"
              },
              {
                "description": "Refreshing the package manager's list.",
                "enum": [
                  "updating"
                ],
                "type": "string"
              },
              {
                "description": "Fetching the official build.",
                "enum": [
                  "downloading"
                ],
                "type": "string"
              },
              {
                "description": "Comparing the download with its checksum.",
                "enum": [
                  "verifying"
                ],
                "type": "string"
              },
              {
                "description": "A package manager or the official build is putting tmux in place.",
                "enum": [
                  "installing"
                ],
                "type": "string"
              },
              {
                "description": "Checking that tmux resolves.",
                "enum": [
                  "finishing"
                ],
                "type": "string"
              }
            ]
          }
        },
        "description": "Where an install is. `tmux::install` and `tmux::install::status` both answer this.",
        "properties": {
          "error": {
            "description": "Why it failed, one sentence for people.",
            "type": [
              "string",
              "null"
            ]
          },
          "hints": {
            "description": "True facts about the step, to alternate with the label.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "label": {
            "description": "What to show for that step, e.g. `Downloading tmux…`.",
            "type": [
              "string",
              "null"
            ]
          },
          "log": {
            "description": "Empty unless the state is `failed`: every command and its output.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "method": {
            "anyOf": [
              {
                "$ref": "#/definitions/InstallMethod"
              },
              {
                "type": "null"
              }
            ],
            "description": "The way being tried, or the one that worked. Null when tmux was already there."
          },
          "path": {
            "description": "Where tmux is, once it resolves.",
            "type": [
              "string",
              "null"
            ]
          },
          "progress": {
            "description": "0 to 1, while the step knows how far it is.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/definitions/InstallState"
              }
            ],
            "description": "`idle` also answers a worker that restarted mid-install."
          },
          "step": {
            "anyOf": [
              {
                "$ref": "#/definitions/InstallStep"
              },
              {
                "type": "null"
              }
            ],
            "description": "The step a running install is on."
          },
          "version": {
            "description": "Its version, once it resolves.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "hints",
          "log",
          "state"
        ],
        "title": "InstallStatus",
        "type": "object"
      }
    },
    {
      "description": "Where tmux::install is: idle (nothing ran since the worker started), running with its step, label and hints, succeeded with the path and version, or failed with one sentence and the log.",
      "metadata": {},
      "name": "tmux::install::status",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "No parameters.",
        "title": "EmptyInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "InstallMethod": {
            "oneOf": [
              {
                "description": "`apt-get`.",
                "enum": [
                  "apt"
                ],
                "type": "string"
              },
              {
                "description": "`dnf`.",
                "enum": [
                  "dnf"
                ],
                "type": "string"
              },
              {
                "description": "`pacman`.",
                "enum": [
                  "pacman"
                ],
                "type": "string"
              },
              {
                "description": "`zypper`.",
                "enum": [
                  "zypper"
                ],
                "type": "string"
              },
              {
                "description": "`apk`.",
                "enum": [
                  "apk"
                ],
                "type": "string"
              },
              {
                "description": "Homebrew's `brew`.",
                "enum": [
                  "homebrew"
                ],
                "type": "string"
              },
              {
                "description": "MacPorts' `port`.",
                "enum": [
                  "macports"
                ],
                "type": "string"
              },
              {
                "description": "The tmux project's official build, into `~/.local/bin`.",
                "enum": [
                  "prebuilt"
                ],
                "type": "string"
              }
            ]
          },
          "InstallState": {
            "oneOf": [
              {
                "description": "No install ran since the worker started.",
                "enum": [
                  "idle"
                ],
                "type": "string"
              },
              {
                "description": "An install is going on.",
                "enum": [
                  "running"
                ],
                "type": "string"
              },
              {
                "description": "tmux is installed and resolves.",
                "enum": [
                  "succeeded"
                ],
                "type": "string"
              },
              {
                "description": "Every way to install it failed.",
                "enum": [
                  "failed"
                ],
                "type": "string"
              }
            ]
          },
          "InstallStep": {
            "oneOf": [
              {
                "description": "Looking at the computer.",
                "enum": [
                  "checking"
                ],
                "type": "string"
              },
              {
                "description": "Refreshing the package manager's list.",
                "enum": [
                  "updating"
                ],
                "type": "string"
              },
              {
                "description": "Fetching the official build.",
                "enum": [
                  "downloading"
                ],
                "type": "string"
              },
              {
                "description": "Comparing the download with its checksum.",
                "enum": [
                  "verifying"
                ],
                "type": "string"
              },
              {
                "description": "A package manager or the official build is putting tmux in place.",
                "enum": [
                  "installing"
                ],
                "type": "string"
              },
              {
                "description": "Checking that tmux resolves.",
                "enum": [
                  "finishing"
                ],
                "type": "string"
              }
            ]
          }
        },
        "description": "Where an install is. `tmux::install` and `tmux::install::status` both answer this.",
        "properties": {
          "error": {
            "description": "Why it failed, one sentence for people.",
            "type": [
              "string",
              "null"
            ]
          },
          "hints": {
            "description": "True facts about the step, to alternate with the label.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "label": {
            "description": "What to show for that step, e.g. `Downloading tmux…`.",
            "type": [
              "string",
              "null"
            ]
          },
          "log": {
            "description": "Empty unless the state is `failed`: every command and its output.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "method": {
            "anyOf": [
              {
                "$ref": "#/definitions/InstallMethod"
              },
              {
                "type": "null"
              }
            ],
            "description": "The way being tried, or the one that worked. Null when tmux was already there."
          },
          "path": {
            "description": "Where tmux is, once it resolves.",
            "type": [
              "string",
              "null"
            ]
          },
          "progress": {
            "description": "0 to 1, while the step knows how far it is.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/definitions/InstallState"
              }
            ],
            "description": "`idle` also answers a worker that restarted mid-install."
          },
          "step": {
            "anyOf": [
              {
                "$ref": "#/definitions/InstallStep"
              },
              {
                "type": "null"
              }
            ],
            "description": "The step a running install is on."
          },
          "version": {
            "description": "Its version, once it resolves.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "hints",
          "log",
          "state"
        ],
        "title": "InstallStatus",
        "type": "object"
      }
    },
    {
      "description": "Live tmux overview: the full state (sessions, windows, panes with agent/compose/port status, compose stacks and listening ports), sent to each observer when it is added and called again whenever it changes. Takes no args.",
      "metadata": {},
      "name": "tmux::on-changed",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "AddressFamily": {
            "enum": [
              "ipv4",
              "ipv6"
            ],
            "type": "string"
          },
          "AgentState": {
            "oneOf": [
              {
                "description": "The agent is running a turn.",
                "enum": [
                  "working"
                ],
                "type": "string"
              },
              {
                "description": "The agent shows a prompt that needs you.",
                "enum": [
                  "waiting"
                ],
                "type": "string"
              },
              {
                "description": "The agent waits for a new message.",
                "enum": [
                  "idle"
                ],
                "type": "string"
              }
            ]
          },
          "AgentStatus": {
            "properties": {
              "id": {
                "description": "Matcher id from the configuration, e.g. `claude`.",
                "type": "string"
              },
              "label": {
                "description": "Display name, e.g. `Claude Code`.",
                "type": "string"
              },
              "pid": {
                "description": "Pid of the agent process.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "since_ms": {
                "description": "When the agent entered `state`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "state": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AgentState"
                  }
                ],
                "description": "What the agent is doing."
              },
              "subagents": {
                "default": [],
                "description": "Sub-agents working right now, oldest first. Their work keeps `state` at `working` after the agent's own turn ended. Claude Code and Codex report them; other agents always list none.",
                "items": {
                  "$ref": "#/definitions/SubagentStatus"
                },
                "type": "array"
              },
              "title": {
                "default": null,
                "description": "The agent's session title: the pane title without the agent's status glyph (Claude Code's ✳ or spinner). Null when the pane only shows tmux's default title (the host name) or nothing.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "label",
              "pid",
              "since_ms",
              "state"
            ],
            "type": "object"
          },
          "ComposeEngine": {
            "properties": {
              "pid": {
                "description": "Engine pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Ports the engine listens on.",
                "items": {
                  "format": "uint16",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              },
              "ws_port": {
                "description": "The engine WebSocket port workers connect to.",
                "format": "uint16",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "pid",
              "ports"
            ],
            "type": "object"
          },
          "ComposeRef": {
            "properties": {
              "namespace": {
                "description": "Compose daemon namespace.",
                "type": "string"
              },
              "pid": {
                "description": "Compose daemon pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "namespace",
              "pid"
            ],
            "type": "object"
          },
          "ComposeStack": {
            "properties": {
              "compose_file": {
                "description": "Compose file the daemon serves, when known.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "engine": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ComposeEngine"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The engine the daemon started, if it manages one."
              },
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PaneRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "tmux pane the daemon runs in."
              },
              "namespace": {
                "description": "Daemon namespace (`iii:c:<namespace>`).",
                "type": "string"
              },
              "pid": {
                "description": "Daemon pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "project_dir": {
                "description": "Daemon working directory.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "workers": {
                "description": "Workers the daemon started.",
                "items": {
                  "$ref": "#/definitions/ComposeWorker"
                },
                "type": "array"
              }
            },
            "required": [
              "namespace",
              "pid",
              "workers"
            ],
            "type": "object"
          },
          "ComposeWorker": {
            "properties": {
              "name": {
                "description": "Worker name.",
                "type": "string"
              },
              "pid": {
                "description": "Top-most pid of the worker's process tree.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Ports the worker's processes listen on.",
                "items": {
                  "format": "uint16",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "name",
              "pid",
              "ports"
            ],
            "type": "object"
          },
          "Listener": {
            "description": "One TCP socket in LISTEN state.",
            "properties": {
              "address": {
                "description": "Bound address, e.g. `0.0.0.0` or `::1`.",
                "type": "string"
              },
              "compose": {
                "description": "Compose namespace the process belongs to.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "family": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AddressFamily"
                  }
                ],
                "description": "IPv4 or IPv6."
              },
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PaneRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "tmux pane the process descends from."
              },
              "pid": {
                "description": "Owning process.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "port": {
                "description": "Port number.",
                "format": "uint16",
                "minimum": 0,
                "type": "integer"
              },
              "process": {
                "description": "Owning process name.",
                "type": "string"
              },
              "role": {
                "allOf": [
                  {
                    "$ref": "#/definitions/ListenerRole"
                  }
                ],
                "description": "What kind of process owns the socket."
              },
              "worker": {
                "description": "iii worker name, when known.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address",
              "family",
              "pid",
              "port",
              "process",
              "role"
            ],
            "type": "object"
          },
          "ListenerRole": {
            "oneOf": [
              {
                "description": "An iii engine (its WebSocket and built-in listeners).",
                "enum": [
                  "engine"
                ],
                "type": "string"
              },
              {
                "description": "An iii worker.",
                "enum": [
                  "worker"
                ],
                "type": "string"
              },
              {
                "description": "An `iii compose` daemon.",
                "enum": [
                  "compose"
                ],
                "type": "string"
              },
              {
                "description": "Anything else.",
                "enum": [
                  "other"
                ],
                "type": "string"
              }
            ]
          },
          "Pane": {
            "properties": {
              "active": {
                "description": "The window's active pane.",
                "type": "boolean"
              },
              "agent": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AgentStatus"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The agent CLI running in this pane, if any."
              },
              "command": {
                "description": "Foreground process name.",
                "type": "string"
              },
              "compose": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ComposeRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The `iii compose` daemon running in this pane, if any."
              },
              "cwd": {
                "description": "Current directory.",
                "type": "string"
              },
              "dead": {
                "description": "The pane's process exited and the pane is kept.",
                "type": "boolean"
              },
              "height": {
                "description": "Height in rows.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "id": {
                "description": "Pane id, e.g. `%5`.",
                "type": "string"
              },
              "index": {
                "description": "Pane index inside the window.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "pid": {
                "description": "Pid of the process tmux started in the pane.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Listening sockets owned by processes started from this pane.",
                "items": {
                  "$ref": "#/definitions/Listener"
                },
                "type": "array"
              },
              "title": {
                "description": "Pane title set by the program.",
                "type": "string"
              },
              "width": {
                "description": "Width in columns.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "active",
              "command",
              "cwd",
              "dead",
              "height",
              "id",
              "index",
              "pid",
              "ports",
              "title",
              "width"
            ],
            "type": "object"
          },
          "PaneRef": {
            "description": "Where a process runs in tmux.",
            "properties": {
              "pane_id": {
                "description": "Pane id.",
                "type": "string"
              },
              "session": {
                "description": "Session name.",
                "type": "string"
              },
              "session_id": {
                "description": "Session id.",
                "type": "string"
              },
              "window_id": {
                "description": "Window id.",
                "type": "string"
              },
              "window_index": {
                "description": "Window index.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "pane_id",
              "session",
              "session_id",
              "window_id",
              "window_index"
            ],
            "type": "object"
          },
          "PortsSnapshot": {
            "description": "Listening ports and the `iii compose` stacks that own them.",
            "properties": {
              "composes": {
                "description": "Running `iii compose` daemons.",
                "items": {
                  "$ref": "#/definitions/ComposeStack"
                },
                "type": "array"
              },
              "error": {
                "description": "Why the scan failed, if it did.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at_ms": {
                "description": "When the snapshot was taken.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "listeners": {
                "description": "Every TCP listening socket of this user's processes, sorted by port.",
                "items": {
                  "$ref": "#/definitions/Listener"
                },
                "type": "array"
              },
              "supported": {
                "description": "This platform has a port scanner.",
                "type": "boolean"
              }
            },
            "required": [
              "composes",
              "generated_at_ms",
              "listeners",
              "supported"
            ],
            "type": "object"
          },
          "Session": {
            "properties": {
              "activity_at_ms": {
                "description": "Last activity in any of its windows.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "attached": {
                "description": "tmux clients attached, console terminals included.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "console_attached": {
                "description": "How many attached clients are console terminals.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "created_at_ms": {
                "description": "When the session was created.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "id": {
                "description": "Session id, e.g. `$5`.",
                "type": "string"
              },
              "name": {
                "description": "Session name.",
                "type": "string"
              },
              "windows": {
                "description": "Windows sorted by index.",
                "items": {
                  "$ref": "#/definitions/Window"
                },
                "type": "array"
              }
            },
            "required": [
              "activity_at_ms",
              "attached",
              "console_attached",
              "created_at_ms",
              "id",
              "name",
              "windows"
            ],
            "type": "object"
          },
          "SessionsSnapshot": {
            "description": "Every session with its windows and panes.",
            "properties": {
              "generated_at_ms": {
                "description": "When the snapshot was taken.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "sessions": {
                "description": "Sessions sorted by name.",
                "items": {
                  "$ref": "#/definitions/Session"
                },
                "type": "array"
              },
              "tmux": {
                "allOf": [
                  {
                    "$ref": "#/definitions/TmuxInfo"
                  }
                ],
                "description": "tmux availability and server."
              }
            },
            "required": [
              "generated_at_ms",
              "sessions",
              "tmux"
            ],
            "type": "object"
          },
          "SubagentStatus": {
            "description": "A sub-agent at work under an agent CLI.",
            "properties": {
              "depth": {
                "description": "1 for a sub-agent of the main agent, 2 for one of its sub-agents, ….",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "description": {
                "description": "What it was asked to do: Claude Code's task description, Codex's task path under the main agent (`review/tests`).",
                "type": "string"
              },
              "id": {
                "description": "Stable within the agent's session: Claude Code's agent id, Codex's thread id.",
                "type": "string"
              },
              "kind": {
                "description": "Claude Code's agent type (`general-purpose`, `Explore`, `fork`) or Codex's agent role; null when the agent names none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "since_ms": {
                "description": "When it started its current task.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "depth",
              "description",
              "id",
              "since_ms"
            ],
            "type": "object"
          },
          "TmuxInfo": {
            "description": "Whether a usable tmux exists and which server this worker talks to.",
            "properties": {
              "available": {
                "description": "A usable tmux binary was found.",
                "type": "boolean"
              },
              "error": {
                "description": "Why tmux is unavailable, or the last listing error.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "installable": {
                "default": false,
                "description": "tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.",
                "type": "boolean"
              },
              "path": {
                "description": "Resolved tmux binary.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_running": {
                "description": "A tmux server is running on that socket.",
                "type": "boolean"
              },
              "socket_path": {
                "description": "Server socket, known while the server runs.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "description": "tmux version, e.g. `3.6`.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "available",
              "server_running"
            ],
            "type": "object"
          },
          "Window": {
            "properties": {
              "active": {
                "description": "This is the session's current window.",
                "type": "boolean"
              },
              "activity_at_ms": {
                "description": "Last output in the window.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "bell": {
                "description": "A bell rang in the window.",
                "type": "boolean"
              },
              "id": {
                "description": "Window id, e.g. `@3` (unique on the server).",
                "type": "string"
              },
              "index": {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "name": {
                "description": "Window name.",
                "type": "string"
              },
              "panes": {
                "description": "Panes sorted by index.",
                "items": {
                  "$ref": "#/definitions/Pane"
                },
                "type": "array"
              },
              "zoomed": {
                "description": "A pane is zoomed.",
                "type": "boolean"
              }
            },
            "required": [
              "active",
              "activity_at_ms",
              "bell",
              "id",
              "index",
              "name",
              "panes",
              "zoomed"
            ],
            "type": "object"
          }
        },
        "description": "What `tmux::on-changed` returns: the payload of the live feed.",
        "properties": {
          "ports": {
            "allOf": [
              {
                "$ref": "#/definitions/PortsSnapshot"
              }
            ],
            "description": "Listening ports and compose stacks."
          },
          "sessions": {
            "allOf": [
              {
                "$ref": "#/definitions/SessionsSnapshot"
              }
            ],
            "description": "Sessions, windows, panes and their status."
          }
        },
        "required": [
          "ports",
          "sessions"
        ],
        "title": "Overview",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "AddressFamily": {
            "enum": [
              "ipv4",
              "ipv6"
            ],
            "type": "string"
          },
          "AgentState": {
            "oneOf": [
              {
                "description": "The agent is running a turn.",
                "enum": [
                  "working"
                ],
                "type": "string"
              },
              {
                "description": "The agent shows a prompt that needs you.",
                "enum": [
                  "waiting"
                ],
                "type": "string"
              },
              {
                "description": "The agent waits for a new message.",
                "enum": [
                  "idle"
                ],
                "type": "string"
              }
            ]
          },
          "AgentStatus": {
            "properties": {
              "id": {
                "description": "Matcher id from the configuration, e.g. `claude`.",
                "type": "string"
              },
              "label": {
                "description": "Display name, e.g. `Claude Code`.",
                "type": "string"
              },
              "pid": {
                "description": "Pid of the agent process.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "since_ms": {
                "description": "When the agent entered `state`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "state": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AgentState"
                  }
                ],
                "description": "What the agent is doing."
              },
              "subagents": {
                "default": [],
                "description": "Sub-agents working right now, oldest first. Their work keeps `state` at `working` after the agent's own turn ended. Claude Code and Codex report them; other agents always list none.",
                "items": {
                  "$ref": "#/definitions/SubagentStatus"
                },
                "type": "array"
              },
              "title": {
                "default": null,
                "description": "The agent's session title: the pane title without the agent's status glyph (Claude Code's ✳ or spinner). Null when the pane only shows tmux's default title (the host name) or nothing.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "label",
              "pid",
              "since_ms",
              "state"
            ],
            "type": "object"
          },
          "ComposeEngine": {
            "properties": {
              "pid": {
                "description": "Engine pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Ports the engine listens on.",
                "items": {
                  "format": "uint16",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              },
              "ws_port": {
                "description": "The engine WebSocket port workers connect to.",
                "format": "uint16",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "pid",
              "ports"
            ],
            "type": "object"
          },
          "ComposeRef": {
            "properties": {
              "namespace": {
                "description": "Compose daemon namespace.",
                "type": "string"
              },
              "pid": {
                "description": "Compose daemon pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "namespace",
              "pid"
            ],
            "type": "object"
          },
          "ComposeStack": {
            "properties": {
              "compose_file": {
                "description": "Compose file the daemon serves, when known.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "engine": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ComposeEngine"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The engine the daemon started, if it manages one."
              },
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PaneRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "tmux pane the daemon runs in."
              },
              "namespace": {
                "description": "Daemon namespace (`iii:c:<namespace>`).",
                "type": "string"
              },
              "pid": {
                "description": "Daemon pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "project_dir": {
                "description": "Daemon working directory.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "workers": {
                "description": "Workers the daemon started.",
                "items": {
                  "$ref": "#/definitions/ComposeWorker"
                },
                "type": "array"
              }
            },
            "required": [
              "namespace",
              "pid",
              "workers"
            ],
            "type": "object"
          },
          "ComposeWorker": {
            "properties": {
              "name": {
                "description": "Worker name.",
                "type": "string"
              },
              "pid": {
                "description": "Top-most pid of the worker's process tree.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Ports the worker's processes listen on.",
                "items": {
                  "format": "uint16",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "name",
              "pid",
              "ports"
            ],
            "type": "object"
          },
          "Listener": {
            "description": "One TCP socket in LISTEN state.",
            "properties": {
              "address": {
                "description": "Bound address, e.g. `0.0.0.0` or `::1`.",
                "type": "string"
              },
              "compose": {
                "description": "Compose namespace the process belongs to.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "family": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AddressFamily"
                  }
                ],
                "description": "IPv4 or IPv6."
              },
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PaneRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "tmux pane the process descends from."
              },
              "pid": {
                "description": "Owning process.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "port": {
                "description": "Port number.",
                "format": "uint16",
                "minimum": 0,
                "type": "integer"
              },
              "process": {
                "description": "Owning process name.",
                "type": "string"
              },
              "role": {
                "allOf": [
                  {
                    "$ref": "#/definitions/ListenerRole"
                  }
                ],
                "description": "What kind of process owns the socket."
              },
              "worker": {
                "description": "iii worker name, when known.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address",
              "family",
              "pid",
              "port",
              "process",
              "role"
            ],
            "type": "object"
          },
          "ListenerRole": {
            "oneOf": [
              {
                "description": "An iii engine (its WebSocket and built-in listeners).",
                "enum": [
                  "engine"
                ],
                "type": "string"
              },
              {
                "description": "An iii worker.",
                "enum": [
                  "worker"
                ],
                "type": "string"
              },
              {
                "description": "An `iii compose` daemon.",
                "enum": [
                  "compose"
                ],
                "type": "string"
              },
              {
                "description": "Anything else.",
                "enum": [
                  "other"
                ],
                "type": "string"
              }
            ]
          },
          "Pane": {
            "properties": {
              "active": {
                "description": "The window's active pane.",
                "type": "boolean"
              },
              "agent": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AgentStatus"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The agent CLI running in this pane, if any."
              },
              "command": {
                "description": "Foreground process name.",
                "type": "string"
              },
              "compose": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ComposeRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The `iii compose` daemon running in this pane, if any."
              },
              "cwd": {
                "description": "Current directory.",
                "type": "string"
              },
              "dead": {
                "description": "The pane's process exited and the pane is kept.",
                "type": "boolean"
              },
              "height": {
                "description": "Height in rows.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "id": {
                "description": "Pane id, e.g. `%5`.",
                "type": "string"
              },
              "index": {
                "description": "Pane index inside the window.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "pid": {
                "description": "Pid of the process tmux started in the pane.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Listening sockets owned by processes started from this pane.",
                "items": {
                  "$ref": "#/definitions/Listener"
                },
                "type": "array"
              },
              "title": {
                "description": "Pane title set by the program.",
                "type": "string"
              },
              "width": {
                "description": "Width in columns.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "active",
              "command",
              "cwd",
              "dead",
              "height",
              "id",
              "index",
              "pid",
              "ports",
              "title",
              "width"
            ],
            "type": "object"
          },
          "PaneRef": {
            "description": "Where a process runs in tmux.",
            "properties": {
              "pane_id": {
                "description": "Pane id.",
                "type": "string"
              },
              "session": {
                "description": "Session name.",
                "type": "string"
              },
              "session_id": {
                "description": "Session id.",
                "type": "string"
              },
              "window_id": {
                "description": "Window id.",
                "type": "string"
              },
              "window_index": {
                "description": "Window index.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "pane_id",
              "session",
              "session_id",
              "window_id",
              "window_index"
            ],
            "type": "object"
          },
          "PortsSnapshot": {
            "description": "Listening ports and the `iii compose` stacks that own them.",
            "properties": {
              "composes": {
                "description": "Running `iii compose` daemons.",
                "items": {
                  "$ref": "#/definitions/ComposeStack"
                },
                "type": "array"
              },
              "error": {
                "description": "Why the scan failed, if it did.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at_ms": {
                "description": "When the snapshot was taken.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "listeners": {
                "description": "Every TCP listening socket of this user's processes, sorted by port.",
                "items": {
                  "$ref": "#/definitions/Listener"
                },
                "type": "array"
              },
              "supported": {
                "description": "This platform has a port scanner.",
                "type": "boolean"
              }
            },
            "required": [
              "composes",
              "generated_at_ms",
              "listeners",
              "supported"
            ],
            "type": "object"
          },
          "Session": {
            "properties": {
              "activity_at_ms": {
                "description": "Last activity in any of its windows.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "attached": {
                "description": "tmux clients attached, console terminals included.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "console_attached": {
                "description": "How many attached clients are console terminals.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "created_at_ms": {
                "description": "When the session was created.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "id": {
                "description": "Session id, e.g. `$5`.",
                "type": "string"
              },
              "name": {
                "description": "Session name.",
                "type": "string"
              },
              "windows": {
                "description": "Windows sorted by index.",
                "items": {
                  "$ref": "#/definitions/Window"
                },
                "type": "array"
              }
            },
            "required": [
              "activity_at_ms",
              "attached",
              "console_attached",
              "created_at_ms",
              "id",
              "name",
              "windows"
            ],
            "type": "object"
          },
          "SessionsSnapshot": {
            "description": "Every session with its windows and panes.",
            "properties": {
              "generated_at_ms": {
                "description": "When the snapshot was taken.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "sessions": {
                "description": "Sessions sorted by name.",
                "items": {
                  "$ref": "#/definitions/Session"
                },
                "type": "array"
              },
              "tmux": {
                "allOf": [
                  {
                    "$ref": "#/definitions/TmuxInfo"
                  }
                ],
                "description": "tmux availability and server."
              }
            },
            "required": [
              "generated_at_ms",
              "sessions",
              "tmux"
            ],
            "type": "object"
          },
          "SubagentStatus": {
            "description": "A sub-agent at work under an agent CLI.",
            "properties": {
              "depth": {
                "description": "1 for a sub-agent of the main agent, 2 for one of its sub-agents, ….",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "description": {
                "description": "What it was asked to do: Claude Code's task description, Codex's task path under the main agent (`review/tests`).",
                "type": "string"
              },
              "id": {
                "description": "Stable within the agent's session: Claude Code's agent id, Codex's thread id.",
                "type": "string"
              },
              "kind": {
                "description": "Claude Code's agent type (`general-purpose`, `Explore`, `fork`) or Codex's agent role; null when the agent names none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "since_ms": {
                "description": "When it started its current task.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "depth",
              "description",
              "id",
              "since_ms"
            ],
            "type": "object"
          },
          "TmuxInfo": {
            "description": "Whether a usable tmux exists and which server this worker talks to.",
            "properties": {
              "available": {
                "description": "A usable tmux binary was found.",
                "type": "boolean"
              },
              "error": {
                "description": "Why tmux is unavailable, or the last listing error.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "installable": {
                "default": false,
                "description": "tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.",
                "type": "boolean"
              },
              "path": {
                "description": "Resolved tmux binary.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_running": {
                "description": "A tmux server is running on that socket.",
                "type": "boolean"
              },
              "socket_path": {
                "description": "Server socket, known while the server runs.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "description": "tmux version, e.g. `3.6`.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "available",
              "server_running"
            ],
            "type": "object"
          },
          "Window": {
            "properties": {
              "active": {
                "description": "This is the session's current window.",
                "type": "boolean"
              },
              "activity_at_ms": {
                "description": "Last output in the window.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "bell": {
                "description": "A bell rang in the window.",
                "type": "boolean"
              },
              "id": {
                "description": "Window id, e.g. `@3` (unique on the server).",
                "type": "string"
              },
              "index": {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "name": {
                "description": "Window name.",
                "type": "string"
              },
              "panes": {
                "description": "Panes sorted by index.",
                "items": {
                  "$ref": "#/definitions/Pane"
                },
                "type": "array"
              },
              "zoomed": {
                "description": "A pane is zoomed.",
                "type": "boolean"
              }
            },
            "required": [
              "active",
              "activity_at_ms",
              "bell",
              "id",
              "index",
              "name",
              "panes",
              "zoomed"
            ],
            "type": "object"
          }
        },
        "description": "What `tmux::on-changed` returns: the payload of the live feed.",
        "properties": {
          "ports": {
            "allOf": [
              {
                "$ref": "#/definitions/PortsSnapshot"
              }
            ],
            "description": "Listening ports and compose stacks."
          },
          "sessions": {
            "allOf": [
              {
                "$ref": "#/definitions/SessionsSnapshot"
              }
            ],
            "description": "Sessions, windows, panes and their status."
          }
        },
        "required": [
          "ports",
          "sessions"
        ],
        "title": "Overview",
        "type": "object"
      }
    },
    {
      "description": "Internal: re-read the tmux configuration after an operator change.",
      "metadata": {
        "internal": true
      },
      "name": "tmux::on-config-change",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "What `<worker>::on-config-change` receives: the `Observed` envelope of a `configuration::on-updated` call (captured as output). Advisory only: handlers ignore it and re-fetch the authoritative value, so a direct call can never inject config.",
        "properties": {
          "id": {
            "default": null,
            "description": "Configuration id that changed.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "title": "OnConfigChangeEvent",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Ack returned by the internal `<worker>::on-config-change` handler.",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "title": "OnConfigChangeResponse",
        "type": "object"
      }
    },
    {
      "description": "The visible screen of one pane as text with its colour and style escapes (capture-pane -e), plus the pane's size, cursor position and whether a full-screen program has the alternate screen. Read-only.",
      "metadata": {},
      "name": "tmux::panes::capture",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane": {
            "description": "Pane id, e.g. `%5`.",
            "type": "string"
          }
        },
        "required": [
          "pane"
        ],
        "title": "PaneInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "alternate": {
            "description": "The pane shows its alternate screen (a full-screen program).",
            "type": "boolean"
          },
          "cursor_x": {
            "description": "Cursor column, from 0.",
            "format": "uint32",
            "minimum": 0,
            "type": "integer"
          },
          "cursor_y": {
            "description": "Cursor row, from 0.",
            "format": "uint32",
            "minimum": 0,
            "type": "integer"
          },
          "height": {
            "description": "Height in rows.",
            "format": "uint32",
            "minimum": 0,
            "type": "integer"
          },
          "pane_id": {
            "description": "Pane id.",
            "type": "string"
          },
          "text": {
            "description": "The visible screen, one line per row separated by `\\n`, with SGR escapes.",
            "type": "string"
          },
          "width": {
            "description": "Width in columns.",
            "format": "uint32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "alternate",
          "cursor_x",
          "cursor_y",
          "height",
          "pane_id",
          "text",
          "width"
        ],
        "title": "PaneCapture",
        "type": "object"
      }
    },
    {
      "description": "Kill a pane and the program running in it. Killing a window's last pane closes the window, and its session's last window closes the session; the answer says which closed.",
      "metadata": {},
      "name": "tmux::panes::kill",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane": {
            "description": "Pane id, e.g. `%5`.",
            "type": "string"
          }
        },
        "required": [
          "pane"
        ],
        "title": "PaneInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "killed": {
            "description": "Always true.",
            "type": "boolean"
          },
          "session_closed": {
            "description": "That window was its session's last, so the session closed.",
            "type": "boolean"
          },
          "window_closed": {
            "description": "It was its window's last pane, so the window closed.",
            "type": "boolean"
          }
        },
        "required": [
          "killed",
          "session_closed",
          "window_closed"
        ],
        "title": "KilledPane",
        "type": "object"
      }
    },
    {
      "description": "Start a pane's program again in the same pane: the command it was started with (or command), in its starting directory (or cwd). A pane whose program is still running is refused unless kill is true, which ends that program first.",
      "metadata": {},
      "name": "tmux::panes::respawn",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "command": {
            "default": null,
            "description": "Shell command to run instead of the one the pane was started with.",
            "type": [
              "string",
              "null"
            ]
          },
          "cwd": {
            "default": null,
            "description": "Working directory, absolute or `~/…`. Defaults to the pane's starting directory.",
            "type": [
              "string",
              "null"
            ]
          },
          "kill": {
            "default": null,
            "description": "End the pane's program first when it is still running (default false).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "pane": {
            "description": "Pane id, e.g. `%5`.",
            "type": "string"
          }
        },
        "required": [
          "pane"
        ],
        "title": "RespawnPaneInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane_id": {
            "description": "Pane id, the same as before.",
            "type": "string"
          }
        },
        "required": [
          "pane_id"
        ],
        "title": "RespawnedPane",
        "type": "object"
      }
    },
    {
      "description": "Make a pane the active pane of its window. zoom sets the window's zoom, it never toggles: true zooms the window on this pane (or keeps it zoomed there), false unzooms it, and without zoom the window keeps its zoom state, moved to this pane. A window with one pane can't zoom: the answer says zoomed false. Like tmux itself, every client looking at that window follows, your terminal included. It does not change the session's current window (tmux::windows::select does).",
      "metadata": {},
      "name": "tmux::panes::select",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane": {
            "description": "Pane id, e.g. `%5`.",
            "type": "string"
          },
          "zoom": {
            "default": null,
            "description": "true zooms the window on this pane, false unzooms it, absent keeps the window's zoom.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "pane"
        ],
        "title": "SelectPaneInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane_id": {
            "description": "Pane id now active in its window.",
            "type": "string"
          },
          "session_id": {
            "description": "Session id the pane was resolved in.",
            "type": "string"
          },
          "window_id": {
            "description": "Window id holding the pane.",
            "type": "string"
          },
          "zoomed": {
            "description": "The window is zoomed on the active pane.",
            "type": "boolean"
          }
        },
        "required": [
          "pane_id",
          "session_id",
          "window_id",
          "zoomed"
        ],
        "title": "SelectedPane",
        "type": "object"
      }
    },
    {
      "description": "Split a pane in two: the new pane goes to its right or below it, starts in that pane's current directory (or cwd) and runs the default shell (or command). It becomes the window's active pane unless select is false. Like tmux, splitting a zoomed window unzooms it. With remain_on_exit, the new pane stays once its program ends, dead, for tmux::panes::respawn to restart it.",
      "metadata": {},
      "name": "tmux::panes::split",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "SplitDirection": {
            "description": "Where a split puts the new pane.",
            "oneOf": [
              {
                "description": "To the right of the pane (tmux `split-window -h`).",
                "enum": [
                  "right"
                ],
                "type": "string"
              },
              {
                "description": "Below the pane (tmux `split-window -v`).",
                "enum": [
                  "below"
                ],
                "type": "string"
              }
            ]
          }
        },
        "properties": {
          "command": {
            "default": null,
            "description": "Shell command to run instead of the default shell.",
            "type": [
              "string",
              "null"
            ]
          },
          "cwd": {
            "default": null,
            "description": "Working directory, absolute or `~/…`. Defaults to the split pane's current directory.",
            "type": [
              "string",
              "null"
            ]
          },
          "direction": {
            "allOf": [
              {
                "$ref": "#/definitions/SplitDirection"
              }
            ],
            "description": "Where the new pane goes: `right` or `below`."
          },
          "pane": {
            "description": "Pane id to split, e.g. `%5`.",
            "type": "string"
          },
          "remain_on_exit": {
            "default": false,
            "description": "Keep the new pane once its program ends, shown dead, so tmux::panes::respawn can restart it (default false: tmux closes it). On tmux before 3.0, which has no pane options, every pane of its window is kept.",
            "type": "boolean"
          },
          "select": {
            "default": null,
            "description": "Make the new pane the window's active pane (default true).",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "direction",
          "pane"
        ],
        "title": "SplitPaneInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane_id": {
            "description": "The new pane's id.",
            "type": "string"
          },
          "session_id": {
            "description": "Session id.",
            "type": "string"
          },
          "window_id": {
            "description": "Window id holding both panes.",
            "type": "string"
          }
        },
        "required": [
          "pane_id",
          "session_id",
          "window_id"
        ],
        "title": "NewPane",
        "type": "object"
      }
    },
    {
      "description": "Every TCP port this user's processes listen on, with process, iii role (engine / worker / compose), worker name, compose namespace and the tmux pane the process runs in; plus each running `iii compose` stack with its engine WebSocket port and workers' ports.",
      "metadata": {},
      "name": "tmux::ports::list",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "No parameters.",
        "title": "EmptyInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "AddressFamily": {
            "enum": [
              "ipv4",
              "ipv6"
            ],
            "type": "string"
          },
          "ComposeEngine": {
            "properties": {
              "pid": {
                "description": "Engine pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Ports the engine listens on.",
                "items": {
                  "format": "uint16",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              },
              "ws_port": {
                "description": "The engine WebSocket port workers connect to.",
                "format": "uint16",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "pid",
              "ports"
            ],
            "type": "object"
          },
          "ComposeStack": {
            "properties": {
              "compose_file": {
                "description": "Compose file the daemon serves, when known.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "engine": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ComposeEngine"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The engine the daemon started, if it manages one."
              },
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PaneRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "tmux pane the daemon runs in."
              },
              "namespace": {
                "description": "Daemon namespace (`iii:c:<namespace>`).",
                "type": "string"
              },
              "pid": {
                "description": "Daemon pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "project_dir": {
                "description": "Daemon working directory.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "workers": {
                "description": "Workers the daemon started.",
                "items": {
                  "$ref": "#/definitions/ComposeWorker"
                },
                "type": "array"
              }
            },
            "required": [
              "namespace",
              "pid",
              "workers"
            ],
            "type": "object"
          },
          "ComposeWorker": {
            "properties": {
              "name": {
                "description": "Worker name.",
                "type": "string"
              },
              "pid": {
                "description": "Top-most pid of the worker's process tree.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Ports the worker's processes listen on.",
                "items": {
                  "format": "uint16",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "name",
              "pid",
              "ports"
            ],
            "type": "object"
          },
          "Listener": {
            "description": "One TCP socket in LISTEN state.",
            "properties": {
              "address": {
                "description": "Bound address, e.g. `0.0.0.0` or `::1`.",
                "type": "string"
              },
              "compose": {
                "description": "Compose namespace the process belongs to.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "family": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AddressFamily"
                  }
                ],
                "description": "IPv4 or IPv6."
              },
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PaneRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "tmux pane the process descends from."
              },
              "pid": {
                "description": "Owning process.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "port": {
                "description": "Port number.",
                "format": "uint16",
                "minimum": 0,
                "type": "integer"
              },
              "process": {
                "description": "Owning process name.",
                "type": "string"
              },
              "role": {
                "allOf": [
                  {
                    "$ref": "#/definitions/ListenerRole"
                  }
                ],
                "description": "What kind of process owns the socket."
              },
              "worker": {
                "description": "iii worker name, when known.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address",
              "family",
              "pid",
              "port",
              "process",
              "role"
            ],
            "type": "object"
          },
          "ListenerRole": {
            "oneOf": [
              {
                "description": "An iii engine (its WebSocket and built-in listeners).",
                "enum": [
                  "engine"
                ],
                "type": "string"
              },
              {
                "description": "An iii worker.",
                "enum": [
                  "worker"
                ],
                "type": "string"
              },
              {
                "description": "An `iii compose` daemon.",
                "enum": [
                  "compose"
                ],
                "type": "string"
              },
              {
                "description": "Anything else.",
                "enum": [
                  "other"
                ],
                "type": "string"
              }
            ]
          },
          "PaneRef": {
            "description": "Where a process runs in tmux.",
            "properties": {
              "pane_id": {
                "description": "Pane id.",
                "type": "string"
              },
              "session": {
                "description": "Session name.",
                "type": "string"
              },
              "session_id": {
                "description": "Session id.",
                "type": "string"
              },
              "window_id": {
                "description": "Window id.",
                "type": "string"
              },
              "window_index": {
                "description": "Window index.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "pane_id",
              "session",
              "session_id",
              "window_id",
              "window_index"
            ],
            "type": "object"
          }
        },
        "description": "Listening ports and the `iii compose` stacks that own them.",
        "properties": {
          "composes": {
            "description": "Running `iii compose` daemons.",
            "items": {
              "$ref": "#/definitions/ComposeStack"
            },
            "type": "array"
          },
          "error": {
            "description": "Why the scan failed, if it did.",
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at_ms": {
            "description": "When the snapshot was taken.",
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "listeners": {
            "description": "Every TCP listening socket of this user's processes, sorted by port.",
            "items": {
              "$ref": "#/definitions/Listener"
            },
            "type": "array"
          },
          "supported": {
            "description": "This platform has a port scanner.",
            "type": "boolean"
          }
        },
        "required": [
          "composes",
          "generated_at_ms",
          "listeners",
          "supported"
        ],
        "title": "PortsSnapshot",
        "type": "object"
      }
    },
    {
      "description": "Create a detached tmux session (starting the tmux server if needed). Optional name, working directory (default $HOME), first window name and a shell command to run instead of the default shell. With remain_on_exit, the pane stays once its program ends, dead, for tmux::panes::respawn to restart it.",
      "metadata": {},
      "name": "tmux::sessions::create",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "command": {
            "default": null,
            "description": "Shell command to run in the first window instead of the default shell.",
            "type": [
              "string",
              "null"
            ]
          },
          "cwd": {
            "default": null,
            "description": "Working directory, absolute or `~/…`. Defaults to $HOME.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "default": null,
            "description": "Session name; tmux picks a number when omitted. No `:` or `.`.",
            "type": [
              "string",
              "null"
            ]
          },
          "remain_on_exit": {
            "default": false,
            "description": "Keep the pane once its program ends, shown dead, so tmux::panes::respawn can restart it (default false: tmux closes it). On tmux before 3.0, which has no pane options, every pane of its window is kept.",
            "type": "boolean"
          },
          "window_name": {
            "default": null,
            "description": "Name of the first window.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "title": "CreateSessionInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane_id": {
            "description": "First pane id.",
            "type": "string"
          },
          "session": {
            "description": "Session name.",
            "type": "string"
          },
          "session_id": {
            "description": "New session id, e.g. `$7`.",
            "type": "string"
          },
          "window_id": {
            "description": "First window id.",
            "type": "string"
          },
          "window_index": {
            "description": "First window index.",
            "format": "uint32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "pane_id",
          "session",
          "session_id",
          "window_id",
          "window_index"
        ],
        "title": "CreatedSession",
        "type": "object"
      }
    },
    {
      "description": "Kill a tmux session and every program running in its windows.",
      "metadata": {},
      "name": "tmux::sessions::kill",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "session": {
            "description": "Session id (`$5`) or exact name.",
            "type": "string"
          }
        },
        "required": [
          "session"
        ],
        "title": "SessionInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "killed": {
            "description": "Always true.",
            "type": "boolean"
          }
        },
        "required": [
          "killed"
        ],
        "title": "KilledOutput",
        "type": "object"
      }
    },
    {
      "description": "Every tmux session with its windows and panes: foreground command, cwd, title, size, the agent CLI running in the pane (claude, codex, … with state working / waiting / idle), the `iii compose` daemon it runs and the ports its processes listen on.",
      "metadata": {},
      "name": "tmux::sessions::list",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "No parameters.",
        "title": "EmptyInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "AddressFamily": {
            "enum": [
              "ipv4",
              "ipv6"
            ],
            "type": "string"
          },
          "AgentState": {
            "oneOf": [
              {
                "description": "The agent is running a turn.",
                "enum": [
                  "working"
                ],
                "type": "string"
              },
              {
                "description": "The agent shows a prompt that needs you.",
                "enum": [
                  "waiting"
                ],
                "type": "string"
              },
              {
                "description": "The agent waits for a new message.",
                "enum": [
                  "idle"
                ],
                "type": "string"
              }
            ]
          },
          "AgentStatus": {
            "properties": {
              "id": {
                "description": "Matcher id from the configuration, e.g. `claude`.",
                "type": "string"
              },
              "label": {
                "description": "Display name, e.g. `Claude Code`.",
                "type": "string"
              },
              "pid": {
                "description": "Pid of the agent process.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "since_ms": {
                "description": "When the agent entered `state`.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "state": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AgentState"
                  }
                ],
                "description": "What the agent is doing."
              },
              "subagents": {
                "default": [],
                "description": "Sub-agents working right now, oldest first. Their work keeps `state` at `working` after the agent's own turn ended. Claude Code and Codex report them; other agents always list none.",
                "items": {
                  "$ref": "#/definitions/SubagentStatus"
                },
                "type": "array"
              },
              "title": {
                "default": null,
                "description": "The agent's session title: the pane title without the agent's status glyph (Claude Code's ✳ or spinner). Null when the pane only shows tmux's default title (the host name) or nothing.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "label",
              "pid",
              "since_ms",
              "state"
            ],
            "type": "object"
          },
          "ComposeRef": {
            "properties": {
              "namespace": {
                "description": "Compose daemon namespace.",
                "type": "string"
              },
              "pid": {
                "description": "Compose daemon pid.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "namespace",
              "pid"
            ],
            "type": "object"
          },
          "Listener": {
            "description": "One TCP socket in LISTEN state.",
            "properties": {
              "address": {
                "description": "Bound address, e.g. `0.0.0.0` or `::1`.",
                "type": "string"
              },
              "compose": {
                "description": "Compose namespace the process belongs to.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "family": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AddressFamily"
                  }
                ],
                "description": "IPv4 or IPv6."
              },
              "location": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PaneRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "tmux pane the process descends from."
              },
              "pid": {
                "description": "Owning process.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "port": {
                "description": "Port number.",
                "format": "uint16",
                "minimum": 0,
                "type": "integer"
              },
              "process": {
                "description": "Owning process name.",
                "type": "string"
              },
              "role": {
                "allOf": [
                  {
                    "$ref": "#/definitions/ListenerRole"
                  }
                ],
                "description": "What kind of process owns the socket."
              },
              "worker": {
                "description": "iii worker name, when known.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address",
              "family",
              "pid",
              "port",
              "process",
              "role"
            ],
            "type": "object"
          },
          "ListenerRole": {
            "oneOf": [
              {
                "description": "An iii engine (its WebSocket and built-in listeners).",
                "enum": [
                  "engine"
                ],
                "type": "string"
              },
              {
                "description": "An iii worker.",
                "enum": [
                  "worker"
                ],
                "type": "string"
              },
              {
                "description": "An `iii compose` daemon.",
                "enum": [
                  "compose"
                ],
                "type": "string"
              },
              {
                "description": "Anything else.",
                "enum": [
                  "other"
                ],
                "type": "string"
              }
            ]
          },
          "Pane": {
            "properties": {
              "active": {
                "description": "The window's active pane.",
                "type": "boolean"
              },
              "agent": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AgentStatus"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The agent CLI running in this pane, if any."
              },
              "command": {
                "description": "Foreground process name.",
                "type": "string"
              },
              "compose": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ComposeRef"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The `iii compose` daemon running in this pane, if any."
              },
              "cwd": {
                "description": "Current directory.",
                "type": "string"
              },
              "dead": {
                "description": "The pane's process exited and the pane is kept.",
                "type": "boolean"
              },
              "height": {
                "description": "Height in rows.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "id": {
                "description": "Pane id, e.g. `%5`.",
                "type": "string"
              },
              "index": {
                "description": "Pane index inside the window.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "pid": {
                "description": "Pid of the process tmux started in the pane.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "ports": {
                "description": "Listening sockets owned by processes started from this pane.",
                "items": {
                  "$ref": "#/definitions/Listener"
                },
                "type": "array"
              },
              "title": {
                "description": "Pane title set by the program.",
                "type": "string"
              },
              "width": {
                "description": "Width in columns.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "active",
              "command",
              "cwd",
              "dead",
              "height",
              "id",
              "index",
              "pid",
              "ports",
              "title",
              "width"
            ],
            "type": "object"
          },
          "PaneRef": {
            "description": "Where a process runs in tmux.",
            "properties": {
              "pane_id": {
                "description": "Pane id.",
                "type": "string"
              },
              "session": {
                "description": "Session name.",
                "type": "string"
              },
              "session_id": {
                "description": "Session id.",
                "type": "string"
              },
              "window_id": {
                "description": "Window id.",
                "type": "string"
              },
              "window_index": {
                "description": "Window index.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "pane_id",
              "session",
              "session_id",
              "window_id",
              "window_index"
            ],
            "type": "object"
          },
          "Session": {
            "properties": {
              "activity_at_ms": {
                "description": "Last activity in any of its windows.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "attached": {
                "description": "tmux clients attached, console terminals included.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "console_attached": {
                "description": "How many attached clients are console terminals.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "created_at_ms": {
                "description": "When the session was created.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "id": {
                "description": "Session id, e.g. `$5`.",
                "type": "string"
              },
              "name": {
                "description": "Session name.",
                "type": "string"
              },
              "windows": {
                "description": "Windows sorted by index.",
                "items": {
                  "$ref": "#/definitions/Window"
                },
                "type": "array"
              }
            },
            "required": [
              "activity_at_ms",
              "attached",
              "console_attached",
              "created_at_ms",
              "id",
              "name",
              "windows"
            ],
            "type": "object"
          },
          "SubagentStatus": {
            "description": "A sub-agent at work under an agent CLI.",
            "properties": {
              "depth": {
                "description": "1 for a sub-agent of the main agent, 2 for one of its sub-agents, ….",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "description": {
                "description": "What it was asked to do: Claude Code's task description, Codex's task path under the main agent (`review/tests`).",
                "type": "string"
              },
              "id": {
                "description": "Stable within the agent's session: Claude Code's agent id, Codex's thread id.",
                "type": "string"
              },
              "kind": {
                "description": "Claude Code's agent type (`general-purpose`, `Explore`, `fork`) or Codex's agent role; null when the agent names none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "since_ms": {
                "description": "When it started its current task.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "depth",
              "description",
              "id",
              "since_ms"
            ],
            "type": "object"
          },
          "TmuxInfo": {
            "description": "Whether a usable tmux exists and which server this worker talks to.",
            "properties": {
              "available": {
                "description": "A usable tmux binary was found.",
                "type": "boolean"
              },
              "error": {
                "description": "Why tmux is unavailable, or the last listing error.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "installable": {
                "default": false,
                "description": "tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.",
                "type": "boolean"
              },
              "path": {
                "description": "Resolved tmux binary.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_running": {
                "description": "A tmux server is running on that socket.",
                "type": "boolean"
              },
              "socket_path": {
                "description": "Server socket, known while the server runs.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "description": "tmux version, e.g. `3.6`.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "available",
              "server_running"
            ],
            "type": "object"
          },
          "Window": {
            "properties": {
              "active": {
                "description": "This is the session's current window.",
                "type": "boolean"
              },
              "activity_at_ms": {
                "description": "Last output in the window.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "bell": {
                "description": "A bell rang in the window.",
                "type": "boolean"
              },
              "id": {
                "description": "Window id, e.g. `@3` (unique on the server).",
                "type": "string"
              },
              "index": {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "name": {
                "description": "Window name.",
                "type": "string"
              },
              "panes": {
                "description": "Panes sorted by index.",
                "items": {
                  "$ref": "#/definitions/Pane"
                },
                "type": "array"
              },
              "zoomed": {
                "description": "A pane is zoomed.",
                "type": "boolean"
              }
            },
            "required": [
              "active",
              "activity_at_ms",
              "bell",
              "id",
              "index",
              "name",
              "panes",
              "zoomed"
            ],
            "type": "object"
          }
        },
        "description": "Every session with its windows and panes.",
        "properties": {
          "generated_at_ms": {
            "description": "When the snapshot was taken.",
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "sessions": {
            "description": "Sessions sorted by name.",
            "items": {
              "$ref": "#/definitions/Session"
            },
            "type": "array"
          },
          "tmux": {
            "allOf": [
              {
                "$ref": "#/definitions/TmuxInfo"
              }
            ],
            "description": "tmux availability and server."
          }
        },
        "required": [
          "generated_at_ms",
          "sessions",
          "tmux"
        ],
        "title": "SessionsSnapshot",
        "type": "object"
      }
    },
    {
      "description": "Rename a tmux session.",
      "metadata": {},
      "name": "tmux::sessions::rename",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "name": {
            "description": "New name. No `:` or `.`.",
            "type": "string"
          },
          "session": {
            "description": "Session id (`$5`) or exact name.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "session"
        ],
        "title": "RenameSessionInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "name": {
            "description": "New name.",
            "type": "string"
          },
          "session_id": {
            "description": "Session id.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "session_id"
        ],
        "title": "RenamedSession",
        "type": "object"
      }
    },
    {
      "description": "Whether tmux is installed, its version and path, and whether a tmux server is running on the configured socket.",
      "metadata": {},
      "name": "tmux::status",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "No parameters.",
        "title": "EmptyInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Whether a usable tmux exists and which server this worker talks to.",
        "properties": {
          "available": {
            "description": "A usable tmux binary was found.",
            "type": "boolean"
          },
          "error": {
            "description": "Why tmux is unavailable, or the last listing error.",
            "type": [
              "string",
              "null"
            ]
          },
          "installable": {
            "default": false,
            "description": "tmux is missing and `tmux::install` can try: a supported OS, the configured binary is plain `tmux`, not a path or another name, and this processor has an official build or this computer a package manager.",
            "type": "boolean"
          },
          "path": {
            "description": "Resolved tmux binary.",
            "type": [
              "string",
              "null"
            ]
          },
          "server_running": {
            "description": "A tmux server is running on that socket.",
            "type": "boolean"
          },
          "socket_path": {
            "description": "Server socket, known while the server runs.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "tmux version, e.g. `3.6`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "available",
          "server_running"
        ],
        "title": "TmuxInfo",
        "type": "object"
      }
    },
    {
      "description": "What one sub-agent of the agent in a pane (Claude Code or Codex) has done so far, from the transcript the agent keeps on disk: the task it was given, what it wrote and reasoned, the tools it called and what they returned, oldest first. Works while the sub-agent runs (`working`) and after it finished, as long as the agent runs. Read-only.",
      "metadata": {},
      "name": "tmux::subagents::transcript",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "limit": {
            "default": null,
            "description": "The most items returned, the latest ones: 200 when absent, at most 1000.",
            "format": "uint32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "pane": {
            "description": "Pane id of the agent, e.g. `%5`.",
            "type": "string"
          },
          "subagent": {
            "description": "The sub-agent's id, from `agent.subagents[].id` in `tmux::sessions::list`.",
            "type": "string"
          }
        },
        "required": [
          "pane",
          "subagent"
        ],
        "title": "TranscriptInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "TranscriptItem": {
            "description": "One step of a sub-agent's transcript.",
            "properties": {
              "at_ms": {
                "description": "When the agent recorded it.",
                "format": "uint64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "error": {
                "default": false,
                "description": "The tool reported a failure (`tool_result` only).",
                "type": "boolean"
              },
              "kind": {
                "$ref": "#/definitions/TranscriptItemKind"
              },
              "text": {
                "description": "The text, cut at 4 000 characters (then ending in `…`). A tool call's is its main argument: the command, path, pattern or query, else the whole input as JSON.",
                "type": "string"
              },
              "tool": {
                "description": "The tool's name, on `tool_call` and `tool_result` items.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "type": "object"
          },
          "TranscriptItemKind": {
            "oneOf": [
              {
                "description": "A message to the sub-agent after its task, from the agent that runs it.",
                "enum": [
                  "user"
                ],
                "type": "string"
              },
              {
                "description": "What the sub-agent wrote.",
                "enum": [
                  "text"
                ],
                "type": "string"
              },
              {
                "description": "Its reasoning, when the agent records it in clear.",
                "enum": [
                  "thinking"
                ],
                "type": "string"
              },
              {
                "description": "A tool it called, with the call's main argument.",
                "enum": [
                  "tool_call"
                ],
                "type": "string"
              },
              {
                "description": "What a tool returned.",
                "enum": [
                  "tool_result"
                ],
                "type": "string"
              }
            ]
          }
        },
        "description": "What one sub-agent has done so far, from the transcript its agent keeps.",
        "properties": {
          "agent": {
            "description": "Matcher id of that agent: `claude` or `codex`.",
            "type": "string"
          },
          "items": {
            "description": "The latest items, oldest first, without the task.",
            "items": {
              "$ref": "#/definitions/TranscriptItem"
            },
            "type": "array"
          },
          "pane_id": {
            "description": "Pane id of the agent running the sub-agent.",
            "type": "string"
          },
          "prompt": {
            "description": "The task it was given, cut at 16 000 characters. Null when the transcript holds none; Codex keeps a sub-agent's task encrypted, so there it shows only the task's name and sender.",
            "type": [
              "string",
              "null"
            ]
          },
          "subagent_id": {
            "description": "The sub-agent's id, as in `agent.subagents`.",
            "type": "string"
          },
          "truncated": {
            "description": "Older items were left out: past `limit`, or before the last 4 MiB of the file.",
            "type": "boolean"
          },
          "working": {
            "description": "The sub-agent is still in its agent's `subagents` list.",
            "type": "boolean"
          }
        },
        "required": [
          "agent",
          "items",
          "pane_id",
          "subagent_id",
          "truncated",
          "working"
        ],
        "title": "SubagentTranscript",
        "type": "object"
      }
    },
    {
      "description": "Detach a console terminal's tmux client. The session keeps running.",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::close",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Identifies one terminal and proves the caller opened it.",
        "properties": {
          "access_key": {
            "description": "Credential from `open`.",
            "type": "string"
          },
          "terminal_id": {
            "description": "Terminal handle from `open`.",
            "type": "string"
          }
        },
        "required": [
          "access_key",
          "terminal_id"
        ],
        "title": "TerminalRef",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "closed": {
            "description": "False when the terminal was already gone.",
            "type": "boolean"
          }
        },
        "required": [
          "closed"
        ],
        "title": "CloseResponse",
        "type": "object"
      }
    },
    {
      "description": "Attach a console terminal to a tmux session as a real tmux client running in a PTY. Output is pushed to the page's handler.",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::open",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "WindowArg": {
            "anyOf": [
              {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              {
                "description": "Window id like `@3`, or an index as text.",
                "type": "string"
              }
            ],
            "description": "A window as callers name it: an id (`\"@3\"`) or an index (`2` or `\"2\"`)."
          }
        },
        "properties": {
          "cols": {
            "description": "Terminal width in columns (2..=500).",
            "format": "uint16",
            "minimum": 0,
            "type": "integer"
          },
          "output_function_id": {
            "description": "Browser handler receiving output: `iii::tmux-ui::pty-output::console-<browser id>`.",
            "type": "string"
          },
          "rows": {
            "description": "Terminal height in rows (2..=500).",
            "format": "uint16",
            "minimum": 0,
            "type": "integer"
          },
          "session": {
            "description": "Session id (`$5`) or exact name to attach to.",
            "type": "string"
          },
          "window": {
            "anyOf": [
              {
                "$ref": "#/definitions/WindowArg"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Window id (`@3`) or index to select before attaching."
          }
        },
        "required": [
          "cols",
          "output_function_id",
          "rows",
          "session"
        ],
        "title": "OpenRequest",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "access_key": {
            "description": "Short-lived credential required by every other call. Never persist it.",
            "type": "string"
          },
          "client_tty": {
            "description": "The tmux client's tty, as `list-clients` shows it.",
            "type": [
              "string",
              "null"
            ]
          },
          "session_id": {
            "description": "Session the client attached to.",
            "type": "string"
          },
          "terminal_id": {
            "description": "Terminal handle for the other calls.",
            "type": "string"
          }
        },
        "required": [
          "access_key",
          "session_id",
          "terminal_id"
        ],
        "title": "OpenResponse",
        "type": "object"
      }
    },
    {
      "description": "Ask tmux to repaint the console terminal's whole screen (refresh-client).",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::redraw",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Identifies one terminal and proves the caller opened it.",
        "properties": {
          "access_key": {
            "description": "Credential from `open`.",
            "type": "string"
          },
          "terminal_id": {
            "description": "Terminal handle from `open`.",
            "type": "string"
          }
        },
        "required": [
          "access_key",
          "terminal_id"
        ],
        "title": "TerminalRef",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "ok": {
            "description": "Always true.",
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "title": "OkResponse",
        "type": "object"
      }
    },
    {
      "description": "Re-send buffered output frames after a sequence, for gap repair.",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::replay",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Identifies one terminal and proves the caller opened it.",
        "properties": {
          "access_key": {
            "description": "Credential from `open`.",
            "type": "string"
          },
          "after_sequence": {
            "description": "Last sequence the page applied; frames after it are returned.",
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "terminal_id": {
            "description": "Terminal handle from `open`.",
            "type": "string"
          }
        },
        "required": [
          "access_key",
          "after_sequence",
          "terminal_id"
        ],
        "title": "ReplayRequest",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "OutputFrame": {
            "properties": {
              "data": {
                "type": "string"
              },
              "sequence": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "data",
              "sequence"
            ],
            "type": "object"
          }
        },
        "properties": {
          "frames": {
            "items": {
              "$ref": "#/definitions/OutputFrame"
            },
            "type": "array"
          },
          "next_sequence": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "frames",
          "next_sequence",
          "truncated"
        ],
        "title": "Replay",
        "type": "object"
      }
    },
    {
      "description": "Resize a console terminal; also its heartbeat.",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::resize",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Identifies one terminal and proves the caller opened it.",
        "properties": {
          "access_key": {
            "description": "Credential from `open`.",
            "type": "string"
          },
          "cols": {
            "description": "Width in columns (2..=500).",
            "format": "uint16",
            "minimum": 0,
            "type": "integer"
          },
          "rows": {
            "description": "Height in rows (2..=500).",
            "format": "uint16",
            "minimum": 0,
            "type": "integer"
          },
          "terminal_id": {
            "description": "Terminal handle from `open`.",
            "type": "string"
          }
        },
        "required": [
          "access_key",
          "cols",
          "rows",
          "terminal_id"
        ],
        "title": "ResizeRequest",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "cols": {
            "description": "Width applied.",
            "format": "uint16",
            "minimum": 0,
            "type": "integer"
          },
          "rows": {
            "description": "Height applied.",
            "format": "uint16",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "cols",
          "rows"
        ],
        "title": "ResizeResponse",
        "type": "object"
      }
    },
    {
      "description": "Move only this console terminal's tmux client to another session (switch-client), optionally selecting a window there.",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::switch",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "WindowArg": {
            "anyOf": [
              {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              {
                "description": "Window id like `@3`, or an index as text.",
                "type": "string"
              }
            ],
            "description": "A window as callers name it: an id (`\"@3\"`) or an index (`2` or `\"2\"`)."
          }
        },
        "description": "Identifies one terminal and proves the caller opened it.",
        "properties": {
          "access_key": {
            "description": "Credential from `open`.",
            "type": "string"
          },
          "session": {
            "description": "Session id (`$5`) or exact name to move this client to.",
            "type": "string"
          },
          "terminal_id": {
            "description": "Terminal handle from `open`.",
            "type": "string"
          },
          "window": {
            "anyOf": [
              {
                "$ref": "#/definitions/WindowArg"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Window id (`@3`) or index to select there."
          }
        },
        "required": [
          "access_key",
          "session",
          "terminal_id"
        ],
        "title": "SwitchRequest",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "session_id": {
            "description": "Session the client now shows.",
            "type": "string"
          }
        },
        "required": [
          "session_id"
        ],
        "title": "SwitchResponse",
        "type": "object"
      }
    },
    {
      "description": "Save a file being pasted into a console terminal (any type, base64, at most 12 MiB) in a new folder of its own in the cache folder of the user this worker runs as, under its name made safe, and answer its path for the page to paste. It types nothing; uploads older than 7 days, and the oldest past 256 MiB, are removed.",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::upload",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Identifies one terminal and proves the caller opened it.",
        "properties": {
          "access_key": {
            "description": "Credential from `open`.",
            "type": "string"
          },
          "data": {
            "description": "The file, base64, any type, at most 12 MiB decoded.",
            "type": "string"
          },
          "mime": {
            "default": null,
            "description": "Its type as the page knows it; the answer names what the bytes are when they are a known image.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "The file's name. Only its base name is kept, made one safe token: characters outside `A-Z a-z 0-9 . _ -` become `-`, no leading dot, at most 100 bytes; empty is `file`. A known image (PNG, JPEG, GIF, WebP) gets the extension its content has.",
            "type": "string"
          },
          "terminal_id": {
            "description": "Terminal handle from `open`.",
            "type": "string"
          }
        },
        "required": [
          "access_key",
          "data",
          "name",
          "terminal_id"
        ],
        "title": "UploadRequest",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "bytes": {
            "description": "Its size in bytes.",
            "format": "uint",
            "minimum": 0,
            "type": "integer"
          },
          "mime": {
            "description": "Its type: what the bytes are when they are a known image, else the request's, else `application/octet-stream`.",
            "type": "string"
          },
          "path": {
            "description": "Absolute path of the new file, to paste into the terminal as text (no spaces in its name).",
            "type": "string"
          }
        },
        "required": [
          "bytes",
          "mime",
          "path"
        ],
        "title": "UploadResponse",
        "type": "object"
      }
    },
    {
      "description": "Write base64 keyboard input to a console terminal's tmux client.",
      "metadata": {
        "internal": true,
        "trace_hidden": true
      },
      "name": "tmux::terminal::write",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Identifies one terminal and proves the caller opened it.",
        "properties": {
          "access_key": {
            "description": "Credential from `open`.",
            "type": "string"
          },
          "data": {
            "description": "Base64 keyboard input, at most 64 KiB decoded.",
            "type": "string"
          },
          "terminal_id": {
            "description": "Terminal handle from `open`.",
            "type": "string"
          }
        },
        "required": [
          "access_key",
          "data",
          "terminal_id"
        ],
        "title": "WriteRequest",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "written": {
            "description": "Bytes written to the tmux client.",
            "format": "uint",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "written"
        ],
        "title": "WriteResponse",
        "type": "object"
      }
    },
    {
      "description": "Serve the tmux worker's injected console UI assets (the target of its ade::ui::asset observers; the console calls it through each asset's observer with {path}).",
      "metadata": {
        "internal": true
      },
      "name": "tmux::ui-content",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Input of the content function: the console asks for one asset by path.",
        "properties": {
          "path": {
            "description": "The asset path from the observer's args (e.g. `state/page.js`).",
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "title": "UiContentInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "description": "Output of the content function.",
        "properties": {
          "content": {
            "description": "The asset source, verbatim.",
            "type": "string"
          },
          "content_type": {
            "description": "MIME type the console should serve the asset with.",
            "type": "string"
          }
        },
        "required": [
          "content",
          "content_type"
        ],
        "title": "UiContentResult",
        "type": "object"
      }
    },
    {
      "description": "Create a window in a tmux session. Optional name, working directory (default: the directory the session was created in), a shell command to run instead of the default shell, and whether to make it the current window (default true). With remain_on_exit, its pane stays once its program ends, dead, for tmux::panes::respawn to restart it.",
      "metadata": {},
      "name": "tmux::windows::create",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "command": {
            "default": null,
            "description": "Shell command to run instead of the default shell.",
            "type": [
              "string",
              "null"
            ]
          },
          "cwd": {
            "default": null,
            "description": "Working directory, absolute or `~/…`. Defaults to the directory the session was created in (the home folder on tmux older than 3.2, which can't tell).",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "default": null,
            "description": "Window name. No `:` or `.`.",
            "type": [
              "string",
              "null"
            ]
          },
          "remain_on_exit": {
            "default": false,
            "description": "Keep its pane once its program ends, shown dead, so tmux::panes::respawn can restart it (default false: tmux closes it). On tmux before 3.0, which has no pane options, every pane of the window is kept.",
            "type": "boolean"
          },
          "select": {
            "default": null,
            "description": "Make it the session's current window (default true).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "session": {
            "description": "Session id (`$5`) or exact name.",
            "type": "string"
          }
        },
        "required": [
          "session"
        ],
        "title": "CreateWindowInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "pane_id": {
            "description": "Its first pane id.",
            "type": "string"
          },
          "session_id": {
            "description": "Session id.",
            "type": "string"
          },
          "window_id": {
            "description": "New window id, e.g. `@9`.",
            "type": "string"
          },
          "window_index": {
            "description": "New window index.",
            "format": "uint32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "pane_id",
          "session_id",
          "window_id",
          "window_index"
        ],
        "title": "CreatedWindow",
        "type": "object"
      }
    },
    {
      "description": "Kill a tmux window and every program running in its panes.",
      "metadata": {},
      "name": "tmux::windows::kill",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "WindowArg": {
            "anyOf": [
              {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              {
                "description": "Window id like `@3`, or an index as text.",
                "type": "string"
              }
            ],
            "description": "A window as callers name it: an id (`\"@3\"`) or an index (`2` or `\"2\"`)."
          }
        },
        "properties": {
          "session": {
            "description": "Session id (`$5`) or exact name.",
            "type": "string"
          },
          "window": {
            "allOf": [
              {
                "$ref": "#/definitions/WindowArg"
              }
            ],
            "description": "Window id (`@3`) or index."
          }
        },
        "required": [
          "session",
          "window"
        ],
        "title": "WindowInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "killed": {
            "description": "Always true.",
            "type": "boolean"
          }
        },
        "required": [
          "killed"
        ],
        "title": "KilledOutput",
        "type": "object"
      }
    },
    {
      "description": "Move a window to another tmux session, after its last window or just before or after one of its windows (`before` / `after`, which need tmux 3.2 or later and also reorder a window inside its own session). The window keeps its id, panes and programs, and the destination session's current window stays as it was. When it was the last window of its session, tmux closes that session.",
      "metadata": {},
      "name": "tmux::windows::move",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "WindowArg": {
            "anyOf": [
              {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              {
                "description": "Window id like `@3`, or an index as text.",
                "type": "string"
              }
            ],
            "description": "A window as callers name it: an id (`\"@3\"`) or an index (`2` or `\"2\"`)."
          }
        },
        "properties": {
          "after": {
            "anyOf": [
              {
                "$ref": "#/definitions/WindowArg"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Put it just after this window of `target_session` (id or index). Needs tmux 3.2 or later. Without `before` or `after` it goes after the session's last window."
          },
          "before": {
            "anyOf": [
              {
                "$ref": "#/definitions/WindowArg"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Put it just before this window of `target_session` (id or index). Needs tmux 3.2 or later."
          },
          "session": {
            "description": "Session id (`$5`) or exact name of the session the window is in.",
            "type": "string"
          },
          "target_session": {
            "description": "Session id (`$5`) or exact name of the session to move it to. Its own session reorders it, with `before` or `after`.",
            "type": "string"
          },
          "window": {
            "allOf": [
              {
                "$ref": "#/definitions/WindowArg"
              }
            ],
            "description": "Window id (`@3`) or index."
          }
        },
        "required": [
          "session",
          "target_session",
          "window"
        ],
        "title": "MoveWindowInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "session_id": {
            "description": "Id of the session the window is in now.",
            "type": "string"
          },
          "source_session_closed": {
            "description": "It was the last window of its session, so tmux closed that session.",
            "type": "boolean"
          },
          "window_id": {
            "description": "Window id, the same as before the move.",
            "type": "string"
          },
          "window_index": {
            "description": "Its index in that session now.",
            "format": "uint32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "session_id",
          "source_session_closed",
          "window_id",
          "window_index"
        ],
        "title": "MovedWindow",
        "type": "object"
      }
    },
    {
      "description": "Rename a tmux window.",
      "metadata": {},
      "name": "tmux::windows::rename",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "WindowArg": {
            "anyOf": [
              {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              {
                "description": "Window id like `@3`, or an index as text.",
                "type": "string"
              }
            ],
            "description": "A window as callers name it: an id (`\"@3\"`) or an index (`2` or `\"2\"`)."
          }
        },
        "properties": {
          "name": {
            "description": "New name. No `:` or `.`.",
            "type": "string"
          },
          "session": {
            "description": "Session id (`$5`) or exact name.",
            "type": "string"
          },
          "window": {
            "allOf": [
              {
                "$ref": "#/definitions/WindowArg"
              }
            ],
            "description": "Window id (`@3`) or index."
          }
        },
        "required": [
          "name",
          "session",
          "window"
        ],
        "title": "RenameWindowInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "name": {
            "description": "New name.",
            "type": "string"
          },
          "window_id": {
            "description": "Window id.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "window_id"
        ],
        "title": "RenamedWindow",
        "type": "object"
      }
    },
    {
      "description": "Make a window the current window of its session. Like tmux itself, every client attached to that session (your terminal included) switches to it.",
      "metadata": {},
      "name": "tmux::windows::select",
      "request_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "WindowArg": {
            "anyOf": [
              {
                "description": "Window index inside the session.",
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              {
                "description": "Window id like `@3`, or an index as text.",
                "type": "string"
              }
            ],
            "description": "A window as callers name it: an id (`\"@3\"`) or an index (`2` or `\"2\"`)."
          }
        },
        "properties": {
          "session": {
            "description": "Session id (`$5`) or exact name.",
            "type": "string"
          },
          "window": {
            "allOf": [
              {
                "$ref": "#/definitions/WindowArg"
              }
            ],
            "description": "Window id (`@3`) or index."
          }
        },
        "required": [
          "session",
          "window"
        ],
        "title": "WindowInput",
        "type": "object"
      },
      "response_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "session_id": {
            "description": "Session id.",
            "type": "string"
          },
          "window_id": {
            "description": "Window id now current.",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "window_id"
        ],
        "title": "SelectedWindow",
        "type": "object"
      }
    }
  ]
}

Search the registry

Find workers, kits and executables, or jump to a page.