Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmux_run

Ruby
  • Python Unavailable
  • Ruby
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

Run an authored POSIX script in an explicitly enrolled idle, empty zsh 5.9 editor. Opt-in; no terminal injection. Exact queue authorization binds the existing shell generation; execution may follow a later pane replacement without retargeting it. Inherits cwd/exported environment, closed stdin, separate bounded UTF-8/base64 outputs. Defaults: 65536 bytes per output, 65536 script bytes; overflow refuses completion. Reports native exit/signal only from the helper; cancellation never proves descendants stopped.

Policy: opt in with --enable-tool tmux_run.

All Ruby tools · JSON · Source

Arguments

script required · string
See the schema for this argument’s constraints.
stderr_limit optional · integer
See the schema for this argument’s constraints.
stdout_limit optional · integer
See the schema for this argument’s constraints.
target required
See the schema for this argument’s constraints.

Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"script": {
"maxLength": 65536,
"pattern": "^[^\\u0000]*$",
"type": "string"
},
"stderr_limit": {
"maximum": 262144,
"minimum": 0,
"type": "integer"
},
"stdout_limit": {
"maximum": 262144,
"minimum": 0,
"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"
}
]
}
},
"required": [
"target",
"script"
],
"type": "object"
}
Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"authorization": {
"additionalProperties": false,
"properties": {
"enrollment_generation": {
"maxLength": 32,
"pattern": "^[a-f0-9]{32}$",
"type": "string"
},
"pane_id": {
"maxLength": 32,
"pattern": "^%[0-9]+$",
"type": "string"
},
"process_generation": {
"maxLength": 32,
"pattern": "^[a-f0-9]{32}$",
"type": "string"
},
"run_id": {
"maxLength": 32,
"pattern": "^[a-f0-9]{32}$",
"type": "string"
},
"script_digest": {
"maxLength": 64,
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"server_generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"state": {
"const": "authorized"
}
},
"required": [
"state",
"run_id",
"script_digest",
"server_generation",
"pane_id",
"enrollment_generation",
"process_generation"
],
"type": "object"
},
"completion": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"exit_status": {
"maximum": 255,
"minimum": 0,
"type": "integer"
},
"signal": {
"type": "null"
},
"state": {
"const": "exited"
}
},
"required": [
"state",
"exit_status",
"signal"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"exit_status": {
"type": "null"
},
"signal": {
"maximum": 255,
"minimum": 1,
"type": "integer"
},
"state": {
"const": "signaled"
}
},
"required": [
"state",
"exit_status",
"signal"
],
"type": "object"
}
]
},
"stderr": {
"additionalProperties": false,
"properties": {
"bytes": {
"maximum": 262144,
"minimum": 0,
"type": "integer"
},
"data": {
"maxLength": 349528,
"type": "string"
},
"encoding": {
"enum": [
"utf-8",
"base64"
]
},
"truncated": {
"const": false
}
},
"required": [
"encoding",
"data",
"bytes",
"truncated"
],
"type": "object"
},
"stdout": {
"additionalProperties": false,
"properties": {
"bytes": {
"maximum": 262144,
"minimum": 0,
"type": "integer"
},
"data": {
"maxLength": 349528,
"type": "string"
},
"encoding": {
"enum": [
"utf-8",
"base64"
]
},
"truncated": {
"const": false
}
},
"required": [
"encoding",
"data",
"bytes",
"truncated"
],
"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"
}
]
}
},
"required": [
"target",
"authorization",
"completion",
"stdout",
"stderr"
],
"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": {
"authorization": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"enrollment_generation": {
"maxLength": 32,
"pattern": "^[a-f0-9]{32}$",
"type": "string"
},
"pane_id": {
"maxLength": 32,
"pattern": "^%[0-9]+$",
"type": "string"
},
"process_generation": {
"maxLength": 32,
"pattern": "^[a-f0-9]{32}$",
"type": "string"
},
"run_id": {
"maxLength": 32,
"pattern": "^[a-f0-9]{32}$",
"type": "string"
},
"script_digest": {
"maxLength": 64,
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"server_generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"state": {
"const": "authorized"
}
},
"required": [
"state",
"run_id",
"script_digest",
"server_generation",
"pane_id",
"enrollment_generation",
"process_generation"
],
"type": "object"
},
{
"type": "null"
}
]
},
"completion": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"state": {
"const": "unobserved"
}
},
"required": [
"state"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"exit_status": {
"maximum": 255,
"minimum": 0,
"type": "integer"
},
"signal": {
"type": "null"
},
"state": {
"const": "exited"
}
},
"required": [
"state",
"exit_status",
"signal"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"exit_status": {
"type": "null"
},
"signal": {
"maximum": 255,
"minimum": 1,
"type": "integer"
},
"state": {
"const": "signaled"
}
},
"required": [
"state",
"exit_status",
"signal"
],
"type": "object"
}
]
},
"state": {
"enum": [
"none",
"known",
"unknown"
]
}
},
"required": [
"state",
"authorization",
"completion"
],
"type": "object"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message",
"delivery"
],
"type": "object"
},
"ok": {
"const": false
}
},
"required": [
"ok",
"error"
],
"type": "object"
}
]
}
Tool annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": false,
"readOnlyHint": false
}
Esc

Type to search.