Skip to content

Secure, Fast, and Extensible Sandbox runtime for AI agents.

16.4 KB
Raw Blame
// Copyright 2026 The OpenSandbox Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
    "/sandboxes/{sandboxId}/diagnostics/context": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Get diagnostic context
         * @description Retrieve structured context for routing further diagnostics of a sandbox.
         *
         *     `backendType` identifies the implementation that currently owns the
         *     sandbox. `backendIdentifiers` contains implementation-defined identifiers
         *     that may be used to correlate the sandbox with resources in that backend.
         *     Identifier keys are scoped to the backend type and are not defined by this
         *     API. The map may be empty when the backend does not expose additional
         *     identifiers.
         *
         *     This endpoint does not return diagnostic logs or events. Use the dedicated
         *     `logs` and `events` endpoints after resolving the diagnostic context.
         */
        get: {
            parameters: {
                query?: never;
                header?: never;
                path: {
                    /** @description Unique sandbox identifier */
                    sandboxId: components["parameters"]["SandboxId"];
                };
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                /** @description Sandbox diagnostic context */
                200: {
                    headers: {
                        "X-Request-ID": components["headers"]["XRequestId"];
                        [name: string]: unknown;
                    };
                    content: {
                        "application/json": components["schemas"]["DiagnosticContextResponse"];
                    };
                };
                401: components["responses"]["Unauthorized"];
                403: components["responses"]["Forbidden"];
                404: components["responses"]["NotFound"];
                500: components["responses"]["InternalServerError"];
                501: components["responses"]["NotImplemented"];
            };
        };
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/sandboxes/{sandboxId}/diagnostics/logs": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Get diagnostic logs
         * @description Retrieve a best-effort descriptor for sandbox diagnostic log text.
         *
         *     Logs are not limited to a structured observability model. Depending on the
         *     selected `scope` and server configuration, log text may include sandbox
         *     container stdout/stderr, lifecycle diagnostic text, network diagnostic text,
         *     or other implementation-defined diagnostic material.
         *
         *     This endpoint does not provide streaming, pagination, or a stable line-level
         *     schema in this version. The server returns a JSON descriptor for currently
         *     available diagnostic text for the requested scope, subject to
         *     implementation-defined retention and response size limits. The descriptor
         *     either embeds the text as `content` or returns a `contentUrl` where the
         *     text can be downloaded.
         */
        get: {
            parameters: {
                query: {
                    /**
                     * @description Required diagnostic scope selector. Known scopes may include `container`,
                     *     `lifecycle`, `runtime`, `network`, `process`, and `all`. Supported scopes
                     *     are implementation-defined; servers may add new scopes over time.
                     *
                     *     On deployments that still expose the legacy DevOps plain-text behavior on
                     *     this path, requests without `scope` are treated as deprecated legacy
                     *     requests and may return `text/plain` instead of this JSON descriptor.
                     */
                    scope: components["parameters"]["DiagnosticScope"];
                };
                header?: never;
                path: {
                    /** @description Unique sandbox identifier */
                    sandboxId: components["parameters"]["SandboxId"];
                };
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                /** @description Diagnostic log content descriptor */
                200: {
                    headers: {
                        "X-Request-ID": components["headers"]["XRequestId"];
                        [name: string]: unknown;
                    };
                    content: {
                        "application/json": components["schemas"]["DiagnosticContentResponse"];
                    };
                };
                400: components["responses"]["BadRequest"];
                401: components["responses"]["Unauthorized"];
                403: components["responses"]["Forbidden"];
                404: components["responses"]["NotFound"];
                500: components["responses"]["InternalServerError"];
                501: components["responses"]["NotImplemented"];
            };
        };
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/sandboxes/{sandboxId}/diagnostics/events": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Get diagnostic events
         * @description Retrieve a best-effort descriptor for sandbox diagnostic event text.
         *
         *     Events are rendered as diagnostic text rather than exposed as a stable
         *     structured event model. Depending on the selected `scope` and runtime, event
         *     text may include lifecycle transitions, runtime or platform events such as
         *     Kubernetes Events, network diagnostic events, process activity events, or
         *     other implementation-defined event material.
         *
         *     This endpoint does not provide streaming, pagination, or a stable line-level
         *     schema in this version. The server returns a JSON descriptor for currently
         *     available diagnostic event text for the requested scope, subject to
         *     implementation-defined retention and response size limits. The descriptor
         *     either embeds the text as `content` or returns a `contentUrl` where the
         *     text can be downloaded.
         */
        get: {
            parameters: {
                query: {
                    /**
                     * @description Required diagnostic scope selector. Known scopes may include `container`,
                     *     `lifecycle`, `runtime`, `network`, `process`, and `all`. Supported scopes
                     *     are implementation-defined; servers may add new scopes over time.
                     *
                     *     On deployments that still expose the legacy DevOps plain-text behavior on
                     *     this path, requests without `scope` are treated as deprecated legacy
                     *     requests and may return `text/plain` instead of this JSON descriptor.
                     */
                    scope: components["parameters"]["DiagnosticScope"];
                };
                header?: never;
                path: {
                    /** @description Unique sandbox identifier */
                    sandboxId: components["parameters"]["SandboxId"];
                };
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                /** @description Diagnostic event content descriptor */
                200: {
                    headers: {
                        "X-Request-ID": components["headers"]["XRequestId"];
                        [name: string]: unknown;
                    };
                    content: {
                        "application/json": components["schemas"]["DiagnosticContentResponse"];
                    };
                };
                400: components["responses"]["BadRequest"];
                401: components["responses"]["Unauthorized"];
                403: components["responses"]["Forbidden"];
                404: components["responses"]["NotFound"];
                500: components["responses"]["InternalServerError"];
                501: components["responses"]["NotImplemented"];
            };
        };
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        /** @description Structured context for routing sandbox diagnostics. */
        DiagnosticContextResponse: {
            /** @description Unique sandbox identifier accepted by the OpenSandbox API. */
            sandboxId: string;
            /** @description Current OpenSandbox lifecycle state, when available. */
            state?: string;
            /**
             * @description Implementation-defined backend type.
             * @example fast-sandbox
             * @example kubernetes
             * @example docker
             */
            backendType: string;
            /**
             * @description Backend-defined identifiers used to correlate this sandbox with
             *     backend resources. Keys are scoped to `backendType`; values are strings.
             */
            backendIdentifiers: {
                [key: string]: string;
            };
        };
        /**
         * @description Descriptor for diagnostic text content.
         *
         *     When `delivery` is `inline`, servers MUST include `content` with the
         *     diagnostic text and MUST omit `contentUrl` / `expiresAt`.
         *
         *     When `delivery` is `url`, servers MUST include `contentUrl` and `expiresAt`
         *     to identify where the diagnostic text can be downloaded and MUST omit
         *     `content`.
         */
        DiagnosticContentResponse: {
            /** @description Unique sandbox identifier. */
            sandboxId: string;
            /**
             * @description Diagnostic payload kind.
             * @enum {string}
             */
            kind: "logs" | "events";
            /** @description Diagnostic scope used for this response. */
            scope: string;
            /**
             * @description How the diagnostic text payload is delivered.
             * @enum {string}
             */
            delivery: "inline" | "url";
            /**
             * @description Media type of the diagnostic payload.
             * @example text/plain; charset=utf-8
             */
            contentType: string;
            /** @description Inline diagnostic text payload. Present when `delivery` is `inline`. */
            content?: string;
            /**
             * Format: uri
             * @description URL where the diagnostic text payload can be downloaded. Present when `delivery` is `url`.
             */
            contentUrl?: string;
            /** @description Payload size in bytes when known. */
            contentLength?: number;
            /**
             * Format: date-time
             * @description Expiration time for the download URL. Present when `delivery` is `url`.
             */
            expiresAt?: string;
            /**
             * @description Whether the diagnostic payload returned inline or by URL was
             *     intentionally truncated by the server. This does not indicate backend
             *     retention gaps such as expired Kubernetes Events; those should be
             *     reported through `warnings` when available.
             */
            truncated: boolean;
            /** @description Non-fatal warnings about payload completeness or availability. */
            warnings?: string[];
        };
        /**
         * @description Standard error response for all non-2xx HTTP responses.
         *     HTTP status code indicates the error category; code and message provide details.
         */
        ErrorResponse: {
            /** @description Machine-readable error code. */
            code: string;
            /** @description Human-readable error message describing what went wrong. */
            message: string;
        };
    };
    responses: {
        /** @description The request was invalid or malformed */
        BadRequest: {
            headers: {
                "X-Request-ID": components["headers"]["XRequestId"];
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["ErrorResponse"];
            };
        };
        /** @description Authentication credentials are missing or invalid */
        Unauthorized: {
            headers: {
                "X-Request-ID": components["headers"]["XRequestId"];
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["ErrorResponse"];
            };
        };
        /** @description The authenticated user lacks permission for this operation */
        Forbidden: {
            headers: {
                "X-Request-ID": components["headers"]["XRequestId"];
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["ErrorResponse"];
            };
        };
        /** @description The requested sandbox does not exist */
        NotFound: {
            headers: {
                "X-Request-ID": components["headers"]["XRequestId"];
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["ErrorResponse"];
            };
        };
        /** @description An unexpected server error occurred */
        InternalServerError: {
            headers: {
                "X-Request-ID": components["headers"]["XRequestId"];
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["ErrorResponse"];
            };
        };
        /** @description The stable Diagnostics API is not implemented by this server */
        NotImplemented: {
            headers: {
                "X-Request-ID": components["headers"]["XRequestId"];
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["ErrorResponse"];
            };
        };
    };
    parameters: {
        /** @description Unique sandbox identifier */
        SandboxId: string;
        /**
         * @description Required diagnostic scope selector. Known scopes may include `container`,
         *     `lifecycle`, `runtime`, `network`, `process`, and `all`. Supported scopes
         *     are implementation-defined; servers may add new scopes over time.
         *
         *     On deployments that still expose the legacy DevOps plain-text behavior on
         *     this path, requests without `scope` are treated as deprecated legacy
         *     requests and may return `text/plain` instead of this JSON descriptor.
         */
        DiagnosticScope: string;
    };
    requestBodies: never;
    headers: {
        /** @description Unique request identifier for tracing */
        XRequestId: string;
    };
    pathItems: never;
}
export type $defs = Record<string, never>;
export type operations = Record<string, never>;