{
  "name": "wait",
  "wireName": "tmux_wait",
  "source": {
    "repo": "libtmux/libtmux-ruby",
    "revision": "e3815d2b35a6c663f20769231e1d22b565f87038",
    "extractedRevision": "e3815d2b35a6c663f20769231e1d22b565f87038",
    "file": "gems/libtmux-mcp/lib/libtmux/mcp/catalog.rb",
    "line": 241
  },
  "description": "Wait for observed literal screen text or the initial pane process exit. Deadline in seconds is capped by the application limit. Uses control events/process descriptors; no polling. Requires tmux>=3.3 and Linux peer pidfds with matching PID namespaces or Darwin kqueue process observation. Reports observed evidence, never remote termination caused by cancellation or an inferred process exit status.",
  "schemaStatus": "runtime",
  "enabledByDefault": false,
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "condition": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "text": {
                    "maxLength": 4096,
                    "minLength": 1,
                    "type": "string"
                  },
                  "type": {
                    "const": "screen_contains"
                  }
                },
                "required": [
                  "type",
                  "text"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "type": {
                    "const": "process_exit"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            ]
          },
          "history_lines": {
            "maximum": 1000,
            "minimum": 0,
            "type": "integer"
          },
          "max_bytes": {
            "maximum": 262144,
            "minimum": 1,
            "type": "integer"
          },
          "max_lines": {
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "target": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "generation": {
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "id": {
                    "maxLength": 32,
                    "pattern": "^%[0-9]+$",
                    "type": "string"
                  },
                  "kind": {
                    "const": "pane"
                  }
                },
                "required": [
                  "generation",
                  "kind",
                  "id"
                ],
                "type": "object"
              }
            ]
          },
          "timeout": {
            "exclusiveMinimum": 0,
            "maximum": 60,
            "type": "number"
          }
        },
        "required": [
          "target",
          "condition"
        ],
        "type": "object"
      }
    ],
    "type": "object"
  },
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "data": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "capture": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "bytes": {
                            "maximum": 262144,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "capture_id": {
                            "type": "string"
                          },
                          "encoding": {
                            "enum": [
                              "utf-8",
                              "base64"
                            ]
                          },
                          "history_continuity": {
                            "const": "unknown"
                          },
                          "interval": {
                            "additionalProperties": false,
                            "properties": {
                              "clock": {
                                "const": "monotonic_seconds"
                              },
                              "finished": {
                                "type": "number"
                              },
                              "started": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "clock",
                              "started",
                              "finished"
                            ],
                            "type": "object"
                          },
                          "mode": {
                            "const": "snapshot"
                          },
                          "next_cursor": {
                            "type": "string"
                          },
                          "process_generation": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "row_count": {
                            "maximum": 1000,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "rows": {
                            "items": {
                              "type": "string"
                            },
                            "maxItems": 1000,
                            "type": "array"
                          },
                          "scope": {
                            "additionalProperties": false,
                            "properties": {
                              "history_lines": {
                                "maximum": 1000,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "max_bytes": {
                                "maximum": 262144,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "max_lines": {
                                "maximum": 1000,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "max_lines",
                              "max_bytes",
                              "history_lines"
                            ],
                            "type": "object"
                          },
                          "target": {
                            "oneOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "generation": {
                                    "maxLength": 128,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "id": {
                                    "maxLength": 32,
                                    "pattern": "^%[0-9]+$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "const": "pane"
                                  }
                                },
                                "required": [
                                  "generation",
                                  "kind",
                                  "id"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "truncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "target",
                          "capture_id",
                          "process_generation",
                          "encoding",
                          "row_count",
                          "bytes",
                          "truncated",
                          "history_continuity",
                          "interval",
                          "scope",
                          "mode",
                          "rows"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "base_capture_id": {
                            "type": "string"
                          },
                          "bytes": {
                            "maximum": 262144,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "capture_id": {
                            "type": "string"
                          },
                          "encoding": {
                            "enum": [
                              "utf-8",
                              "base64"
                            ]
                          },
                          "history_continuity": {
                            "const": "unknown"
                          },
                          "interval": {
                            "additionalProperties": false,
                            "properties": {
                              "clock": {
                                "const": "monotonic_seconds"
                              },
                              "finished": {
                                "type": "number"
                              },
                              "started": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "clock",
                              "started",
                              "finished"
                            ],
                            "type": "object"
                          },
                          "mode": {
                            "const": "delta"
                          },
                          "next_cursor": {
                            "type": "string"
                          },
                          "process_generation": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "reset": {
                            "type": "boolean"
                          },
                          "row_count": {
                            "maximum": 1000,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "scope": {
                            "additionalProperties": false,
                            "properties": {
                              "history_lines": {
                                "maximum": 1000,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "max_bytes": {
                                "maximum": 262144,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "max_lines": {
                                "maximum": 1000,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "max_lines",
                              "max_bytes",
                              "history_lines"
                            ],
                            "type": "object"
                          },
                          "splice": {
                            "additionalProperties": false,
                            "properties": {
                              "delete": {
                                "minimum": 0,
                                "type": "integer"
                              },
                              "rows": {
                                "items": {
                                  "type": "string"
                                },
                                "maxItems": 1000,
                                "type": "array"
                              },
                              "start": {
                                "minimum": 0,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "start",
                              "delete",
                              "rows"
                            ],
                            "type": "object"
                          },
                          "target": {
                            "oneOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "generation": {
                                    "maxLength": 128,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "id": {
                                    "maxLength": 32,
                                    "pattern": "^%[0-9]+$",
                                    "type": "string"
                                  },
                                  "kind": {
                                    "const": "pane"
                                  }
                                },
                                "required": [
                                  "generation",
                                  "kind",
                                  "id"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "truncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "target",
                          "capture_id",
                          "process_generation",
                          "encoding",
                          "row_count",
                          "bytes",
                          "truncated",
                          "history_continuity",
                          "interval",
                          "scope",
                          "mode",
                          "base_capture_id",
                          "reset",
                          "splice",
                          "next_cursor"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "condition": {
                    "const": "screen_contains"
                  },
                  "target": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "generation": {
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "maxLength": 32,
                            "pattern": "^%[0-9]+$",
                            "type": "string"
                          },
                          "kind": {
                            "const": "pane"
                          }
                        },
                        "required": [
                          "generation",
                          "kind",
                          "id"
                        ],
                        "type": "object"
                      }
                    ]
                  }
                },
                "required": [
                  "target",
                  "condition",
                  "capture"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "condition": {
                    "const": "process_exit"
                  },
                  "exit_status": {
                    "const": "unobserved"
                  },
                  "observed_at": {
                    "type": "number"
                  },
                  "process_generation": {
                    "type": "string"
                  },
                  "target": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "generation": {
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "maxLength": 32,
                            "pattern": "^%[0-9]+$",
                            "type": "string"
                          },
                          "kind": {
                            "const": "pane"
                          }
                        },
                        "required": [
                          "generation",
                          "kind",
                          "id"
                        ],
                        "type": "object"
                      }
                    ]
                  }
                },
                "required": [
                  "target",
                  "condition",
                  "process_generation",
                  "observed_at",
                  "exit_status"
                ],
                "type": "object"
              }
            ]
          },
          "ok": {
            "const": true
          }
        },
        "required": [
          "ok",
          "data"
        ],
        "type": "object"
      },
      {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "delivery": {
                "enum": [
                  "not_sent",
                  "possibly_sent",
                  "observed"
                ]
              },
              "effects": {
                "additionalProperties": false,
                "properties": {
                  "created": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^\\$[0-9]+$",
                              "type": "string"
                            },
                            "kind": {
                              "const": "session"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^@[0-9]+$",
                              "type": "string"
                            },
                            "kind": {
                              "const": "window"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^%[0-9]+$",
                              "type": "string"
                            },
                            "kind": {
                              "const": "pane"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^@[0-9]+$",
                              "type": "string"
                            },
                            "index": {
                              "minimum": 0,
                              "type": "integer"
                            },
                            "kind": {
                              "const": "window_link"
                            },
                            "session_id": {
                              "maxLength": 32,
                              "pattern": "^\\$[0-9]+$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id",
                            "session_id",
                            "index"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 3,
                    "type": "array"
                  },
                  "state": {
                    "enum": [
                      "none",
                      "known",
                      "unknown"
                    ]
                  }
                },
                "required": [
                  "state",
                  "created"
                ],
                "type": "object"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "delivery"
            ],
            "type": "object"
          },
          "ok": {
            "const": false
          }
        },
        "required": [
          "ok",
          "error"
        ],
        "type": "object"
      }
    ]
  },
  "annotations": {
    "destructiveHint": false,
    "idempotentHint": false,
    "openWorldHint": false,
    "readOnlyHint": false
  }
}
