{
  "opencollection": "1.0.0",
  "info": {
    "name": "Runloop agents Devbox-ShellTools API",
    "version": "0.1"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Devbox-ShellTools",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create or reconnect to a PTY session.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.runloop.ai/pty/:session_name",
            "params": [
              {
                "name": "session_name",
                "value": "",
                "type": "path",
                "description": "The client-chosen PTY session name. Must be 1..=256 ASCII letters, digits, '-' and '_'. Reusing the same name reconnects to the same logical PTY session when it is still available."
              },
              {
                "name": "cols",
                "value": "",
                "type": "query",
                "description": "Optional initial terminal width in character cells (1..=1000). Defaults to 80 when omitted. Applied only if both cols and rows are provided; otherwise ignored."
              },
              {
                "name": "rows",
                "value": "",
                "type": "query",
                "description": "Optional initial terminal height in character cells (1..=1000). Defaults to 24 when omitted. Applied only if both cols and rows are provided; otherwise ignored."
              }
            ]
          },
          "docs": "Looks up the PTY session identified by the path session_name and either reconnects to the existing session or creates it if it does not yet exist. The session_name is a client-chosen session identifier, not an opaque server-issued ID. It must be non-empty (1..=256 chars) and use only ASCII letters, digits, '-' and '_'. A newly created PTY session starts an interactive bash shell on the Devbox. Optional cols and rows query parameters apply an initial terminal size before any I/O; they must both b"
        },
        {
          "info": {
            "name": "Send a control command to a PTY session.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.runloop.ai/pty/:session_name/control",
            "params": [
              {
                "name": "session_name",
                "value": "",
                "type": "path",
                "description": "The client-chosen PTY session name. Must be 1..=256 ASCII letters, digits, '-' and '_'."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Applies a PTY control operation to an existing session. The action field selects the operation; the other fields in PtyControlParameters are interpreted only when they are relevant to the chosen action.\n\nresize: cols and rows are required and must each be in 1..=1000. A 0 or out-of-range value returns 400. The new winsize is applied to the PTY master and the kernel delivers SIGWINCH to the foreground process group.\n\nsignal: signal is the POSIX signal name (for example 'SIGTERM', 'SIGHUP', 'SIGIN"
        },
        {
          "info": {
            "name": "Get status of an asynchronous execution on a Devbox.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.runloop.ai/v1/devboxes/:devbox_id/executions/:execution_id",
            "params": [
              {
                "name": "devbox_id",
                "value": "",
                "type": "path",
                "description": "The Devbox ID"
              },
              {
                "name": "execution_id",
                "value": "",
                "type": "path",
                "description": "The Execution ID"
              },
              {
                "name": "last_n",
                "value": "",
                "type": "query",
                "description": "Last n lines of standard error / standard out to return (default: 100)"
              }
            ]
          },
          "docs": "Get the latest status of a previously launched asynchronous execuction including stdout/error and the exit code if complete."
        },
        {
          "info": {
            "name": "Kill an asynchronous execution currently running on a devbox",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.runloop.ai/v1/devboxes/:devbox_id/executions/:execution_id/kill",
            "params": [
              {
                "name": "devbox_id",
                "value": "",
                "type": "path",
                "description": "The Devbox ID."
              },
              {
                "name": "execution_id",
                "value": "",
                "type": "path",
                "description": "The Async Execution ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Kill a previously launched asynchronous execution if it is still running by killing the launched process. Optionally kill the entire process group."
        },
        {
          "info": {
            "name": "Send Content to Std In for a running execution.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.runloop.ai/v1/devboxes/:devbox_id/executions/:execution_id/send_std_in",
            "params": [
              {
                "name": "devbox_id",
                "value": "",
                "type": "path",
                "description": "The Devbox ID."
              },
              {
                "name": "execution_id",
                "value": "",
                "type": "path",
                "description": "The Async Execution ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Send content to the Std In of a running execution."
        },
        {
          "info": {
            "name": "Wait for an asynchronous execution to reach a specific status.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.runloop.ai/v1/devboxes/:devbox_id/executions/:execution_id/wait_for_status",
            "params": [
              {
                "name": "devbox_id",
                "value": "",
                "type": "path",
                "description": "The Devbox ID."
              },
              {
                "name": "execution_id",
                "value": "",
                "type": "path",
                "description": "The Async Execution ID."
              },
              {
                "name": "last_n",
                "value": "",
                "type": "query",
                "description": "Last n lines of standard error / standard out to return (default: 100)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Polls the asynchronous execution's status until it reaches one of the desired statuses or times out. Max is 25 seconds."
        },
        {
          "info": {
            "name": "Execute a command with a known ID, optimistically waiting for completion",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.runloop.ai/v1/devboxes/:id/execute",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The Devbox ID."
              },
              {
                "name": "last_n",
                "value": "",
                "type": "query",
                "description": "Last n lines of standard error / standard out to return (default: 100)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Execute a command with a known command ID on a devbox, optimistically waiting for it to complete within the specified timeout. If it completes in time, return the result. If not, return a status indicating the command is still running. Note: attach_stdin parameter is not supported; use execute_async for stdin support."
        },
        {
          "info": {
            "name": "Asynchronously execute a command via the Devbox shell",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.runloop.ai/v1/devboxes/:id/execute_async",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The Devbox ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Execute the given command in the Devbox shell asynchronously and returns the execution that can be used to track the command's progress."
        },
        {
          "info": {
            "name": "(Deprecated, please use /execute_async) Synchronously execute a shell command on a Devbox",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.runloop.ai/v1/devboxes/:id/execute_sync",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The Devbox ID."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Execute a bash command in the Devbox shell, await the command completion and return the output. Note: attach_stdin parameter is not supported for synchronous execution."
        }
      ]
    }
  ],
  "bundled": true
}